genericcommand.h
Go to the documentation of this file.
18 std::function<void(interfaces::IEditorModel*)> undo, const QString &name, const bool save = false)
Definition: genericcommand.h:13
void execute() const override
Execute the command.
Definition: genericcommand.h:22
bool isSave() const override
Is the command is in a save state.
Definition: genericcommand.h:35
GenericCommand(interfaces::IEditorModel *model, std::function< void(interfaces::IEditorModel *)> dofunc, std::function< void(interfaces::IEditorModel *)> undo, const QString &name, const bool save=false)
Definition: genericcommand.h:15
Definition: command.h:11
std::function< void(interfaces::IEditorModel *)> m_undo
Definition: genericcommand.h:40
void executeSave() override
Save current state of the command for the reverse unExcute()
Definition: genericcommand.h:26
Definition: api.h:13
interfaces::IEditorModel * m_model
Definition: genericcommand.h:38
void unExcute() const override
Reverse the execute() function.
Definition: genericcommand.h:30
QString infos() const override
Get display info for this command.
Definition: genericcommand.h:34
Definition: ieditormodel.h:11
const QString & name() const
Get the command name.
Definition: command.cpp:34
std::function< void(interfaces::IEditorModel *)> m_dofunc
Definition: genericcommand.h:39