-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathimageview.h
60 lines (45 loc) · 1010 Bytes
/
imageview.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
#ifndef IMAGEVIEW_H
#define IMAGEVIEW_H
#include <QStackedWidget>
#include <QString>
class QImage;
class ImageFile;
namespace Ui
{
class ImageView;
}
class ThreadedImageLoader;
/*
* Image viewer preserving aspect ratio and supporting scaling.
*
* Displays a spinning progress when loading a file. Utilizes ImageViewer class
* to display an actual image
*/
class ImageView : public QStackedWidget
{
Q_OBJECT
public:
explicit ImageView(QWidget *parent = 0);
~ImageView();
/*
* Load the specified image
*/
void setImageFile(ImageFile *imageFile);
/*
* Is loading the specified image
*/
bool busy() const;
void reset();
private:
void setImage(const QImage &image);
signals:
void zoomChanged(double);
void platesChanged();
private slots:
void slotImageFileLoaded(const QImage &image);
private:
Ui::ImageView *ui;
ImageFile *m_imageFile;
ThreadedImageLoader *m_threadedImageLoader;
};
#endif // IMAGEVIEW_H