annotate ui/textoverlaybutton.h @ 791:7986972fbded

Update translations
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 15 Jul 2014 09:58:45 +0200
parents b0929968562a
children 57371f2e8dae
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
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
11 /** @file A tool button that overlays a text over the icon */
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
12
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
13 #include <QToolButton>
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
14 #include <QString>
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 class QPaintEvent;
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
17
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
18 class TextOverlayButton : public QToolButton
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 Q_OBJECT
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 public:
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
23 QString overlay() {return mOverlay;}
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
24
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
25 protected:
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
26 virtual void paintEvent(QPaintEvent *);
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
27
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
28 public slots:
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
29 void setOverlay (const QString& text) {mOverlay = text; repaint();}
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
30
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
31 private:
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
32 QString mOverlay;
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
33 };
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
34
b0929968562a (Issue31) Add textoverlaybutton to show a text in the button.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
35 #endif // UI_TEXTOVERLAYBUTTON_H

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