SetRandomTableCommand.h header
#include <ew/core/SetRandomTableCommand.h>
Namespace ew::core
SetRandomTableCommand class
class ew::core::SetRandomTableCommand
Command that replaces a random table's editable state – its title and its list of weighted entries – as produced by editing a table in the tools UI. Undo restores the previous title and entries; redo re-applies the new ones.
Members
ew::core::SetRandomTableCommand::SetRandomTableCommand(RandomTable &table, QString title, std::vector< RandomTableEntry > entries)
Creates a command that, when applied, sets table's title to title and its entries to entries.
ew::core::SetRandomTableCommand::~SetRandomTableCommand() override
Destroys the command.
void ew::core::SetRandomTableCommand::apply() override
Records the table's current title and entries and applies the new ones.
void ew::core::SetRandomTableCommand::undo() override
Restores the previous title and entries.
QString ew::core::SetRandomTableCommand::description() const override
Returns a short description for the undo/redo UI.