SetDocumentTargetCommand.h header

#include <ew/core/SetDocumentTargetCommand.h>

Namespace ew::core

SetDocumentTargetCommand class

class ew::core::SetDocumentTargetCommand

Command that sets a document's word-count target (0 means no target). Undo restores the previous target and redo re-applies the new one.

Members

ew::core::SetDocumentTargetCommand::SetDocumentTargetCommand(Document &document, int target)

Creates a command that sets document's word-count target to target when applied.

ew::core::SetDocumentTargetCommand::~SetDocumentTargetCommand() override

Destroys the command.

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

Records the current target and sets the new one.

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

Restores the previous target.

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

Returns a short description for the undo/redo UI.