libyui-qt  2.49.2
YQLabel.h
1 /*
2  Copyright (C) 2000-2012 Novell, Inc
3  This library is free software; you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as
5  published by the Free Software Foundation; either version 2.1 of the
6  License, or (at your option) version 3.0 of the License. This library
7  is distributed in the hope that it will be useful, but WITHOUT ANY
8  WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10  License for more details. You should have received a copy of the GNU
11  Lesser General Public License along with this library; if not, write
12  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13  Floor, Boston, MA 02110-1301 USA
14 */
15 
16 
17 /*-/
18 
19  File: YQLabel.h
20 
21  Author: Stefan Hundhammer <sh@suse.de>
22 
23 /-*/
24 
25 
26 #ifndef YQLabel_h
27 #define YQLabel_h
28 
29 #include <qlabel.h>
30 #include <yui/YLabel.h>
31 
32 
33 class YQLabel : public QLabel, public YLabel
34 {
35  Q_OBJECT
36 
37 public:
38 
39  /**
40  * Constructor.
41  **/
42  YQLabel( YWidget * parent,
43  const std::string & text,
44  bool isHeading = false,
45  bool isOutputField = false );
46 
47  /**
48  * Destructor.
49  **/
50  virtual ~YQLabel();
51 
52  /**
53  * Set the text the widget displays.
54  *
55  * Reimplemented from YLabel.
56  **/
57  virtual void setText( const std::string & newText );
58 
59  /**
60  * Switch bold font on or off.
61  *
62  * Reimplemented from YLabel.
63  **/
64  virtual void setUseBoldFont( bool bold );
65 
66  /**
67  * Set enabled / disabled state.
68  *
69  * Reimplemented from YWidget.
70  **/
71  virtual void setEnabled( bool enabled );
72 
73  /**
74  * Preferred width of the widget.
75  *
76  * Reimplemented from YWidget.
77  **/
78  virtual int preferredWidth();
79 
80  /**
81  * Preferred height of the widget.
82  *
83  * Reimplemented from YWidget.
84  **/
85  virtual int preferredHeight();
86 
87  /**
88  * Set the new size of the widget.
89  *
90  * Reimplemented from YWidget.
91  **/
92  virtual void setSize( int newWidth, int newHeight );
93 };
94 
95 
96 #endif // YQLabel_h
virtual void setText(const std::string &newText)
Set the text the widget displays.
Definition: YQLabel.cc:72
virtual ~YQLabel()
Destructor.
Definition: YQLabel.cc:66
YQLabel(YWidget *parent, const std::string &text, bool isHeading=false, bool isOutputField=false)
Constructor.
Definition: YQLabel.cc:37
virtual int preferredHeight()
Preferred height of the widget.
Definition: YQLabel.cc:102
virtual int preferredWidth()
Preferred width of the widget.
Definition: YQLabel.cc:96
virtual void setUseBoldFont(bool bold)
Switch bold font on or off.
Definition: YQLabel.cc:79
virtual void setEnabled(bool enabled)
Set enabled / disabled state.
Definition: YQLabel.cc:89
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
Definition: YQLabel.cc:108