![]() |
hivemind 1.0.0
|
This is the class responsible for retrieving maps from Kartverket. More...
#include <map_manager.h>
Signals | |
void | GotImage () |
Signal emitted when the map image data has been retrieved. | |
void | RequestImage () |
Static Public Member Functions | |
static MapManager & | Instance () |
Returns the singleton instance of the class. | |
static void | GetMap (Core::UTMCoordinate coord, int size) |
Retrieves the map from Kartverket for the specified UTM coordinate and size. | |
static void | CalculateCornerCoordinates (Core::UTMCoordinate coord, int size) |
Calculates the UTM corner coordinates for the specified UTM coordinate and size. | |
static QByteArray & | GetData () |
Returns the map data as a byte array. | |
static int | GetImageResolution () |
Private Member Functions | |
MapManager () | |
Constructor. | |
~MapManager ()=default | |
Destructor. | |
Private Attributes | |
QByteArray | m_Data |
QString | m_Area |
int | m_ImageResolution |
This is the class responsible for retrieving maps from Kartverket.
Definition at line 14 of file map_manager.h.
|
inlineprivate |
Constructor.
Definition at line 67 of file map_manager.h.
|
privatedefault |
Destructor.
|
static |
Calculates the UTM corner coordinates for the specified UTM coordinate and size.
This function calculates the UTM corner coordinates for the specified UTM coordinate and size, and stores them in the CornerCoordinates variable.
coord | The UTM coordinate for the center of the map. |
size | The size of the map in meters. |
Definition at line 77 of file map_manager.cpp.
References Core::UTMCoordinate::Easting, Instance(), m_Area, and Core::UTMCoordinate::Northing.
Referenced by GetMap().
|
inlinestatic |
Returns the map data as a byte array.
Definition at line 49 of file map_manager.h.
References Instance(), and m_Data.
Referenced by Gui::MapViewer::paintEvent().
|
inlinestatic |
Definition at line 55 of file map_manager.h.
References Instance(), and m_ImageResolution.
Referenced by Gui::MapViewer::paintEvent().
|
static |
Retrieves the map from Kartverket for the specified UTM coordinate and size.
This function retrieves the satellite map data from Kartverket with a HTTP request for the specified UTM coordinate and size.
coord | The UTM coordinate for the center of the map. |
size | The size of the map in meters. |
Definition at line 17 of file map_manager.cpp.
References CalculateCornerCoordinates(), Instance(), m_Area, m_ImageResolution, and RequestImage().
Referenced by CompileScenario::Scenario::Scenario(), and CompileScenario::Scenario::SetOrigin().
|
signal |
Signal emitted when the map image data has been retrieved.
Referenced by Gui::MainWindow::ConnectSlotsAndSignals().
|
inlinestatic |
Returns the singleton instance of the class.
Definition at line 20 of file map_manager.h.
Referenced by CalculateCornerCoordinates(), Gui::MainWindow::ConnectSlotsAndSignals(), GetData(), GetImageResolution(), and GetMap().
|
signal |
Referenced by Gui::MainWindow::ConnectSlotsAndSignals(), and GetMap().
|
private |
Definition at line 73 of file map_manager.h.
Referenced by CalculateCornerCoordinates(), and GetMap().
|
private |
Definition at line 72 of file map_manager.h.
Referenced by GetData().
|
private |
Definition at line 74 of file map_manager.h.
Referenced by GetImageResolution(), and GetMap().