Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
screenwidget.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
#
ifndef
SCREENWIDGET_H
5
#
define
SCREENWIDGET_H
6
7
#
include
<
QColor
>
8
#
include
<
QFrame
>
9
#
include
<
QImage
>
10
#
include
<
QSize
>
11
12
class
QGridLayout;
13
class
QLabel;
14
class
QPushButton;
15
class
QWidget
;
16
17
class
ScreenWidget
:
public
QFrame
18
{
19
Q_OBJECT
20
public
:
21
enum
Separation
{
Cyan
,
Magenta
,
Yellow
};
22
23
ScreenWidget
(
QWidget
*parent, QColor initialColor,
const
QString &name,
24
Separation mask,
const
QSize &labelSize);
25
void
setImage
(QImage &image);
26
QImage
*
image
();
27
28
signals
:
29
void
imageChanged
();
30
31
public
slots
:
32
void
setColor
();
33
void
invertImage
();
34
35
private
:
36
void
createImage();
37
38
bool
inverted;
39
QColor paintColor;
40
QImage newImage;
41
QImage originalImage;
42
QLabel *imageLabel;
43
QLabel *nameLabel;
44
QPushButton *colorButton;
45
QPushButton *invertButton;
46
Separation maskColor;
47
};
48
49
#
endif
QPainter::QWidget
friend class QWidget
Definition
qpainter.h:431
ScreenWidget
Definition
screenwidget.h:18
ScreenWidget::invertImage
void invertImage()
Sets whether the amount of ink applied to the canvas is to be inverted (subtracted from the maximum v...
Definition
screenwidget.cpp:141
ScreenWidget::ScreenWidget
ScreenWidget(QWidget *parent, QColor initialColor, const QString &name, Separation mask, const QSize &labelSize)
Initializes the paint color, the mask color (cyan, magenta, or yellow), connects the color selector a...
Definition
screenwidget.cpp:33
ScreenWidget::image
QImage * image()
Returns a pointer to the modified image.
Definition
screenwidget.cpp:131
ScreenWidget::setImage
void setImage(QImage &image)
Records the original image selected by the user, creates a color separation, and enables the invert i...
Definition
screenwidget.cpp:174
qtbase
src
gui
doc
snippets
separations
screenwidget.h
Generated on
for Qt by
1.14.0