summaryrefslogtreecommitdiffstats
path: root/Tools/QtBiomeVisualiser/MainWindow.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-10-03 12:33:03 +0200
committermadmaxoft <github@xoft.cz>2014-10-03 12:33:03 +0200
commitf625b33d56f6a0ce98f03a24bf6cad8b5624ce07 (patch)
tree5062632160237bcc8e382527bddfb54b4b1b5d45 /Tools/QtBiomeVisualiser/MainWindow.h
parentFix spelling of PRISMRAINE (diff)
downloadcuberite-f625b33d56f6a0ce98f03a24bf6cad8b5624ce07.tar
cuberite-f625b33d56f6a0ce98f03a24bf6cad8b5624ce07.tar.gz
cuberite-f625b33d56f6a0ce98f03a24bf6cad8b5624ce07.tar.bz2
cuberite-f625b33d56f6a0ce98f03a24bf6cad8b5624ce07.tar.lz
cuberite-f625b33d56f6a0ce98f03a24bf6cad8b5624ce07.tar.xz
cuberite-f625b33d56f6a0ce98f03a24bf6cad8b5624ce07.tar.zst
cuberite-f625b33d56f6a0ce98f03a24bf6cad8b5624ce07.zip
Diffstat (limited to 'Tools/QtBiomeVisualiser/MainWindow.h')
-rw-r--r--Tools/QtBiomeVisualiser/MainWindow.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Tools/QtBiomeVisualiser/MainWindow.h b/Tools/QtBiomeVisualiser/MainWindow.h
index 6490a937f..54a9cc6c7 100644
--- a/Tools/QtBiomeVisualiser/MainWindow.h
+++ b/Tools/QtBiomeVisualiser/MainWindow.h
@@ -39,13 +39,30 @@ private slots:
/** Opens a vanilla world that is specified by the calling action. */
void openVanillaWorld();
+ /** Moves the view to the map's center. */
+ void centerView();
+
+ /** Sets the zoom level specified in the triggering action. */
+ void setViewZoom();
+
+ /** Sets a zoom level one step larger than current, if allowed. */
+ void increaseZoom();
+
+ /** Sets a zoom level one step smaller than current, if allowed. */
+ void decreaseZoom();
+
protected:
+ /** The zoom levels */
+ static const double m_ViewZooms[10];
+
// Actions:
QAction * m_actNewGen;
QAction * m_actOpenGen;
QAction * m_actOpenWorld;
QAction * m_actReload;
QAction * m_actExit;
+ QAction * m_actViewCenter;
+ QAction * m_actViewZoom[ARRAYCOUNT(m_ViewZooms)];
/** List of actions that open the specific vanilla world. */
QList<QAction *> m_WorldActions;
@@ -65,6 +82,9 @@ protected:
/** The separator line between biome view and generator setup. */
QWidget * m_LineSeparator;
+ /** Index into m_ViewZooms[] for the current zoom level. */
+ size_t m_CurrentZoomLevel;
+
/** Initializes the m_MinecraftPath based on the proper MC path */
void initMinecraftPath();