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-2022 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#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class definitions
27// ===========================================================================
32class GNEDeleteFrame : public GNEFrame {
33
34public:
35
36 // ===========================================================================
37 // class DeleteOptions
38 // ===========================================================================
39
43
44 public:
46 DeleteOptions(GNEDeleteFrame* deleteFrameParent);
47
50
52 bool deleteOnlyGeometryPoints() const;
53
57 long onCmdSetOption(FXObject*, FXSelector, void*);
58
60
61 protected:
63 FOX_CONSTRUCTOR(DeleteOptions)
64
65 private:
68
71 };
72
73 // ===========================================================================
74 // class ProtectElements
75 // ===========================================================================
76
78
79 public:
81 ProtectElements(GNEDeleteFrame* deleteFrameParent);
82
85
87 bool protectAdditionals() const;
88
90 bool protectTAZs() const;
91
93 bool protectDemandElements() const;
94
96 bool protectGenericDatas() const;
97
98 private:
100 FXCheckButton* myProtectAdditionals;
101
103 FXCheckButton* myProtectTAZs;
104
107
109 FXCheckButton* myProtectGenericDatas;
110 };
111
114
115 public:
117 SubordinatedElements(const GNEJunction* junction);
118
120 SubordinatedElements(const GNEEdge* edge);
121
123 SubordinatedElements(const GNELane* lane);
124
126 SubordinatedElements(const GNEAdditional* additional);
127
129 SubordinatedElements(const GNEDemandElement* demandElement);
130
132 SubordinatedElements(const GNEGenericData* genericData);
133
136
138 bool checkElements(const ProtectElements* protectElements);
139
140 protected:
143
146
149
152
155
158
161
164
165 private:
166 // default constructor for non-net elements
167 SubordinatedElements(const GNEAttributeCarrier* attributeCarrier, GNEViewNet* viewNet);
168
169 // default constructor for Net Elements
170 SubordinatedElements(const GNEAttributeCarrier* attributeCarrier, GNEViewNet* viewNet, const GNEHierarchicalElement* hierarchicalElement);
171
174
175 // @brief open warning dialog
176 void openWarningDialog(const std::string& elementType, const size_t number, const bool isChild);
177
180
183 };
184
189 GNEDeleteFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
190
193
195 void show();
196
198 void hide();
199
202
206 void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
207
211 void removeGeometryPoint(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
212
215
218
219protected:
221 bool selectedACsToDelete() const;
222
223private:
226
229};
An Element which don't belong to GNENet but has influence in the simulation.
Definition: GNEAdditional.h:48
FXCheckButton * myDeleteOnlyGeometryPoints
checkbox for enable/disable delete only geometry points
long onCmdSetOption(FXObject *, FXSelector, void *)
GNEDeleteFrame * myDeleteFrameParent
FOX need this.
DeleteOptions(GNEDeleteFrame *deleteFrameParent)
FOX-declaration.
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
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
FXCheckButton * myProtectAdditionals
checkbox for enable/disable protect additionals
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
bool protectTAZs() const
check if protect TAZ elements checkbox is enabled
ProtectElements(GNEDeleteFrame *deleteFrameParent)
constructor
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
SubordinatedElements(const SubordinatedElements &)=delete
Invalidated copy constructor.
SubordinatedElements & operator=(const SubordinatedElements &)=delete
Invalidated assignment operator.
const GNEAttributeCarrier * myAttributeCarrier
parent of SubordinatedElements
size_t myDemandElementChilds
child demand elements
size_t myAdditionalParents
parent additionals (except TAZs)
GNEViewNet * myViewNet
pointer to view net
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
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 removeGeometryPoint(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
remove geometry point
void show()
show delete frame
void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
remove attribute carrier (element)
An Element which don't belong to GNENet but has influence in the simulation.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:53
An Element which don't belong to GNENet but has influence in the simulation.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
class used to group all variables related with objects under cursor after a click over view
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:84
MFXGroupBoxModule (based on FXGroupBox)