SetWritingGoalCommand.h header

#include <ew/core/SetWritingGoalCommand.h>

Namespace ew::core

SetWritingGoalCommand class

class ew::core::SetWritingGoalCommand

Command that replaces a project's writing goals (daily target, manuscript target, deadline) with a new set. Undo restores the previous goals and redo re-applies the new ones. Routing goal edits through the command stack makes them undoable and marks the workspace modified so the change is autosaved.

Members

ew::core::SetWritingGoalCommand::SetWritingGoalCommand(Project &project, WritingGoal goal)

Creates a command that sets project's writing goals to goal when applied.

ew::core::SetWritingGoalCommand::~SetWritingGoalCommand() override

Destroys the command.

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

Records the current goals and installs the new ones.

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

Restores the previous goals.

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

Returns a short description for the undo/redo UI.