qHexWalker 0.0.1
Hexagonal Grid Pathfinding & Maze Visualization on Interactive Maps
Loading...
Searching...
No Matches
EntryPoint Class Referencefinal

Application initialization orchestrator. More...

#include <entryPoint.h>

+ Inheritance diagram for EntryPoint:
+ Collaboration diagram for EntryPoint:

Public Member Functions

 EntryPoint (const std::string &loggerName, QObject *parent=nullptr)
 Constructs and initializes the application.
 
 ~EntryPoint () override
 Destructor.
 

Private Member Functions

void InitLogger (std::string_view loggerName)
 Initializes the spdlog logging system.
 
void InitDataModels ()
 Initializes data models (H3Model, H3TargetsModel).
 
void InitMap ()
 Initializes the map provider and style.
 
void InitEngine ()
 Initializes the QML engine and loads the UI.
 

Private Attributes

const QString pathUrl_c {"https://api.maptiler.com/maps/base-v4/style.json?key=bFpEhpcbtSI3j1gzj2Is"}
 Default MapTiler API URL for map tiles.
 
QQmlApplicationEngine * engine_ {}
 QML application engine.
 
QQuickWindow * rootWindow_ {}
 Root window reference.
 
std::unique_ptr< TD::Loggerlogger_
 Logger instance.
 
H3Modelh3Model_ {}
 Hexagonal cell model.
 
H3TargetsModeltargetsModel_ {}
 Waypoint targets model.
 
MapProvidermapProvider_ {}
 Map tile provider.
 

Detailed Description

Application initialization orchestrator.

EntryPoint is responsible for initializing all application components in the correct order:

  1. Logger initialization
  2. Data models (H3Model, H3TargetsModel)
  3. Map provider and style
  4. QML engine and UI
Initialization Flow
msc_inline_mscgraph_1
Example Usage
int main(int argc, char *argv[]) {
Application app(argc, argv);
EntryPoint entry(app.getLoggerName());
return app.exec();
}
Main application class extending QGuiApplication.
Definition application.h:39
Application initialization orchestrator.
Definition entryPoint.h:61
int main(int argc, char *argv[])
Definition main.cpp:16
See also
Application for the main application class
H3Model for hexagonal cell data
H3TargetsModel for waypoint management

Definition at line 61 of file entryPoint.h.

Constructor & Destructor Documentation

◆ EntryPoint()

EntryPoint::EntryPoint ( const std::string &  loggerName,
QObject *  parent = nullptr 
)
explicit

Constructs and initializes the application.

Performs complete application initialization sequence: logger, models, map, and QML engine.

Parameters
loggerNameName for the spdlog logger instance.
parentOptional parent QObject.

Definition at line 12 of file entryPoint.cpp.

References engine_, InitDataModels(), InitEngine(), InitLogger(), and InitMap().

+ Here is the call graph for this function:

◆ ~EntryPoint()

EntryPoint::~EntryPoint ( )
overridedefault

Destructor.

Cleans up all initialized components.

Member Function Documentation

◆ InitDataModels()

void EntryPoint::InitDataModels ( )
private

Initializes data models (H3Model, H3TargetsModel).

Creates and connects the hexagonal cell model and waypoint target model.

Definition at line 33 of file entryPoint.cpp.

References engine_, h3Model_, H3Model::Init(), H3Model::mazeBoundsGenerated(), H3Model::mazeWallsGenerated(), H3TargetsModel::onCompute(), H3TargetsModel::onRemoveCell(), H3Model::requestCells(), H3TargetsModel::setMazeBounds(), H3TargetsModel::setMazeWalls(), and targetsModel_.

Referenced by EntryPoint().

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

◆ InitEngine()

void EntryPoint::InitEngine ( )
private

Initializes the QML engine and loads the UI.

Creates QQmlApplicationEngine, registers C++ types, and loads main.qml.

Definition at line 66 of file entryPoint.cpp.

References engine_, and rootWindow_.

Referenced by EntryPoint().

+ Here is the caller graph for this function:

◆ InitLogger()

void EntryPoint::InitLogger ( std::string_view  loggerName)
private

Initializes the spdlog logging system.

Parameters
loggerNameName for the logger instance.

Definition at line 26 of file entryPoint.cpp.

References logger_.

Referenced by EntryPoint().

+ Here is the caller graph for this function:

◆ InitMap()

void EntryPoint::InitMap ( )
private

Initializes the map provider and style.

Sets up MapLibre map with online or offline tile source.

Definition at line 51 of file entryPoint.cpp.

References engine_, mapProvider_, pathUrl_c, and MapProvider::setUrl().

Referenced by EntryPoint().

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

Member Data Documentation

◆ engine_

QQmlApplicationEngine* EntryPoint::engine_ {}
private

QML application engine.

Definition at line 117 of file entryPoint.h.

Referenced by EntryPoint(), InitDataModels(), InitEngine(), and InitMap().

◆ h3Model_

H3Model* EntryPoint::h3Model_ {}
private

Hexagonal cell model.

Definition at line 121 of file entryPoint.h.

Referenced by InitDataModels().

◆ logger_

std::unique_ptr<TD::Logger> EntryPoint::logger_
private

Logger instance.

Definition at line 120 of file entryPoint.h.

Referenced by InitLogger().

◆ mapProvider_

MapProvider* EntryPoint::mapProvider_ {}
private

Map tile provider.

Definition at line 123 of file entryPoint.h.

Referenced by InitMap().

◆ pathUrl_c

const QString EntryPoint::pathUrl_c {"https://api.maptiler.com/maps/base-v4/style.json?key=bFpEhpcbtSI3j1gzj2Is"}
private

Default MapTiler API URL for map tiles.

Definition at line 107 of file entryPoint.h.

Referenced by InitMap().

◆ rootWindow_

QQuickWindow* EntryPoint::rootWindow_ {}
private

Root window reference.

Definition at line 118 of file entryPoint.h.

Referenced by InitEngine().

◆ targetsModel_

H3TargetsModel* EntryPoint::targetsModel_ {}
private

Waypoint targets model.

Definition at line 122 of file entryPoint.h.

Referenced by InitDataModels().


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