git-svn-id: file:///svnroot/family-shop-mgr@4 26eb2498-383b-47a6-be48-5d6f36779e85
[family-shop-mgr] / code / family-shop-mgr / ShoppingTreeModel.h
index f985b59..55609e3 100644 (file)
 #define SHOPPINGTREEMODEL_H\r
 \r
 #include <QAbstractItemModel>\r
+#include <QDomDocument>\r
+#include <QModelIndex>\r
+#include <QVariant>\r
+\r
+class ShoppingTreeItem;\r
 \r
 class ShoppingTreeModel : public QAbstractItemModel\r
 {\r
 public:\r
-    ShoppingTreeModel();\r
+    ShoppingTreeModel(const QString &xmlFileName, QObject *parent = 0);\r
+    ~ShoppingTreeModel();\r
+\r
+    QVariant data(const QModelIndex &index, int role) const;\r
+    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;\r
+    QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;\r
+    QModelIndex parent(const QModelIndex &index) const;\r
+\r
+    int rowCount(const QModelIndex &parent = QModelIndex()) const;\r
+    int columnCount(const QModelIndex &parent = QModelIndex()) const;\r
+\r
+    Qt::ItemFlags flags(const QModelIndex &index) const;\r
+    bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);\r
+    bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole);\r
+\r
+    bool insertColumns(int position, int columns, const QModelIndex &parent = QModelIndex());\r
+    bool removeColumns(int position, int columns, const QModelIndex &parent = QModelIndex());\r
+    bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());\r
+    bool removeRows(int position, int rows, const QModelIndex &parent = QModelIndex());\r
 \r
 private:\r
     QDomDocument m_document;\r