OGS
|
ColorPickerPushButton calls a QColorDialog on clicking and then sends a colorPicked(QColor) signal. It also saves the last color and sets its background color accordingly.
Definition at line 28 of file ColorPickerPushButton.h.
#include <ColorPickerPushButton.h>
Public Slots | |
void | mouseReleaseEvent (QMouseEvent *e) override |
Calls the QColorDialog. | |
void | setColor (QColor color) |
Sets the color. | |
void | setColor (double *color) |
Signals | |
void | colorPicked (QColor) |
Is emitted when a color was picked from the dialog. | |
Public Member Functions | |
ColorPickerPushButton (QWidget *parent=nullptr) | |
Private Member Functions | |
QString | colorToCss (QColor color) |
QString | colorToString (QColor color) |
Private Attributes | |
QColor | _color |
|
explicit |
Definition at line 20 of file ColorPickerPushButton.cpp.
References _color.
|
signal |
Is emitted when a color was picked from the dialog.
Referenced by mouseReleaseEvent().
|
private |
Definition at line 41 of file ColorPickerPushButton.cpp.
References colorToString().
Referenced by setColor().
|
private |
Definition at line 49 of file ColorPickerPushButton.cpp.
Referenced by colorToCss(), and setColor().
|
overrideslot |
Calls the QColorDialog.
Definition at line 27 of file ColorPickerPushButton.cpp.
References _color, colorPicked(), and setColor().
|
slot |
Definition at line 87 of file ColorPickerPushButton.cpp.
References setColor().
|
slot |
Sets the color.
Definition at line 62 of file ColorPickerPushButton.cpp.
References _color, colorToCss(), and colorToString().
Referenced by mouseReleaseEvent(), and setColor().
|
private |
Definition at line 47 of file ColorPickerPushButton.h.
Referenced by ColorPickerPushButton(), mouseReleaseEvent(), and setColor().