SetCellFormatsCommand.h header
#include <ew/core/SetCellFormatsCommand.h>
Namespace ew::core
SetCellFormatsCommand class
class ew::core::SetCellFormatsCommand
Command that sets the formatting of a batch of cells at once – the unit of a formatting toolbar action over a selection. Each entry gives a cell's target format; apply records each cell's previous format so undo restores it exactly.
Members
ew::core::SetCellFormatsCommand::SetCellFormatsCommand(Spreadsheet &sheet, std::vector< SpreadsheetCellFormat > formats, QString description)
Creates a command that applies formats (one target format per cell) to sheet, labelled description in the undo/redo UI. Cells should be distinct.
ew::core::SetCellFormatsCommand::~SetCellFormatsCommand() override
Destroys the command.
void ew::core::SetCellFormatsCommand::apply() override
Records each cell's current format and applies the new ones.
void ew::core::SetCellFormatsCommand::undo() override
Restores each cell's previous format.
QString ew::core::SetCellFormatsCommand::description() const override
Returns the caller-provided description for the undo/redo UI.