bugfixinating
[quassel.git] / src / client / treemodel.h
index da1f5fd..6439233 100644 (file)
@@ -44,6 +44,11 @@ public:
   void removeChild(int column, int row);
   void removeChild(int row);
 
+  void removeChildById(int column, const quint64 &id);
+  void removeChildById(const quint64 &id);
+  
+  void removeAllChilds();
+
   virtual quint64 id() const;
 
   AbstractTreeItem *child(int column, int row) const;
@@ -69,7 +74,9 @@ public:
 signals:
   void dataChanged(int column = -1);
   void newChild(AbstractTreeItem *);
-  void childDestroyed(int row);
+
+  void beginRemoveChilds(int firstRow, int lastRow);
+  void endRemoveChilds();
                                       
 private slots:
   void childDestroyed();
@@ -77,7 +84,6 @@ private slots:
 private:
   QHash<int, QList<AbstractTreeItem *> > _childItems;
   QHash<int, QHash<quint64, AbstractTreeItem *> > _childHash; // uint to be compatible to qHash functions FIXME test this
-  AbstractTreeItem *_parentItem;
   Qt::ItemFlags _flags;
 
   int defaultColumn() const;
@@ -150,8 +156,10 @@ public:
 private slots:
   void itemDataChanged(int column = -1);
   void newChild(AbstractTreeItem *child);
-  void childDestroyed(int row);
 
+  void beginRemoveChilds(int firstRow, int lastRow);
+  void endRemoveChilds();
+  
 protected:
   void appendChild(AbstractTreeItem *parent, AbstractTreeItem *child);