SetMapTitleCommand.h header

#include <ew/core/SetMapTitleCommand.h>

Namespace ew::core

SetMapTitleCommand class

class ew::core::SetMapTitleCommand

Command that renames a map. Undo restores the previous title and redo re-applies the new one.

Members

ew::core::SetMapTitleCommand::SetMapTitleCommand(Map &map, QString title)

Creates a command that sets map's title to title when applied.

ew::core::SetMapTitleCommand::~SetMapTitleCommand() override

Destroys the command.

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

Records the map's current title and applies the new one.

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

Restores the previous title.

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

Returns a short description for the undo/redo UI.