This Update is like 90% bugfixes.
[quassel.git] / src / client / treemodel.h
index 27360ba..c720216 100644 (file)
@@ -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<TreeItem *> childItems;
-  QHash<uint, TreeItem *> childHash; // uint to be compatible to qHash functions
-  TreeItem *parentItem;
   QList<QVariant> itemData;
+  
+private:
+  QList<TreeItem *> _childItems;
+  QHash<uint, TreeItem *> _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;
 };