Eclipse SUMO - Simulation of Urban MObility
GNEDeleteFrame.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // The Widget for remove network-elements
16 /****************************************************************************/
17 #ifndef GNEDeleteFrame_h
18 #define GNEDeleteFrame_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include "GNEFrame.h"
24 
25 // ===========================================================================
26 // class definitions
27 // ===========================================================================
32 class GNEDeleteFrame : public GNEFrame {
33 
34 public:
35 
36  // ===========================================================================
37  // class DeleteOptions
38  // ===========================================================================
39 
40  class DeleteOptions : protected FXGroupBox {
41 
42  public:
44  DeleteOptions(GNEDeleteFrame* deleteFrameParent);
45 
48 
50  bool forceDeleteAdditionals() const;
51 
53  bool deleteOnlyGeometryPoints() const;
54 
56  bool protectDemandElements() const;
57 
58  private:
60  FXCheckButton* myForceDeleteAdditionals;
61 
64 
66  FXCheckButton* myProtectDemandElements;
67  };
68 
73  GNEDeleteFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
74 
77 
79  void show();
80 
82  void hide();
83 
86 
91  void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, bool ignoreOptions = false);
92 
95 
96 protected:
97 
100 
102  SubordinatedElements(const GNEJunction* junction);
103 
105  SubordinatedElements(const GNEEdge* edge);
106 
108  SubordinatedElements(const GNELane* lane);
109 
111  SubordinatedElements(const GNEAdditional* additional);
112 
114  SubordinatedElements(const GNEDemandElement* demandElement);
115 
118 
121 
124 
127 
128  private:
130  SubordinatedElements& operator+=(const SubordinatedElements& other);
131  };
132 
134  bool ACsToDelete() const;
135 
136 private:
139 
142 };
143 
144 
145 #endif
146 
147 /****************************************************************************/
148 
DeleteOptions * getDeleteOptions() const
get delete options
void hide()
hide delete frame
void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool ignoreOptions=false)
remove attribute carrier (element)
void show()
show delete frame
int demandElementParents
demand element parents
GNEDeleteFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
FXCheckButton * myDeleteOnlyGeometryPoints
checkbox for enable/disable delete only geometry points
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
int additionalParents
additional parents
~GNEDeleteFrame()
Destructor.
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
bool ACsToDelete() const
check if there is ACs to delete
DeleteOptions * myDeleteOptions
modul for delete options
int demandElementChildren
demand element children
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
bool protectDemandElements() const
check if protect demand elements checkbox is enabled
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
struct for saving subordinated elements (Junction->Edge->Lane->(Additional | DemandElement) ...
int additionalChildren
additional children
DeleteOptions(GNEDeleteFrame *deleteFrameParent)
constructor
FXCheckButton * myForceDeleteAdditionals
checkbox for enable/disable automatic deletion of additionals children
An Element which don't belongs to GNENet but has influency in the simulation.
bool forceDeleteAdditionals() const
check if force delete additionals checkbox is enabled
GNEFrameModuls::AttributeCarrierHierarchy * myAttributeCarrierHierarchy
modul for hierarchy
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)