diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-04-25 00:08:22 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-04-25 00:08:22 +0000 |
| commit | dd643ee61d9166761c50803cd379c9343099385c (patch) | |
| tree | 30d935e81896f3680d5d1c232669e180088d3f37 /pokemodr/models/CoinListObjectModel.cpp | |
| parent | 446fcd9248d4cef74e905c485ef767a94a8463ec (diff) | |
| download | sigen-dd643ee61d9166761c50803cd379c9343099385c.tar.gz sigen-dd643ee61d9166761c50803cd379c9343099385c.tar.xz sigen-dd643ee61d9166761c50803cd379c9343099385c.zip | |
[FIX] Fleshed out a lot more Model classes
[ADD] New intermediate classes for Objects with subclasses and those without
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@107 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/models/CoinListObjectModel.cpp')
| -rw-r--r-- | pokemodr/models/CoinListObjectModel.cpp | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/pokemodr/models/CoinListObjectModel.cpp b/pokemodr/models/CoinListObjectModel.cpp index 9fc94bd4..c2af381a 100644 --- a/pokemodr/models/CoinListObjectModel.cpp +++ b/pokemodr/models/CoinListObjectModel.cpp @@ -37,7 +37,6 @@ CoinListObjectModel::CoinListObjectModel(BaseModel* parent, Object* object) : CoinListObjectModel::~CoinListObjectModel() { - // TODO: destruct } QVariant CoinListObjectModel::data(int role) const @@ -58,11 +57,6 @@ QVariant CoinListObjectModel::data(int role) const return QVariant(); } -int CoinListObjectModel::rowCount() const -{ - return 0; -} - bool CoinListObjectModel::setData(const QVariant& value, int role) { if (role == Qt::UserRole) @@ -81,50 +75,31 @@ bool CoinListObjectModel::setData(const QVariant& value, int role) if (xml.setContent(&file)) { if (xml.doctype().name() == m_object->className()) + { m_object->load(xml.documentElement()); + return true; + } } file.close(); } else if (xml.setContent(value.toString())) { if (xml.doctype().name() == m_object->className()) + { m_object->load(xml.documentElement()); + return true; + } } } } return false; } -BaseModel* CoinListObjectModel::childItem(const int row) -{ - return NULL; -} - int CoinListObjectModel::indexNumber() const { // TODO: get index number } -bool CoinListObjectModel::canInsertRows() const -{ - return false; -} - -bool CoinListObjectModel::insertRows(const int /*rows*/) -{ - return false; -} - -bool CoinListObjectModel::canRemoveRows() const -{ - return false; -} - -bool CoinListObjectModel::removeRows(const int /*position*/, const int /*rows*/) -{ - return false; -} - // bool CoinListObjectModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column) // { // // TODO: drag/drop |
