-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
imageview.h
39 lines (31 loc) · 863 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
/** @file imageview.h
* Hlavickovy soubor tridy ImageView dedici ze tridy QWidget
* pro zobrazeni noveho okna s fotografii v puvodni velikosti
*/
#ifndef IMAGEVIEW_H
#define IMAGEVIEW_H
#include "scrollarea.h"
#include <QLabel>
#include <QLayout>
#include <QWidget>
#include <exiv2/exiv2.hpp>
class ImageView : public QWidget {
Q_OBJECT
QLabel* imageL;
QImage* img;
ScrollArea* scrollArea;
void resizeEvent(QResizeEvent* event);
QSize currentSize;
double scaleFactor = 1.0;
public:
ImageView(QWidget* parent = 0);
~ImageView();
// ImageView(QWidget *parent = 0,QImage *image = 0);
void setImage(QString pictureName);
void wheelEvent(QWheelEvent* event);
virtual QSize sizeHint() const;
public slots:
void changeImageSize(int delta);
void keyPressEvent(QKeyEvent* e);
};
#endif // IMAGEVIEW_H