Mercurial > trustbridge
comparison ui/separatoritemdelegate.h @ 273:b6c2fa8457b6
Added new list item delegate for drawing a separator.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 02 Apr 2014 13:38:10 +0200 |
parents | |
children | 17e1c8f37d72 |
comparison
equal
deleted
inserted
replaced
272:abac76b855b2 | 273:b6c2fa8457b6 |
---|---|
1 #ifndef SEPARATORITEMDELEGATE_H | |
2 #define SEPARATORITEMDELEGATE_H | |
3 /** | |
4 * @file separatoritemdelegate.h | |
5 * @brief Item delegate drawing a separator in list widgets. | |
6 * | |
7 */ | |
8 | |
9 #include <QStyledItemDelegate> | |
10 | |
11 class SeparatorItemDelegate : public QStyledItemDelegate | |
12 { | |
13 Q_OBJECT | |
14 | |
15 public: | |
16 SeparatorItemDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent){} | |
17 | |
18 /** | |
19 * @brief Renders the delegate using the given painter and options. | |
20 * | |
21 * @param painter The painter to draw the item. | |
22 * @param option The style options. | |
23 * @param index The model index of the item to draw. | |
24 */ | |
25 void paint(QPainter *painter, const QStyleOptionViewItem &option, | |
26 const QModelIndex &index) const; | |
27 }; | |
28 #endif |