lib
ko_hsv_widget.h00001
00019 #ifndef KO_HSV_WIDGET_H
00020 #define KO_HSV_WIDGET_H
00021
00022 #include "qwidget.h"
00023 #include "kdualcolorbutton.h"
00024
00025 #include "koColor.h"
00026
00027 #include <koffice_export.h>
00028
00029 class KDualColorButton;
00030 class KValueSelector;
00031 class KoColorWheel;
00032 class KoColorSlider;
00033 class KoFrameButton;
00034 class QGridLayout;
00035 class QLabel;
00036 class QSpinBox;
00037
00038 class KoHSVWidget
00039 : public QWidget
00040 {
00041 Q_OBJECT
00042 typedef QWidget super;
00043
00044 public:
00045 KoHSVWidget(QWidget *parent = 0L, const char *name = 0);
00046 virtual ~KoHSVWidget() {}
00047
00048 public slots:
00052 virtual void setFgColor(const QColor & c);
00053 virtual void setBgColor(const QColor & c);
00054
00055 signals:
00056
00060 virtual void sigFgColorChanged(const QColor & c);
00061 virtual void sigBgColorChanged(const QColor & c);
00062
00063 protected slots:
00064
00065 virtual void slotHChanged(int h);
00066 virtual void slotSChanged(int s);
00067 virtual void slotVChanged(int v);
00068 virtual void slotWheelChanged(const KoColor& c);
00069
00070 void slotFGColorSelected(const QColor& c);
00071 void slotBGColorSelected(const QColor& c);
00072 void currentChanged(KDualColorButton::DualColor);
00073
00074 private:
00075 void changedFgColor();
00076 void changedBgColor();
00077
00078 void update(const KoColor & fgColor, const KoColor & bgColor);
00079
00080 KoColorWheel *m_colorwheel;
00081 KValueSelector *m_VSelector;
00082 QLabel *mHLabel;
00083 QLabel *mSLabel;
00084 QLabel *mVLabel;
00085 QSpinBox *mHIn;
00086 QSpinBox *mSIn;
00087 QSpinBox *mVIn;
00088 KDualColorButton *m_ColorButton;
00089
00090 KoColor m_fgColor;
00091 KoColor m_bgColor;
00092
00093 bool m_autovalue;
00094 };
00095
00096 #endif
|