libyui-qt
YQCheckBox.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: YQCheckBox.h
20 
21  Author: Stefan Hundhammer <shundhammer@suse.de>
22 
23 /-*/
24 
25 
26 #ifndef YQCheckBox_h
27 #define YQCheckBox_h
28 
29 #include <QCheckBox>
30 #include <yui/YCheckBox.h>
31 
32 class YQCheckBox : public QCheckBox, public YCheckBox
33 {
34  Q_OBJECT
35 
36 public:
37 
41  YQCheckBox( YWidget * parent,
42  const std::string & label,
43  bool checked );
44 
48  virtual ~YQCheckBox();
49 
61  virtual YCheckBoxState value();
62 
68  virtual void setValue( YCheckBoxState state );
69 
75  virtual void setLabel( const std::string & label );
76 
82  virtual void setUseBoldFont( bool bold = true );
83 
89  virtual void setEnabled( bool enabled );
90 
96  virtual int preferredWidth();
97 
103  virtual int preferredHeight();
104 
110  virtual void setSize( int newWidth, int newHeight );
111 
117  virtual bool setKeyboardFocus();
118 
119 
120 private slots:
121 
125  void stateChanged ( int newState );
126 
127 };
128 
129 #endif // YQCheckBox_h
YQCheckBox(YWidget *parent, const std::string &label, bool checked)
Definition: YQCheckBox.cc:42
virtual void setValue(YCheckBoxState state)
Definition: YQCheckBox.cc:78
virtual bool setKeyboardFocus()
Definition: YQCheckBox.cc:142
virtual ~YQCheckBox()
Definition: YQCheckBox.cc:57
virtual YCheckBoxState value()
Definition: YQCheckBox.cc:64
virtual int preferredWidth()
Definition: YQCheckBox.cc:124
virtual void setUseBoldFont(bool bold=true)
Definition: YQCheckBox.cc:107
virtual void setSize(int newWidth, int newHeight)
Definition: YQCheckBox.cc:136
virtual void setLabel(const std::string &label)
Definition: YQCheckBox.cc:100
virtual int preferredHeight()
Definition: YQCheckBox.cc:130
virtual void setEnabled(bool enabled)
Definition: YQCheckBox.cc:117
Definition: YQCheckBox.h:32