summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-03-14 14:15:34 (GMT)
committerKevin Smith <git@kismith.co.uk>2014-04-02 11:14:52 (GMT)
commitc9275affd040ee1ca7c1d599b28df3b363bef888 (patch)
tree04afffe1e766f897f2208cf097a307a5fe530032 /Swift/QtUI/Roster/RosterModel.h
parentb92fe0b47d519da5fd55ba55ad0838e1ff69195c (diff)
downloadswift-contrib-c9275affd040ee1ca7c1d599b28df3b363bef888.zip
swift-contrib-c9275affd040ee1ca7c1d599b28df3b363bef888.tar.bz2
Make the impromptu MUCs behave more like a regular chat.
This hides occupant types in the participant list and initiates a direct 1-to-1 on occupant double-click instead of MUC-proxied 1-to-1. Change-Id: I76c57fe52beb3e4236524c1d8cfbd583d3dc3f62
Diffstat (limited to 'Swift/QtUI/Roster/RosterModel.h')
-rw-r--r--Swift/QtUI/Roster/RosterModel.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swift/QtUI/Roster/RosterModel.h b/Swift/QtUI/Roster/RosterModel.h
index 7f6cdd2..2b05044 100644
--- a/Swift/QtUI/Roster/RosterModel.h
+++ b/Swift/QtUI/Roster/RosterModel.h
@@ -14,19 +14,21 @@
#include <Swift/QtUI/QtScaledAvatarCache.h>
namespace Swift {
enum RosterRoles {
StatusTextRole = Qt::UserRole,
AvatarRole = Qt::UserRole + 1,
PresenceIconRole = Qt::UserRole + 2,
StatusShowTypeRole = Qt::UserRole + 3,
ChildCountRole = Qt::UserRole + 4,
- IdleRole = Qt::UserRole + 5
+ IdleRole = Qt::UserRole + 5,
+ JIDRole = Qt::UserRole + 6,
+ DisplayJIDRole = Qt::UserRole + 7
};
class QtTreeWidget;
class RosterModel : public QAbstractItemModel {
Q_OBJECT
public:
RosterModel(QtTreeWidget* view, bool screenReaderMode);
~RosterModel();
@@ -46,18 +48,20 @@ namespace Swift {
void handleDataChanged(RosterItem* item);
void handleChildrenChanged(GroupRosterItem* item);
RosterItem* getItem(const QModelIndex& index) const;
QColor intToColor(int color) const;
QColor getTextColor(RosterItem* item) const;
QColor getBackgroundColor(RosterItem* item) const;
QString getToolTip(RosterItem* item) const;
QString getAvatar(RosterItem* item) const;
QString getStatusText(RosterItem* item) const;
+ QString getJID(RosterItem* item) const;
+ QString getDisplayJID(RosterItem* item) const;
QIcon getPresenceIcon(RosterItem* item) const;
int getChildCount(RosterItem* item) const;
bool getIsIdle(RosterItem* item) const;
void reLayout();
/** calculates screenreader-friendly text if in screenreader mode, otherwise uses alternative text */
QString getScreenReaderTextOr(RosterItem* item, const QString& alternative) const;
private:
Roster* roster_;
QtTreeWidget* view_;