87 GNEFrame(horizontalFrameParent, viewNet,
"Delete") {
201 if (subordinatedElements.additionalChildren > 0) {
203 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
204 std::string plural = subordinatedElements.additionalChildren > 1 ?
"s" :
"";
208 toString(subordinatedElements.additionalChildren) +
" additional child" + plural +
".\n Check 'Force deletion of additionals' to force deletion.").c_str());
210 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
233 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
234 std::string plural = subordinatedElements.additionalChildren > 1 ?
"s" :
"";
236 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
237 (tagstr +
" '" +
id +
"' cannot be deleted because owns " +
toString(subordinatedElements.additionalChildren) +
" additional" + plural +
238 ".\n Check 'Force deletion of additionals' to force deletion.").c_str());
240 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
243 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
244 std::string plural = subordinatedElements.additionalParents > 1 ?
"s" :
"";
246 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
247 (tagstr +
" '" +
id +
"' cannot be deleted because is part of " +
toString(subordinatedElements.additionalParents) +
" additional" + plural +
248 ".\n Check 'Force deletion of additionals' to force deletion.").c_str());
250 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
253 WRITE_DEBUG(
"Opening FXMessageBox 'Unprotect demand elements'");
254 std::string plural = subordinatedElements.demandElementChildren > 1 ?
"s" :
"";
256 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
257 (tagstr +
" '" +
id +
"' cannot be deleted because owns " +
toString(subordinatedElements.demandElementChildren) +
" demand element" + plural +
258 ".\n Uncheck 'Protect demand elements' to force deletion.").c_str());
260 WRITE_DEBUG(
"Closed FXMessageBox 'Unprotect demand elements' with 'OK'");
263 WRITE_DEBUG(
"Opening FXMessageBox 'Unprotect demand elements'");
264 std::string plural = subordinatedElements.demandElementParents > 1 ?
"s" :
"";
266 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
267 (tagstr +
" '" +
id +
"' cannot be deleted because is part of " +
toString(subordinatedElements.demandElementParents) +
" demand element" + plural +
268 ".\n Uncheck 'Protect demand elements' to force deletion.").c_str());
270 WRITE_DEBUG(
"Closed FXMessageBox 'Unprotect demand elements' with 'OK'");
291 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
292 std::string plural = subordinatedElements.additionalChildren > 1 ?
"s" :
"";
294 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
295 (tagstr +
" '" +
id +
"' cannot be deleted because owns " +
toString(subordinatedElements.additionalChildren) +
" additional" + plural +
296 ".\n Check 'Force deletion of additionals' to force deletion.").c_str());
298 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
301 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
302 std::string plural = subordinatedElements.additionalParents > 1 ?
"s" :
"";
304 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
305 (tagstr +
" '" +
id +
"' cannot be deleted because is part of " +
toString(subordinatedElements.additionalParents) +
" additional" + plural +
306 ".\n Check 'Force deletion of additionals' to force deletion.").c_str());
308 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
311 WRITE_DEBUG(
"Opening FXMessageBox 'Unprotect demand elements'");
312 std::string plural = subordinatedElements.demandElementChildren > 1 ?
"s" :
"";
314 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
315 (tagstr +
" '" +
id +
"' cannot be deleted because owns " +
toString(subordinatedElements.demandElementChildren) +
" demand element" + plural +
316 ".\n Uncheck 'Protect demand elements' to force deletion.").c_str());
318 WRITE_DEBUG(
"Closed FXMessageBox 'Unprotect demand elements' with 'OK'");
321 WRITE_DEBUG(
"Opening FXMessageBox 'Unprotect demand elements'");
322 std::string plural = subordinatedElements.demandElementParents > 1 ?
"s" :
"";
324 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
325 (tagstr +
" '" +
id +
"' cannot be deleted because is part of " +
toString(subordinatedElements.demandElementParents) +
" demand element" + plural +
326 ".\n Uncheck 'Protect demand elements' to force deletion.").c_str());
328 WRITE_DEBUG(
"Closed FXMessageBox 'Unprotect demand elements' with 'OK'");
366 additionalParents(0),
367 additionalChildren(0),
368 demandElementParents(0),
369 demandElementChildren(0) {
393 for (
const auto& i : edge->
getLanes()) {
447 if (i.second->isAttributeCarrierSelected()) {
451 for (
const auto& j : i.second->getGNEIncomingEdges()) {
452 if (j->isAttributeCarrierSelected()) {
456 for (
auto k : j->getLanes()) {
457 if (k->isAttributeCarrierSelected()) {
462 for (
const auto& k : j->getGNEConnections()) {
463 if (k->isAttributeCarrierSelected()) {
469 for (
const auto& j : i.second->getGNECrossings()) {
470 if (j->isAttributeCarrierSelected()) {
479 for (
const auto& j : i.second) {
480 if (j.second->isAttributeCarrierSelected()) {
503 if (i.second->isAttributeCarrierSelected()) {
509 if (i.second->isAttributeCarrierSelected()) {
515 if (i.second->isAttributeCarrierSelected()) {
521 if (i.second->isAttributeCarrierSelected()) {
527 if (i.second->isAttributeCarrierSelected()) {
533 if (i.second->isAttributeCarrierSelected()) {
539 if (i.second->isAttributeCarrierSelected()) {
545 if (i.second->isAttributeCarrierSelected()) {
551 if (i.second->isAttributeCarrierSelected()) {
557 if (i.second->isAttributeCarrierSelected()) {
const AttributeCarriers & getAttributeCarriers() const
retrieve all attribute carriers of Net
stop placed over a parking area (used in netedit)
DeleteOptions * getDeleteOptions() const
get delete options
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
GNECrossing * getCrossingFront() const
get front crossing (or a pointer to nullptr if there isn't)
GNETAZ * getTAZFront() const
get front TAZ (or a pointer to nullptr if there isn't)
void hide()
hide delete frame
begin/end of the description of a junction
begin/end of the description of a single lane
void update() const
Mark the entire GNEViewNet to be repainted later.
void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool ignoreOptions=false)
remove attribute carrier (element)
a flow definitio nusing a from-to edges instead of a route (used by router)
const Polygons & getPolygons() const
Returns all polygons.
a traffic assignment zone
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
a flow definition nusing a route instead of a from-to edges route (used in NETEDIT) ...
std::map< SumoXMLTag, std::map< std::string, GNEAdditional * > > additionals
map with the name and pointer to additional elements of net
void show()
show delete frame
connectio between two lanes
int demandElementParents
demand element parents
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
bool isSelectable() const
return true if tag correspond to a selectable element
stop placed over a lane (used in netedit)
void deleteShape(GNEShape *shape, GNEUndoList *undoList)
remove shape
GNEDeleteFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
FXCheckButton * myDeleteOnlyGeometryPoints
checkbox for enable/disable delete only geometry points
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
std::vector< GNEConnection * > retrieveConnections(bool onlySelected=false) const
return all connections
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier (or a pointer to nullptr if there isn't)
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
SubordinatedElements(const GNEJunction *junction)
constructor (for junctions)
const std::vector< GNEEdge * > & getGNEEdges() const
Returns all GNEEdges vinculated with this Junction.
const std::vector< GNEAdditional * > & getAdditionalChildren() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
GNEViewNet * getViewNet() const
get view net
begin/end of the description of a route
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
const std::vector< GNEDemandElement * > & getDemandElementChildren() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
GNEViewNet * myViewNet
View Net.
GNEDemandElement * getDemandElementFront() const
get front net element element (or a pointer to nullptr if there isn't)
GNEUndoList * getUndoList() const
get the undoList object
stop placed over a charging station (used in netedit)
int additionalParents
additional parents
std::vector< GNEDemandElement * > retrieveDemandElements(bool onlySelected=false) const
return all demand elements
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
void enableUpdateGeometry()
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
GNEJunction * getJunctionFront() const
get front junction (or a pointer to nullptr if there isn't)
~GNEDeleteFrame()
Destructor.
A point in 2D or 3D with translation and scaling methods.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
#define GUIDesignCheckButton
checkButton placed in left position
Supermode currentSupermode
the current supermode
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
stop placed over a containerStop (used in netedit)
stop placed over a busStop (used in netedit)
void showAttributeCarrierHierarchy(GNEAttributeCarrier *AC)
show AttributeCarrierHierarchy
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
class used to group all variables related with objects under cursor after a click over view ...
FXCheckButton * myProtectDemandElements
checkbox for enable/disable automatic deletion of demand children
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > demandElements
map with the name and pointer to demand elements of net
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
bool ACsToDelete() const
check if there is ACs to delete
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
const std::string getID() const
function to support debugging
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
std::vector< GNEShape * > retrieveShapes(SumoXMLTag shapeTag, bool onlySelected=false)
return shape by type shapes
GNEAdditional * getAdditionalFront() const
get front additional element (or a pointer to nullptr if there isn't)
DeleteOptions * myDeleteOptions
modul for delete options
int demandElementChildren
demand element children
begin/end of the description of an edge
A road/street connecting two junctions (netedit-version)
const std::vector< GNEDemandElement * > & getDemandElementParents() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
bool protectDemandElements() const
check if protect demand elements checkbox is enabled
void hideAttributeCarrierHierarchy()
hide AttributeCarrierHierarchy
virtual void show()
show Frame
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
An Element which don't belongs to GNENet but has influency in the simulation.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
const std::string & getTagStr() const
get tag assigned to this object in string format
struct for saving subordinated elements (Junction->Edge->Lane->(Additional | DemandElement) ...
GNEShape * getShapeFront() const
get front shape element (or a pointer to nullptr if there isn't)
crossing between edges for pedestrians
virtual void hide()
hide Frame
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
std::map< std::string, GNEJunction * > junctions
map with the name and pointer to junctions of net
std::vector< GNECrossing * > retrieveCrossings(bool onlySelected=false) const
return all crossings
GNENet * getNet() const
get the net object
~DeleteOptions()
destructor
GNEConnection * getConnectionFront() const
get front connection (or a pointer to nullptr if there isn't)
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
a single trip definition (used by router)
int additionalChildren
additional children
GNEPoly * getPolyFront() const
get front Poly (or a pointer to nullptr if there isn't)
void disableUpdateGeometry()
disable update geometry of elements after inserting or removing an element in net ...
SubordinatedElements & operator+=(const SubordinatedElements &other)
add operator
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
Network mode (Edges, junctions, etc..)
DeleteOptions(GNEDeleteFrame *deleteFrameParent)
constructor
FXCheckButton * myForceDeleteAdditionals
checkbox for enable/disable automatic deletion of additionals children
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
An Element which don't belongs to GNENet but has influency in the simulation.
begin/end of the description of a polygon
bool forceDeleteAdditionals() const
check if force delete additionals checkbox is enabled
GNEFrameModuls::AttributeCarrierHierarchy * myAttributeCarrierHierarchy
modul for hierarchy
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)
const POIs & getPOIs() const
Returns all pois.