diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-05-23 19:17:53 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-05-23 19:17:53 +0000 |
| commit | 793f2e539316e796968103617025320870f8c3ce (patch) | |
| tree | f702d6498d3c0841b05a07bc129d34a12b09625e /pokemodr/models/DialogGroupModel.cpp | |
| parent | c07a81f2656d1168e7124f0b7281a4e38128926b (diff) | |
| download | sigen-793f2e539316e796968103617025320870f8c3ce.tar.gz sigen-793f2e539316e796968103617025320870f8c3ce.tar.xz sigen-793f2e539316e796968103617025320870f8c3ce.zip | |
[DEL] Cleaned out unneeded files
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@167 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/models/DialogGroupModel.cpp')
| -rw-r--r-- | pokemodr/models/DialogGroupModel.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/pokemodr/models/DialogGroupModel.cpp b/pokemodr/models/DialogGroupModel.cpp deleted file mode 100644 index 1eeeb4be..00000000 --- a/pokemodr/models/DialogGroupModel.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 "DialogGroupModel.h" - -// Model includes -#include "DialogModel.h" - -// Pokemod includes -#include "../../pokemod/Pokemod.h" - -DialogGroupModel::DialogGroupModel(BaseModel* parent, Pokemod* pokemod) : - GroupModel(parent, pokemod, "Dialogs") -{ - setupData(); -} - -DialogGroupModel::~DialogGroupModel() -{ -} - -bool DialogGroupModel::insertRows(const int rows) -{ - for (int i = 0; i < rows; ++i) - m_objects.append(new DialogModel(this, static_cast<Pokemod*>(m_object)->newDialog())); - return true; -} - -bool DialogGroupModel::removeRows(const int position, const int rows) -{ - for (int i = 0; i < rows; ++i) - { - static_cast<Pokemod*>(m_object)->deleteDialog(position); - delete m_objects[position]; - m_objects.removeAt(position); - } - return true; -} - -void DialogGroupModel::setupData() -{ - Pokemod* pokemod = static_cast<Pokemod*>(m_object); - for (int i = 0; i < pokemod->dialogCount(); ++i) - m_objects.append(new DialogModel(this, pokemod->dialog(i))); -} |
