21#ifndef __ko_ColorChooser_h__
22#define __ko_ColorChooser_h__
43class KoColorChooser : public TQWidget
48 KoColorChooser(TQWidget *parent = 0L, const char *name = 0L);
50 const KoColor &color() const { return mColor; }
53 void slotChangeColor( const KoColor &c);
54 void slotChangeColor( const TQColor &c);
57 void colorChanged( const KoColor &c);
60 void slotChangeXY( int h, int s);
63 void childColorChanged( const KoColor& c);
64 void slotCurrentChanged(TQWidget *current);
67 ColorWidget *m_current;
71 KoFrameButton *btnRGB;
72 KoFrameButton *btnHSV;
73 KoFrameButton *btnCMYK;
74 KoFrameButton *btnLAB;
75 KoFrameButton *btnGrey;
76 RGBWidget *mRGBWidget;
77 HSVWidget *mHSVWidget;
78 TQWidget *mCMYKWidget;
79 LABWidget *mLABWidget;
80 GreyWidget *mGreyWidget;
81 KHSSelector *mColorSelector;
84class ColorWidget : public TQWidget {
89 ColorWidget(TQWidget *parent = 0);
90 virtual ~ColorWidget();
93 virtual void slotChangeColor( const KoColor& c);
94 virtual void slotChangeColor( const TQColor& c);
95 virtual void slotRefreshColor() = 0;
101class RGBWidget : public ColorWidget
106 RGBWidget(TQWidget *parent = 0L);
107 virtual ~RGBWidget() {}
110 virtual void slotRefreshColor();
113 void slotRSliderChanged( int r);
114 void slotGSliderChanged( int g);
115 void slotBSliderChanged( int b);
117 void slotRInChanged( int r);
118 void slotGInChanged( int g);
119 void slotBInChanged( int b);
121 void slotPatchChanged( const TQColor& clr);
124 void colorChanged( const KoColor &c);
127 KoColorSlider *mRSlider;
128 KoColorSlider *mGSlider;
129 KoColorSlider *mBSlider;
136 KColorPatch *mColorPatch;
139class HSVWidget : public ColorWidget
144 HSVWidget(TQWidget *parent = 0L);
145 virtual ~HSVWidget() {}
148 virtual void slotRefreshColor();
151 void slotHSliderChanged( int h);
152 void slotSSliderChanged( int s);
153 void slotVSliderChanged( int v);
155 void slotHInChanged( int h);
156 void slotSInChanged( int s);
157 void slotVInChanged( int v);
159 void slotPatchChanged( const TQColor& clr);
162 void colorChanged( const KoColor &c);
165 KoColorSlider *mHSlider;
166 KoColorSlider *mSSlider;
167 KoColorSlider *mVSlider;
174 KColorPatch *mColorPatch;
177class GreyWidget : public ColorWidget
182 GreyWidget(TQWidget *parent = 0L);
183 virtual ~GreyWidget() {}
186 virtual void slotRefreshColor();
189 void slotVSliderChanged( int v);
190 void slotVInChanged( int v);
191 void slotPatchChanged( const TQColor& clr);
194 void colorChanged( const KoColor &c);
197 KoColorSlider *mVSlider;
200 KColorPatch *mColorPatch;
203class LABWidget : public ColorWidget
208 LABWidget(TQWidget *parent = 0L);
209 virtual ~LABWidget() {}
212 virtual void slotRefreshColor();
215 void slotLSliderChanged( int l);
216 void slotASliderChanged( int a);
217 void slotBSliderChanged( int b);
219 void slotLInChanged( int l);
220 void slotAInChanged( int a);
221 void slotBInChanged( int b);
223 void slotPatchChanged( const TQColor& clr);
226 void colorChanged( const KoColor &c);
229 KoColorSlider *mLSlider;
230 KoColorSlider *mASlider;
231 KoColorSlider *mBSlider;
238 KColorPatch *mColorPatch;
|