From f625b33d56f6a0ce98f03a24bf6cad8b5624ce07 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 3 Oct 2014 12:33:03 +0200 Subject: QtBiomeVisualiser: Zoom is now limited and aligned to steps. --- Tools/QtBiomeVisualiser/BiomeView.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'Tools/QtBiomeVisualiser/BiomeView.h') diff --git a/Tools/QtBiomeVisualiser/BiomeView.h b/Tools/QtBiomeVisualiser/BiomeView.h index f0521571d..ae5dd2338 100644 --- a/Tools/QtBiomeVisualiser/BiomeView.h +++ b/Tools/QtBiomeVisualiser/BiomeView.h @@ -25,7 +25,24 @@ public: The entire view is then invalidated and regenerated. */ void setChunkSource(std::shared_ptr a_ChunkSource); + /** Sets the position of the central pixel of the map to the specified point and redraws the view. */ + void setPosition(int a_BlockX, int a_BlockZ); + + /** Sets the zoom level to the specified value and redraws the view. */ + void setZoomLevel(double a_ZoomLevel); + signals: + /** Signalled when the user uses the wheel to scroll upwards. */ + void wheelUp(); + + /** Signalled when the user uses the wheel to scroll downwards. */ + void wheelDown(); + + /** Signalled when the user presses a key to increase zoom. */ + void increaseZoom(); + + /** Signalled when the user presses a key to decrease zoom. */ + void decreaseZoom(); public slots: /** Redraw the entire widget area. */ @@ -86,12 +103,6 @@ protected: /** Called when the user presses a key. */ virtual void keyPressEvent(QKeyEvent * a_Event) override; - - /** Decreases the zoom level and queues a redraw. */ - void decreaseZoom(); - - /** Increases the zoom level and queues a redraw. */ - void increaseZoom(); }; -- cgit v1.2.3