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
26
27// ===========================================================================
28// class declaration
29// ===========================================================================
30
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
37class GNEDeleteFrame : public GNEFrame {
38
39public:
40
41 // ===========================================================================
42 // class DeleteOptions
43 // ===========================================================================
44
48
49 public:
51 DeleteOptions(GNEDeleteFrame* deleteFrameParent);
52
55
57 bool deleteOnlyGeometryPoints() const;
58
62 long onCmdSetOption(FXObject*, FXSelector, void*);
63
65
66 protected:
68 FOX_CONSTRUCTOR(DeleteOptions)
69
70 private:
73
76 };
77
78 // ===========================================================================
79 // class ProtectElements
80 // ===========================================================================
81
85
86 public:
88 ProtectElements(GNEDeleteFrame* deleteFrameParent);
89
92
95
97 bool protectAdditionals() const;
98
100 bool protectTAZs() const;
101
103 bool protectDemandElements() const;
104
106 bool protectGenericDatas() const;
107
111 long onCmdProtectAll(FXObject*, FXSelector, void*);
112
114 long onCmdUnprotectAll(FXObject*, FXSelector, void*);
115
117 long onUpdProtectAll(FXObject*, FXSelector, void*);
118
120 long onUpdUnprotectAll(FXObject*, FXSelector, void*);
121
123
124 protected:
126 FOX_CONSTRUCTOR(ProtectElements)
127
128 private:
131
133 FXButton* myProtectAllButton = nullptr;
134
136 FXButton* myUnprotectAllButton = nullptr;
137
139 FXCheckButton* myProtectAdditionals = nullptr;
140
142 FXCheckButton* myProtectTAZs = nullptr;
143
145 FXCheckButton* myProtectDemandElements = nullptr;
146
148 FXCheckButton* myProtectGenericDatas = nullptr;
149
152
155 };
156
159
160 public:
162 SubordinatedElements(const GNEJunction* junction);
163
165 SubordinatedElements(const GNEEdge* edge);
166
168 SubordinatedElements(const GNELane* lane);
169
171 SubordinatedElements(const GNEAdditional* additional);
172
174 SubordinatedElements(const GNEDemandElement* demandElement);
175
177 SubordinatedElements(const GNEGenericData* genericData);
178
181
183 bool checkElements(const ProtectElements* protectElements);
184
185 protected:
188
191
194
197
200
203
206
209
210 private:
211 // default constructor for non-net elements
212 SubordinatedElements(const GNEAttributeCarrier* attributeCarrier, GNEViewNet* viewNet);
213
214 // default constructor for Net Elements
215 SubordinatedElements(const GNEAttributeCarrier* attributeCarrier, GNEViewNet* viewNet, const GNEHierarchicalElement* hierarchicalElement);
216
219
220 // @brief open warning dialog
221 void openWarningDialog(const std::string& elementType, const size_t number, const bool isChild, const bool runningInternalTests);
222
225
228 };
229
234 GNEDeleteFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
235
238
240 void show();
241
243 void hide();
244
247
252
257
260
263
264protected:
266 bool selectedACsToDelete() const;
267
268private:
271
274};
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
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)