52 #ifndef VMAINGRAPHICSVIEW_H
53 #define VMAINGRAPHICSVIEW_H
55 #include <qcompilerdetection.h>
56 #include <QGraphicsView>
57 #include <QMetaObject>
64 #include <QRubberBand>
67 #include <QSharedPointer>
121 virtual bool eventFilter(QObject*
object, QEvent* event) Q_DECL_OVERRIDE;
164 void setShowToolOptions(
bool value);
165 void allowRubberBand(
bool value);
166 void zoomPanEnabled(
bool value);
167 void zoomToAreaEnabled(
bool value);
169 static void NewSceneRect(QGraphicsScene *sc, QGraphicsView *view, QGraphicsItem *item =
nullptr);
170 static QRectF SceneVisibleArea(QGraphicsView *view);
172 static qreal MinScale();
173 static qreal MaxScale();
175 void setRubberBandColor(QRubberBand *band,
const QColor &color);
177 void initScrollBars();
191 void zoomByScale(qreal scale);
194 void zoom100Percent();
196 void zoomToRect(
const QRectF &rect);
197 void updateView(
const QTransform &transform);
198 void resetScrollBars();
199 void resetScrollAnimations();
202 virtual void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
203 virtual void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
204 virtual void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
205 virtual void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
212 bool showToolProperties;
214 bool isallowRubberBand;
215 bool isZoomToAreaActive;
216 bool isRubberBandActive;
217 bool isRubberBandColorSet;
218 bool isZoomPanActive;
219 bool isPanDragActive;
220 QRubberBand *rubberBand;
221 QRect *rubberBandRect;
GraphicsViewZoom(QGraphicsView *view)
QTimeLine * verticalScrollAnim
void panTriggered(QPanGesture *gesture)
void horizontalScrollingTime(qreal x)
Qt::KeyboardModifiers m_modifiers
bool startHorizontalScrollings(QWheelEvent *wheel_event)
qint32 m_numScheduledVerticalScrollings
_numScheduledVerticalScrollings keep number scheduled vertical scrollings.
virtual bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE
bool gestureEvent(QGestureEvent *event)
void setModifiers(Qt::KeyboardModifiers modifiers)
void pinchTriggered(QPinchGesture *gesture)
void setZoomSpeedFactor(qreal value)
void verticalScrollingTime(qreal x)
void fictiveSceneRect(QGraphicsScene *sc, QGraphicsView *view)
bool startVerticalScrollings(QWheelEvent *wheel_event)
void gentleZoom(qreal factor)
QTimeLine * horizontalScrollAnim
void initScrollAnimations()
qint32 m_numScheduledHorizontalScrollings
_numScheduledHorizontalScrollings keep number scheduled horizontal scrollings.
The VMainGraphicsView class main scene view.
void itemClicked(QGraphicsItem *item)
void signalZoomScaleChanged(qreal scale)
QSharedPointer< QCursor > curMagnifier
void mouseRelease()
mouseRelease help catch mouse release event.