-
Notifications
You must be signed in to change notification settings - Fork 0
/
imageviewer.h
57 lines (44 loc) · 1 KB
/
imageviewer.h
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
53
54
55
56
57
#ifndef IMAGEVIEWER_H
#define IMAGEVIEWER_H
#include <QMainWindow>
#include <QDebug>
#include <QPixmap>
#include <QFileDialog>
#include <QImageWriter>
#include <QMessageBox>
#include <QScrollArea>
#include <QHBoxLayout>
#include <QLabel>
// additional files
#include "imageprocessor.h"
QT_BEGIN_NAMESPACE
namespace Ui { class ImageViewer; }
QT_END_NAMESPACE
class ImageViewer : public QMainWindow
{
Q_OBJECT
public:
ImageViewer(QWidget *parent = nullptr);
~ImageViewer();
public slots:
void doOpen();
void doSave();
void doExit();
void doColor();
void doGray();
void doBin();
private:
// functions
bool loadImage(const QStringList& fileName);
bool saveImage(const QString& fileName);
void setImage(const QImage& img);
void createAction();
void createConnection();
QImage processImage(QImage& img);
Ui::ImageViewer *ui;
QList<QImage*> imagesList;
QAction* loadAct;
QAction* exitAct;
QAction* saveAct;
};
#endif // IMAGEVIEWER_H