8 #include <qstringlist.h>
10 #include <QtxComboBox.h>
13 #pragma warning( disable:4251 )
16 class QDS_EXPORT QDS_ComboBox : public QDS_Datum
21 QDS_ComboBox( const QString&, QWidget* = 0, const int = All, const QString& = QString::null );
22 virtual ~QDS_ComboBox();
24 bool editable() const;
25 void setEditable( const bool );
27 int count( bool = false ) const;
28 void values( QValueList<int>&, bool = false ) const;
30 virtual int integerValue() const;
31 virtual double doubleValue() const;
32 virtual void setIntegerValue( const int );
33 virtual void setDoubleValue( const double );
35 bool state( const int ) const;
36 void setState( const bool, const int, const bool = true );
37 void setState( const bool, const QValueList<int>&, const bool = true );
38 void setValues( const QValueList<int>&, const QStringList& );
39 void setValues( const QStringList& );
43 int stringToValue( const QString& ) const;
44 QString valueToString( const int ) const;
47 void activated( int );
48 void activated( const QString& );
51 virtual void onActivated( int );
52 virtual void onTextChanged( const QString& );
55 QtxComboBox* comboBox() const;
56 virtual QWidget* createControl( QWidget* );
58 virtual QString getString() const;
59 virtual void setString( const QString& );
61 virtual void unitSystemChanged( const QString& );
64 int getId( const int ) const;
65 int getId( const QString& ) const;
66 int getIndex( const int ) const;
67 int getIndex( const QString& ) const;
69 void updateComboBox();
72 typedef QMap<int, QPixmap> IdIconsMap;
73 typedef QMap<int, QString> IdValueMap;
74 typedef QMap<int, bool> IdStateMap;
75 typedef QMap<int, int> IdIndexMap;
85 QStringList myUserNames;
89 #pragma warning( default:4251 )