00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: YQCheckBox.h 00014 00015 Author: Mathias Kettner <kettner@suse.de> 00016 Maintainer: Stefan Hundhammer <sh@suse.de> 00017 00018 /-*/ 00019 00020 // -*- c++ -*- 00021 00022 00023 #ifndef YQCheckBox_h 00024 #define YQCheckBox_h 00025 00026 #include <qgroupbox.h> 00027 #include <ycp/YCPString.h> 00028 00029 #include "YCheckBox.h" 00030 00031 00032 class QCheckBox; 00033 00034 class YQCheckBox : public QGroupBox, public YCheckBox 00035 { 00036 Q_OBJECT 00037 00038 public: 00039 00043 YQCheckBox( QWidget * parent, 00044 const YWidgetOpt & opt, 00045 const YCPString & label, 00046 bool initiallyChecked ); 00047 00053 void setEnabling( bool enabled ); 00054 00059 long nicesize( YUIDimension dim ); 00060 00064 void setSize( long newWidth, long newHeight ); 00065 00069 void setValue( const YCPValue & checked ); 00070 00075 YCPValue getValue(); 00076 00080 void setLabel( const YCPString & label ); 00081 00085 virtual bool setKeyboardFocus(); 00086 00090 bool isTristate(); 00091 00095 void setTristate( bool tristate ); 00096 00097 00098 private slots: 00099 00103 void stateChanged ( int newState ); 00104 00105 00106 protected: 00107 00111 QCheckBox * _qt_checkbox; 00112 00116 bool _dont_care; 00117 00118 }; 00119 00120 #endif // YQCheckBox_h