diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-07-26 18:05:52 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-07-26 18:05:52 (GMT) |
commit | aeab97f48ee6c260a3e2a21bca7a291ed1af8063 (patch) | |
tree | 4e929b3cd7ea393c9ae756afb32828014e939324 /Swift/QtUI/Roster/RosterItem.cpp | |
parent | 774fb699f967e05e7d3f46987b501c61c01f6687 (diff) | |
download | swift-contrib-aeab97f48ee6c260a3e2a21bca7a291ed1af8063.zip swift-contrib-aeab97f48ee6c260a3e2a21bca7a291ed1af8063.tar.bz2 |
Removing RosterItem and including in QtTreeWidgetItem.
Diffstat (limited to 'Swift/QtUI/Roster/RosterItem.cpp')
-rw-r--r-- | Swift/QtUI/Roster/RosterItem.cpp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/Swift/QtUI/Roster/RosterItem.cpp b/Swift/QtUI/Roster/RosterItem.cpp deleted file mode 100644 index b39a47c..0000000 --- a/Swift/QtUI/Roster/RosterItem.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "RosterItem.h" - -#include <qdebug.h> - -namespace Swift { - -RosterItem::RosterItem(RosterItem* parent) : QObject() { - parent_ = parent; -} - -RosterItem::~RosterItem() { - qDeleteAll(children_); -} - -RosterItem* RosterItem::getParentItem() { - return parent_; -} - -void RosterItem::addChild(RosterItem* child) { - printf("Boing\n"); - children_.append(child); - connect(child, SIGNAL(changed()), this, SIGNAL(changed())); - emit changed(); -} - -int RosterItem::rowCount() { - qDebug() << "Returning size of " << children_.size() << " for item " << name_; - return children_.size(); -} - -int RosterItem::rowOf(RosterItem* item) { - return children_.indexOf(item);; -} - -int RosterItem::row() { - return parent_ ? parent_->rowOf(this) : 0; -} - -RosterItem* RosterItem::getItem(int row) { - qDebug() << "Returning row " << row << " from item " << name_; - return children_[row]; -} - -QVariant RosterItem::data(int role) { - if (role != Qt::DisplayRole) { - return QVariant(); - } - qDebug() << "Returning name " << name_ << " for role " << role; - return name_; -} - -void RosterItem::setName(QString name) { - name_ = name; - qDebug() << "Name changed to " << name; - changed(); -} -}
\ No newline at end of file |