OpenHantek
Toggle main menu visibility
Loading...
Searching...
No Matches
colorbox.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
3
#pragma once
4
5
#include <QColor>
6
#include <QPushButton>
7
9
class
ColorBox
:
public
QPushButton {
10
Q_OBJECT
11
12
public
:
13
ColorBox
( QColor
color
, QWidget *parent =
nullptr
);
14
~ColorBox
()
override
;
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
};
ColorBox::colorChanged
void colorChanged(QColor color)
The color has been changed.
ColorBox::ColorBox
ColorBox(QColor color, QWidget *parent=nullptr)
Initializes the widget.
Definition
colorbox.cpp:35
ColorBox::getColor
const QColor getColor()
Get the current color.
Definition
colorbox.cpp:45
ColorBox::~ColorBox
~ColorBox() override
Cleans up the widget.
Definition
colorbox.cpp:41
ColorBox::waitForColor
void waitForColor()
Wait for the color dialog and apply chosen color.
Definition
colorbox.cpp:57
ColorBox::setColor
void setColor(QColor color)
Sets the color.
Definition
colorbox.cpp:49
ColorBox::color
QColor color
Definition
colorbox.h:23
widgets
colorbox.h
Generated by
1.17.0