diff options
author | Loïc Bartoletti <loic.bartoletti@oslandia.com> | 2018-09-24 23:40:38 +0200 |
---|---|---|
committer | Loïc Bartoletti <loic.bartoletti@oslandia.com> | 2018-09-25 22:23:12 +0200 |
commit | b23d20719ba9a518d67e20ad66975e6c25b20cbe (patch) | |
tree | b613b7380b4dbab6ce480d860e10e16941e5fbc9 /src-qt5/desktop-utils/lumina-photo/PhotoView.h | |
parent | Merge pull request #622 from chenliangomc/master (diff) | |
download | lumina-b23d20719ba9a518d67e20ad66975e6c25b20cbe.tar.gz lumina-b23d20719ba9a518d67e20ad66975e6c25b20cbe.tar.bz2 lumina-b23d20719ba9a518d67e20ad66975e6c25b20cbe.zip |
init lumina-photo
Diffstat (limited to 'src-qt5/desktop-utils/lumina-photo/PhotoView.h')
-rw-r--r-- | src-qt5/desktop-utils/lumina-photo/PhotoView.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-photo/PhotoView.h b/src-qt5/desktop-utils/lumina-photo/PhotoView.h new file mode 100644 index 00000000..521e705d --- /dev/null +++ b/src-qt5/desktop-utils/lumina-photo/PhotoView.h @@ -0,0 +1,18 @@ +#pragma once + +#include <QGraphicsView> + +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; +}; |