From d910d8ec38e0c33eeb32b7ceaaea9b40632cbd17 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 20 May 2008 22:24:45 +0000 Subject: [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 --- pokemodr/models/CoinListModel.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'pokemodr/models/CoinListModel.cpp') 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(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; -} -- cgit