SetSpreadsheetSizesCommand.h header

#include <ew/core/SetSpreadsheetSizesCommand.h>

Namespace ew::core

SetSpreadsheetSizesCommand class

class ew::core::SetSpreadsheetSizesCommand

Command that replaces a spreadsheet's custom column widths and row heights at once – the unit of one interactive resize gesture. Undo restores the previous widths and heights.

Members

ew::core::SetSpreadsheetSizesCommand::SetSpreadsheetSizesCommand(Spreadsheet &sheet, std::map< int, int > columnWidths, std::map< int, int > rowHeights)

Creates a command that sets sheet's custom column widths and row heights (keyed by zero-based index; only non-default entries).

ew::core::SetSpreadsheetSizesCommand::~SetSpreadsheetSizesCommand() override

Destroys the command.

void ew::core::SetSpreadsheetSizesCommand::apply() override

Records the sheet's current sizes and applies the new ones.

void ew::core::SetSpreadsheetSizesCommand::undo() override

Restores the previous sizes.

QString ew::core::SetSpreadsheetSizesCommand::description() const override

Returns a short description for the undo/redo UI.