Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEDeleteFrame.h
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#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
80
81 public:
83 ProtectElements(GNEDeleteFrame* deleteFrameParent);
84
87
89 bool protectAdditionals() const;
90
92 bool protectTAZs() const;
93
95 bool protectDemandElements() const;
96
98 bool protectGenericDatas() const;
99
103 long onCmdProtectAll(FXObject*, FXSelector, void*);
104
106 long onCmdUnprotectAll(FXObject*, FXSelector, void*);
107
109 long onUpdProtectAll(FXObject*, FXSelector, void*);
110
112 long onUpdUnprotectAll(FXObject*, FXSelector, void*);
113
115
116 protected:
118 FOX_CONSTRUCTOR(ProtectElements)
119
120 private:
122 FXCheckButton* myProtectAdditionals;
123
125 FXCheckButton* myProtectTAZs;
126
129
131 FXCheckButton* myProtectGenericDatas;
132 };
133
136
137 public:
139 SubordinatedElements(const GNEJunction* junction);
140
142 SubordinatedElements(const GNEEdge* edge);
143
145 SubordinatedElements(const GNELane* lane);
146
148 SubordinatedElements(const GNEAdditional* additional);
149
151 SubordinatedElements(const GNEDemandElement* demandElement);
152
154 SubordinatedElements(const GNEGenericData* genericData);
155
158
160 bool checkElements(const ProtectElements* protectElements);
161
162 protected:
165
168
171
174
177
180
183
186
187 private:
188 // default constructor for non-net elements
189 SubordinatedElements(const GNEAttributeCarrier* attributeCarrier, GNEViewNet* viewNet);
190
191 // default constructor for Net Elements
192 SubordinatedElements(const GNEAttributeCarrier* attributeCarrier, GNEViewNet* viewNet, const GNEHierarchicalElement* hierarchicalElement);
193
196
197 // @brief open warning dialog
198 void openWarningDialog(const std::string& elementType, const size_t number, const bool isChild);
199
202
205 };
206
211 GNEDeleteFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
212
215
217 void show();
218
220 void hide();
221
224
229
234
237
240
241protected:
243 bool selectedACsToDelete() const;
244
245private:
248
251};
An Element which don't belong to GNENet but has influence in the simulation.
FXCheckButton * myDeleteOnlyGeometryPoints
checkbox for enable/disable delete only geometry points
long onCmdSetOption(FXObject *, FXSelector, void *)
GNEDeleteFrame * myDeleteFrameParent
FOX need this.
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
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
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)
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
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.
MFXGroupBoxModule (based on FXGroupBox)