summaryrefslogtreecommitdiffstats
path: root/Tools/QtBiomeVisualiser/RegionLoader.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-28 22:07:09 +0100
committerMattes D <github@xoft.cz>2014-10-28 22:07:09 +0100
commit2f0abb73c94eb896c956ceb0375d2e72065d95d5 (patch)
tree2cf8a72a9aaf59fa218f5978045412a47662d52b /Tools/QtBiomeVisualiser/RegionLoader.h
parentForgotten m_SendChunksMediumPriority.empty() check. (diff)
parentQtBiomeVisualiser: Reduced memory usage. (diff)
downloadcuberite-2f0abb73c94eb896c956ceb0375d2e72065d95d5.tar
cuberite-2f0abb73c94eb896c956ceb0375d2e72065d95d5.tar.gz
cuberite-2f0abb73c94eb896c956ceb0375d2e72065d95d5.tar.bz2
cuberite-2f0abb73c94eb896c956ceb0375d2e72065d95d5.tar.lz
cuberite-2f0abb73c94eb896c956ceb0375d2e72065d95d5.tar.xz
cuberite-2f0abb73c94eb896c956ceb0375d2e72065d95d5.tar.zst
cuberite-2f0abb73c94eb896c956ceb0375d2e72065d95d5.zip
Diffstat (limited to 'Tools/QtBiomeVisualiser/RegionLoader.h')
-rw-r--r--Tools/QtBiomeVisualiser/RegionLoader.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/Tools/QtBiomeVisualiser/RegionLoader.h b/Tools/QtBiomeVisualiser/RegionLoader.h
new file mode 100644
index 000000000..5a993f5ca
--- /dev/null
+++ b/Tools/QtBiomeVisualiser/RegionLoader.h
@@ -0,0 +1,50 @@
+#pragma once
+
+#include <QObject>
+#include <QRunnable>
+#include <memory>
+
+
+
+
+// fwd:
+class Region;
+typedef std::shared_ptr<Region> RegionPtr;
+
+class ChunkSource;
+typedef std::shared_ptr<ChunkSource> ChunkSourcePtr;
+
+
+
+
+
+class RegionLoader :
+ public QObject,
+ public QRunnable
+{
+ Q_OBJECT
+
+public:
+ RegionLoader(int a_RegionX, int a_RegionZ, RegionPtr a_Region, ChunkSourcePtr a_ChunkSource);
+ virtual ~RegionLoader() {}
+
+signals:
+ void loaded(int a_RegionX, int a_RegionZ);
+
+protected:
+ virtual void run() override;
+
+private:
+ /** Coords of the region to be loaded. */
+ int m_RegionX, m_RegionZ;
+
+ /** The region to be loaded. */
+ RegionPtr m_Region;
+
+ /** The chunk source to be used for individual chunks within the region. */
+ ChunkSourcePtr m_ChunkSource;
+};
+
+
+
+