Save the mainwindow state properly when exiting the client.
[quassel.git] / src / client / treemodel.h
index 6eef89f..8caffdd 100644 (file)
@@ -41,6 +41,7 @@ public:
   virtual ~AbstractTreeItem();
 
   bool newChild(AbstractTreeItem *child);
+  bool newChilds(const QList<AbstractTreeItem *> &items);
 
   bool removeChild(int row);
   bool removeChildById(const quint64 &id);
@@ -51,7 +52,7 @@ public:
   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 +133,11 @@ class TreeModel : public QAbstractItemModel {
   Q_OBJECT
 
 public:
+  enum myRoles {
+    SortRole = Qt::UserRole,
+    UserRole
+  };
+
   TreeModel(const QList<QVariant> &, QObject *parent = 0);
   virtual ~TreeModel();
 
@@ -182,6 +188,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