Mercurial > trustbridge
annotate ui/textoverlaybutton.h @ 1247:d4b24df4eed1
Doc: fix typo
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 25 Sep 2014 12:03:18 +0200 |
parents | 78798d3af8f0 |
children | 2a1aa9df8f11 |
rev | line source |
---|---|
722
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
1 #ifndef UI_TEXTOVERLAYBUTTON_H |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
2 #define UI_TEXTOVERLAYBUTTON_H |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
3 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
4 * Software engineering by Intevation GmbH |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
5 * |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
6 * This file is Free Software under the GNU GPL (v>=2) |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
7 * and comes with ABSOLUTELY NO WARRANTY! |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
8 * See LICENSE.txt for details. |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
9 */ |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
10 |
1053
78798d3af8f0
Fixed doxygen build warnings.
Emanuel Schuetze <emanuel@intevation.de>
parents:
932
diff
changeset
|
11 /** |
78798d3af8f0
Fixed doxygen build warnings.
Emanuel Schuetze <emanuel@intevation.de>
parents:
932
diff
changeset
|
12 * @file textoverlaybutton.h |
78798d3af8f0
Fixed doxygen build warnings.
Emanuel Schuetze <emanuel@intevation.de>
parents:
932
diff
changeset
|
13 * @brief A tool button that overlays a text over the icon. |
78798d3af8f0
Fixed doxygen build warnings.
Emanuel Schuetze <emanuel@intevation.de>
parents:
932
diff
changeset
|
14 */ |
722
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
15 |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
16 #include <QToolButton> |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
17 #include <QString> |
932
57371f2e8dae
(issue72) Set background image as pixmap in textoverlayicon
Andre Heinecke <andre.heinecke@intevation.de>
parents:
722
diff
changeset
|
18 #include <QPixmap> |
722
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
19 |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
20 class QPaintEvent; |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
21 |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
22 class TextOverlayButton : public QToolButton |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
23 { |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
24 Q_OBJECT |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
25 |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
26 public: |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
27 QString overlay() {return mOverlay;} |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
28 |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
29 protected: |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
30 virtual void paintEvent(QPaintEvent *); |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
31 |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
32 public slots: |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
33 void setOverlay (const QString& text) {mOverlay = text; repaint();} |
932
57371f2e8dae
(issue72) Set background image as pixmap in textoverlayicon
Andre Heinecke <andre.heinecke@intevation.de>
parents:
722
diff
changeset
|
34 void setBackgroundIcon (const QString& iconPath); |
722
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
35 |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
36 private: |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
37 QString mOverlay; |
932
57371f2e8dae
(issue72) Set background image as pixmap in textoverlayicon
Andre Heinecke <andre.heinecke@intevation.de>
parents:
722
diff
changeset
|
38 QPixmap mBackground; |
722
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
39 }; |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
40 |
b0929968562a
(Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
41 #endif // UI_TEXTOVERLAYBUTTON_H |