Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
12class QGridLayout;
13class QLabel;
14class QPushButton;
15class QWidget;
16
17class ScreenWidget : public QFrame
18{
20public:
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
30
31public slots:
32 void setColor();
33 void invertImage();
34
35private:
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
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
The QFrame class is the base class of widgets that can have a frame.
Definition qframe.h:17
The QGridLayout class lays out widgets in a grid.
Definition qgridlayout.h:21
\inmodule QtGui
Definition qimage.h:37
The QLabel widget provides a text or image display.
Definition qlabel.h:20
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
The QPushButton widget provides a command button.
Definition qpushbutton.h:20
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
void setColor()
Separate the current image into cyan, magenta, and yellow components.
void imageChanged()
void invertImage()
Sets whether the amount of ink applied to the canvas is to be inverted (subtracted from the maximum v...
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...
QImage * image()
Returns a pointer to the modified image.
void setImage(QImage &image)
Records the original image selected by the user, creates a color separation, and enables the invert i...
Definition image.cpp:4
GLuint name
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
#define Q_OBJECT
#define slots
#define signals