annotate ui/separatoritemdelegate.h @ 1070:f110a3f6e387

(issue114) Fine tune ACL propagation using mkdir_p the ACL of the parent directories would propagate to all subdirectories and objects in the directory. Now we only use ACL propagation in the last directory to make sure that files we might create in that directory inherit the correct (resitricted) ACL
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 10 Sep 2014 16:41:36 +0200
parents 17e1c8f37d72
children 2a1aa9df8f11
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
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

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