lib

ko_hsv_widget.h

00001 
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);
00055     virtual void setMode(KDualColorButton::DualColor);
00056 signals:
00057 
00061     virtual void sigFgColorChanged(const QColor & c);
00062     virtual void sigBgColorChanged(const QColor & c);
00064     virtual void sigModeChanged(KDualColorButton::DualColor);
00065 
00066 protected slots:
00067 
00068     virtual void slotHChanged(int h);
00069     virtual void slotSChanged(int s);
00070     virtual void slotVChanged(int v);
00071     virtual void slotWheelChanged(const KoColor& c);
00072 
00073     void slotFGColorSelected(const QColor& c);
00074     void slotBGColorSelected(const QColor& c);
00075     void currentChanged(KDualColorButton::DualColor);
00076 
00077 private:
00078     void changedFgColor();
00079     void changedBgColor();
00080 
00081     void update(const KoColor & fgColor, const KoColor & bgColor);
00082 
00083     KoColorWheel *m_colorwheel;
00084     KValueSelector *m_VSelector;
00085     QLabel *mHLabel;
00086     QLabel *mSLabel;
00087     QLabel *mVLabel;
00088     QSpinBox *mHIn;
00089     QSpinBox *mSIn;
00090     QSpinBox *mVIn;
00091     KDualColorButton *m_ColorButton;
00092 
00093     KoColor m_fgColor;
00094     KoColor m_bgColor;
00095 
00096     bool m_autovalue;
00097 };
00098 
00099 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys