OGS
ColorPickerPushButton.h
Go to the documentation of this file.
1
15
#pragma once
16
17
// ** INCLUDES **
18
#include <QPushButton>
19
20
class
QColor;
21
class
QMouseEvent;
22
28
class
ColorPickerPushButton
:
public
QPushButton
29
{
30
Q_OBJECT
31
32
public
:
33
explicit
ColorPickerPushButton
(QWidget* parent =
nullptr
);
34
35
public
slots:
37
void
mouseReleaseEvent
(QMouseEvent* e)
override
;
38
40
void
setColor
(QColor color);
41
void
setColor
(
double
* color);
42
43
private
:
44
QString
colorToCss
(QColor color);
45
QString
colorToString
(QColor color);
46
47
QColor
_color
;
48
49
signals:
51
void
colorPicked
(QColor);
52
};
ColorPickerPushButton
Definition
ColorPickerPushButton.h:29
ColorPickerPushButton::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *e) override
Calls the QColorDialog.
Definition
ColorPickerPushButton.cpp:27
ColorPickerPushButton::colorPicked
void colorPicked(QColor)
Is emitted when a color was picked from the dialog.
ColorPickerPushButton::ColorPickerPushButton
ColorPickerPushButton(QWidget *parent=nullptr)
Definition
ColorPickerPushButton.cpp:20
ColorPickerPushButton::setColor
void setColor(QColor color)
Sets the color.
Definition
ColorPickerPushButton.cpp:62
ColorPickerPushButton::_color
QColor _color
Definition
ColorPickerPushButton.h:47
ColorPickerPushButton::colorToString
QString colorToString(QColor color)
Definition
ColorPickerPushButton.cpp:49
ColorPickerPushButton::colorToCss
QString colorToCss(QColor color)
Definition
ColorPickerPushButton.cpp:41
Applications
DataExplorer
Base
ColorPickerPushButton.h
Generated by
1.12.0