summaryrefslogtreecommitdiffstats
path: root/pokemodr/models/CoinListModel.h
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-04-24 20:21:59 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-04-24 20:21:59 +0000
commit446fcd9248d4cef74e905c485ef767a94a8463ec (patch)
tree66fa3e7a0536303395bd5b88abb6e1b2cacc8383 /pokemodr/models/CoinListModel.h
parentd7b6b0627a7d5e0875a263bf9501506a3d8da450 (diff)
downloadsigen-446fcd9248d4cef74e905c485ef767a94a8463ec.tar.gz
sigen-446fcd9248d4cef74e905c485ef767a94a8463ec.tar.xz
sigen-446fcd9248d4cef74e905c485ef767a94a8463ec.zip
[ADD] More model classes
[FIX] Minor things within the models git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@106 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/models/CoinListModel.h')
-rw-r--r--pokemodr/models/CoinListModel.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/pokemodr/models/CoinListModel.h b/pokemodr/models/CoinListModel.h
new file mode 100644
index 00000000..d8aab92d
--- /dev/null
+++ b/pokemodr/models/CoinListModel.h
@@ -0,0 +1,52 @@
+/*
+ * 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/>.
+ */
+
+#ifndef __POKEMODR_COINLISTMODEL__
+#define __POKEMODR_COINLISTMODEL__
+
+// Model includes
+#include "BaseModel.h"
+
+// Forward declarations
+class CoinListObjectModel;
+
+class CoinListModel : public ObjectModel
+{
+ public:
+ CoinListModel(BaseModel* parent, Object* object);
+ ~CoinListModel();
+
+ QVariant data(int role = Qt::DisplayRole) const;
+ int rowCount() const;
+
+ bool setData(const QVariant& value, int role = Qt::EditRole);
+
+ BaseModel* childItem(const int row);
+ int indexNumber() const;
+
+ bool canInsertRows() const;
+ bool insertRows(const int rows);
+
+ bool canRemoveRows() const;
+ bool removeRows(const int position, const int rows);
+
+// bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column);
+ private:
+ QList<CoinListObjectModel*> m_objects;
+};
+
+#endif