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 /****************************************************************************/
14 // The Widget for remove network-elements
15 /****************************************************************************/
16 #ifndef GNEDeleteFrame_h
17 #define GNEDeleteFrame_h
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include "GNEFrame.h"
23 
24 // ===========================================================================
25 // class definitions
26 // ===========================================================================
31 class GNEDeleteFrame : public GNEFrame {
32 
33 public:
34 
35  // ===========================================================================
36  // class DeleteOptions
37  // ===========================================================================
38 
39  class DeleteOptions : protected FXGroupBox {
40 
41  public:
43  DeleteOptions(GNEDeleteFrame* deleteFrameParent);
44 
47 
49  bool forceDeleteAdditionals() const;
50 
52  bool deleteOnlyGeometryPoints() const;
53 
55  bool protectDemandElements() const;
56 
57  private:
59  FXCheckButton* myForceDeleteAdditionals;
60 
63 
65  FXCheckButton* myProtectDemandElements;
66  };
67 
72  GNEDeleteFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
73 
76 
78  void show();
79 
81  void hide();
82 
85 
90  void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, bool ignoreOptions = false);
91 
94 
95 protected:
96 
99 
101  SubordinatedElements(const GNEJunction* junction);
102 
104  SubordinatedElements(const GNEEdge* edge);
105 
107  SubordinatedElements(const GNELane* lane);
108 
110  SubordinatedElements(const GNEAdditional* additional);
111 
113  SubordinatedElements(const GNEDemandElement* demandElement);
114 
117 
120 
123 
126 
127  private:
130  };
131 
133  bool ACsToDelete() const;
134 
135 private:
138 
141 };
142 
143 
144 #endif
145 
146 /****************************************************************************/
147 
GNEDeleteFrame::hide
void hide()
hide delete frame
Definition: GNEDeleteFrame.cpp:110
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:55
GNEDeleteFrame::removeSelectedAttributeCarriers
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)
Definition: GNEDeleteFrame.cpp:116
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
GNEDeleteFrame::SubordinatedElements::childDemandElements
int childDemandElements
child demand elements
Definition: GNEDeleteFrame.h:125
GNEDeleteFrame
Definition: GNEDeleteFrame.h:31
GNEDeleteFrame::DeleteOptions::myProtectDemandElements
FXCheckButton * myProtectDemandElements
checkbox for enable/disable automatic deletion of demand children
Definition: GNEDeleteFrame.h:65
GNEDeleteFrame::myDeleteOptions
DeleteOptions * myDeleteOptions
modul for delete options
Definition: GNEDeleteFrame.h:137
GNEFrame
Definition: GNEFrame.h:34
GNEDeleteFrame::DeleteOptions::deleteOnlyGeometryPoints
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
Definition: GNEDeleteFrame.cpp:71
GNEViewNet
Definition: GNEViewNet.h:42
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNEDeleteFrame::SubordinatedElements::SubordinatedElements
SubordinatedElements(const GNEJunction *junction)
constructor (for junctions)
Definition: GNEDeleteFrame.cpp:364
GNEDeleteFrame::getDeleteOptions
DeleteOptions * getDeleteOptions() const
get delete options
Definition: GNEDeleteFrame.cpp:356
GNEDeleteFrame::myAttributeCarrierHierarchy
GNEFrameModuls::AttributeCarrierHierarchy * myAttributeCarrierHierarchy
modul for hierarchy
Definition: GNEDeleteFrame.h:140
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:148
GNEDeleteFrame::SubordinatedElements::parentAdditionals
int parentAdditionals
parent additionals
Definition: GNEDeleteFrame.h:116
GNEDeleteFrame::DeleteOptions::myForceDeleteAdditionals
FXCheckButton * myForceDeleteAdditionals
checkbox for enable/disable automatic deletion of additionals children
Definition: GNEDeleteFrame.h:59
GNEDeleteFrame::removeAttributeCarrier
void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool ignoreOptions=false)
remove attribute carrier (element)
Definition: GNEDeleteFrame.cpp:168
GNEFrameModuls::AttributeCarrierHierarchy
Definition: GNEFrameModuls.h:287
GNEDeleteFrame::show
void show()
show delete frame
Definition: GNEDeleteFrame.cpp:99
GNEDeleteFrame::DeleteOptions::forceDeleteAdditionals
bool forceDeleteAdditionals() const
check if force delete additionals checkbox is enabled
Definition: GNEDeleteFrame.cpp:65
GNEDeleteFrame::GNEDeleteFrame
GNEDeleteFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Definition: GNEDeleteFrame.cpp:85
GNEDeleteFrame::ACsToDelete
bool ACsToDelete() const
check if there is ACs to delete
Definition: GNEDeleteFrame.cpp:441
GNEDeleteFrame::SubordinatedElements
struct for saving subordinated elements (Junction->Edge->Lane->(Additional | DemandElement)
Definition: GNEDeleteFrame.h:98
GNEDeleteFrame::DeleteOptions
Definition: GNEDeleteFrame.h:39
GNEDeleteFrame::SubordinatedElements::operator+=
SubordinatedElements & operator+=(const SubordinatedElements &other)
add operator
Definition: GNEDeleteFrame.cpp:428
GNEDeleteFrame::DeleteOptions::protectDemandElements
bool protectDemandElements() const
check if protect demand elements checkbox is enabled
Definition: GNEDeleteFrame.cpp:77
GNEJunction
Definition: GNEJunction.h:47
GNEDeleteFrame::SubordinatedElements::childAdditionals
int childAdditionals
child additional
Definition: GNEDeleteFrame.h:119
GNEDeleteFrame::~GNEDeleteFrame
~GNEDeleteFrame()
Destructor.
Definition: GNEDeleteFrame.cpp:95
GNEDeleteFrame::DeleteOptions::DeleteOptions
DeleteOptions(GNEDeleteFrame *deleteFrameParent)
constructor
Definition: GNEDeleteFrame.cpp:44
GNEFrame.h
GNEDeleteFrame::SubordinatedElements::parentDemandElements
int parentDemandElements
parent demand elements
Definition: GNEDeleteFrame.h:122
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
GNEDeleteFrame::DeleteOptions::~DeleteOptions
~DeleteOptions()
destructor
Definition: GNEDeleteFrame.cpp:61
GNEDeleteFrame::DeleteOptions::myDeleteOnlyGeometryPoints
FXCheckButton * myDeleteOnlyGeometryPoints
checkbox for enable/disable delete only geometry points
Definition: GNEDeleteFrame.h:62