SetTimelineErasCommand.h header

#include <ew/core/SetTimelineErasCommand.h>

Namespace ew::core

SetTimelineErasCommand class

class ew::core::SetTimelineErasCommand

Replaces the project's timeline-era registry (TL-18) as one undoable step: apply swaps in the new list after snapshotting the previous one, undo restores it. Mirrors SetContinuityRulesCommand – the whole set is edited at once by the Manage Eras dialog.

Members

ew::core::SetTimelineErasCommand::SetTimelineErasCommand(Project &project, std::vector< TimelineEra > eras)

Creates a command that sets project's timeline eras to eras when applied.

ew::core::SetTimelineErasCommand::~SetTimelineErasCommand() override

Destroys the command.

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

Applies the change; also used to re-apply the command on redo.

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

Reverses the change previously applied by apply().

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

Short, human-readable description for the undo/redo UI (e.g. "Add character").