SetPinnedCommand.h header

#include <ew/core/SetPinnedCommand.h>

Namespace ew::core

SetPinnedCommand class

class ew::core::SetPinnedCommand

Command that pins or unpins an object as a favorite. Undo restores the previous pinned state and redo re-applies the new one.

Members

ew::core::SetPinnedCommand::SetPinnedCommand(Project &project, ContentId id, bool pinned)

Creates a command that sets object id's pinned state to pinned when applied.

ew::core::SetPinnedCommand::~SetPinnedCommand() override

Destroys the command.

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

Records the current pinned state and applies the new one.

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

Restores the previous pinned state.

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

Returns a short description for the undo/redo UI.