diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-07-26 16:31:58 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-07-26 16:31:58 (GMT) |
commit | 3d6db73e834b745f2abadd04f8309d96f2b41b9c (patch) | |
tree | bd02aa7ad336ebfa33117d9566791b66fa4cf6c7 /Swift/QtUI/Roster/RosterItem.h | |
parent | a28d92f3458218d6effbfdd9a42bf8fbe8b8aa72 (diff) | |
download | swift-contrib-3d6db73e834b745f2abadd04f8309d96f2b41b9c.zip swift-contrib-3d6db73e834b745f2abadd04f8309d96f2b41b9c.tar.bz2 |
The new roster now renders (badly) the contents.
Diffstat (limited to 'Swift/QtUI/Roster/RosterItem.h')
-rw-r--r-- | Swift/QtUI/Roster/RosterItem.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Swift/QtUI/Roster/RosterItem.h b/Swift/QtUI/Roster/RosterItem.h index f7cd804..e0041d2 100644 --- a/Swift/QtUI/Roster/RosterItem.h +++ b/Swift/QtUI/Roster/RosterItem.h @@ -1,9 +1,10 @@ #pragma once #include <QList> - +#include <QVariant> namespace Swift { - class RosterItem { + class RosterItem : public QObject { + Q_OBJECT public: RosterItem(RosterItem* parent); ~RosterItem(); @@ -11,10 +12,16 @@ namespace Swift { RosterItem* getParentItem(); int rowCount(); int rowOf(RosterItem* item); + int row(); RosterItem* getItem(int row); + QVariant data(int role); + void setName(QString name); + signals: + void changed(); private: QList<RosterItem*> children_; RosterItem* parent_; + QString name_; }; }
\ No newline at end of file |