blob: a04a70d03a56b5a4e1fc652c69dc0ab60fe2e628 (
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
|
#pragma once
#include <QGraphicsView>
#include <QEvent>
class PhotoView : public QGraphicsView
{
Q_OBJECT
public:
PhotoView (QWidget *parent = nullptr);
void zoomNormal ();
void zoomFit ();
void zoomIn ();
void zoomOut ();
private:
const double scaleFactor = 1.25;
const double invScaleFactor = 1 / 1.25;
bool eventFilter(QObject *, QEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
bool isFit = true;
signals:
void nextImage();
void prevImage();
};
|