|
qHexWalker 0.0.1
Hexagonal Grid Pathfinding & Maze Visualization on Interactive Maps
|
#include <h3TargetsModel.h>
Inheritance diagram for H3TargetsModel:
Collaboration diagram for H3TargetsModel:Public Types | |
| enum | Roles { ResRole = Qt::UserRole + 1 , ZoomRole , OrderRole , IndexRole , CellColor , PathRole , CoordinatesRole } |
Public Member Functions | |
| H3TargetsModel (QObject *parent=nullptr) | |
| ~H3TargetsModel () override | |
| int | rowCount (const QModelIndex &parent) const override |
| QVariant | data (const QModelIndex &index, int role) const override |
| QHash< int, QByteArray > | roleNames () const override |
| void | compute () |
| void | move (int from, int to) |
| qsizetype | remove (int row) |
| void | requestCell (quint8 mapZoom, const QGeoCoordinate &coordinate) |
| void | clearAllCells () |
| void | setMazeWalls (const std::unordered_set< H3Index > &walls) |
| void | setMazeBounds (const QGeoCoordinate ¢er, double radiusMeters) |
| public::void | onRemoveCell (const std::vector< H3Index > &indexes) |
| void | onCompute (const std::vector< H3Index > &indexes) |
| void | clearingStarted () |
| void | clearingFinished () |
| void | showNotification (const QString &message, const QString &type) |
Private Member Functions | |
| bool | isCoordinateTargetValid (quint8 zoom, const QGeoCoordinate &coordinate) const |
Private Attributes | |
| QList< H3Target * > | cells_ |
| std::unordered_set< H3Index > | mazeWalls_ |
| QGeoCoordinate | mazeCenter_ |
| double | mazeRadius_ {0.0} |
| const uint8_t | minZoom_c {3} |
| const uint8_t | maxZoom_c {15} |
| std::unordered_map< uint8_t, uint8_t > | zoomToRes_ |
| const QHash< int, QString > | resolutionColors_c |
| std::atomic_bool | isClearing_ {false} |
Definition at line 9 of file h3TargetsModel.h.
| Enumerator | |
|---|---|
| ResRole | |
| ZoomRole | |
| OrderRole | |
| IndexRole | |
| CellColor | |
| PathRole | |
| CoordinatesRole | |
Definition at line 13 of file h3TargetsModel.h.
|
explicit |
Definition at line 6 of file h3TargetsModel.cpp.
References maxZoom_c, minZoom_c, and zoomToRes_.
|
override |
Definition at line 15 of file h3TargetsModel.cpp.
References cells_.
| void H3TargetsModel::clearAllCells | ( | ) |
Definition at line 209 of file h3TargetsModel.cpp.
References cells_, clearingFinished(), clearingStarted(), and isClearing_.
Here is the call graph for this function:| void H3TargetsModel::clearingFinished | ( | ) |
| void H3TargetsModel::clearingStarted | ( | ) |
| void H3TargetsModel::compute | ( | ) |
Definition at line 63 of file h3TargetsModel.cpp.
References cells_, and onCompute().
Referenced by move(), and remove().
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
|
private |
Definition at line 235 of file h3TargetsModel.cpp.
References maxZoom_c.
Referenced by requestCell().
Here is the caller graph for this function:| void H3TargetsModel::move | ( | int | from, |
| int | to | ||
| ) |
Definition at line 71 of file h3TargetsModel.cpp.
References cells_, clearingFinished(), clearingStarted(), compute(), isClearing_, and OrderRole.
Here is the call graph for this function:| void H3TargetsModel::onCompute | ( | const std::vector< H3Index > & | indexes | ) |
Referenced by compute(), and EntryPoint::InitDataModels().
Here is the caller graph for this function:| public::void H3TargetsModel::onRemoveCell | ( | const std::vector< H3Index > & | indexes | ) |
Referenced by EntryPoint::InitDataModels(), and remove().
Here is the caller graph for this function:| qsizetype H3TargetsModel::remove | ( | int | row | ) |
Definition at line 103 of file h3TargetsModel.cpp.
References cells_, clearingFinished(), clearingStarted(), compute(), isClearing_, onRemoveCell(), and OrderRole.
Here is the call graph for this function:| void H3TargetsModel::requestCell | ( | quint8 | mapZoom, |
| const QGeoCoordinate & | coordinate | ||
| ) |
Definition at line 143 of file h3TargetsModel.cpp.
References cells_, H3_VIEWER::Helper::indexToPolygon(), isClearing_, isCoordinateTargetValid(), mazeCenter_, mazeRadius_, mazeWalls_, showNotification(), and zoomToRes_.
Here is the call graph for this function:
|
override |
Definition at line 51 of file h3TargetsModel.cpp.
References CellColor, CoordinatesRole, IndexRole, OrderRole, PathRole, ResRole, and ZoomRole.
|
override |
Definition at line 20 of file h3TargetsModel.cpp.
References cells_.
| void H3TargetsModel::setMazeBounds | ( | const QGeoCoordinate & | center, |
| double | radiusMeters | ||
| ) |
Definition at line 251 of file h3TargetsModel.cpp.
References mazeCenter_, and mazeRadius_.
Referenced by EntryPoint::InitDataModels().
Here is the caller graph for this function:| void H3TargetsModel::setMazeWalls | ( | const std::unordered_set< H3Index > & | walls | ) |
Definition at line 246 of file h3TargetsModel.cpp.
References mazeWalls_.
Referenced by EntryPoint::InitDataModels().
Here is the caller graph for this function:| void H3TargetsModel::showNotification | ( | const QString & | message, |
| const QString & | type | ||
| ) |
|
private |
Definition at line 41 of file h3TargetsModel.h.
Referenced by ~H3TargetsModel(), clearAllCells(), compute(), data(), move(), remove(), requestCell(), and rowCount().
|
private |
Definition at line 54 of file h3TargetsModel.h.
Referenced by clearAllCells(), move(), remove(), and requestCell().
|
private |
Definition at line 47 of file h3TargetsModel.h.
Referenced by H3TargetsModel(), and isCoordinateTargetValid().
|
private |
Definition at line 43 of file h3TargetsModel.h.
Referenced by requestCell(), and setMazeBounds().
|
private |
Definition at line 44 of file h3TargetsModel.h.
Referenced by requestCell(), and setMazeBounds().
|
private |
Definition at line 42 of file h3TargetsModel.h.
Referenced by requestCell(), and setMazeWalls().
|
private |
Definition at line 46 of file h3TargetsModel.h.
Referenced by H3TargetsModel().
|
private |
Definition at line 49 of file h3TargetsModel.h.
|
private |
Definition at line 48 of file h3TargetsModel.h.
Referenced by H3TargetsModel(), and requestCell().