SetCanonWritesCommand.h header
#include <ew/core/branching/SetCanonWritesCommand.h>
Namespace ew::core::branching
SetCanonWritesCommand class
class ew::core::branching::SetCanonWritesCommand
Command that decides whether a conversation may write entity properties. Undo restores the previous answer.
Undoable like every other project setting, and worth being undoable: turning this ON is what promotes every canon-writing effect in the project from an error to a permitted change, so turning it off again has to be one step rather than a hunt.
Members
ew::core::branching::SetCanonWritesCommand::SetCanonWritesCommand(ew::core::project::Project &project, bool allowed)
Creates a command that sets the answer to allowed when applied.
ew::core::branching::SetCanonWritesCommand::~SetCanonWritesCommand() override
Destroys the command.
void ew::core::branching::SetCanonWritesCommand::apply() override
Records the current answer and applies the new one.
void ew::core::branching::SetCanonWritesCommand::undo() override
Restores the previous answer.
QString ew::core::branching::SetCanonWritesCommand::description() const override
Returns a short description for the undo/redo UI.
ew::core::foundation::OperationSubject ew::core::branching::SetCanonWritesCommand::subject() const override
Returns the subject this command changes. See Command::subject().