![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/CoreWidgets/ColorButton.h>
Specialization of a QPushButton to show and select a color. More...
Inheritance diagram for ColorButton:Specialization of a QPushButton to show and select a color.
The button will show the selected color as pixmap and optionally as hex-string. Clicking on the button will open a color selector widget, either the built-in OS color picker or the ColorPickerWidget.
Public Types | |
| enum class | PickerType { FullOS , Reduced } |
| Widget type to use for letting the user choose a color. More... | |
Signals | |
| void | valueChangedQColor (const QColor &value) |
| void | valueChangedVec4 (const vec4 &value) |
Public Member Functions | |
| ColorButton (PickerType pickerType, QWidget *parent=nullptr) | |
| PickerType | pickerType () const |
| Returns the color picker type to show when clicking the button. | |
| void | setPickerType (PickerType value) |
| Sets the color picker type to show when clicking the button. | |
| bool | showsText () const |
| Returns the flag whether to show the current color also as text in hexadecimal format. | |
| void | setShowText (bool value) |
| Sets the flag whether to show the current color also as text in hexadecimal format. | |
| bool | useAlpha () const |
| Returns the flag whether to make the alpha value configurable as well. | |
| void | setUseAlpha (bool value) |
| Sets the flag whether to make the alpha value configurable as well. | |
| const QColor & | colorQt () const |
| Returns the currently configured color as QColor. | |
| void | setColor (const QColor &value) |
| Sets the currently configured color as QColor. | |
| vec4 | colorVec4 () const |
| Returns the currently configured color as vec4. | |
| void | setColor (const vec4 &value) |
| Sets the currently configured color as vec4. | |
| vec3 | colorVec3 () const |
| Returns the currently configured color as vec3 ignoring the alpha component. | |
| void | setColor (const vec3 &value) |
| Sets the currently configured color as vec3 setting the alpha component to 1. | |
|
strong |
Widget type to use for letting the user choose a color.
| Enumerator | |
|---|---|
| FullOS | QColorDialog as provided by the underlying OS. |
| Reduced | Simplified ColorPickerWidget from the ImFusion SDK. |