0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 00:33:02 +03:00
LimeReport/limereport/lrgraphicsviewzoom.h
Arin Alexander 5717900216 Zommer has been moved to own module
Zommer has been moved to own module
2016-03-31 00:50:10 +04:00

29 lines
643 B
C++

#ifndef GRAPHICSVIEWZOOM_H
#define GRAPHICSVIEWZOOM_H
#include <QObject>
#include <QGraphicsView>
namespace LimeReport {
class GraphicsViewZoomer : public QObject {
Q_OBJECT
public:
GraphicsViewZoomer(QGraphicsView* view);
void gentleZoom(double factor);
void setModifiers(Qt::KeyboardModifiers modifiers);
void setZoomFactorBase(double value);
private:
QGraphicsView* m_view;
Qt::KeyboardModifiers m_modifiers;
double m_zoomFactorBase;
QPointF m_targetScenePos, m_targetViewportPos;
bool eventFilter(QObject* object, QEvent* event);
signals:
void zoomed();
};
} // namespace LimeReport
#endif // GRAPHICSVIEWZOOM_H