mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 20:44:39 +03:00
5717900216
Zommer has been moved to own module
29 lines
643 B
C++
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
|