viewer: respond to wheel events for moving and zooming
This commit is contained in:
@@ -34,6 +34,10 @@ class HandMovableView : public QGraphicsView
|
||||
public:
|
||||
HandMovableView(QWidget* parent = nullptr);
|
||||
|
||||
static bool WheelEventIsAZoomEvent(QWheelEvent* event);
|
||||
|
||||
static qreal GetScrollZoomMultiplier(QWheelEvent* event);
|
||||
|
||||
protected:
|
||||
virtual void ToolChangedEvent(Tool::Item tool){Q_UNUSED(tool)}
|
||||
|
||||
@@ -44,8 +48,6 @@ protected:
|
||||
void SetDefaultDragMode(DragMode mode);
|
||||
const DragMode& GetDefaultDragMode() const;
|
||||
|
||||
bool WheelEventIsAZoomEvent(QWheelEvent* event) const;
|
||||
|
||||
virtual void wheelEvent(QWheelEvent* event) override;
|
||||
|
||||
virtual void ZoomIntoCursorPosition(QWheelEvent* event, double multiplier, const QPointF &cursor_pos);
|
||||
|
||||
Reference in New Issue
Block a user