summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-07-26 19:17:46 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-07-26 19:17:46 (GMT)
commit46e59e0e6bfceee216db3414680825cbdae60daf (patch)
treed1e078bb0eec292d628e7d44fccc8345ecc1d911 /Swift/QtUI/Roster/RosterDelegate.cpp
parentce74ccc7c8d2ce4c032a90b1ebc0ebd30b4ea4c8 (diff)
downloadswift-46e59e0e6bfceee216db3414680825cbdae60daf.zip
swift-46e59e0e6bfceee216db3414680825cbdae60daf.tar.bz2
Use a (boring) delegate for roster rendering.
Diffstat (limited to 'Swift/QtUI/Roster/RosterDelegate.cpp')
-rw-r--r--Swift/QtUI/Roster/RosterDelegate.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Swift/QtUI/Roster/RosterDelegate.cpp b/Swift/QtUI/Roster/RosterDelegate.cpp
index e69de29..925f66c 100644
--- a/Swift/QtUI/Roster/RosterDelegate.cpp
+++ b/Swift/QtUI/Roster/RosterDelegate.cpp
@@ -0,0 +1,16 @@
+#include "RosterDelegate.h"
+
+#include <QPainter>
+
+namespace Swift {
+QSize RosterDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index ) const {
+ return QSize(100,50);
+}
+
+void RosterDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex index) const {
+ painter->save();
+ QStyledItemDelegate::paint(painter, option, index);
+ painter->restore();
+}
+
+} \ No newline at end of file