23 #ifndef COLOR_WHEEL_HPP
24 #define COLOR_WHEEL_HPP
40 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged DESIGNABLE
true STORED
false )
41 Q_PROPERTY(qreal hue READ hue WRITE setHue DESIGNABLE false )
42 Q_PROPERTY(qreal saturation READ saturation WRITE setSaturation DESIGNABLE false )
43 Q_PROPERTY(qreal value READ value WRITE setValue DESIGNABLE false )
44 Q_PROPERTY(
unsigned wheelWidth READ wheelWidth WRITE setWheelWidth DESIGNABLE true )
45 Q_PROPERTY(Display_Flags displayFlags READ displayFlags WRITE setDisplayFlags NOTIFY displayFlagsChanged DESIGNABLE true )
50 SHAPE_DEFAULT = 0x000,
51 SHAPE_TRIANGLE = 0x001,
55 ANGLE_DEFAULT = 0x000,
57 ANGLE_ROTATING = 0x020,
60 COLOR_DEFAULT = 0x000,
66 FLAGS_DEFAULT = 0x000,
69 Q_DECLARE_FLAGS(Display_Flags, Display_Enum)
70 Q_FLAGS(Display_Flags)
78 QSize sizeHint() const;
84 qreal saturation() const;
90 unsigned int wheelWidth() const;
93 void setWheelWidth(
unsigned int w);
96 Display_Flags displayFlags(Display_Flags mask = FLAGS_ALL) const;
99 static
void setDefaultDisplayFlags(Display_Flags flags);
102 static Display_Flags defaultDisplayFlags(Display_Flags mask = FLAGS_ALL);
109 void setDisplayFlag(Display_Flags flag, Display_Flags mask);
114 void setColor(QColor c);
119 void setHue(qreal h);
124 void setSaturation(qreal s);
129 void setValue(qreal v);
135 void setDisplayFlags(
Color_Wheel::Display_Flags flags);
141 void colorChanged(QColor);
146 void colorSelected(QColor);
148 void displayFlagsChanged(
Color_Wheel::Display_Flags flags);
151 void paintEvent(QPaintEvent *);
152 void mouseMoveEvent(QMouseEvent *);
153 void mousePressEvent(QMouseEvent *);
154 void mouseReleaseEvent(QMouseEvent *);
155 void resizeEvent(QResizeEvent *);
162 Q_DECLARE_OPERATORS_FOR_FLAGS(
Color_Wheel::Display_Flags)
164 #endif // COLOR_WHEEL_HPP
Display_Enum
Definition: color_wheel.hpp:48
#define QCP_EXPORT
Definition: colorpicker_global.hpp:9
Display an analog widget that allows the selection of a HSV color.
Definition: color_wheel.hpp:36