SetLanguageSoundChangesCommand.h header

#include <ew/core/SetLanguageSoundChangesCommand.h>

Namespace ew::core

SetLanguageSoundChangesCommand class

class ew::core::SetLanguageSoundChangesCommand

Command that replaces a language's sound-change rulesets (its diachronic evolution rules) in one undoable step – the finer-grained counterpart to SetLanguageCommand for the sound-change sub-editor, so editing a ruleset does not snapshot the whole language payload on every change. Undo restores the previous rulesets; redo re-applies the new ones.

Members

ew::core::SetLanguageSoundChangesCommand::SetLanguageSoundChangesCommand(Language &language, std::vector< SoundChangeRuleset > rulesets)

Creates a command that, when applied, replaces language's rulesets with rulesets.

ew::core::SetLanguageSoundChangesCommand::~SetLanguageSoundChangesCommand() override

Destroys the command.

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

Records the language's current rulesets and applies the new ones.

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

Restores the previous rulesets.

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

Returns a short description for the undo/redo UI.