SetStatBlockCommand.h header

#include <ew/core/SetStatBlockCommand.h>

Namespace ew::core

SetStatBlockCommand class

class ew::core::SetStatBlockCommand

Command that replaces a stat block's editable state – its title, system label, statistics, actions, and notes – as produced by editing a block in the tools UI. Undo restores the previous state; redo re-applies the new one.

Members

ew::core::SetStatBlockCommand::SetStatBlockCommand(StatBlock &block, QString title, QString system, std::vector< StatEntry > stats, std::vector< StatBlockAction > actions, QString notes)

Creates a command that, when applied, sets block's fields to the given values.

ew::core::SetStatBlockCommand::~SetStatBlockCommand() override

Destroys the command.

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

Records the block's current state and applies the new one.

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

Restores the previous state.

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

Returns a short description for the undo/redo UI.