OpenHantek
Loading...
Searching...
No Matches
colorbox.h
1// SPDX-License-Identifier: GPL-2.0+
2
3#pragma once
4
5#include <QColor>
6#include <QPushButton>
7
9class ColorBox : public QPushButton {
10 Q_OBJECT
11
12 public:
13 ColorBox(QColor color, QWidget *parent = 0);
14 ~ColorBox();
15
16 const QColor getColor();
17
18 public slots:
19 void setColor(QColor color);
20 void waitForColor();
21
22 private:
23 QColor color;
24
25 signals:
26 void colorChanged(QColor color);
27};
A widget for the selection of a color.
Definition colorbox.h:9
void colorChanged(QColor color)
The color has been changed.
ColorBox(QColor color, QWidget *parent=0)
Initializes the widget.
Definition colorbox.cpp:35
const QColor getColor()
Get the current color.
Definition colorbox.cpp:46
void waitForColor()
Wait for the color dialog and apply chosen color.
Definition colorbox.cpp:59
void setColor(QColor color)
Sets the color.
Definition colorbox.cpp:50
~ColorBox()
Cleans up the widget.
Definition colorbox.cpp:42