![]() |
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 25 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 14 of file GEOModels.cpp.
References _geo_objects, _geoModel, and _stationModel.
|
override |
Definition at line 23 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 247 of file GEOModels.cpp.
References _geo_objects, GeoLib::convertGeoTypeToString(), ERR(), GeoLib::POINT, GeoLib::POLYLINE, and GeoLib::SURFACE.
|
slot |
Adds a generic name to all points that are part of the specified geo-object.
Definition at line 272 of file GEOModels.cpp.
References _geo_objects, GeoLib::convertGeoTypeToString(), ERR(), GeoLib::Polyline::getNumberOfPoints(), GeoLib::Surface::getNumberOfTriangles(), GeoLib::POLYLINE, GeoLib::PointVec::setNameForElement(), and GeoLib::SURFACE.
|
slot |
Definition at line 102 of file GEOModels.cpp.
References _geo_objects, _geoModel, geoDataAdded(), and GeoLib::POINT.
|
slot |
Definition at line 130 of file GEOModels.cpp.
References _geo_objects, _geoModel, geoDataAdded(), and GeoLib::POLYLINE.
|
slot |
Definition at line 117 of file GEOModels.cpp.
References _geo_objects, _stationModel, and stationVectorAdded().
|
slot |
Definition at line 149 of file GEOModels.cpp.
References _geo_objects, _geoModel, geoDataAdded(), and GeoLib::SURFACE.
|
slot |
Definition at line 137 of file GEOModels.cpp.
References _geo_objects, and _geoModel.
|
slot |
Definition at line 156 of file GEOModels.cpp.
References _geo_objects, and _geoModel.
|
slot |
Calls all necessary functions to connect polyline-segments and update all views and windows.
Definition at line 174 of file GEOModels.cpp.
References _geo_objects, OGSError::box(), GeoLib::Polyline::closePolyline(), GeoLib::Polyline::constructPolylineFromSegments(), FileIO::createSurfaceWithEarClipping(), 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 92 of file GEOModels.cpp.
References _geo_objects.
|
inline |
|
slot |
Definition at line 96 of file GEOModels.cpp.
References _geo_objects.
|
inline |
|
virtualslot |
Removes all parts (points, lines, surfaces) of the geometry with the given name.
Definition at line 75 of file GEOModels.cpp.
References _geo_objects, GeoLib::POINT, GeoLib::POLYLINE, and GeoLib::SURFACE.
|
slot |
Definition at line 109 of file GEOModels.cpp.
References _geo_objects, _geoModel, geoDataRemoved(), and GeoLib::POINT.
|
slot |
Definition at line 143 of file GEOModels.cpp.
References _geoModel, geoDataRemoved(), and GeoLib::POLYLINE.
|
slot |
Definition at line 124 of file GEOModels.cpp.
References _stationModel, and stationVectorRemoved().
|
slot |
Definition at line 161 of file GEOModels.cpp.
References _geoModel, geoDataRemoved(), and GeoLib::SURFACE.
|
slot |
Definition at line 167 of file GEOModels.cpp.
References _geoModel, and updateGeometry().
|
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 29 of file GEOModels.cpp.
References _geo_objects, _geoModel, _stationModel, ERR(), geoDataAdded(), geoDataRemoved(), GeoLib::POINT, GeoLib::POLYLINE, stationVectorAdded(), stationVectorRemoved(), and GeoLib::SURFACE.
Referenced by renameGeometry().
|
private |
Definition at line 99 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 95 of file GEOModels.h.
Referenced by GEOModels(), ~GEOModels(), addPointVec(), addPolylineVec(), addSurfaceVec(), appendPolylineVec(), appendSurfaceVec(), getGeoModel(), removePointVec(), removePolylineVec(), removeSurfaceVec(), renameGeometry(), and updateGeometry().
|
protected |
Definition at line 96 of file GEOModels.h.
Referenced by GEOModels(), ~GEOModels(), addStationVec(), getStationModel(), removeStationVec(), and updateGeometry().