DISPLACE
1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
|
#include <mapobjectscontroller.h>
Classes | |
class | LayerList |
class | WidgetAncillaryData |
class | WidgetUserData |
Public Slots | |
void | signalAppIsClosing () |
void | removeAllWidgets () |
void | edgeSelectionHasChanged (EdgeMapObject *object) |
void | nodeSelectionHasChanged (NodeMapObject *node) |
void | redraw () |
Signals | |
int | edgeSelectionChanged (int num) |
int | nodeSelectionChanged (int num) |
Public Member Functions | |
MapObjectsController (qmapcontrol::QMapControl *map) | |
virtual | ~MapObjectsController () noexcept=default |
qmapcontrol::QMapControl * | mapWidget () const |
void | setModel (int model_n, std::shared_ptr< DisplaceModel > model) |
DisplaceModel & | getModel (int model_n) |
void | removeModel (int model_n) |
void | createMapObjectsFromModel (int model_n, DisplaceModel *model) |
void | updateMapObjectsFromModel (int model_n, DisplaceModel *model) |
void | updateVesselPosition (int model, int idx) |
void | updateShipPosition (int model, int idx) |
void | updateFishfarmPosition (int model, int idx) |
void | updateWindmillPosition (int model, int idx) |
void | updateNodes (int model) |
LayerList * | getLayerList (int model, ObjectTreeModel::Category type) |
void | setModelVisibility (int model, Visibility visibility) |
Sets the visibility of the model objects. More... | |
void | setLayerVisibility (int model, ObjectTreeModel::Category type, int layer, bool visibility) |
bool | isLayerVisible (int model, ObjectTreeModel::Category type, int layer) |
bool | isModelActive (int model) const |
const Palette & | getPalette (int model, PaletteRole n) const |
void | setPalette (int model, PaletteRole n, const Palette &palette) |
void | forceRedraw () |
void | showDetailsWidget (const PointWorldCoord &point, QWidget *widget) |
bool | importShapefile (int model_idx, QString path, QString layername) |
QStringList | getShapefilesList (int model_idx) const |
std::shared_ptr< qmapcontrol::ESRIShapefile > | getShapefile (int model_idx, int idx) |
std::shared_ptr< GDALDataset > | cloneShapefileDatasource (int model_idx, const QString &name) |
void | setEditorMode (EditorModes mode) |
EditorModes | getEditorMode () const |
void | clearNodeSelection (int model) |
void | selectNodes (int model, QList< types::NodeId > nodes) |
void | delSelected (int model) |
QSet< EdgeMapObject * > | edgeSelection (int model) const |
void | clearAllNodes (int model_n) |
void | addNode (int model_n, std::shared_ptr< NodeData > nd, bool disable_redraw=false) |
void | addHarbour (int model_n, std::shared_ptr< HarbourData > nd, bool disable_redraw=false) |
void | addEdge (int model_n, std::shared_ptr< NodeData::Edge > edge, bool disable_redraw) |
void | clearEditorLayer () |
void | addEditorLayerGeometry (std::shared_ptr< qmapcontrol::Geometry > geometry) |
MapsDataProvider & | getMapDataProvider (int model) |
void | delSelectedNodes (int model) |
Protected Slots | |
void | geometryClicked (const Geometry *) |
void | widgetClosed (QObject *) |
Protected Member Functions | |
void | addStandardLayer (int model, LayerIds id, std::shared_ptr< Layer > layer, bool visibility) |
void | addOutputLayer (int model, OutLayerIds id, std::shared_ptr< Layer > layer, bool visibility) |
void | addTariffLayer (int model, int id, std::shared_ptr< Layer > layer, bool visibility) |
void | addEnvLayer (int model, int id, std::shared_ptr< Layer > layer, bool visibility) |
void | addShapefileLayer (int model, QString name, std::shared_ptr< GDALDataset > datasource, std::shared_ptr< LayerESRIShapefile > layer, bool show=true) |
void | delSelectedEdges (int model) |
MapObjectsController::MapObjectsController | ( | qmapcontrol::QMapControl * | map | ) |
|
virtualdefaultnoexcept |
void MapObjectsController::addEdge | ( | int | model_n, |
std::shared_ptr< NodeData::Edge > | edge, | ||
bool | disable_redraw | ||
) |
|
virtual |
Implements EditorLayerInterface.
|
protected |
void MapObjectsController::addHarbour | ( | int | model_n, |
std::shared_ptr< HarbourData > | nd, | ||
bool | disable_redraw = false |
||
) |
void MapObjectsController::addNode | ( | int | model_n, |
std::shared_ptr< NodeData > | nd, | ||
bool | disable_redraw = false |
||
) |
|
protected |
|
protected |
|
protected |
|
protected |
void MapObjectsController::clearAllNodes | ( | int | model_n | ) |
|
virtual |
Implements EditorLayerInterface.
void MapObjectsController::clearNodeSelection | ( | int | model | ) |
std::shared_ptr< GDALDataset > MapObjectsController::cloneShapefileDatasource | ( | int | model_idx, |
const QString & | name | ||
) |
void MapObjectsController::createMapObjectsFromModel | ( | int | model_n, |
DisplaceModel * | model | ||
) |
void MapObjectsController::delSelected | ( | int | model | ) |
|
protected |
void MapObjectsController::delSelectedNodes | ( | int | model | ) |
|
inline |
|
signal |
|
slot |
void MapObjectsController::forceRedraw | ( | ) |
|
protectedslot |
|
inline |
|
inline |
MapsDataProvider & MapObjectsController::getMapDataProvider | ( | int | model | ) |
DisplaceModel & MapObjectsController::getModel | ( | int | model_n | ) |
|
inline |
std::shared_ptr< ESRIShapefile > MapObjectsController::getShapefile | ( | int | model_idx, |
int | idx | ||
) |
QStringList MapObjectsController::getShapefilesList | ( | int | model_idx | ) | const |
bool MapObjectsController::importShapefile | ( | int | model_idx, |
QString | path, | ||
QString | layername | ||
) |
bool MapObjectsController::isLayerVisible | ( | int | model, |
ObjectTreeModel::Category | type, | ||
int | layer | ||
) |
bool MapObjectsController::isModelActive | ( | int | model | ) | const |
|
inline |
|
signal |
|
slot |
|
slot |
|
slot |
void MapObjectsController::removeModel | ( | int | model_n | ) |
void MapObjectsController::selectNodes | ( | int | model, |
QList< types::NodeId > | nodes | ||
) |
void MapObjectsController::setEditorMode | ( | MapObjectsController::EditorModes | mode | ) |
void MapObjectsController::setLayerVisibility | ( | int | model, |
ObjectTreeModel::Category | type, | ||
int | layer, | ||
bool | visibility | ||
) |
void MapObjectsController::setModel | ( | int | model_n, |
std::shared_ptr< DisplaceModel > | model | ||
) |
void MapObjectsController::setModelVisibility | ( | int | model, |
MapObjectsController::Visibility | visibility | ||
) |
Sets the visibility of the model objects.
model | index of the model |
visibility | visibility status |
void MapObjectsController::setPalette | ( | int | model, |
PaletteRole | n, | ||
const Palette & | palette | ||
) |
void MapObjectsController::showDetailsWidget | ( | const PointWorldCoord & | point, |
QWidget * | widget | ||
) |
|
slot |
void MapObjectsController::updateFishfarmPosition | ( | int | model, |
int | idx | ||
) |
void MapObjectsController::updateMapObjectsFromModel | ( | int | model_n, |
DisplaceModel * | model | ||
) |
void MapObjectsController::updateNodes | ( | int | model | ) |
void MapObjectsController::updateShipPosition | ( | int | model, |
int | idx | ||
) |
void MapObjectsController::updateVesselPosition | ( | int | model, |
int | idx | ||
) |
void MapObjectsController::updateWindmillPosition | ( | int | model, |
int | idx | ||
) |
|
protectedslot |