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
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
friend class QWidget
Definition qpainter.h:431
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...