blob: 869372cb83d17b232aa7e0553f234db033bbedc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef VIEWER_H
#define VIEWER_H
#include <QImage>
#include <QMainWindow>
#include <QMap>
class QAction;
class QFrame;
class QGridLayout;
class QLabel;
class QMenu;
class FinalWidget;
class ScreenWidget;
class Viewer : public QMainWindow
{
Q_OBJECT
public:
enum Brightness { None, Quarter, Half, ThreeQuarters, Full };
Viewer();
public slots:
void chooseFile();
void setBrightness(QAction *action);
void createImage();
void saveImage();
private:
void createMenus();
QFrame *createCentralWidget();
void openImageFile(QString &filePath);
FinalWidget *finalWidget;
int brightness;
QAction *currentBrightness;
QAction *saveAction;
QGridLayout *grid;
QImage scaledImage;
QMap <QAction*,Brightness> menuMap;
QMenu *brightnessMenu;
QMenu *fileMenu;
QString path;
ScreenWidget *cyanWidget;
ScreenWidget *magentaWidget;
ScreenWidget *yellowWidget;
};
#endif
|