annotate ui/separatoritemdelegate.h @ 1265:b18f08034c24

Split off CLANG section more clearly
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 26 Sep 2014 18:01:35 +0200
parents 2a1aa9df8f11
children
rev   line source
404
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 273
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 273
diff changeset
2 * Software engineering by Intevation GmbH
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 273
diff changeset
3 *
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 273
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 273
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 273
diff changeset
6 * See LICENSE.txt for details.
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 273
diff changeset
7 */
273
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8 #ifndef SEPARATORITEMDELEGATE_H
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 #define SEPARATORITEMDELEGATE_H
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 * @file separatoritemdelegate.h
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12 * @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
13 *
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
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 #include <QStyledItemDelegate>
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17
1255
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
18 /**
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
19 * @brief Item delegate drawing a separator in list widgets.
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 404
diff changeset
20 */
273
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 class SeparatorItemDelegate : public QStyledItemDelegate
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22 {
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 Q_OBJECT
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 public:
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26 SeparatorItemDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent){}
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 /**
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
29 * @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
30 *
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
31 * @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
32 * @param option The style options.
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
33 * @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
34 */
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
35 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
36 const QModelIndex &index) const;
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
37 };
b6c2fa8457b6 Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
38 #endif

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