summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Roster/RosterDelegate.h')
-rw-r--r--Swift/QtUI/Roster/RosterDelegate.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/Swift/QtUI/Roster/RosterDelegate.h b/Swift/QtUI/Roster/RosterDelegate.h
index 7713968..696ea03 100644
--- a/Swift/QtUI/Roster/RosterDelegate.h
+++ b/Swift/QtUI/Roster/RosterDelegate.h
@@ -10,29 +10,26 @@
#include <QColor>
#include <QFont>
+#include "GroupItemDelegate.h"
+#include "DelegateCommons.h"
+
namespace Swift {
class QtTreeWidgetItem;
class RosterDelegate : public QStyledItemDelegate {
public:
RosterDelegate();
+ ~RosterDelegate();
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
private:
- QSize groupSizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
QSize contactSizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
void paintGroup(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
void paintContact(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
- void paintShadowText(QPainter* painter, const QRect& region, const QString& text) const;
- void paintExpansionTriangle(QPainter* painter, const QRect& region, int width, int height, bool expanded) const;
- QFont nameFont_;
- QFont statusFont_;
- QFont groupFont_;
+ DelegateCommons common_;
+ GroupItemDelegate* groupDelegate_;
static const int avatarSize_;
static const int presenceIconHeight_;
static const int presenceIconWidth_;
- static const int groupCornerRadius_;
- static const int horizontalMargin_;
- static const int verticalMargin_ ;
- static const int farLeftMargin_;
+
};
}