lib
combobox.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KPROPERTY_COMBOBOX_H
00022 #define KPROPERTY_COMBOBOX_H
00023
00024 #include "../widget.h"
00025
00026 #ifdef QT_ONLY
00027 class QComboBox;
00028 #else
00029 class KComboBox;
00030 #endif
00031
00032 namespace KoProperty {
00033
00034 class KOPROPERTY_EXPORT ComboBox : public Widget
00035 {
00036 Q_OBJECT
00037
00038 public:
00039 ComboBox(Property *property, QWidget *parent=0, const char *name=0);
00040 virtual ~ComboBox();
00041
00042 virtual QVariant value() const;
00043 virtual void setValue(const QVariant &value, bool emitChange=true);
00044
00045 virtual void setProperty(Property *property);
00046 virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
00047
00048 protected slots:
00049 void slotValueChanged(int value);
00050
00051 protected:
00052 virtual void setReadOnlyInternal(bool readOnly);
00053 QString keyForValue(const QVariant &value);
00054 void fillBox();
00055
00056 private:
00057 #ifdef QT_ONLY
00058 QComboBox *m_edit;
00059 #else
00060 KComboBox *m_edit;
00061 #endif
00062 bool m_setValueEnabled : 1;
00063 };
00064
00065 }
00066
00067 #endif
00068
|