0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-27 18:08:10 +03:00
LimeReport/limereport/lrgraphicsviewzoom.h

30 lines
693 B
C
Raw Normal View History

#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);
2016-06-10 18:05:18 +03:00
void setView(QGraphicsView* view);
private:
QGraphicsView* m_view;
Qt::KeyboardModifiers m_modifiers;
double m_zoomFactorBase;
QPointF m_targetScenePos, m_targetViewportPos;
bool eventFilter(QObject* object, QEvent* event);
signals:
2016-04-05 23:06:11 +03:00
void zoomed(double factor);
};
} // namespace LimeReport
#endif // GRAPHICSVIEWZOOM_H