projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Quassel not being able to login to core without remembering the password.
[quassel.git]
/
src
/
client
/
treemodel.h
diff --git
a/src/client/treemodel.h
b/src/client/treemodel.h
index
0d23405
..
6439233
100644
(file)
--- a/
src/client/treemodel.h
+++ b/
src/client/treemodel.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-0
7 by the Quassel IRC Team
*
+ * Copyright (C) 2005-0
8 by the Quassel Project
*
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-32,7
+32,7
@@
*****************************************/
class AbstractTreeItem : public QObject {
Q_OBJECT
*****************************************/
class AbstractTreeItem : public QObject {
Q_OBJECT
- Q_PROPERTY(
uint
id READ id)
+ Q_PROPERTY(
quint64
id READ id)
public:
AbstractTreeItem(AbstractTreeItem *parent = 0);
public:
AbstractTreeItem(AbstractTreeItem *parent = 0);
@@
-44,13
+44,18
@@
public:
void removeChild(int column, int row);
void removeChild(int row);
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;
AbstractTreeItem *child(int row) const;
virtual quint64 id() const;
AbstractTreeItem *child(int column, int row) const;
AbstractTreeItem *child(int row) const;
- AbstractTreeItem *childById(int column, const
uint
&id) const;
- AbstractTreeItem *childById(const
uint
&id) const;
+ AbstractTreeItem *childById(int column, const
quint64
&id) const;
+ AbstractTreeItem *childById(const
quint64
&id) const;
int childCount(int column) const;
int childCount() const;
int childCount(int column) const;
int childCount() const;
@@
-64,18
+69,21
@@
public:
int column() const;
int row() const;
int column() const;
int row() const;
- AbstractTreeItem *parent();
+ AbstractTreeItem *parent()
const
;
signals:
signals:
- void dataChanged(int column);
+ void dataChanged(int column = -1);
+ void newChild(AbstractTreeItem *);
+
+ void beginRemoveChilds(int firstRow, int lastRow);
+ void endRemoveChilds();
private slots:
void childDestroyed();
private:
QHash<int, QList<AbstractTreeItem *> > _childItems;
private slots:
void childDestroyed();
private:
QHash<int, QList<AbstractTreeItem *> > _childItems;
- QHash<int, QHash<quint64, AbstractTreeItem *> > _childHash; // uint to be compatible to qHash functions
- AbstractTreeItem *_parentItem;
+ QHash<int, QHash<quint64, AbstractTreeItem *> > _childHash; // uint to be compatible to qHash functions FIXME test this
Qt::ItemFlags _flags;
int defaultColumn() const;
Qt::ItemFlags _flags;
int defaultColumn() const;
@@
-135,7
+143,7
@@
public:
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
- QModelIndex indexById(
uint
id, const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex indexById(
quint64
id, const QModelIndex &parent = QModelIndex()) const;
QModelIndex indexByItem(AbstractTreeItem *item) const;
QModelIndex parent(const QModelIndex &index) const;
QModelIndex indexByItem(AbstractTreeItem *item) const;
QModelIndex parent(const QModelIndex &index) const;
@@
-146,8
+154,12
@@
public:
virtual void clear();
private slots:
virtual void clear();
private slots:
- void itemDataChanged(int column);
+ void itemDataChanged(int column = -1);
+ void newChild(AbstractTreeItem *child);
+ void beginRemoveChilds(int firstRow, int lastRow);
+ void endRemoveChilds();
+
protected:
void appendChild(AbstractTreeItem *parent, AbstractTreeItem *child);
protected:
void appendChild(AbstractTreeItem *parent, AbstractTreeItem *child);