hivemind 1.0.0
Loading...
Searching...
No Matches
MapManagement::MapManager Class Reference

This is the class responsible for retrieving maps from Kartverket. More...

#include <map_manager.h>

Inheritance diagram for MapManagement::MapManager:
Inheritance graph
Collaboration diagram for MapManagement::MapManager:
Collaboration graph

Signals

void GotImage ()
 Signal emitted when the map image data has been retrieved.
 
void RequestImage ()
 

Static Public Member Functions

static MapManagerInstance ()
 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
 

Detailed Description

This is the class responsible for retrieving maps from Kartverket.

Definition at line 14 of file map_manager.h.

Constructor & Destructor Documentation

◆ MapManager()

MapManagement::MapManager::MapManager ( )
inlineprivate

Constructor.

Definition at line 67 of file map_manager.h.

◆ ~MapManager()

MapManagement::MapManager::~MapManager ( )
privatedefault

Destructor.

Member Function Documentation

◆ CalculateCornerCoordinates()

void MapManagement::MapManager::CalculateCornerCoordinates ( Core::UTMCoordinate  coord,
int  size 
)
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.

Parameters
coordThe UTM coordinate for the center of the map.
sizeThe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetData()

static QByteArray & MapManagement::MapManager::GetData ( )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetImageResolution()

static int MapManagement::MapManager::GetImageResolution ( )
inlinestatic

Definition at line 55 of file map_manager.h.

References Instance(), and m_ImageResolution.

Referenced by Gui::MapViewer::paintEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMap()

void MapManagement::MapManager::GetMap ( Core::UTMCoordinate  coord,
int  size 
)
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.

Parameters
coordThe UTM coordinate for the center of the map.
sizeThe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GotImage

void MapManagement::MapManager::GotImage ( )
signal

Signal emitted when the map image data has been retrieved.

Referenced by Gui::MainWindow::ConnectSlotsAndSignals().

Here is the caller graph for this function:

◆ Instance()

static MapManager & MapManagement::MapManager::Instance ( )
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().

Here is the caller graph for this function:

◆ RequestImage

void MapManagement::MapManager::RequestImage ( )
signal

Referenced by Gui::MainWindow::ConnectSlotsAndSignals(), and GetMap().

Here is the caller graph for this function:

Member Data Documentation

◆ m_Area

QString MapManagement::MapManager::m_Area
private

Definition at line 73 of file map_manager.h.

Referenced by CalculateCornerCoordinates(), and GetMap().

◆ m_Data

QByteArray MapManagement::MapManager::m_Data
private

Definition at line 72 of file map_manager.h.

Referenced by GetData().

◆ m_ImageResolution

int MapManagement::MapManager::m_ImageResolution
private

Definition at line 74 of file map_manager.h.

Referenced by GetImageResolution(), and GetMap().


The documentation for this class was generated from the following files: