X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Ftreemodel.h;h=6dd6ed8b6a99445239fe3e4e95110a54a146ba03;hb=2f83cb6d01ff68131528797020637887fe0e77b7;hp=6eef89f1e76b73bfbd28ee6ba2c7b64d26033e2d;hpb=d5e69c3c89f674c4b033b5ff3469c547fd09f927;p=quassel.git diff --git a/src/client/treemodel.h b/src/client/treemodel.h index 6eef89f1..6dd6ed8b 100644 --- a/src/client/treemodel.h +++ b/src/client/treemodel.h @@ -41,6 +41,7 @@ public: virtual ~AbstractTreeItem(); bool newChild(AbstractTreeItem *child); + bool newChilds(const QList &items); bool removeChild(int row); bool removeChildById(const quint64 &id); @@ -48,10 +49,12 @@ public: virtual quint64 id() const; + bool reParent(AbstractTreeItem *newParent); + AbstractTreeItem *child(int row) const; AbstractTreeItem *childById(const quint64 &id) const; - int childCount() const; + int childCount(int column = 0) const; virtual int columnCount() const = 0; @@ -132,6 +135,11 @@ class TreeModel : public QAbstractItemModel { Q_OBJECT public: + enum myRoles { + SortRole = Qt::UserRole, + UserRole + }; + TreeModel(const QList &, QObject *parent = 0); virtual ~TreeModel(); @@ -182,6 +190,7 @@ private slots: void debug_rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end); void debug_rowsInserted(const QModelIndex &parent, int start, int end); void debug_rowsRemoved(const QModelIndex &parent, int start, int end); + void debug_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); }; #endif