SetSpreadsheetCellCommand.h header

#include <ew/core/SetSpreadsheetCellCommand.h>

Namespace ew::core

SetSpreadsheetCellCommand class

class ew::core::SetSpreadsheetCellCommand

Command that sets one spreadsheet cell's raw text (a literal or a formula). Undo restores the cell's previous text.

Members

ew::core::SetSpreadsheetCellCommand::SetSpreadsheetCellCommand(Spreadsheet &spreadsheet, int row, int column, QString text)

Creates a command that sets the cell at (row, column) of spreadsheet to text when applied.

ew::core::SetSpreadsheetCellCommand::~SetSpreadsheetCellCommand() override

Destroys the command.

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

Records the cell's previous text and sets the new text.

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

Restores the cell's previous text.

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

Returns a short description for the undo/redo UI.