Differential D16724 Diff 45300 plugins/dockers/specificcolorselector/kis_specific_color_selector_widget.h
Changeset View
Changeset View
Standalone View
Standalone View
plugins/dockers/specificcolorselector/kis_specific_color_selector_widget.h
Show All 17 Lines | |||||
18 | #ifndef _KIS_SPECIFIC_COLOR_SELECTOR_WIDGET_H_ | 18 | #ifndef _KIS_SPECIFIC_COLOR_SELECTOR_WIDGET_H_ | ||
19 | #define _KIS_SPECIFIC_COLOR_SELECTOR_WIDGET_H_ | 19 | #define _KIS_SPECIFIC_COLOR_SELECTOR_WIDGET_H_ | ||
20 | 20 | | |||
21 | #include <QWidget> | 21 | #include <QWidget> | ||
22 | 22 | | |||
23 | #include <KoColor.h> | 23 | #include <KoColor.h> | ||
24 | #include "kis_signal_auto_connection.h" | 24 | #include "kis_signal_auto_connection.h" | ||
25 | 25 | | |||
26 | #include "ui_wdgSpecificColorSelectorWidget.h" | ||||
27 | | ||||
28 | | ||||
26 | class KoColorSpace; | 29 | class KoColorSpace; | ||
27 | class QVBoxLayout; | 30 | class QVBoxLayout; | ||
28 | class KisColorInput; | 31 | class KisColorInput; | ||
29 | class KisColorSpaceSelector; | 32 | class KisColorSpaceSelector; | ||
30 | class QCheckBox; | 33 | class QCheckBox; | ||
31 | class KisSignalCompressor; | 34 | class KisSignalCompressor; | ||
32 | class QSpacerItem; | 35 | class QSpacerItem; | ||
33 | class KisDisplayColorConverter; | 36 | class KisDisplayColorConverter; | ||
37 | class KisPopupButton; | ||||
34 | 38 | | |||
35 | class KisSpecificColorSelectorWidget : public QWidget | 39 | class KisSpecificColorSelectorWidget : public QWidget | ||
36 | { | 40 | { | ||
37 | Q_OBJECT | 41 | Q_OBJECT | ||
38 | public: | 42 | public: | ||
39 | KisSpecificColorSelectorWidget(QWidget* parent); | 43 | KisSpecificColorSelectorWidget(QWidget* parent); | ||
40 | ~KisSpecificColorSelectorWidget() override; | 44 | ~KisSpecificColorSelectorWidget() override; | ||
41 | bool customColorSpaceUsed(); | 45 | bool customColorSpaceUsed(); | ||
46 | | ||||
47 | protected: | ||||
48 | void resizeEvent(QResizeEvent* event) override; | ||||
49 | | ||||
42 | public Q_SLOTS: | 50 | public Q_SLOTS: | ||
43 | void setDisplayConverter(KisDisplayColorConverter *colorConverter); | 51 | void setDisplayConverter(KisDisplayColorConverter *colorConverter); | ||
44 | 52 | | |||
45 | void setColorSpace(const KoColorSpace *cs, bool force = false); | 53 | void setColorSpace(const KoColorSpace *cs, bool force = false); | ||
46 | void setColor(const KoColor&); | 54 | void setColor(const KoColor&); | ||
47 | private Q_SLOTS: | 55 | private Q_SLOTS: | ||
48 | void update(); | 56 | void update(); | ||
49 | void updateTimeout(); | 57 | void updateTimeout(); | ||
50 | void setCustomColorSpace(const KoColorSpace *); | 58 | void setCustomColorSpace(const KoColorSpace *); | ||
51 | void rereadCurrentColorSpace(bool force = false); | 59 | void rereadCurrentColorSpace(bool force = false); | ||
52 | void onChkUsePercentageChanged(bool); | 60 | void onChkUsePercentageChanged(bool); | ||
53 | Q_SIGNALS: | 61 | Q_SIGNALS: | ||
54 | void colorChanged(const KoColor&); | 62 | void colorChanged(const KoColor&); | ||
55 | void updated(); | 63 | void updated(); | ||
56 | private: | 64 | private: | ||
57 | QList<KisColorInput*> m_inputs; | 65 | QList<KisColorInput*> m_inputs; | ||
58 | const KoColorSpace* m_colorSpace; | 66 | const KoColorSpace* m_colorSpace; | ||
59 | QVBoxLayout *m_layout; | | |||
60 | QSpacerItem *m_spacer; | 67 | QSpacerItem *m_spacer; | ||
61 | KoColor m_color; | 68 | KoColor m_color; | ||
62 | bool m_updateAllowed; | 69 | bool m_updateAllowed; | ||
63 | KisSignalCompressor *m_updateCompressor; | 70 | KisSignalCompressor *m_updateCompressor; | ||
64 | KisColorSpaceSelector *m_colorspaceSelector; | 71 | KisColorSpaceSelector *m_colorspaceSelector; | ||
65 | bool m_customColorSpaceSelected; | 72 | bool m_customColorSpaceSelected; | ||
66 | QCheckBox *m_chkShowColorSpaceSelector; | 73 | Ui_wdgSpecificColorSelectorWidget* m_ui; | ||
67 | QCheckBox *m_chkUsePercentage; | 74 | | ||
68 | 75 | | |||
69 | KisDisplayColorConverter *m_displayConverter; | 76 | KisDisplayColorConverter *m_displayConverter; | ||
70 | KisSignalAutoConnectionsStore m_converterConnection; | 77 | KisSignalAutoConnectionsStore m_converterConnection; | ||
71 | }; | 78 | }; | ||
72 | 79 | | |||
73 | #endif | 80 | #endif |