Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef SVTK_COMBOACTION_H
00027 #define SVTK_COMBOACTION_H
00028
00029 #include "SVTK.h"
00030
00031 #include <QWidgetAction>
00032
00033 class QComboBox;
00034 class SVTK_EXPORT SVTK_ComboAction : public QWidgetAction
00035 {
00036 Q_OBJECT
00037
00038 public:
00039 SVTK_ComboAction( QObject* = 0 );
00040 SVTK_ComboAction( const QString&, QObject* = 0 );
00041 virtual ~SVTK_ComboAction();
00042
00043 void insertItem( const QIcon&, const int = -1 );
00044 void clear();
00045
00046 void setCurrentIndex( const int );
00047 int currentIndex() const;
00048
00049 signals:
00050 void triggered( int );
00051
00052 protected:
00053 virtual QWidget* createWidget( QWidget* );
00054
00055 virtual void update();
00056 virtual void updateCombo( QComboBox* );
00057
00058 private:
00059 QList<QIcon> myIcons;
00060 int myCurId;
00061 };
00062
00063 #endif // SVTK_COMBOACTION_H