qwwhuesatpicker.h

00001 //
00002 // C++ Interface: qwwhuesatpicker
00003 //
00004 // Description:
00005 //
00006 //
00007 // Author: Witold Wysota <wysota@wysota.eu.org>, (C) 2007
00008 //
00009 // Copyright: See COPYING file that comes with this distribution
00010 //
00011 //
00012 #ifndef QWWHUESATPICKER_H
00013 #define QWWHUESATPICKER_H
00014 
00015 #ifndef WW_NO_HUESATPICKER
00016 
00017 #include <QFrame>
00018 #include <QPixmap>
00019 #include <wwglobal.h>
00020 
00021 class QwwHueSatPickerPrivate;
00022 class Q_WW_EXPORT QwwHueSatPicker : public QFrame, public QwwPrivatable {
00023     Q_OBJECT
00024     Q_PROPERTY(int minimumHue READ minimumHue WRITE setMinimumHue)
00025     Q_PROPERTY(int maximumHue READ maximumHue WRITE setMaximumHue)
00026     Q_PROPERTY(int minimumSat READ minimumSat WRITE setMinimumSat)
00027     Q_PROPERTY(int maximumSat READ maximumSat WRITE setMaximumSat)
00028     Q_PROPERTY(int value READ value WRITE setValue)
00029     Q_PROPERTY(QColor color READ color WRITE setColor)
00030 public:
00031     QwwHueSatPicker(QWidget *parent = 0);
00032     ~QwwHueSatPicker();
00033     QSize sizeHint() const;
00034     QSize minimumSizeHint() const;
00035     int value() const;
00036     QColor color() const;
00037     int minimumSat() const;
00038     int maximumSat() const;
00039     int minimumHue() const;
00040     int maximumHue() const;
00041     void setHueRange(int mi, int ma);
00042     void setSatRange(int mi, int ma);
00043 public slots:
00044     void setValue(int v);
00045     void setMinimumSat(int v);
00046     void setMaximumSat(int v);
00047     void setMinimumHue(int h);
00048     void setMaximumHue(int h);
00049     void setColor(const QColor &c);
00050 signals:
00051     void valueChanged(int);
00052     void minimumHueChanged(int);
00053     void maximumHueChanged(int);
00054     void minimumSatChanged(int);
00055     void maximumSatChanged(int);
00056     void satRangeChanged(int, int);
00057     void hueRangeChanged(int, int);
00058     void colorPicked(QColor);
00059 protected:
00060     virtual void drawCrosshair(QPainter *p, const QPoint &pt);
00061 private:
00062     void paintEvent(QPaintEvent *pe);
00063     void mousePressEvent(QMouseEvent *me);
00064     void mouseMoveEvent(QMouseEvent *me);
00065     void resizeEvent(QResizeEvent *);
00066     WW_DECLARE_PRIVATE(QwwHueSatPicker);
00067     Q_DISABLE_COPY(QwwHueSatPicker);
00068 };
00069 
00070 #endif
00071 
00072 #endif

Generated on Sat Apr 21 21:54:35 2007 for wwWidgets by  doxygen 1.5.1