Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

YQComboBox.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       YQComboBox.h
00014 
00015   Author:     Stefan Hundhammer <sh@suse.de>
00016 
00017 /-*/
00018 
00019 // -*- c++ -*-
00020 
00021 #ifndef YQComboBox_h
00022 #define YQComboBox_h
00023 
00024 #include <qvbox.h>
00025 #include <ycp/YCPString.h>
00026 
00027 #include "YComboBox.h"
00028 
00029 
00030 class QLabel;
00031 class QComboBox;
00032 class QY2CharValidator;
00033 
00034 
00035 class YQComboBox : public QVBox, public YComboBox
00036 {
00037     Q_OBJECT
00038 
00039 public:
00040 
00041     YQComboBox( QWidget * parent, const YWidgetOpt & opt, const YCPString & label );
00042 
00048     void setEnabling( bool enabled );
00049 
00055     long nicesize( YUIDimension dim );
00056 
00060     void setSize( long newWidth, long newHeight );
00061 
00065     void setLabel( const YCPString & label );
00066 
00072     void setValidChars( const YCPString & validChars );
00073 
00078     bool YQComboBox::isValidText( const QString & txt ) const;
00079     
00085     void itemAdded( const YCPString & itemText, int itemIndex, bool selected );
00086 
00091     YCPString getValue() const;
00092 
00098     void setValue( const YCPString & new_value );
00099 
00105     int getCurrentItem() const;
00106     
00112     void setCurrentItem( int index );
00113 
00117     virtual bool setKeyboardFocus();
00118 
00119 
00120 protected slots:
00121 
00126     void slotSelected( int i );
00127 
00133     void textChanged( const QString &new_text );
00134 
00135     
00136 protected:
00137 
00138     //
00139     // Data members
00140     //
00141     
00142     QLabel *            _qt_label;
00143     QComboBox *         _qt_combo_box;
00144     QY2CharValidator *  _validator;
00145 };
00146 
00147 
00148 #endif // YQLabel_h

Generated on Tue Mar 22 19:06:27 2005 for yast2-qt by  doxygen 1.4.1