libyui-qt
Loading...
Searching...
No Matches
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 <shundhammer@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
33class YQLabel : public QLabel, public YLabel
34{
35 Q_OBJECT
36
37public:
38
42 YQLabel( YWidget * parent,
43 const std::string & text,
44 bool isHeading = false,
45 bool isOutputField = false );
46
50 virtual ~YQLabel();
51
57 virtual void setText( const std::string & newText );
58
64 virtual void setUseBoldFont( bool bold );
65
66 /*
67 * Enable or disable automatic word wrapping.
68 *
69 * Reimplemented from YLabel.
70 **/
71 virtual void setAutoWrap( bool autoWrap = true );
72
78 virtual void setEnabled( bool enabled );
79
85 virtual int preferredWidth();
86
92 virtual int preferredHeight();
93
99 virtual void setSize( int newWidth, int newHeight );
100
101protected:
102
103 int _layoutPass1Width;
104};
105
106
107#endif // YQLabel_h
Definition YQLabel.h:34
virtual int preferredWidth()
Definition YQLabel.cc:111
virtual ~YQLabel()
Definition YQLabel.cc:74
virtual int preferredHeight()
Definition YQLabel.cc:154
virtual void setText(const std::string &newText)
Definition YQLabel.cc:80
virtual void setUseBoldFont(bool bold)
Definition YQLabel.cc:87
virtual void setSize(int newWidth, int newHeight)
Definition YQLabel.cc:187
virtual void setEnabled(bool enabled)
Definition YQLabel.cc:104