#include <vmaingraphicsview.h>
Public Slots | |
void | verticalScrollingTime (qreal x) |
void | horizontalScrollingTime (qreal x) |
void | animFinished () |
Signals | |
void | zoomed () |
Public Member Functions | |
GraphicsViewZoom (QGraphicsView *view) | |
void | gentleZoom (qreal factor) |
void | setModifiers (Qt::KeyboardModifiers modifiers) |
void | setZoomSpeedFactor (qreal value) |
void | initScrollAnimations () |
Protected Member Functions | |
virtual bool | eventFilter (QObject *object, QEvent *event) Q_DECL_OVERRIDE |
Private Member Functions | |
void | fictiveSceneRect (QGraphicsScene *sc, QGraphicsView *view) |
bool | startVerticalScrollings (QWheelEvent *wheel_event) |
bool | startHorizontalScrollings (QWheelEvent *wheel_event) |
bool | gestureEvent (QGestureEvent *event) |
void | panTriggered (QPanGesture *gesture) |
void | pinchTriggered (QPinchGesture *gesture) |
Private Attributes | |
QGraphicsView * | m_view |
Qt::KeyboardModifiers | m_modifiers |
qreal | m_zoomSpeedFactor |
QPointF | targetScenePos |
QPointF | targetViewPos |
int | m_duration |
int | m_updateInterval |
QTimeLine * | verticalScrollAnim |
qint32 | m_numScheduledVerticalScrollings |
_numScheduledVerticalScrollings keep number scheduled vertical scrollings. More... | |
QTimeLine * | horizontalScrollAnim |
qint32 | m_numScheduledHorizontalScrollings |
_numScheduledHorizontalScrollings keep number scheduled horizontal scrollings. More... | |
QGesture * | pan |
QGesture * | pinch |
qreal | horizontalOffset |
qreal | verticalOffset |
qreal | scaleFactor |
qreal | currentScaleFactor |
Definition at line 102 of file vmaingraphicsview.h.
|
explicit |
Definition at line 94 of file vmaingraphicsview.cpp.
References animFinished(), horizontalScrollingTime(), and verticalScrollingTime().
|
slot |
Definition at line 230 of file vmaingraphicsview.cpp.
References m_numScheduledVerticalScrollings, m_view, targetScenePos, targetViewPos, and verticalScrollAnim.
Referenced by GraphicsViewZoom().
|
protectedvirtual |
Definition at line 251 of file vmaingraphicsview.cpp.
References gentleZoom(), gestureEvent(), m_modifiers, m_view, m_zoomSpeedFactor, qApp, SCASSERT, startHorizontalScrollings(), startVerticalScrollings(), targetScenePos, and targetViewPos.
|
private |
Definition at line 357 of file vmaingraphicsview.cpp.
References SCASSERT.
Referenced by gentleZoom().
void GraphicsViewZoom::gentleZoom | ( | qreal | factor | ) |
Definition at line 129 of file vmaingraphicsview.cpp.
References fictiveSceneRect(), m_view, VMainGraphicsView::MaxScale(), VMainGraphicsView::MinScale(), VMainGraphicsView::NewSceneRect(), SCASSERT, VMainGraphicsScene::setCurrentTransform(), targetScenePos, targetViewPos, and zoomed().
Referenced by eventFilter(), and pinchTriggered().
|
private |
Definition at line 308 of file vmaingraphicsview.cpp.
References pan, panTriggered(), pinch, and pinchTriggered().
Referenced by eventFilter().
|
slot |
Definition at line 208 of file vmaingraphicsview.cpp.
References m_duration, m_numScheduledHorizontalScrollings, m_updateInterval, and m_view.
Referenced by GraphicsViewZoom().
void GraphicsViewZoom::initScrollAnimations | ( | ) |
Definition at line 174 of file vmaingraphicsview.cpp.
References horizontalScrollAnim, m_duration, m_updateInterval, qApp, and verticalScrollAnim.
Referenced by VMainGraphicsView::resetScrollAnimations().
|
private |
Definition at line 326 of file vmaingraphicsview.cpp.
References horizontalOffset, m_view, and verticalOffset.
Referenced by gestureEvent().
|
private |
Definition at line 346 of file vmaingraphicsview.cpp.
References currentScaleFactor, and gentleZoom().
Referenced by gestureEvent().
void GraphicsViewZoom::setModifiers | ( | Qt::KeyboardModifiers | modifiers | ) |
Definition at line 162 of file vmaingraphicsview.cpp.
References m_modifiers.
void GraphicsViewZoom::setZoomSpeedFactor | ( | qreal | value | ) |
Definition at line 169 of file vmaingraphicsview.cpp.
References m_zoomSpeedFactor.
|
private |
Definition at line 424 of file vmaingraphicsview.cpp.
References horizontalScrollAnim, m_numScheduledHorizontalScrollings, qApp, and SCASSERT.
Referenced by eventFilter().
|
private |
Definition at line 387 of file vmaingraphicsview.cpp.
References m_numScheduledVerticalScrollings, qApp, SCASSERT, and verticalScrollAnim.
Referenced by eventFilter().
|
slot |
Definition at line 186 of file vmaingraphicsview.cpp.
References m_duration, m_numScheduledVerticalScrollings, m_updateInterval, and m_view.
Referenced by GraphicsViewZoom().
|
signal |
Referenced by gentleZoom(), and VMainGraphicsView::VMainGraphicsView().
|
private |
Definition at line 152 of file vmaingraphicsview.h.
Referenced by pinchTriggered().
|
private |
Definition at line 149 of file vmaingraphicsview.h.
Referenced by panTriggered().
|
private |
Definition at line 135 of file vmaingraphicsview.h.
Referenced by initScrollAnimations(), and startHorizontalScrollings().
|
private |
Definition at line 130 of file vmaingraphicsview.h.
Referenced by horizontalScrollingTime(), initScrollAnimations(), and verticalScrollingTime().
|
private |
Definition at line 126 of file vmaingraphicsview.h.
Referenced by eventFilter(), and setModifiers().
|
private |
_numScheduledHorizontalScrollings keep number scheduled horizontal scrollings.
Definition at line 137 of file vmaingraphicsview.h.
Referenced by horizontalScrollingTime(), and startHorizontalScrollings().
|
private |
_numScheduledVerticalScrollings keep number scheduled vertical scrollings.
Definition at line 134 of file vmaingraphicsview.h.
Referenced by animFinished(), startVerticalScrollings(), and verticalScrollingTime().
|
private |
Definition at line 131 of file vmaingraphicsview.h.
Referenced by horizontalScrollingTime(), initScrollAnimations(), and verticalScrollingTime().
|
private |
Definition at line 125 of file vmaingraphicsview.h.
Referenced by animFinished(), eventFilter(), gentleZoom(), horizontalScrollingTime(), panTriggered(), and verticalScrollingTime().
|
private |
Definition at line 127 of file vmaingraphicsview.h.
Referenced by eventFilter(), and setZoomSpeedFactor().
|
private |
Definition at line 147 of file vmaingraphicsview.h.
Referenced by gestureEvent().
|
private |
Definition at line 148 of file vmaingraphicsview.h.
Referenced by gestureEvent().
|
private |
Definition at line 151 of file vmaingraphicsview.h.
|
private |
Definition at line 128 of file vmaingraphicsview.h.
Referenced by animFinished(), eventFilter(), and gentleZoom().
|
private |
Definition at line 129 of file vmaingraphicsview.h.
Referenced by animFinished(), eventFilter(), and gentleZoom().
|
private |
Definition at line 150 of file vmaingraphicsview.h.
Referenced by panTriggered().
|
private |
Definition at line 132 of file vmaingraphicsview.h.
Referenced by animFinished(), initScrollAnimations(), and startVerticalScrollings().