00001 #ifndef IGUANA_GL_BROWSERS_IG_3DENUM_CONTROL_H
00002 # define IGUANA_GL_BROWSERS_IG_3DENUM_CONTROL_H
00003
00004
00005
00006 # include "Iguana/GLBrowsers/interface/Ig3DFieldControl.h"
00007 # include <vector>
00008
00009
00010
00011
00012
00013 class SoSFEnum;
00014 class QComboBox;
00015 class QWidegt;
00016
00017
00018
00019
00020
00021 class IGUANA_GL_BROWSERS_API Ig3DEnumControl : public Ig3DFieldControl
00022 {
00023 Q_OBJECT
00024 public:
00025 Ig3DEnumControl (IgControlCategory *pane, QString label);
00026
00027
00028
00029
00030 SoSFEnum * field (void) const;
00031 void setField (SoSFEnum *field);
00032 int fieldValue (void) const;
00033 int value (void) const;
00034 void addValidValue (int value, const QString &name);
00035 QWidget * widget () const;
00036
00037 public slots:
00038 void setValue (int newval);
00039
00040 protected:
00041 virtual void updateValue (void);
00042 virtual void applyValue (void);
00043
00044 private slots:
00045 virtual void valueChanged (int);
00046
00047 private:
00048 int findIndex (int value);
00049
00050 QComboBox *m_value;
00051 std::vector<int> m_enums;
00052 };
00053
00054
00055
00056
00057 #endif // IGUANA_GL_BROWSERS_IG_3DENUM_CONTROL_H