comparison ui/textoverlaybutton.h @ 932:57371f2e8dae

(issue72) Set background image as pixmap in textoverlayicon
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 22 Aug 2014 16:20:25 +0200
parents b0929968562a
children 78798d3af8f0
comparison
equal deleted inserted replaced
931:7ac5a366184d 932:57371f2e8dae
10 10
11 /** @file A tool button that overlays a text over the icon */ 11 /** @file A tool button that overlays a text over the icon */
12 12
13 #include <QToolButton> 13 #include <QToolButton>
14 #include <QString> 14 #include <QString>
15 #include <QPixmap>
15 16
16 class QPaintEvent; 17 class QPaintEvent;
17 18
18 class TextOverlayButton : public QToolButton 19 class TextOverlayButton : public QToolButton
19 { 20 {
25 protected: 26 protected:
26 virtual void paintEvent(QPaintEvent *); 27 virtual void paintEvent(QPaintEvent *);
27 28
28 public slots: 29 public slots:
29 void setOverlay (const QString& text) {mOverlay = text; repaint();} 30 void setOverlay (const QString& text) {mOverlay = text; repaint();}
31 void setBackgroundIcon (const QString& iconPath);
30 32
31 private: 33 private:
32 QString mOverlay; 34 QString mOverlay;
35 QPixmap mBackground;
33 }; 36 };
34 37
35 #endif // UI_TEXTOVERLAYBUTTON_H 38 #endif // UI_TEXTOVERLAYBUTTON_H

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