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
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