00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef YQSelectionBox_h
00023 #define YQSelectionBox_h
00024
00025 #include <qvbox.h>
00026 #include <qtimer.h>
00027 #include <ycp/YCPString.h>
00028
00029 #include "YSelectionBox.h"
00030
00031
00032 class QLabel;
00033 class QListBox;
00034 class QListBoxItem;
00035
00036 class YQSelectionBox : public QVBox, public YSelectionBox
00037 {
00038 Q_OBJECT
00039
00040 public:
00041
00042 YQSelectionBox( QWidget * parent, const YWidgetOpt & opt, const YCPString & label );
00043
00049 void setEnabling( bool enabled );
00050
00056 long nicesize( YUIDimension dim );
00057
00061 void setSize( long newWidth, long newHeight );
00062
00066 void setLabel( const YCPString & label );
00067
00073 void itemAdded( const YCPString & itemText, int itemIndex, bool selected );
00074
00079 int getCurrentItem();
00080
00084 void setCurrentItem( int index );
00085
00089 virtual bool setKeyboardFocus();
00090
00094 bool eventFilter( QObject * obj, QEvent * ev );
00095
00096
00097 protected slots:
00098
00103 void slotSelected( int index );
00104
00108 void slotActivated( QListBoxItem * item );
00109
00114 void returnDelayed();
00115
00120 void returnImmediately();
00121
00122
00123 protected:
00124
00125
00126
00127
00128
00129
00130
00131 QLabel * _qt_label;
00132 QListBox * _qt_listbox;
00133
00134
00135
00136 bool _shrinkable;
00137
00138
00139 bool _immediateMode;
00140
00141
00142 QTimer _timer;
00143 };
00144
00145 #endif // YQLabel_h