git-svn-id: file:///svnroot/family-shop-mgr@23 26eb2498-383b-47a6-be48-5d6f36779e85
[family-shop-mgr] / code / family-shop-mgr / ShoppingTreeModel.h
index 31301d6..66829bf 100644 (file)
@@ -39,6 +39,13 @@ public:
     ShoppingTreeModel(const QString &xmlFileName, QObject *parent = 0);\r
     ~ShoppingTreeModel();\r
 \r
+    bool addCategory(QString name);\r
+    bool addSubCategory(QString name, int position,\r
+                        const QModelIndex &parent = QModelIndex());\r
+    bool addItem(QString name, int position,\r
+                 const QModelIndex &parent = QModelIndex());\r
+    bool removeCategoryOrItem(const QModelIndex &index = QModelIndex());\r
+\r
     QVariant data(const QModelIndex &index, int role) const;\r
     QVariant headerData(int section, Qt::Orientation orientation,\r
                         int role = Qt::DisplayRole) const;\r
@@ -55,6 +62,7 @@ public:
     bool setHeaderData(int section, Qt::Orientation orientation,\r
                        const QVariant &value, int role = Qt::EditRole);\r
 \r
+private:\r
     bool insertColumns(int position, int columns,\r
                            const QModelIndex &parent = QModelIndex());\r
     bool removeColumns(int position, int columns,\r