SetTaskTargetCommand.h header

#include <ew/core/SetTaskTargetCommand.h>

Namespace ew::core

SetTaskTargetCommand class

class ew::core::SetTaskTargetCommand

Command that sets the object a task is about (a null id unlinks it). Undo restores the previous target and redo re-applies the new one.

Members

ew::core::SetTaskTargetCommand::SetTaskTargetCommand(Task &task, ContentId targetId)

Creates a command that sets task's target to targetId when applied.

ew::core::SetTaskTargetCommand::~SetTaskTargetCommand() override

Destroys the command.

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

Records the current target and sets the new one.

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

Restores the previous target.

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

Returns a short description for the undo/redo UI.