diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-05-20 22:24:45 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-05-20 22:24:45 +0000 |
| commit | d910d8ec38e0c33eeb32b7ceaaea9b40632cbd17 (patch) | |
| tree | a2fd6b050b2eea3bf26e6d04121e07a478ca5d16 /pokemodr/models/CoinListModel.cpp | |
| parent | 8ac53af4a15a59b8f6adf7a2468a1bd90a7cc549 (diff) | |
| download | sigen-d910d8ec38e0c33eeb32b7ceaaea9b40632cbd17.tar.gz sigen-d910d8ec38e0c33eeb32b7ceaaea9b40632cbd17.tar.xz sigen-d910d8ec38e0c33eeb32b7ceaaea9b40632cbd17.zip | |
[FIX] Models cleaned up (each class is now in its own file, parenting not hard-coded, etc.)
[FIX] Tree bug fixed! :)
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@157 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/models/CoinListModel.cpp')
| -rw-r--r-- | pokemodr/models/CoinListModel.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/pokemodr/models/CoinListModel.cpp b/pokemodr/models/CoinListModel.cpp index 36312ce1..167d9070 100644 --- a/pokemodr/models/CoinListModel.cpp +++ b/pokemodr/models/CoinListModel.cpp @@ -60,11 +60,6 @@ QVariant CoinListModel::data(int role) const return GroupObjectModel::data(role); } -int CoinListModel::rowCount() const -{ - return m_objects.size(); -} - bool CoinListModel::setData(const QVariant& value, int role) { if (role == BaseModel::XmlRole) @@ -89,18 +84,6 @@ bool CoinListModel::setData(const QVariant& value, int role) return false; } -BaseModel* CoinListModel::childItem(const int row) -{ - if (row < m_objects.size()) - return m_objects[row]; - return NULL; -} - -int CoinListModel::indexNumber() const -{ - return static_cast<const Pokemod*>(m_object->parent())->coinListIndex(m_object->id()); -} - bool CoinListModel::insertRows(const int rows) { for (int i = 0; i < rows; ++i) @@ -125,9 +108,3 @@ void CoinListModel::setupData() for (int i = 0; i < coinList->objectCount(); ++i) m_objects.append(new CoinListObjectModel(this, coinList->object(i))); } - -void CoinListModel::clearData() -{ - foreach (CoinListObjectModel* model, m_objects) - delete model; -} |
