Mercurial > trustbridge
annotate ui/separatoritemdelegate.h @ 1088:508c96e72f62
(issue124) Switch server URL and remove some RELEASE_BUILD options
As the test server speaks ECDSA we do not need so much
#ifndef RELEASE_BUILD options anymore.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 12 Sep 2014 15:38:42 +0200 |
parents | 17e1c8f37d72 |
children | 2a1aa9df8f11 |
rev | line source |
---|---|
404 | 1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU GPL (v>=2) | |
5 * and comes with ABSOLUTELY NO WARRANTY! | |
6 * See LICENSE.txt for details. | |
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 |
b6c2fa8457b6
Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
18 class SeparatorItemDelegate : public QStyledItemDelegate |
b6c2fa8457b6
Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
19 { |
b6c2fa8457b6
Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
20 Q_OBJECT |
b6c2fa8457b6
Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
21 |
b6c2fa8457b6
Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 public: |
b6c2fa8457b6
Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 SeparatorItemDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent){} |
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 /** |
b6c2fa8457b6
Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 * @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
|
27 * |
b6c2fa8457b6
Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 * @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
|
29 * @param option The style options. |
b6c2fa8457b6
Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
30 * @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
|
31 */ |
b6c2fa8457b6
Added new list item delegate for drawing a separator.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 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
|
33 const QModelIndex &index) const; |
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 #endif |