SetTimelineDescriptionCommand.h header
#include <ew/core/SetTimelineDescriptionCommand.h>
Namespace ew::core
SetTimelineDescriptionCommand class
class ew::core::SetTimelineDescriptionCommand
Command that changes a timeline's description. Undo restores the previous description and redo re-applies the new one.
The field was persisted, loaded and shown from the moment Timeline had it, and nothing could change it: there was a setter and no command, so no undoable edit could reach it. Anything that rewrites project text – a project-wide find and replace, an import, a script – needs one.
Members
ew::core::timeline::SetTimelineDescriptionCommand::SetTimelineDescriptionCommand(Timeline &timeline, QString description)
Creates a command that sets timeline's description to description when applied.
ew::core::timeline::SetTimelineDescriptionCommand::~SetTimelineDescriptionCommand() override
Destroys the command.
void ew::core::timeline::SetTimelineDescriptionCommand::apply() override
Records the timeline's current description and applies the new one.
void ew::core::timeline::SetTimelineDescriptionCommand::undo() override
Restores the previous description.
QString ew::core::timeline::SetTimelineDescriptionCommand::description() const override
Returns a short description for the undo/redo UI.
ew::core::foundation::OperationSubject ew::core::timeline::SetTimelineDescriptionCommand::subject() const override
Returns the subject this command changes. See Command::subject().