RenameCategoryCommand.h header
#include <ew/core/RenameCategoryCommand.h>
Namespace ew::core
RenameCategoryCommand class
class ew::core::RenameCategoryCommand
Command that sets a category's name. Undo restores the previous name and redo re-applies the new one.
Members
ew::core::RenameCategoryCommand::RenameCategoryCommand(Taxonomy &taxonomy, CategoryId id, QString name)
Creates a command that renames the category id in taxonomy to name.
ew::core::RenameCategoryCommand::~RenameCategoryCommand() override
Destroys the command.
void ew::core::RenameCategoryCommand::apply() override
Records the current name and sets the new one.
void ew::core::RenameCategoryCommand::undo() override
Restores the previous name.
QString ew::core::RenameCategoryCommand::description() const override
Returns a short description for the undo/redo UI.