OGS
|
GEOModels connects the data management class GEOObjects and the GUI. It inherits from GeoLib::GEOObjects and additionally emits signals when data objects are modified. The GUI connects to these signals. Model instances are created for every data object.
Definition at line 36 of file GEOModels.h.
#include <GEOModels.h>
Public Slots | |
void | updateGeometry (const std::string &geo_name) |
virtual void | removeGeometry (std::string const &geo_name, GeoLib::GEOTYPE const type) |
void | addPointVec (std::string const &name) |
void | removePointVec (std::string const &name) |
void | addStationVec (std::string const &name) |
void | removeStationVec (std::string const &name) |
void | addPolylineVec (std::string const &name) |
void | appendPolylineVec (std::string const &name) |
void | removePolylineVec (std::string const &name) |
void | addSurfaceVec (std::string const &name) |
std::vector< std::string > | getGeometryNames () const |
const std::vector< GeoLib::Point * > * | getPointVec (const std::string &name) const |
void | appendSurfaceVec (std::string const &name) |
void | removeSurfaceVec (std::string const &name) |
void | renameGeometry (std::string const &old_name, std::string const &new_name) |
void | addNameForElement (std::string const &geometry_name, GeoLib::GEOTYPE const object_type, std::size_t const id, std::string const &new_name) |
Adds the name 'new_name' for the geo-object specified by the parameters. | |
void | addNameForObjectPoints (const std::string &geometry_name, const GeoLib::GEOTYPE object_type, const std::string &geo_object_name, const std::string &new_name) |
Adds a generic name to all points that are part of the specified geo-object. | |
void | connectPolylineSegments (const std::string &geoName, std::vector< std::size_t > const &indexlist, double const proximity, std::string const &ply_name, bool const closePly, bool const triangulatePly) |
Signals | |
void | geoDataAdded (GeoTreeModel *, std::string, GeoLib::GEOTYPE) |
void | geoDataRemoved (GeoTreeModel *, std::string, GeoLib::GEOTYPE) |
void | stationVectorAdded (StationTreeModel *model, std::string name) |
void | stationVectorRemoved (StationTreeModel *model, std::string name) |
Public Member Functions | |
GEOModels (GeoLib::GEOObjects &geo_objects, QObject *parent=nullptr) | |
~GEOModels () override | |
GeoTreeModel * | getGeoModel () |
StationTreeModel * | getStationModel () |
Protected Attributes | |
GeoTreeModel * | _geoModel |
StationTreeModel * | _stationModel |
Private Attributes | |
GeoLib::GEOObjects & | _geo_objects |
|
explicit |
Definition at line 25 of file GEOModels.cpp.
References GeoLib::GEOObjects::_callbacks, _geo_objects, _geoModel, and _stationModel.
|
override |
Definition at line 34 of file GEOModels.cpp.
References _geoModel, and _stationModel.
|
slot |
Adds the name 'new_name' for the geo-object specified by the parameters.
Definition at line 258 of file GEOModels.cpp.
References _geo_objects, GeoLib::convertGeoTypeToString(), ERR(), GeoLib::GEOObjects::getPointVecObj(), GeoLib::GEOObjects::getPolylineVecObj(), GeoLib::GEOObjects::getSurfaceVecObj(), GeoLib::POINT, GeoLib::POLYLINE, GeoLib::PointVec::setNameForElement(), GeoLib::TemplateVec< T >::setNameForElement(), and GeoLib::SURFACE.
|
slot |
Adds a generic name to all points that are part of the specified geo-object.
Definition at line 283 of file GEOModels.cpp.
References _geo_objects, GeoLib::convertGeoTypeToString(), ERR(), GeoLib::GEOObjects::getGeoObject(), GeoLib::Polyline::getNumberOfPoints(), GeoLib::Surface::getNumberOfTriangles(), GeoLib::GEOObjects::getPointVecObj(), GeoLib::POLYLINE, GeoLib::PointVec::setNameForElement(), and GeoLib::SURFACE.
|
slot |
Definition at line 113 of file GEOModels.cpp.
References _geo_objects, _geoModel, GeoTreeModel::addPointList(), geoDataAdded(), GeoLib::GEOObjects::getPointVecObj(), and GeoLib::POINT.
Referenced by GEOModelsCallbacks::addPointVec().
|
slot |
Definition at line 141 of file GEOModels.cpp.
References _geo_objects, _geoModel, GeoTreeModel::addPolylineList(), geoDataAdded(), GeoLib::GEOObjects::getPolylineVecObj(), and GeoLib::POLYLINE.
Referenced by GEOModelsCallbacks::addPolylineVec().
|
slot |
Definition at line 128 of file GEOModels.cpp.
References _geo_objects, _stationModel, StationTreeModel::addStationList(), GeoLib::GEOObjects::getStationVec(), and stationVectorAdded().
Referenced by GEOModelsCallbacks::addStationVec().
|
slot |
Definition at line 160 of file GEOModels.cpp.
References _geo_objects, _geoModel, GeoTreeModel::addSurfaceList(), geoDataAdded(), GeoLib::GEOObjects::getSurfaceVecObj(), and GeoLib::SURFACE.
Referenced by GEOModelsCallbacks::addSurfaceVec().
|
slot |
Definition at line 148 of file GEOModels.cpp.
References _geo_objects, _geoModel, GeoTreeModel::appendPolylines(), and GeoLib::GEOObjects::getPolylineVecObj().
Referenced by GEOModelsCallbacks::appendPolylineVec().
|
slot |
Definition at line 167 of file GEOModels.cpp.
References _geo_objects, _geoModel, GeoTreeModel::appendSurfaces(), and GeoLib::GEOObjects::getSurfaceVecObj().
Referenced by GEOModelsCallbacks::appendSurfaceVec().
|
slot |
Calls all necessary functions to connect polyline-segments and update all views and windows.
Definition at line 185 of file GEOModels.cpp.
References _geo_objects, GeoLib::GEOObjects::appendPolylineVec(), GeoLib::GEOObjects::appendSurfaceVec(), OGSError::box(), GeoLib::Polyline::closePolyline(), GeoLib::Polyline::constructPolylineFromSegments(), FileIO::createSurfaceWithEarClipping(), GeoLib::GEOObjects::getPolylineVecObj(), GeoLib::TemplateVec< T >::getVector(), INFO(), GeoLib::TemplateVec< T >::setNameOfElementByID(), and WARN().
|
signal |
Referenced by addPointVec(), addPolylineVec(), addSurfaceVec(), and updateGeometry().
|
signal |
Referenced by removePointVec(), removePolylineVec(), removeSurfaceVec(), and updateGeometry().
|
slot |
Definition at line 103 of file GEOModels.cpp.
References _geo_objects, and GeoLib::GEOObjects::getGeometryNames().
Referenced by TranslateDataDialog::TranslateDataDialog(), and TranslateDataDialog::accept().
|
inline |
|
slot |
Definition at line 107 of file GEOModels.cpp.
References _geo_objects, and GeoLib::GEOObjects::getPointVec().
Referenced by TranslateDataDialog::moveGeometry().
|
inline |
|
virtualslot |
Removes all parts (points, lines, surfaces) of the geometry with the given name.
Definition at line 86 of file GEOModels.cpp.
References _geo_objects, GeoLib::POINT, GeoLib::POLYLINE, GeoLib::GEOObjects::removePointVec(), GeoLib::GEOObjects::removePolylineVec(), GeoLib::GEOObjects::removeSurfaceVec(), and GeoLib::SURFACE.
|
slot |
Definition at line 120 of file GEOModels.cpp.
References _geo_objects, _geoModel, geoDataRemoved(), GeoLib::GEOObjects::isPntVecUsed(), GeoLib::POINT, and GeoTreeModel::removeGeoList().
Referenced by GEOModelsCallbacks::removePointVec().
|
slot |
Definition at line 154 of file GEOModels.cpp.
References _geoModel, geoDataRemoved(), GeoLib::POLYLINE, and GeoTreeModel::removeGeoList().
Referenced by GEOModelsCallbacks::removePolylineVec().
|
slot |
Definition at line 135 of file GEOModels.cpp.
References _stationModel, StationTreeModel::removeStationList(), and stationVectorRemoved().
Referenced by GEOModelsCallbacks::removeStationVec().
|
slot |
Definition at line 172 of file GEOModels.cpp.
References _geoModel, geoDataRemoved(), GeoTreeModel::removeGeoList(), and GeoLib::SURFACE.
Referenced by GEOModelsCallbacks::removeSurfaceVec().
|
slot |
Definition at line 178 of file GEOModels.cpp.
References _geoModel, GeoTreeModel::renameGeometry(), and updateGeometry().
Referenced by GEOModelsCallbacks::renameGeometry().
|
signal |
Referenced by addStationVec(), and updateGeometry().
|
signal |
Referenced by removeStationVec(), and updateGeometry().
|
slot |
Updates the tree model if the underlying data in GEOObjects has changed. Technically it removes the geometry from the tree model (but not from GeoObjects) and re-adds the (modified) geometry.
Definition at line 40 of file GEOModels.cpp.
References _geo_objects, _geoModel, _stationModel, GeoTreeModel::addPointList(), GeoTreeModel::addPolylineList(), StationTreeModel::addStationList(), GeoTreeModel::addSurfaceList(), ERR(), geoDataAdded(), geoDataRemoved(), GeoLib::GEOObjects::getPointVecObj(), GeoLib::GEOObjects::getPolylineVecObj(), GeoLib::GEOObjects::getStationVec(), GeoLib::GEOObjects::getSurfaceVecObj(), GeoLib::POINT, GeoLib::POLYLINE, GeoTreeModel::removeGeoList(), StationTreeModel::removeStationList(), stationVectorAdded(), stationVectorRemoved(), and GeoLib::SURFACE.
Referenced by TranslateDataDialog::moveGeometry(), and renameGeometry().
|
private |
Definition at line 110 of file GEOModels.h.
Referenced by GEOModels(), addNameForElement(), addNameForObjectPoints(), addPointVec(), addPolylineVec(), addStationVec(), addSurfaceVec(), appendPolylineVec(), appendSurfaceVec(), connectPolylineSegments(), getGeometryNames(), getPointVec(), removeGeometry(), removePointVec(), and updateGeometry().
|
protected |
Definition at line 106 of file GEOModels.h.
Referenced by GEOModels(), ~GEOModels(), addPointVec(), addPolylineVec(), addSurfaceVec(), appendPolylineVec(), appendSurfaceVec(), getGeoModel(), removePointVec(), removePolylineVec(), removeSurfaceVec(), renameGeometry(), and updateGeometry().
|
protected |
Definition at line 107 of file GEOModels.h.
Referenced by GEOModels(), ~GEOModels(), addStationVec(), getStationModel(), removeStationVec(), and updateGeometry().