diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-05-08 12:14:01 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-05-13 12:29:20 (GMT) |
commit | 705bd7256fa4812045677743fc1e939ccfd66d05 (patch) | |
tree | 84502c2c6bd6bda1bc38e7fce59cc451e05b21c4 /Swift/QtUI/MUCSearch/MUCSearchRoomItem.cpp | |
parent | 61078c4e4fd553bf952bae5c9d44da6cb96a3a70 (diff) | |
download | swift-contrib-705bd7256fa4812045677743fc1e939ccfd66d05.zip swift-contrib-705bd7256fa4812045677743fc1e939ccfd66d05.tar.bz2 |
List MUCs available on services.
Resolves: #276
Diffstat (limited to 'Swift/QtUI/MUCSearch/MUCSearchRoomItem.cpp')
-rw-r--r-- | Swift/QtUI/MUCSearch/MUCSearchRoomItem.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Swift/QtUI/MUCSearch/MUCSearchRoomItem.cpp b/Swift/QtUI/MUCSearch/MUCSearchRoomItem.cpp new file mode 100644 index 0000000..a53a577 --- /dev/null +++ b/Swift/QtUI/MUCSearch/MUCSearchRoomItem.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#include "Swift/QtUI/MUCSearch/MUCSearchRoomItem.h" + +#include "Swift/QtUI/MUCSearch/MUCSearchServiceItem.h" + +namespace Swift { +MUCSearchRoomItem::MUCSearchRoomItem(const QString& node, MUCSearchServiceItem* parent) : parent_(parent), node_(node) { + parent_->addRoom(this); +} + +MUCSearchServiceItem* MUCSearchRoomItem::getParent() { + return parent_; +} +QVariant MUCSearchRoomItem::data(int role) { + switch (role) { + case Qt::DisplayRole: return QVariant(node_); + default: return QVariant(); + } +} + +} |