lib
ko_cmyk_widget.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KO_CMYK_WIDGET_H
00021 #define KO_CMYK_WIDGET_H
00022
00023 #include "qwidget.h"
00024
00025 #include <koffice_export.h>
00026
00027 class KoFrameButton;
00028 class QGridLayout;
00029 class QColor;
00030 class KoColorSlider;
00031 class QLabel;
00032 class QSpinBox;
00033 class KDualColorButton;
00034
00035 struct CMYKColor
00036 {
00037 float C;
00038 float M;
00039 float Y;
00040 float K;
00041 };
00042
00043 class KoCMYKWidget
00044 : public QWidget
00045 {
00046 Q_OBJECT
00047 typedef QWidget super;
00048
00049 public:
00050 KoCMYKWidget(QWidget *parent = 0L, const char *name = 0);
00051 virtual ~KoCMYKWidget() {}
00052
00053 public slots:
00057 virtual void setFgColor(const QColor & c);
00058 virtual void setBgColor(const QColor & c);
00059
00060 signals:
00061
00065 virtual void sigFgColorChanged(const QColor & c);
00066 virtual void sigBgColorChanged(const QColor & c);
00067
00068
00069 protected slots:
00070
00071 virtual void slotCChanged(int c);
00072 virtual void slotMChanged(int m);
00073 virtual void slotYChanged(int y);
00074 virtual void slotKChanged(int k);
00075
00076 void slotFGColorSelected(const QColor& c);
00077 void slotBGColorSelected(const QColor& c);
00078
00079 private:
00080
00081 void update(const QColor fgColor, const QColor);
00082
00083 CMYKColor RgbToCmyk(const QColor& col);
00084 QColor CmykToRgb(const CMYKColor& c);
00085
00086 private:
00087
00088 KoColorSlider *mCSlider;
00089 KoColorSlider *mMSlider;
00090 KoColorSlider *mYSlider;
00091 KoColorSlider *mKSlider;
00092 QLabel *mCLabel;
00093 QLabel *mMLabel;
00094 QLabel *mYLabel;
00095 QLabel *mKLabel;
00096 QSpinBox *mCIn;
00097 QSpinBox *mMIn;
00098 QSpinBox *mYIn;
00099 QSpinBox *mKIn;
00100 KDualColorButton *m_ColorButton;
00101
00102 float m_fgC;
00103 float m_fgM;
00104 float m_fgY;
00105 float m_fgK;
00106
00107 float m_bgC;
00108 float m_bgM;
00109 float m_bgY;
00110 float m_bgK;
00111
00112 QColor m_fgColor;
00113 QColor m_bgColor;
00114 };
00115
00116 #endif
|