![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/CoreWidgets/HsvColorPicker.h>
QWidget allowing for selecting 2 components of the HSV color space. More...
Inheritance diagram for HsvColorPicker2d:QWidget allowing for selecting 2 components of the HSV color space.
Renders the color gradient of the two selected components and offers user interaction to select the corresponding color underneath. The third component of the HSV color space is fixed.
Public Types | |
| enum class | Component { Hue , Saturation , Value } |
| HSV color space component. | |
Signals | |
| void | colorChanged (QColor) |
Public Member Functions | |
| HsvColorPicker2d (QWidget *parent=nullptr) | |
| Creates a new HsvColorPicker2d widget. | |
| void | setComponents (Component xComponent, Component yComponent) |
| Set the HSV components to plot along the two widget axes, must be different from each other. | |
| QColor | color () const |
| Returns the currently selected color. | |
| void | setColor (const QColor &c) |
| Sets current color. | |
| double | hue () const |
| Returns the currently selected hue in the range [0..1]. | |
| void | setHue (double h) |
| Sets the currently selected hue in the range [0..1]. | |
| double | saturation () const |
| Returns the currently selected saturation in the range [0..1]. | |
| void | setSaturation (double s) |
| Sets the currently selected saturation in the range [0..1]. | |
| double | value () const |
| Returns the currently selected value in the range [0..1]. | |
| void | setValue (double v) |
| Sets the currently selected value in the range [0..1]. | |
| QSize | sizeHint () const override |
Set the HSV components to plot along the two widget axes, must be different from each other.
| xComponent | HSV color space component to plot along the X axis. |
| yComponent | HSV color space component to plot along the Y axis. |