X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Ftreemodel.h;h=c72021683730a35fdeaa2f2b68b0278eb9aee70d;hp=27360ba1c0e5ec4267f60418adcadd70b9df0a8b;hb=a7f5d6a23f7214b11f6db85346a67fd7d02767da;hpb=012df68ce8a743a71bfe3beda529a21c02daddb6 diff --git a/src/client/treemodel.h b/src/client/treemodel.h index 27360ba1..c7202168 100644 --- a/src/client/treemodel.h +++ b/src/client/treemodel.h @@ -42,19 +42,34 @@ public: void removeChild(int row); virtual uint id() const; + TreeItem *child(int row) const; TreeItem *childById(const uint &) const; + int childCount() const; int columnCount() const; + virtual QVariant data(int column, int role) const; + + Qt::ItemFlags flags() const; + void setFlags(Qt::ItemFlags); + int row() const; TreeItem *parent(); - + + +private slots: + void childDestroyed(); + + protected: - QList childItems; - QHash childHash; // uint to be compatible to qHash functions - TreeItem *parentItem; QList itemData; + +private: + QList _childItems; + QHash _childHash; // uint to be compatible to qHash functions + TreeItem *_parentItem; + Qt::ItemFlags _flags; }; @@ -82,7 +97,7 @@ public: protected: bool removeRow(int row, const QModelIndex &parent = QModelIndex()); bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); - + TreeItem *rootItem; };