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:
131  };
132 
134  bool ACsToDelete() const;
135 
136 private:
139 
142 };
143 
144 
145 #endif
146 
147 /****************************************************************************/
148 
GNEDeleteFrame::hide
void hide()
hide delete frame
Definition: GNEDeleteFrame.cpp:111
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:54
GNEDeleteFrame::removeSelectedAttributeCarriers
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)
Definition: GNEDeleteFrame.cpp:117
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
GNEDeleteFrame
Definition: GNEDeleteFrame.h:32
GNEDeleteFrame::SubordinatedElements::demandElementParents
int demandElementParents
demand element parents
Definition: GNEDeleteFrame.h:123
GNEDeleteFrame::DeleteOptions::myProtectDemandElements
FXCheckButton * myProtectDemandElements
checkbox for enable/disable automatic deletion of demand children
Definition: GNEDeleteFrame.h:66
GNEDeleteFrame::myDeleteOptions
DeleteOptions * myDeleteOptions
modul for delete options
Definition: GNEDeleteFrame.h:138
GNEFrame
Definition: GNEFrame.h:35
GNEDeleteFrame::DeleteOptions::deleteOnlyGeometryPoints
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
Definition: GNEDeleteFrame.cpp:72
GNEViewNet
Definition: GNEViewNet.h:43
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
GNEDeleteFrame::SubordinatedElements::SubordinatedElements
SubordinatedElements(const GNEJunction *junction)
constructor (for junctions)
Definition: GNEDeleteFrame.cpp:365
GNEDeleteFrame::getDeleteOptions
DeleteOptions * getDeleteOptions() const
get delete options
Definition: GNEDeleteFrame.cpp:357
GNEDeleteFrame::myAttributeCarrierHierarchy
GNEFrameModuls::AttributeCarrierHierarchy * myAttributeCarrierHierarchy
modul for hierarchy
Definition: GNEDeleteFrame.h:141
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:149
GNEDeleteFrame::SubordinatedElements::demandElementChildren
int demandElementChildren
demand element children
Definition: GNEDeleteFrame.h:126
GNEDeleteFrame::DeleteOptions::myForceDeleteAdditionals
FXCheckButton * myForceDeleteAdditionals
checkbox for enable/disable automatic deletion of additionals children
Definition: GNEDeleteFrame.h:60
GNEDeleteFrame::removeAttributeCarrier
void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool ignoreOptions=false)
remove attribute carrier (element)
Definition: GNEDeleteFrame.cpp:169
GNEFrameModuls::AttributeCarrierHierarchy
Definition: GNEFrameModuls.h:291
GNEDeleteFrame::show
void show()
show delete frame
Definition: GNEDeleteFrame.cpp:100
GNEDeleteFrame::DeleteOptions::forceDeleteAdditionals
bool forceDeleteAdditionals() const
check if force delete additionals checkbox is enabled
Definition: GNEDeleteFrame.cpp:66
GNEDeleteFrame::SubordinatedElements::additionalParents
int additionalParents
additional parents
Definition: GNEDeleteFrame.h:117
GNEDeleteFrame::GNEDeleteFrame
GNEDeleteFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Definition: GNEDeleteFrame.cpp:86
GNEDeleteFrame::ACsToDelete
bool ACsToDelete() const
check if there is ACs to delete
Definition: GNEDeleteFrame.cpp:442
GNEDeleteFrame::SubordinatedElements
struct for saving subordinated elements (Junction->Edge->Lane->(Additional | DemandElement)
Definition: GNEDeleteFrame.h:99
GNEDeleteFrame::DeleteOptions
Definition: GNEDeleteFrame.h:40
GNEDeleteFrame::SubordinatedElements::additionalChildren
int additionalChildren
additional children
Definition: GNEDeleteFrame.h:120
GNEDeleteFrame::SubordinatedElements::operator+=
SubordinatedElements & operator+=(const SubordinatedElements &other)
add operator
Definition: GNEDeleteFrame.cpp:429
GNEDeleteFrame::DeleteOptions::protectDemandElements
bool protectDemandElements() const
check if protect demand elements checkbox is enabled
Definition: GNEDeleteFrame.cpp:78
GNEJunction
Definition: GNEJunction.h:48
GNEDeleteFrame::~GNEDeleteFrame
~GNEDeleteFrame()
Destructor.
Definition: GNEDeleteFrame.cpp:96
GNEDeleteFrame::DeleteOptions::DeleteOptions
DeleteOptions(GNEDeleteFrame *deleteFrameParent)
constructor
Definition: GNEDeleteFrame.cpp:45
GNEFrame.h
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
GNEDeleteFrame::DeleteOptions::~DeleteOptions
~DeleteOptions()
destructor
Definition: GNEDeleteFrame.cpp:62
GNEDeleteFrame::DeleteOptions::myDeleteOnlyGeometryPoints
FXCheckButton * myDeleteOnlyGeometryPoints
checkbox for enable/disable delete only geometry points
Definition: GNEDeleteFrame.h:63