SetLanguageGrammarCommand.h header

#include <ew/core/SetLanguageGrammarCommand.h>

Namespace ew::core

SetLanguageGrammarCommand class

class ew::core::SetLanguageGrammarCommand

Command that replaces a language's structured grammar (typology, word order, inflection paradigms, pronouns, and number system) in one undoable step – the finer-grained counterpart to SetLanguageCommand for the grammar sub-editor, so editing a paradigm does not snapshot the whole language payload on every change. Undo restores the previous grammar; redo re-applies it.

Members

ew::core::SetLanguageGrammarCommand::SetLanguageGrammarCommand(Language &language, Grammar grammar)

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

ew::core::SetLanguageGrammarCommand::~SetLanguageGrammarCommand() override

Destroys the command.

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

Records the language's current grammar and applies the new one.

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

Restores the previous grammar.

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

Returns a short description for the undo/redo UI.