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 
00124     virtual void deleteAllItems();
00125 
00131     void setInputMaxLength( const YCPInteger & numberOfChars );
00132 
00133 
00134 protected slots:
00135 
00140     void slotSelected( int i );
00141 
00147     void textChanged( const QString &new_text );
00148 
00149     
00150 protected:
00151 
00152     //
00153     // Data members
00154     //
00155     
00156     QLabel *            _qt_label;
00157     QComboBox *         _qt_combo_box;
00158     QY2CharValidator *  _validator;
00159 };
00160 
00161 
00162 #endif // YQLabel_h

Generated on Wed Sep 14 10:59:02 2005 for yast2-qt by  doxygen 1.4.4