Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
g
i
l
m
o
p
r
s
t
v
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
w
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Properties
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Related Functions
:
a
b
c
d
e
f
g
i
m
o
q
r
s
v
w
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
x
z
+
Enumerations
a
b
c
d
e
f
h
i
k
l
n
o
r
t
u
v
x
+
Enumerator
b
c
d
e
f
h
i
k
l
m
n
o
p
r
t
u
v
w
x
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
3rdparty
color_widgets
include
color_preview.hpp
Go to the documentation of this file.
1
23
#ifndef COLOR_PREVIEW_HPP
24
#define COLOR_PREVIEW_HPP
25
26
#include <QWidget>
27
28
namespace
color_widgets
{
29
33
class
ColorPreview
:
public
QWidget
34
{
35
Q_OBJECT
36
Q_PROPERTY(QColor
color
READ
color
WRITE
setColor
NOTIFY
colorChanged
DESIGNABLE
true
)
37
Q_PROPERTY(QColor
comparisonColor
READ
comparisonColor
WRITE
setComparisonColor
DESIGNABLE true)
38
Q_PROPERTY(
DisplayMode
display_mode
READ
displayMode
WRITE
setDisplayMode
DESIGNABLE true)
39
Q_PROPERTY(QBrush
background
READ
background
WRITE
setBackground
DESIGNABLE true)
40
Q_ENUMS(
DisplayMode
)
41
public:
42
enum
DisplayMode
43
{
44
NoAlpha
,
45
AllAlpha
,
46
SplitAlpha
,
47
SplitColor
48
};
49
50
explicit
ColorPreview
(QWidget *parent = 0);
51
~ColorPreview
();
52
54
QBrush
background
()
const
;
55
57
void
setBackground
(
const
QBrush &bk);
58
60
DisplayMode
displayMode
()
const
;
61
63
void
setDisplayMode
(
DisplayMode
dm);
64
66
QColor
color
()
const
;
67
69
QColor
comparisonColor
()
const
;
70
71
QSize
sizeHint
()
const
;
72
73
void
paint
(QPainter &painter, QRect rect)
const
;
74
75
public
slots:
77
void
setColor
(
const
QColor &c);
78
80
void
setComparisonColor
(
const
QColor &c);
81
82
signals:
84
void
clicked
();
85
87
void
colorChanged
(QColor);
88
89
protected
:
90
void
paintEvent
(QPaintEvent *);
91
void
resizeEvent
(QResizeEvent *);
92
void
mouseReleaseEvent
(QMouseEvent *ev);
93
void
mouseMoveEvent
(QMouseEvent *ev);
94
95
private
:
96
class
Private
;
97
Private
*
const
p
;
98
};
99
100
}
// namespace color_widgets
101
102
#endif // COLOR_PREVIEW_HPP
color_widgets::ColorPreview::sizeHint
QSize sizeHint() const
Definition:
color_preview.cpp:88
color_widgets::ColorPreview::paint
void paint(QPainter &painter, QRect rect) const
Definition:
color_preview.cpp:93
color_widgets::ColorPreview::~ColorPreview
~ColorPreview()
Definition:
color_preview.cpp:51
color_widgets::ColorPreview::Private
Definition:
color_preview.cpp:33
color_widgets::ColorPreview::displayMode
DisplayMode displayMode() const
Get color display mode.
Definition:
color_preview.cpp:67
color_widgets::ColorPreview::setColor
void setColor(const QColor &c)
Set current color.
Definition:
color_preview.cpp:131
color_widgets::ColorPreview::colorChanged
void colorChanged(QColor)
Emitted on setColor.
color_widgets::ColorPreview::DisplayMode
DisplayMode
Definition:
color_preview.hpp:42
color_widgets::ColorPreview::setBackground
void setBackground(const QBrush &bk)
Change the background visible under transparent colors.
Definition:
color_preview.cpp:56
color_widgets::ColorPreview::SplitAlpha
Show both solid and transparent side by side.
Definition:
color_preview.hpp:46
color_widgets::ColorPreview::display_mode
DisplayMode display_mode
Definition:
color_preview.hpp:38
color_widgets::ColorPreview::resizeEvent
void resizeEvent(QResizeEvent *)
Definition:
color_preview.cpp:151
color_widgets::ColorPreview::background
QBrush background() const
Get the background visible under transparent colors.
color_widgets::ColorPreview::paintEvent
void paintEvent(QPaintEvent *)
Definition:
color_preview.cpp:144
color_widgets::ColorPreview::comparisonColor
QColor comparisonColor() const
Get the comparison color.
color_widgets::ColorPreview::color
QColor color() const
Get current color.
color_widgets::ColorPreview::AllAlpha
show current color with transparency
Definition:
color_preview.hpp:45
color_widgets::ColorPreview::SplitColor
Show current and comparison colors side by side.
Definition:
color_preview.hpp:47
color_widgets::ColorPreview::clicked
void clicked()
Emitted when the user clicks on the widget.
color_widgets::ColorPreview
Definition:
color_preview.hpp:33
color_widgets::ColorPreview::ColorPreview
ColorPreview(QWidget *parent=0)
Definition:
color_preview.cpp:45
color
color
Definition:
color.h:23
color_widgets::ColorPreview::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *ev)
Definition:
color_preview.cpp:156
color_widgets::ColorPreview::NoAlpha
Show current color with no transparency.
Definition:
color_preview.hpp:44
color_widgets::ColorPreview::p
Private *const p
Definition:
color_preview.hpp:96
color_widgets::ColorPreview::setDisplayMode
void setDisplayMode(DisplayMode dm)
Set how transparent colors are handled.
Definition:
color_preview.cpp:72
color_widgets
Definition:
color_dialog.hpp:33
color_widgets::ColorPreview::setComparisonColor
void setComparisonColor(const QColor &c)
Set the comparison color.
Definition:
color_preview.cpp:138
color_widgets::ColorPreview::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *ev)
Definition:
color_preview.cpp:162
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:01