forked from psemiletov/tea-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
img_viewer.h
66 lines (44 loc) · 1.05 KB
/
img_viewer.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
58
59
60
61
62
63
64
65
#ifndef IMG_VIEWER_H
#define IMG_VIEWER_H
#include <QObject>
#include <QWidget>
#include <QFileInfoList>
#include <QLabel>
#include <QMovie>
class CGIFWindow: public QLabel
{
Q_OBJECT
public:
QMovie *movie;
CGIFWindow (QWidget *parent = 0);
~CGIFWindow();
void load_image (const QString &fname);
void keyPressEvent ( QKeyEvent * event);
void closeEvent (QCloseEvent *event);
};
class CZORWindow : public QWidget
{
Q_OBJECT
public:
QString fname_image;
QImage source_image;
CZORWindow (QWidget *parent = 0);
~CZORWindow();
void load_image (const QString &fname);
void paintEvent (QPaintEvent *event);
void keyPressEvent (QKeyEvent *event);
void closeEvent (QCloseEvent *event);
};
class CImgViewer: public QObject
{
Q_OBJECT
public:
QWidget window_mini;
CZORWindow window_full;
QLabel *img_mini;
CImgViewer (QObject *parent = 0);
void set_image_mini (const QString &fname);
void set_image_full (const QString &fname);
QString get_the_thumb_name (const QString &img_fname);
};
#endif // IMG_VIEWER_H