SetWorkflowStatusesCommand.h header

#include <ew/core/workflow/SetWorkflowStatusesCommand.h>

Namespace ew::core::workflow

SetWorkflowStatusesCommand class

class ew::core::workflow::SetWorkflowStatusesCommand

Command that replaces the project's review-state vocabulary. Undo restores the previous one.

Whole-vocabulary rather than per-status, for the reason SetLineBudgetsCommand beside it is: nothing else is in play when a panel edits a project-wide registry, so the tempting shortcut is to call the setter directly – which compiles, works, and silently makes the edit un-undoable.

Members

ew::core::workflow::SetWorkflowStatusesCommand::SetWorkflowStatusesCommand(ew::core::project::Project &project, WorkflowStatuses statuses)

Creates a command that sets the vocabulary to statuses when applied.

ew::core::workflow::SetWorkflowStatusesCommand::~SetWorkflowStatusesCommand() override

Destroys the command.

void ew::core::workflow::SetWorkflowStatusesCommand::apply() override

Records the current vocabulary and applies the new one.

void ew::core::workflow::SetWorkflowStatusesCommand::undo() override

Restores the previous vocabulary.

QString ew::core::workflow::SetWorkflowStatusesCommand::description() const override

Returns a short description for the undo/redo UI.

ew::core::foundation::OperationSubject ew::core::workflow::SetWorkflowStatusesCommand::subject() const override

Returns the subject this command changes. See Command::subject().