diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-05-22 06:05:31 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-05-22 06:05:31 +0000 |
| commit | a4eabe00d6c32d0d15d77362428fb2d05a0ec0d7 (patch) | |
| tree | efa01b3be952c8b32b381e019803f1e1e6c4afbd /pokemodr/commands/RandomizeFlagCommand.cpp | |
| parent | c2d90a8019125dc260db1882ebc292e4e52f3969 (diff) | |
| download | sigen-a4eabe00d6c32d0d15d77362428fb2d05a0ec0d7.tar.gz sigen-a4eabe00d6c32d0d15d77362428fb2d05a0ec0d7.tar.xz sigen-a4eabe00d6c32d0d15d77362428fb2d05a0ec0d7.zip | |
[ADD] New Dialog widgets
[FIX] FlipFlag was misnamed
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@163 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/commands/RandomizeFlagCommand.cpp')
| -rw-r--r-- | pokemodr/commands/RandomizeFlagCommand.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pokemodr/commands/RandomizeFlagCommand.cpp b/pokemodr/commands/RandomizeFlagCommand.cpp new file mode 100644 index 00000000..4bea5f1a --- /dev/null +++ b/pokemodr/commands/RandomizeFlagCommand.cpp @@ -0,0 +1,44 @@ +/* + * Copyright 2008 Ben Boeckel <MathStuf@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +// Header include +#include "RandomizeFlagCommand.h" + +// Pokemod includes +#include "../../pokemod/Dialog.h" + +// Qt includes +#include <QHBoxLayout> +#include <QVBoxLayout> + +RandomizeFlagCommand::RandomizeFlagCommand(const Pokemod * pokemod, const int command) : + CommandWidget(pokemod, command) +{ + QVBoxLayout* vboxLayout = new QVBoxLayout(this); + QHBoxLayout* hboxLayout = new QHBoxLayout; + boxFlag = new QGroupBox("Flag to randomize"); + varFlag = new KIntNumInput(); + varFlag->setRange(0, INT_MAX); + hboxLayout->addWidget(varFlag); + boxFlag->setLayout(hboxLayout); + vboxLayout->addWidget(boxFlag); +} + +QString RandomizeFlagCommand::commandString() const +{ + return QString("@%1#%2@").arg(Dialog::CommandAbbrStr[m_command]).arg(varFlag->value()); +} |
