AddFieldCommand.h header
#include <ew/core/AddFieldCommand.h>
Namespace ew::core
AddFieldCommand class
class ew::core::AddFieldCommand
Command that adds a field definition to a taxonomy category. Undo restores the category's previous state for that key – removing the field if it was new, or restoring the prior definition if this replaced one.
Members
ew::core::AddFieldCommand::AddFieldCommand(Taxonomy &taxonomy, CategoryId categoryId, FieldDefinition field)
Creates a command that adds field to the category categoryId in taxonomy when applied.
ew::core::AddFieldCommand::~AddFieldCommand() override
Destroys the command.
void ew::core::AddFieldCommand::apply() override
Records any field previously stored under the same key and adds the new field.
void ew::core::AddFieldCommand::undo() override
Restores the previous field for the key, or removes the field if it was new.
QString ew::core::AddFieldCommand::description() const override
Returns a short description for the undo/redo UI.