]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQLabel.h
disabling the style for now as the theming causes terrible
[duncan/yast2-qt4.git] / src / YQLabel.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQLabel.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQLabel_h
21 #define YQLabel_h
22
23 #include <qlabel.h>
24 #include "YLabel.h"
25
26
27 class YQLabel : public QLabel, public YLabel
28 {
29     Q_OBJECT
30
31 public:
32
33     /**
34      * Constructor.
35      **/
36     YQLabel( YWidget *          parent,
37              const string &     text,
38              bool               isHeading       = false,
39              bool               isOutputField   = false );
40
41     /**
42      * Destructor.
43      **/
44     virtual ~YQLabel();
45
46     /**
47      * Set the text the widget displays.
48      *
49      * Reimplemented from YLabel.
50      **/
51     virtual void setText( const string & newText );
52
53     /**
54      * Switch bold font on or off.
55      *
56      * Reimplemented from YLabel.
57      **/
58     virtual void setUseBoldFont( bool bold );
59     
60     /**
61      * Set enabled / disabled state.
62      *
63      * Reimplemented from YWidget.
64      **/
65     virtual void setEnabled( bool enabled );
66
67     /**
68      * Preferred width of the widget.
69      *
70      * Reimplemented from YWidget.
71      **/
72     virtual int preferredWidth();
73
74     /**
75      * Preferred height of the widget.
76      *
77      * Reimplemented from YWidget.
78      **/
79     virtual int preferredHeight();
80
81     /**
82      * Set the new size of the widget.
83      *
84      * Reimplemented from YWidget.
85      **/
86     virtual void setSize( int newWidth, int newHeight );
87 };
88
89
90 #endif // YQLabel_h