diff options
author | Mattes D <github@xoft.cz> | 2014-10-27 23:58:09 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-10-27 23:58:09 +0100 |
commit | c53b7e5d38c24bce7ba55abf3060ffd012783086 (patch) | |
tree | e592eeadadbd41cede746f8729bd70c275552eb5 /Tools/QtBiomeVisualiser/RegionLoader.h | |
parent | Fixed typo. (diff) | |
download | cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar.gz cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar.bz2 cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar.lz cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar.xz cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar.zst cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.zip |
Diffstat (limited to 'Tools/QtBiomeVisualiser/RegionLoader.h')
-rw-r--r-- | Tools/QtBiomeVisualiser/RegionLoader.h | 50 |
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; +}; + + + + |