annotate ui/separatoritemdelegate.h @ 330:1e6d1eab8395

Fix NSS unit test for Windows and change how instructions are written This was supposed to fix the block on error. But it did not.
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 08 Apr 2014 15:08:57 +0000
parents b6c2fa8457b6
children 17e1c8f37d72
rev   line source
273
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
1 #ifndef SEPARATORITEMDELEGATE_H
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
2 #define SEPARATORITEMDELEGATE_H
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
3 /**
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
4 * @file separatoritemdelegate.h
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
5 * @brief Item delegate drawing a separator in list widgets.
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
6 *
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
7 */
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 #include <QStyledItemDelegate>
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
10
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
11 class SeparatorItemDelegate : public QStyledItemDelegate
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12 {
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13 Q_OBJECT
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
14
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
15 public:
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 SeparatorItemDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent){}
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 /**
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
19 * @brief Renders the delegate using the given painter and options.
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
20 *
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 * @param painter The painter to draw the item.
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22 * @param option The style options.
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 * @param index The model index of the item to draw.
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24 */
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
25 void paint(QPainter *painter, const QStyleOptionViewItem &option,
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26 const QModelIndex &index) const;
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
27 };
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
28 #endif

http://wald.intevation.org/projects/trustbridge/