Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEDeleteFrame.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// The Widget for remove network-elements
19/****************************************************************************/
20#include <config.h>
21
22#include <netedit/GNENet.h>
23#include <netedit/GNEUndoList.h>
24#include <netedit/GNEViewNet.h>
34
35#include "GNEDeleteFrame.h"
36
37// ===========================================================================
38// FOX callback mapping
39// ===========================================================================
40
44
51
52// Object implementation
53FXIMPLEMENT(GNEDeleteFrame::DeleteOptions, MFXGroupBoxModule, DeleteOptionsMap, ARRAYNUMBER(DeleteOptionsMap))
54FXIMPLEMENT(GNEDeleteFrame::ProtectElements, MFXGroupBoxModule, ProtectElementsMap, ARRAYNUMBER(ProtectElementsMap))
55
56// ---------------------------------------------------------------------------
57// GNEDeleteFrame::DeleteOptions - methods
58// ---------------------------------------------------------------------------
59
61 MFXGroupBoxModule(deleteFrameParent, TL("Options")),
62 myDeleteFrameParent(deleteFrameParent) {
63 // Create checkbox for enable/disable delete only geomtery point(by default, disabled)
64 myDeleteOnlyGeometryPoints = new FXCheckButton(getCollapsableFrame(), TL("Delete geometry points"), this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
65 myDeleteOnlyGeometryPoints->setCheck(FALSE);
66}
67
68
70
71
72bool
74 return (myDeleteOnlyGeometryPoints->getCheck() == TRUE);
75}
76
77
78long
79GNEDeleteFrame::DeleteOptions::onCmdSetOption(FXObject*, FXSelector, void*) {
80 myDeleteFrameParent->getViewNet()->update();
81 return 1;
82}
83
84// ---------------------------------------------------------------------------
85// GNEDeleteFrame::SubordinatedElements - methods
86// ---------------------------------------------------------------------------
87
89 SubordinatedElements(junction, junction->getNet()->getViewNet(), junction) {
90 // add the number of subodinated elements of child edges
91 for (const auto& edge : junction->getChildEdges()) {
93 }
94}
95
96
98 SubordinatedElements(edge, edge->getNet()->getViewNet(), edge) {
99 // add the number of subodinated elements of child lanes
100 for (const auto& lane : edge->getLanes()) {
102 }
103}
104
105
109
110
112 SubordinatedElements(additional, additional->getNet()->getViewNet()) {
113}
114
115
117 SubordinatedElements(demandElement, demandElement->getNet()->getViewNet()) {
118}
119
120
122 SubordinatedElements(genericData, genericData->getNet()->getViewNet()) {
123}
124
125
127
128
129bool
131 // check every parent/child
132 if ((myAdditionalParents > 0) && protectElements->protectAdditionals()) {
133 openWarningDialog("additional", myAdditionalParents, false);
134 } else if ((myAdditionalChilds > 0) && protectElements->protectAdditionals()) {
135 openWarningDialog("additional", myAdditionalChilds, true);
136 } else if ((myDemandElementParents > 0) && protectElements->protectDemandElements()) {
137 openWarningDialog("demand", myDemandElementParents, false);
138 } else if ((myDemandElementChilds > 0) && protectElements->protectDemandElements()) {
139 openWarningDialog("demand", myDemandElementChilds, true);
140 } else if ((myGenericDataParents > 0) && protectElements->protectGenericDatas()) {
141 openWarningDialog("data", myGenericDataParents, false);
142 } else if ((myGenericDataChilds > 0) && protectElements->protectGenericDatas()) {
143 openWarningDialog("data", myGenericDataChilds, true);
144 } else {
145 // all checks ok, then return true, to remove element
146 return true;
147 }
148 return false;
149}
150
151
153 myAttributeCarrier(attributeCarrier),
154 myViewNet(viewNet),
155 myAdditionalParents(0),
156 myAdditionalChilds(0),
157 myDemandElementParents(0),
158 myDemandElementChilds(0),
159 myGenericDataParents(0),
160 myGenericDataChilds(0) {
161}
162
163
165 const GNEHierarchicalElement* hierarchicalElement) :
166 myAttributeCarrier(attributeCarrier),
167 myViewNet(viewNet),
168 myAdditionalParents(hierarchicalElement->getParentAdditionals().size()),
169 myAdditionalChilds(hierarchicalElement->getChildAdditionals().size()),
170 myDemandElementParents(hierarchicalElement->getParentDemandElements().size()),
171 myDemandElementChilds(hierarchicalElement->getChildDemandElements().size()),
172 myGenericDataParents(hierarchicalElement->getParentGenericDatas().size()),
173 myGenericDataChilds(hierarchicalElement->getChildGenericDatas().size()) {
174 // add the number of subodinated elements of additionals, demand elements and generic datas
175 for (const auto& additionalParent : hierarchicalElement->getParentAdditionals()) {
176 addValuesFromSubordinatedElements(this, additionalParent);
177 }
178 for (const auto& demandParent : hierarchicalElement->getParentDemandElements()) {
179 addValuesFromSubordinatedElements(this, demandParent);
180 }
181 for (const auto& genericDataParent : hierarchicalElement->getParentGenericDatas()) {
182 addValuesFromSubordinatedElements(this, genericDataParent);
183 }
184 for (const auto& additionalChild : hierarchicalElement->getChildAdditionals()) {
185 addValuesFromSubordinatedElements(this, additionalChild);
186 }
187 for (const auto& demandChild : hierarchicalElement->getChildDemandElements()) {
188 addValuesFromSubordinatedElements(this, demandChild);
189 }
190 for (const auto& genericDataChild : hierarchicalElement->getChildGenericDatas()) {
191 addValuesFromSubordinatedElements(this, genericDataChild);
192 }
193}
194
195
196void
205
206
207void
208GNEDeleteFrame::SubordinatedElements::openWarningDialog(const std::string& type, const size_t number, const bool isChild) {
209 // declare plural depending of "number"
210 const std::string plural = (number > 1) ? "s" : "";
211 // declare header
212 const std::string header = "Problem deleting " + myAttributeCarrier->getTagProperty().getTagStr() + " '" + myAttributeCarrier->getID() + "'";
213 // declare message
214 std::string msg;
215 // set message depending of isChild
216 if (isChild) {
217 msg = myAttributeCarrier->getTagProperty().getTagStr() + " '" + myAttributeCarrier->getID() +
218 "' cannot be deleted because it has " + toString(number) + " " + type + " element" + plural + ".\n" +
219 "To delete it, uncheck 'protect " + type + " elements'.";
220 } else {
221 msg = myAttributeCarrier->getTagProperty().getTagStr() + " '" + myAttributeCarrier->getID() +
222 "' cannot be deleted because it is part of " + toString(number) + " " + type + " element" + plural + ".\n" +
223 "To delete it, uncheck 'protect " + type + " elements'.";
224 }
225 // write warning
226 WRITE_DEBUG("Opened FXMessageBox " + header);
227 // open message box
228 FXMessageBox::warning(myViewNet->getApp(), MBOX_OK, header.c_str(), "%s", msg.c_str());
229 // write warning if netedit is running in testing mode
230 WRITE_DEBUG("Closed FXMessageBox " + header);
231}
232
233// ---------------------------------------------------------------------------
234// GNEDeleteFrame::ProtectElements - methods
235// ---------------------------------------------------------------------------
236
238 MFXGroupBoxModule(deleteFrameParent, TL("Protect Elements")) {
239 // Create "Protect all" Button
240 GUIDesigns::buildFXButton(getCollapsableFrame(), TL("Protect all"), "", TL("Protect all elements"), nullptr, this, MID_GNE_PROTECT_ALL, GUIDesignButton);
241 // Create "Unprotect all" Button
242 GUIDesigns::buildFXButton(getCollapsableFrame(), TL("Unprotect all"), "", TL("Unprotect all elements"), nullptr, this, MID_GNE_UNPROTECT_ALL, GUIDesignButton);
243 // Create checkbox for enable/disable delete only geomtery point(by default, disabled)
244 myProtectAdditionals = new FXCheckButton(getCollapsableFrame(), TL("Protect additional elements"), deleteFrameParent, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
245 myProtectAdditionals->setCheck(TRUE);
246 // Create checkbox for enable/disable delete only geomtery point(by default, disabled)
247 myProtectTAZs = new FXCheckButton(getCollapsableFrame(), TL("Protect TAZ elements"), deleteFrameParent, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
248 myProtectTAZs->setCheck(TRUE);
249 // Create checkbox for enable/disable delete only geomtery point(by default, disabled)
250 myProtectDemandElements = new FXCheckButton(getCollapsableFrame(), TL("Protect demand elements"), deleteFrameParent, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
251 myProtectDemandElements->setCheck(TRUE);
252 // Create checkbox for enable/disable delete only geomtery point(by default, disabled)
253 myProtectGenericDatas = new FXCheckButton(getCollapsableFrame(), TL("Protect data elements"), deleteFrameParent, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
254 myProtectGenericDatas->setCheck(TRUE);
255}
256
257
259
260
261bool
263 return (myProtectAdditionals->getCheck() == TRUE);
264}
265
266
267bool
269 return (myProtectTAZs->getCheck() == TRUE);
270}
271
272
273bool
275 return (myProtectDemandElements->getCheck() == TRUE);
276}
277
278
279bool
281 return (myProtectGenericDatas->getCheck() == TRUE);
282}
283
284
285long
287 myProtectAdditionals->setCheck(TRUE);
288 myProtectTAZs->setCheck(TRUE);
289 myProtectDemandElements->setCheck(TRUE);
290 myProtectGenericDatas->setCheck(TRUE);
291 return 1;
292}
293
294
295long
297 myProtectAdditionals->setCheck(FALSE);
298 myProtectTAZs->setCheck(FALSE);
299 myProtectDemandElements->setCheck(FALSE);
300 myProtectGenericDatas->setCheck(FALSE);
301 return 1;
302}
303
304
305long
306GNEDeleteFrame::ProtectElements::onUpdProtectAll(FXObject* sender, FXSelector, void*) {
307 if (myProtectAdditionals->getCheck() && myProtectTAZs->getCheck() &&
308 myProtectDemandElements->getCheck() && myProtectGenericDatas->getCheck()) {
309 return sender->handle(this, FXSEL(SEL_COMMAND, ID_DISABLE), nullptr);
310 } else {
311 return sender->handle(this, FXSEL(SEL_COMMAND, ID_ENABLE), nullptr);
312 }
313}
314
315
316long
317GNEDeleteFrame::ProtectElements::onUpdUnprotectAll(FXObject* sender, FXSelector, void*) {
318 if (!myProtectAdditionals->getCheck() && !myProtectTAZs->getCheck() &&
319 !myProtectDemandElements->getCheck() && !myProtectGenericDatas->getCheck()) {
320 return sender->handle(this, FXSEL(SEL_COMMAND, ID_DISABLE), nullptr);
321 } else {
322 return sender->handle(this, FXSEL(SEL_COMMAND, ID_ENABLE), nullptr);
323 }
324}
325
326// ===========================================================================
327// method definitions
328// ===========================================================================
329
331 GNEFrame(viewParent, viewNet, TL("Delete")) {
332 // create delete options module
333 myDeleteOptions = new DeleteOptions(this);
334 // create protect elements module
336}
337
338
341
342
343void
347
348
349void
353
354
355void
357 // get attribute carriers
358 const auto& attributeCarriers = myViewNet->getNet()->getAttributeCarriers();
359 // first check if there is additional to remove
360 if (selectedACsToDelete()) {
361 // remove all selected attribute carriers using the following parent-child sequence
362 myViewNet->getUndoList()->begin(GUIIcon::MODEDELETE, TL("remove selected items"));
363 // disable update geometry
365 // delete selected attribute carriers depending of current supermode
367 //junctions
368 const auto selectedJunctions = attributeCarriers->getSelectedJunctions();
369 for (const auto& selectedJunction : selectedJunctions) {
370 myViewNet->getNet()->deleteJunction(selectedJunction, myViewNet->getUndoList());
371 }
372 // edges
373 const auto selectedEdges = attributeCarriers->getSelectedEdges();
374 for (const auto& selectedEdge : selectedEdges) {
375 myViewNet->getNet()->deleteEdge(selectedEdge, myViewNet->getUndoList(), false);
376 }
377 // lanes
378 const auto selectedLanes = attributeCarriers->getSelectedLanes();
379 for (const auto& selectedLane : selectedLanes) {
380 myViewNet->getNet()->deleteLane(selectedLane, myViewNet->getUndoList(), false);
381 }
382 // connections
383 const auto selectedConnections = attributeCarriers->getSelectedConnections();
384 for (const auto& selectedConnection : selectedConnections) {
385 myViewNet->getNet()->deleteConnection(selectedConnection, myViewNet->getUndoList());
386 }
387 // crossings
388 const auto selectedCrossings = attributeCarriers->getSelectedCrossings();
389 for (const auto& selectedCrossing : selectedCrossings) {
390 myViewNet->getNet()->deleteCrossing(selectedCrossing, myViewNet->getUndoList());
391 }
392 // additionals (including Polygons, POIs, TAZs and Wires)
393 while (attributeCarriers->getNumberOfSelectedAdditionals() > 0) {
394 myViewNet->getNet()->deleteAdditional(attributeCarriers->getSelectedAdditionals().front(), myViewNet->getUndoList());
395 }
397 // demand elements
398 while (attributeCarriers->getNumberOfSelectedDemandElements() > 0) {
399 myViewNet->getNet()->deleteDemandElement(attributeCarriers->getSelectedDemandElements().front(), myViewNet->getUndoList());
400 }
402 // generic datas
403 auto selectedGenericDatas = attributeCarriers->getSelectedGenericDatas();
404 for (const auto& selectedGenericData : selectedGenericDatas) {
405 myViewNet->getNet()->deleteGenericData(selectedGenericData, myViewNet->getUndoList());
406 }
407 }
408 // enable update geometry
410 // finish deletion
412 }
413}
414
415
416void
418 // disable update geometry
420 // first check if there more than one clicked GL object under cursor
421 if (viewObjects.getGLObjects().size() > 1) {
422 std::vector<GUIGlObject*> filteredGLObjects;
423 // filter objects
424 for (const auto& glObject : viewObjects.getGLObjects()) {
425 if (glObject->isGLObjectLocked()) {
426 continue;
427 }
428 filteredGLObjects.push_back(glObject);
429 }
430 // now filter elements based on the first element
431 filteredGLObjects = GNEViewNetHelper::filterElementsByLayer(filteredGLObjects);
432 // after filter, check if there is more than one element
433 if (filteredGLObjects.size() > 1) {
434 // use Cursor dialog
435 myViewNet->openDeleteDialogAtCursor(filteredGLObjects);
436 } else if (filteredGLObjects.size() > 0) {
437 filteredGLObjects.front()->deleteGLObject();
438 }
439 } else if ((viewObjects.getGLObjects().size() > 0) &&
440 !viewObjects.getGLObjects().front()->isGLObjectLocked()) {
441 viewObjects.getGLObjects().front()->deleteGLObject();
442 }
443 // enable update geometry
445}
446
447
448bool
450 // get clicked position
451 const Position clickedPosition = myViewNet->getPositionInformation();
452 // filter elements with geometry points
453 for (const auto& AC : viewObjects.getAttributeCarriers()) {
454 if (AC->getTagProperty().getTag() == SUMO_TAG_EDGE) {
455 viewObjects.getEdgeFront()->removeGeometryPoint(clickedPosition, myViewNet->getUndoList());
456 return true;
457 } else if (AC->getTagProperty().getTag() == SUMO_TAG_POLY) {
458 viewObjects.getPolyFront()->removeGeometryPoint(clickedPosition, myViewNet->getUndoList());
459 return true;
460 } else if (AC->getTagProperty().getTag() == SUMO_TAG_TAZ) {
461 viewObjects.getTAZFront()->removeGeometryPoint(clickedPosition, myViewNet->getUndoList());
462 return true;
463 }
464 }
465 return false;
466}
467
468
473
474
479
480// ---------------------------------------------------------------------------
481// GNEAdditionalFrame - protected methods
482// ---------------------------------------------------------------------------
483
484bool
486 // invert selection of elements depending of current supermode
488 // iterate over junctions
489 for (const auto& junction : myViewNet->getNet()->getAttributeCarriers()->getJunctions()) {
490 if (junction.second->isAttributeCarrierSelected()) {
491 return true;
492 }
493 // since we iterate over all junctions, it's only necessary to iterate over incoming edges
494 for (const auto& edge : junction.second->getGNEIncomingEdges()) {
495 if (edge->isAttributeCarrierSelected()) {
496 return true;
497 }
498 // check lanes
499 for (const auto& lane : edge->getLanes()) {
500 if (lane->isAttributeCarrierSelected()) {
501 return true;
502 }
503 }
504 // check connections
505 for (const auto& connection : edge->getGNEConnections()) {
506 if (connection->isAttributeCarrierSelected()) {
507 return true;
508 }
509 }
510 }
511 // check crossings
512 for (const auto& crossing : junction.second->getGNECrossings()) {
513 if (crossing->isAttributeCarrierSelected()) {
514 return true;
515 }
516 }
517 }
518 // check additionals
519 for (const auto& additionalTag : myViewNet->getNet()->getAttributeCarriers()->getAdditionals()) {
520 for (const auto& additional : additionalTag.second) {
521 if (additional.second->isAttributeCarrierSelected()) {
522 return true;
523 }
524 }
525 }
527 // check demand elements
528 for (const auto& demandElementTag : myViewNet->getNet()->getAttributeCarriers()->getDemandElements()) {
529 for (const auto& demandElement : demandElementTag.second) {
530 if (demandElement.second->isAttributeCarrierSelected()) {
531 return true;
532 }
533 }
534 }
536 // iterate over all generic datas
537 for (const auto& genericDataTag : myViewNet->getNet()->getAttributeCarriers()->getGenericDatas()) {
538 for (const auto& genericData : genericDataTag.second) {
539 if (genericData.second->isAttributeCarrierSelected()) {
540 return true;
541 }
542 }
543 }
544 }
545 return false;
546}
547
548/****************************************************************************/
FXDEFMAP(GNEDeleteFrame::DeleteOptions) DeleteOptionsMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
Definition GUIAppEnum.h:939
@ MID_GNE_UNPROTECT_ALL
unprotect all elements
@ MID_GNE_PROTECT_ALL
protect all elements
#define GUIDesignButton
Definition GUIDesigns.h:88
#define GUIDesignCheckButton
checkButton placed in left position
Definition GUIDesigns.h:198
#define WRITE_DEBUG(msg)
Definition MsgHandler.h:306
#define TL(string)
Definition MsgHandler.h:315
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ SUMO_TAG_EDGE
begin/end of the description of an edge
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
An Element which don't belong to GNENet but has influence in the simulation.
long onCmdSetOption(FXObject *, FXSelector, void *)
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
long onUpdUnprotectAll(FXObject *, FXSelector, void *)
update unprotect all elements
FXCheckButton * myProtectGenericDatas
checkbox for enable/disable protect generic datas
bool protectGenericDatas() const
check if protect generic datas checkbox is enabled
bool protectAdditionals() const
check if protect additional elements checkbox is enabled
long onCmdUnprotectAll(FXObject *, FXSelector, void *)
unprotect all elements
FXCheckButton * myProtectAdditionals
FOX need this.
FXCheckButton * myProtectDemandElements
checkbox for enable/disable protect demand elements
FXCheckButton * myProtectTAZs
checkbox for enable/disable protect TAZs
bool protectDemandElements() const
check if protect demand elements checkbox is enabled
long onUpdProtectAll(FXObject *, FXSelector, void *)
update protect all elements
long onCmdProtectAll(FXObject *, FXSelector, void *)
bool protectTAZs() const
check if protect TAZ elements checkbox is enabled
ProtectElements(GNEDeleteFrame *deleteFrameParent)
FOX-declaration.
struct for saving subordinated elements (Junction->Edge->Lane->(Additional | DemandElement)
size_t myDemandElementParents
parent demand elements
size_t myGenericDataChilds
child demand elements
size_t myGenericDataParents
parent demand elements
size_t myDemandElementChilds
child demand elements
size_t myAdditionalParents
parent additionals (except TAZs)
void openWarningDialog(const std::string &elementType, const size_t number, const bool isChild)
size_t myAdditionalChilds
child additional (except TAZs)
bool checkElements(const ProtectElements *protectElements)
if element can be removed
void addValuesFromSubordinatedElements(SubordinatedElements *originalSE, const SubordinatedElements &newSE)
add in originalSE the values of newSE
SubordinatedElements(const GNEJunction *junction)
constructor (for junctions)
bool selectedACsToDelete() const
check if there is selected ACs to delete
ProtectElements * getProtectElements() const
get protect elements modul
bool removeGeometryPoint(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
remove geometry point
DeleteOptions * getDeleteOptions() const
get delete options modul
~GNEDeleteFrame()
Destructor.
DeleteOptions * myDeleteOptions
modul for delete options
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)
GNEDeleteFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
void hide()
hide delete frame
ProtectElements * myProtectElements
modul for protect elements
void removeAttributeCarrier(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
remove attribute carrier (element)
void show()
show delete frame
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)
remove geometry point in the clicked position
Definition GNEEdge.cpp:514
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
Definition GNEEdge.cpp:1116
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:150
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:117
virtual void show()
show Frame
Definition GNEFrame.cpp:115
virtual void hide()
hide Frame
Definition GNEFrame.cpp:124
An Element which don't belong to GNENet but has influence in the simulation.
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
const std::vector< GNEGenericData * > & getParentGenericDatas() const
get parent demand elements
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const std::vector< GNEEdge * > & getChildEdges() const
get child edges
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
const std::vector< GNEGenericData * > & getChildGenericDatas() const
return child generic data elements
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
const std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEAdditional * > > & getAdditionals() const
get additionals
const std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEGenericData * > > & getGenericDatas() const
get all generic datas
const std::map< std::string, GNEJunction * > & getJunctions() const
get junctions
const std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEDemandElement * > > & getDemandElements() const
get demand elements
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
Definition GNENet.cpp:423
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
Definition GNENet.cpp:590
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
Definition GNENet.cpp:646
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
Definition GNENet.cpp:664
void disableUpdateGeometry()
disable update geometry of elements after inserting or removing an element in net
Definition GNENet.cpp:2788
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
Definition GNENet.cpp:685
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
Definition GNENet.cpp:631
void deleteGenericData(GNEGenericData *genericData, GNEUndoList *undoList)
remove generic data
Definition GNENet.cpp:741
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:125
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
Definition GNENet.cpp:377
void enableUpdateGeometry()
Definition GNENet.cpp:2782
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList) override
remove geometry point in the clicked position
Definition GNEPoly.cpp:130
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)
remove geometry point in the clicked position
Definition GNETAZ.cpp:119
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
class used to group all variables related with objects under cursor after a click over view
const std::vector< GNEAttributeCarrier * > & getAttributeCarriers() const
get vector with ACs
GNEPoly * getPolyFront() const
get front Poly or a pointer to nullptr
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
GNETAZ * getTAZFront() const
get front TAZ or a pointer to nullptr
const std::vector< GUIGlObject * > & getGLObjects() const
get vector with GL objects
GNENet * getNet() const
get the net object
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
GNEUndoList * getUndoList() const
get the undoList object
void openDeleteDialogAtCursor(const std::vector< GUIGlObject * > &GLObjects)
open delete dialog at cursor
A single child window which contains a view of the simulation area.
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
virtual Position getPositionInformation() const
Returns the cursor's x/y position within the network.
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
Options
GroupBoxModule options.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
bool isCurrentSupermodeDemand() const
@check if current supermode is Demand
bool isCurrentSupermodeData() const
@check if current supermode is Data
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
static std::vector< GUIGlObject * > filterElementsByLayer(const std::vector< GUIGlObject * > &GLObjects)
filter elements based on the layer