summaryrefslogtreecommitdiff
path: root/src/gui/windows/textcommandeditor.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-16 20:39:21 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-16 20:39:21 +0300
commitdb82bf99bbd6d246f3e8da19fe88705f7015f144 (patch)
tree3fdd7e569c428b611ddaa80f59ff93da4ade1ed0 /src/gui/windows/textcommandeditor.cpp
parent11000f010f19a2de85ba26660b451c7c41ab3a97 (diff)
downloadmanaverse-db82bf99bbd6d246f3e8da19fe88705f7015f144.tar.gz
manaverse-db82bf99bbd6d246f3e8da19fe88705f7015f144.tar.bz2
manaverse-db82bf99bbd6d246f3e8da19fe88705f7015f144.tar.xz
manaverse-db82bf99bbd6d246f3e8da19fe88705f7015f144.zip
Move TextCommandType enum into separate file and convert to strong typed.
Diffstat (limited to 'src/gui/windows/textcommandeditor.cpp')
-rw-r--r--src/gui/windows/textcommandeditor.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp
index 32cc0959f..115a3bace 100644
--- a/src/gui/windows/textcommandeditor.cpp
+++ b/src/gui/windows/textcommandeditor.cpp
@@ -47,7 +47,8 @@ TextCommandEditor::TextCommandEditor(TextCommand *const command) :
Window(_("Command Editor"), Modal_false, nullptr, "commandeditor.xml"),
ActionListener(),
mIsMagicCommand(command ?
- (command->getCommandType() == TEXT_COMMAND_MAGIC) : false),
+ (command->getCommandType() == TextCommandType::Magic) :
+ false),
mCommand(command),
// TRANSLATORS: command editor button
mIsMagic(new RadioButton(this, _("magic"), "magic", mIsMagicCommand)),
@@ -131,7 +132,7 @@ TextCommandEditor::TextCommandEditor(TextCommand *const command) :
if (command)
{
- if (command->getCommandType() == TEXT_COMMAND_MAGIC)
+ if (command->getCommandType() == TextCommandType::Magic)
showControls(Visible_true);
else
showControls(Visible_false);
@@ -252,9 +253,9 @@ void TextCommandEditor::scheduleDelete()
void TextCommandEditor::save()
{
if (mIsMagicCommand)
- mCommand->setCommandType(TEXT_COMMAND_MAGIC);
+ mCommand->setCommandType(TextCommandType::Magic);
else
- mCommand->setCommandType(TEXT_COMMAND_TEXT);
+ mCommand->setCommandType(TextCommandType::Text);
mCommand->setSymbol(mSymbolTextField->getText());
mCommand->setCommand(mCommandTextField->getText());
@@ -273,7 +274,7 @@ void TextCommandEditor::save()
void TextCommandEditor::deleteCommand()
{
- mCommand->setCommandType(TEXT_COMMAND_TEXT);
+ mCommand->setCommandType(TextCommandType::Text);
mCommand->setSymbol("");
mCommand->setCommand("");
mCommand->setComment("");