Engauge Digitizer  2
ZoomTransition.h
1 /******************************************************************************************************
2  * (C) 2017 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef ZOOM_TRANSITION_H
8 #define ZOOM_TRANSITION_H
9 
10 #include <QMap>
11 #include "ZoomFactor.h"
12 
15 {
16 public:
18  ZoomTransition ();
19 
21  double mapToFactor (ZoomFactor zoomFactor) const;
22 
24  ZoomFactor zoomIn (ZoomFactor currentZoomFactor,
25  double m11,
26  double m22,
27  bool actionZoomFillIsChecked) const;
28 
30  ZoomFactor zoomOut (ZoomFactor currentZoomFactor,
31  double m11,
32  double m22,
33  bool actionZoomFillIsChecked) const;
34 
35 private:
36  QMap<ZoomFactor, double> m_zoomMapToFactor;
37 };
38 
39 #endif // ZOOM_TRANSITION_H
double mapToFactor(ZoomFactor zoomFactor) const
Return the floating precision zoom factor given the enum value.
ZoomFactor zoomIn(ZoomFactor currentZoomFactor, double m11, double m22, bool actionZoomFillIsChecked) const
Zoom in.
ZoomTransition()
Single constructor.
Perform calculations to determine the next zoom setting given the current zoom setting, when zooming in or out.
ZoomFactor zoomOut(ZoomFactor currentZoomFactor, double m11, double m22, bool actionZoomFillIsChecked) const
Zoom out.