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
viewer.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 VIEWER_H
5#define VIEWER_H
6
7#include <QImage>
8#include <QMainWindow>
9#include <QMap>
10
11class QAction;
12class QFrame;
13class QGridLayout;
14class QLabel;
15class QMenu;
16class FinalWidget;
17class ScreenWidget;
18
19class Viewer : public QMainWindow
20{
22public:
24 Viewer();
25
26public slots:
27 void chooseFile();
28 void setBrightness(QAction *action);
29 void createImage();
30 void saveImage();
31
32private:
33 void createMenus();
34 QFrame *createCentralWidget();
35 void openImageFile(QString &filePath);
36
37 FinalWidget *finalWidget;
38 int brightness;
39 QAction *currentBrightness;
40 QAction *saveAction;
41 QGridLayout *grid;
42 QImage scaledImage;
43 QMap <QAction*,Brightness> menuMap;
44 QMenu *brightnessMenu;
45 QMenu *fileMenu;
47 ScreenWidget *cyanWidget;
48 ScreenWidget *magentaWidget;
49 ScreenWidget *yellowWidget;
50};
51
52#endif
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition qaction.h:30
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
The QMainWindow class provides a main application window.
Definition qmainwindow.h:25
The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.
Definition qmenu.h:26
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
void setBrightness(QAction *action)
Definition viewer.cpp:152
void saveImage()
Definition viewer.cpp:268
Viewer()
Definition viewer.cpp:26
Brightness
Definition viewer.h:23
@ Full
Definition viewer.h:23
@ ThreeQuarters
Definition viewer.h:23
@ None
Definition viewer.h:23
@ Quarter
Definition viewer.h:23
@ Half
Definition viewer.h:23
void createImage()
Definition viewer.cpp:222
void chooseFile()
Definition viewer.cpp:133
GLsizei const GLchar *const * path
#define Q_OBJECT
#define slots