Changeset View
Changeset View
Standalone View
Standalone View
src/editors/combobox.h
Show All 16 Lines | 1 | /* This file is part of the KDE project | |||
---|---|---|---|---|---|
17 | along with this library; see the file COPYING.LIB. If not, write to | 17 | along with this library; see the file COPYING.LIB. If not, write to | ||
18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
19 | * Boston, MA 02110-1301, USA. | 19 | * Boston, MA 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef KPROPERTY_COMBOBOX_H | 22 | #ifndef KPROPERTY_COMBOBOX_H | ||
23 | #define KPROPERTY_COMBOBOX_H | 23 | #define KPROPERTY_COMBOBOX_H | ||
24 | 24 | | |||
25 | #include "KPropertyFactory.h" | 25 | #include "KPropertyWidgetsFactory.h" | ||
26 | #include "kpropertywidgets_export.h" | ||||
26 | 27 | | |||
27 | #include <QComboBox> | 28 | #include <QComboBox> | ||
28 | 29 | | |||
29 | class KPROPERTY_EXPORT KPropertyComboBoxEditor : public QComboBox | 30 | class KPROPERTYWIDGETS_EXPORT KPropertyComboBoxEditor : public QComboBox | ||
30 | { | 31 | { | ||
31 | Q_OBJECT | 32 | Q_OBJECT | ||
32 | Q_PROPERTY(QVariant value READ value WRITE setValue USER true) | 33 | Q_PROPERTY(QVariant value READ value WRITE setValue USER true) | ||
33 | 34 | | |||
34 | public: | 35 | public: | ||
35 | class Options { | 36 | class Options { | ||
36 | public: | 37 | public: | ||
37 | class IconProviderInterface { | 38 | class IconProviderInterface { | ||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
82 | // KComboBox *m_edit; | 83 | // KComboBox *m_edit; | ||
83 | // const Property *m_property; | 84 | // const Property *m_property; | ||
84 | KPropertyListData m_listData; | 85 | KPropertyListData m_listData; | ||
85 | // QList<QVariant> keys; | 86 | // QList<QVariant> keys; | ||
86 | bool m_setValueEnabled; | 87 | bool m_setValueEnabled; | ||
87 | Options m_options; | 88 | Options m_options; | ||
88 | }; | 89 | }; | ||
89 | 90 | | |||
90 | class KPROPERTY_EXPORT KPropertyComboBoxDelegate : public KPropertyEditorCreatorInterface, | 91 | class KPROPERTYWIDGETS_EXPORT KPropertyComboBoxDelegate : public KPropertyEditorCreatorInterface, | ||
91 | public KPropertyValueDisplayInterface | 92 | public KPropertyValueDisplayInterface | ||
92 | { | 93 | { | ||
93 | public: | 94 | public: | ||
94 | KPropertyComboBoxDelegate(); | 95 | KPropertyComboBoxDelegate(); | ||
95 | 96 | | |||
96 | virtual QString displayTextForProperty( const KProperty* property ) const; | 97 | virtual QString displayTextForProperty( const KProperty* property ) const; | ||
97 | 98 | | |||
98 | virtual QWidget * createEditor( int type, QWidget *parent, | 99 | virtual QWidget * createEditor( int type, QWidget *parent, | ||
99 | const QStyleOptionViewItem & option, const QModelIndex & index ) const; | 100 | const QStyleOptionViewItem & option, const QModelIndex & index ) const; | ||
100 | 101 | | |||
101 | // virtual void paint( QPainter * painter, | 102 | // virtual void paint( QPainter * painter, | ||
102 | // const QStyleOptionViewItem & option, const QModelIndex & index ) const; | 103 | // const QStyleOptionViewItem & option, const QModelIndex & index ) const; | ||
103 | }; | 104 | }; | ||
104 | 105 | | |||
105 | #endif | 106 | #endif |