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-2025 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
25
26// ===========================================================================
27// class declaration
28// ===========================================================================
29
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
36class GNEDeleteFrame : public GNEFrame {
37
38public:
39
40 // ===========================================================================
41 // class DeleteOptions
42 // ===========================================================================
43
47
48 public:
50 DeleteOptions(GNEDeleteFrame* deleteFrameParent);
51
54
56 bool deleteOnlyGeometryPoints() const;
57
61 long onCmdSetOption(FXObject*, FXSelector, void*);
62
64
65 protected:
67 FOX_CONSTRUCTOR(DeleteOptions)
68
69 private:
72
75 };
76
77 // ===========================================================================
78 // class ProtectElements
79 // ===========================================================================
80
84
85 public:
87 ProtectElements(GNEDeleteFrame* deleteFrameParent);
88
91
94
96 bool protectAdditionals() const;
97
99 bool protectTAZs() const;
100
102 bool protectDemandElements() const;
103
105 bool protectGenericDatas() const;
106
110 long onCmdProtectAll(FXObject*, FXSelector, void*);
111
113 long onCmdUnprotectAll(FXObject*, FXSelector, void*);
114
116 long onUpdProtectAll(FXObject*, FXSelector, void*);
117
119 long onUpdUnprotectAll(FXObject*, FXSelector, void*);
120
122
123 protected:
125 FOX_CONSTRUCTOR(ProtectElements)
126
127 private:
130
132 FXButton* myProtectAllButton = nullptr;
133
135 FXButton* myUnprotectAllButton = nullptr;
136
138 FXCheckButton* myProtectAdditionals = nullptr;
139
141 FXCheckButton* myProtectTAZs = nullptr;
142
144 FXCheckButton* myProtectDemandElements = nullptr;
145
147 FXCheckButton* myProtectGenericDatas = nullptr;
148
151
154 };
155
158
159 public:
161 SubordinatedElements(const GNEJunction* junction);
162
164 SubordinatedElements(const GNEEdge* edge);
165
167 SubordinatedElements(const GNELane* lane);
168
170 SubordinatedElements(const GNEAdditional* additional);
171
173 SubordinatedElements(const GNEDemandElement* demandElement);
174
176 SubordinatedElements(const GNEGenericData* genericData);
177
180
182 bool checkElements(const ProtectElements* protectElements);
183
184 protected:
187
190
193
196
199
202
205
208
209 private:
210 // default constructor for non-net elements
211 SubordinatedElements(const GNEAttributeCarrier* attributeCarrier, GNEViewNet* viewNet);
212
213 // default constructor for Net Elements
214 SubordinatedElements(const GNEAttributeCarrier* attributeCarrier, GNEViewNet* viewNet, const GNEHierarchicalElement* hierarchicalElement);
215
218
219 // @brief open warning dialog
220 void openWarningDialog(const std::string& elementType, const size_t number, const bool isChild, const bool runningInternalTests);
221
224
227 };
228
233 GNEDeleteFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
234
237
239 void show();
240
242 void hide();
243
246
251
256
259
262
263protected:
265 bool selectedACsToDelete() const;
266
267private:
270
273};
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
GNEDeleteFrame * getDeleteFrameParent() const
get delete frame parent
bool protectAdditionals() const
check if protect additional elements checkbox is enabled
long onCmdUnprotectAll(FXObject *, FXSelector, void *)
unprotect all elements
FXCheckButton * myProtectAdditionals
checkbox for enable/disable protect additionals
FXCheckButton * myProtectDemandElements
checkbox for enable/disable protect demand elements
ProtectElements & operator=(const ProtectElements &)=delete
Invalidated assignment operator.
FXCheckButton * myProtectTAZs
checkbox for enable/disable protect TAZs
FXButton * myUnprotectAllButton
unprotect all button
GNEDeleteFrame * myDeleteFrameParent
FOX need this.
bool protectDemandElements() const
check if protect demand elements checkbox is enabled
long onUpdProtectAll(FXObject *, FXSelector, void *)
update protect all elements
ProtectElements(const ProtectElements &)=delete
Invalidated copy constructor.
long onCmdProtectAll(FXObject *, FXSelector, void *)
FXButton * myProtectAllButton
protect all button
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
void openWarningDialog(const std::string &elementType, const size_t number, const bool isChild, const bool runningInternalTests)
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
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
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)