Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/widgets/kis_widget_chooser.h
Context not available. | |||||
35 | struct Data | 35 | struct Data | ||
---|---|---|---|---|---|
36 | { | 36 | { | ||
37 | Data(const QString& ID): | 37 | Data(const QString& ID): | ||
38 | id(ID), widget(0), label(0), choosen(false) { } | 38 | id(ID), widget(0), label(0), chosen(false) { } | ||
39 | Data(const Data& d): | 39 | Data(const Data& d): | ||
40 | id(d.id), widget(d.widget), label(d.label), choosen(d.choosen) { } | 40 | id(d.id), widget(d.widget), label(d.label), chosen(d.chosen) { } | ||
41 | Data(const QString& ID, QWidget* w, QLabel* l): | 41 | Data(const QString& ID, QWidget* w, QLabel* l): | ||
42 | id(ID), widget(w), label(l), choosen(false) { } | 42 | id(ID), widget(w), label(l), chosen(false) { } | ||
43 | 43 | | |||
44 | friend bool operator == (const Data& a, const Data& b) { | 44 | friend bool operator == (const Data& a, const Data& b) { | ||
45 | return a.id == b.id; | 45 | return a.id == b.id; | ||
Context not available. | |||||
48 | QString id; | 48 | QString id; | ||
49 | QWidget* widget; | 49 | QWidget* widget; | ||
50 | QLabel* label; | 50 | QLabel* label; | ||
51 | bool choosen; | 51 | bool chosen; | ||
52 | }; | 52 | }; | ||
53 | 53 | | |||
54 | typedef QList<Data>::iterator Iterator; | 54 | typedef QList<Data>::iterator Iterator; | ||
Context not available. | |||||
86 | 86 | | |||
87 | protected Q_SLOTS: | 87 | protected Q_SLOTS: | ||
88 | void slotButtonPressed(); | 88 | void slotButtonPressed(); | ||
89 | void slotWidgetChoosen(int index); | 89 | void slotWidgetChosen(int index); | ||
90 | 90 | | |||
91 | // QWidget interface | 91 | // QWidget interface | ||
92 | protected: | 92 | protected: | ||
Context not available. | |||||
98 | QToolButton* m_arrowButton; | 98 | QToolButton* m_arrowButton; | ||
99 | QButtonGroup* m_buttons; | 99 | QButtonGroup* m_buttons; | ||
100 | QFrame* m_popup; | 100 | QFrame* m_popup; | ||
101 | QString m_choosenID; | 101 | QString m_chosenID; | ||
102 | QList<Data> m_widgets; | 102 | QList<Data> m_widgets; | ||
103 | }; | 103 | }; | ||
104 | 104 | | |||
Context not available. |