summaryrefslogtreecommitdiffstats
path: root/qt-ui/modeldelegates.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-07-01 19:31:56 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-01 19:24:52 -0700
commit3b0936eca3d143c8a75d16b5d7acd0b7d6b3cf1b (patch)
treed770a8be00b1a64a5b4eed34d8c1114d22f77617 /qt-ui/modeldelegates.h
parent1b8f7f53f2a715b7e0faaf404985165b608b840a (diff)
downloadsubsurface-3b0936eca3d143c8a75d16b5d7acd0b7d6b3cf1b.tar.gz
Create a delegate to display custom data
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/modeldelegates.h')
-rw-r--r--qt-ui/modeldelegates.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/modeldelegates.h b/qt-ui/modeldelegates.h
index f501c5214..95701775a 100644
--- a/qt-ui/modeldelegates.h
+++ b/qt-ui/modeldelegates.h
@@ -129,4 +129,13 @@ public:
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
};
+
+class LocationFilterDelegate : public QStyledItemDelegate {
+ Q_OBJECT
+public:
+ LocationFilterDelegate(QObject *parent = 0);
+ void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
+ QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE;
+};
+
#endif // MODELDELEGATES_H