SetCalendarCommand.h header

#include <ew/core/SetCalendarCommand.h>

Namespace ew::core

SetCalendarCommand class

class ew::core::SetCalendarCommand

Command that replaces the project's calendar (its months, weekdays, and era name). Undo restores the previous calendar and redo re-applies the new one.

Members

ew::core::SetCalendarCommand::SetCalendarCommand(Project &project, Calendar calendar)

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

ew::core::SetCalendarCommand::~SetCalendarCommand() override

Destroys the command.

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

Records the project's current calendar and applies the new one.

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

Restores the previous calendar.

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

Returns a short description for the undo/redo UI.