Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEFixDemandElements.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// Dialog used to fix demand elements during saving
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class declarations
27// ===========================================================================
28
30
31// ===========================================================================
32// class definitions
33// ===========================================================================
34
37 FXDECLARE(GNEFixDemandElements)
38
39public:
42
45
47 FXuint openDialog(const std::vector<GNEDemandElement*>& invalidDemandElements);
48
50 void runInternalTest(const InternalTestStep::DialogTest* dialogTest);
51
54
56 long onCmdSelectOption(FXObject* obj, FXSelector, void*);
57
59 long onCmdAccept(FXObject*, FXSelector, void*);
60
62 long onCmdCancel(FXObject*, FXSelector, void*);
63
65
66protected:
68 FOX_CONSTRUCTOR(GNEFixDemandElements)
69
70
72
73 public:
75 FixOptions(FXVerticalFrame* frameParent, const std::string& title, GNEViewNet* viewNet);
76
78 void setInvalidElements(const std::vector<GNEDemandElement*>& invalidElements);
79
81 virtual void fixElements(bool& abortSaving) = 0;
82
83 protected:
85 bool saveContents() const;
86
88 FXVerticalFrame* myLeftFrame = nullptr;
89
91 FXVerticalFrame* myRightFrame = nullptr;
92
95
97 std::vector<GNEDemandElement*> myInvalidElements;
98
99 private:
101 virtual void enableOptions() = 0;
102
104 virtual void disableOptions() = 0;
105
107 FXTable* myTable = nullptr;
108
110 FixOptions(const FixOptions&) = delete;
111
113 FixOptions& operator=(const FixOptions&) = delete;
114 };
115
118
119 public:
121 FixRouteOptions(GNEFixDemandElements* fixDemandElementsParent, GNEViewNet* viewNet);
122
124 void selectOption(FXObject* option);
125
127 void fixElements(bool& abortSaving);
128
130 FXRadioButton* removeInvalidRoutes;
131
133 FXRadioButton* saveInvalidRoutes;
134
136 FXRadioButton* selectRouteInvalids;
137
139 FXCheckButton* removeStopsOutOfRoute;
140
141 private:
143 void enableOptions();
144
146 void disableOptions();
147
150
153 };
154
157
158 public:
160 FixVehicleOptions(GNEFixDemandElements* fixDemandElementsParent, GNEViewNet* viewNet);
161
163 void selectOption(FXObject* option);
164
166 void fixElements(bool& abortSaving);
167
169 FXRadioButton* removeInvalidVehicles;
170
172 FXRadioButton* saveInvalidVehicles;
173
176
179
180 private:
182 void enableOptions();
183
185 void disableOptions();
186
189
192 };
193
196
197 public:
199 FixStopPositionOptions(GNEFixDemandElements* fixDemandElementsParent, GNEViewNet* viewNet);
200
202 void selectOption(FXObject* option);
203
205 void fixElements(bool& abortSaving);
206
209
211 FXRadioButton* fixPositionsAndSave;
212
214 FXRadioButton* saveInvalid;
215
218
219 private:
221 void enableOptions();
222
224 void disableOptions();
225
228
231 };
232
235
236 public:
238 FixPersonPlanOptions(GNEFixDemandElements* fixDemandElementsParent, GNEViewNet* viewNet);
239
241 void selectOption(FXObject* option);
242
244 void fixElements(bool& abortSaving);
245
247 FXRadioButton* deletePersonPlan;
248
250 FXRadioButton* saveInvalid;
251
254
255 private:
257 void enableOptions();
258
260 void disableOptions();
261
264
267 };
268
270 FXVerticalFrame* myLeftFrame = nullptr;
271
273 FXVerticalFrame* myRightFrame = nullptr;
274
277
280
283
286
287private:
290
293};
virtual void disableOptions()=0
disable options
GNEViewNet * myViewNet
pointer to viewNet
std::vector< GNEDemandElement * > myInvalidElements
vector with the invalid demand elements
FixOptions & operator=(const FixOptions &)=delete
Invalidated assignment operator.
FixOptions(const FixOptions &)=delete
Invalidated copy constructor.
virtual void enableOptions()=0
enable options
virtual void fixElements(bool &abortSaving)=0
fix elements
groupbox for all radio buttons related with fix person plan options
FXRadioButton * deletePersonPlan
Option "delete person plan".
void disableOptions()
disable personPlan options
void selectOption(FXObject *option)
select option
FixPersonPlanOptions & operator=(const FixPersonPlanOptions &)=delete
Invalidated assignment operator.
FXRadioButton * selectInvalidPersonPlansAndCancel
Option "Select invalid person plans and cancel".
FixPersonPlanOptions(const FixPersonPlanOptions &)=delete
Invalidated copy constructor.
void fixElements(bool &abortSaving)
fix elements
FXRadioButton * saveInvalid
Option "Save invalid".
groupbox for all radio buttons related with fix route options
void selectOption(FXObject *option)
select option
FixRouteOptions(const FixRouteOptions &)=delete
Invalidated copy constructor.
void fixElements(bool &abortSaving)
fix elements
FXRadioButton * removeInvalidRoutes
Option "Remove invalid routes".
FXRadioButton * saveInvalidRoutes
Option "Save invalid routes".
FXRadioButton * selectRouteInvalids
Option "Select invalid routes and cancel".
FixRouteOptions & operator=(const FixRouteOptions &)=delete
Invalidated assignment operator.
FXCheckButton * removeStopsOutOfRoute
Option "Remove stops out of route".
groupbox for all radio buttons related with fix stop options
FXRadioButton * saveInvalid
Option "Save invalid".
void fixElements(bool &abortSaving)
fix elements
FXRadioButton * fixPositionsAndSave
Option "Fix Positions and save".
FXRadioButton * selectInvalidStopsAndCancel
Option "Select invalid stops and cancel".
void selectOption(FXObject *option)
select option
FXRadioButton * activateFriendlyPositionAndSave
Option "Activate friendlyPos and save".
FixStopPositionOptions(const FixStopPositionOptions &)=delete
Invalidated copy constructor.
FixStopPositionOptions & operator=(const FixStopPositionOptions &)=delete
Invalidated assignment operator.
groupbox for all radio buttons related with fix vehicle options
FXRadioButton * saveInvalidVehicles
Option "save invalid vehicles".
FXCheckButton * removeStopsOutOfVehicle
Option "Remove stops out of vehicle".
FixVehicleOptions(const FixVehicleOptions &)=delete
Invalidated copy constructor.
void selectOption(FXObject *option)
select option
FXRadioButton * selectInvalidVehiclesAndCancel
Option "Select invalid vehicles and cancel".
void fixElements(bool &abortSaving)
fix elements
FXRadioButton * removeInvalidVehicles
Option "remove invalid elements".
FixVehicleOptions & operator=(const FixVehicleOptions &)=delete
Invalidated assignment operator.
void runInternalTest(const InternalTestStep::DialogTest *dialogTest)
run internal test
FixStopPositionOptions * myFixStopPositionOptions
fix stop options
long onCmdSelectOption(FXObject *obj, FXSelector, void *)
event when user select a option
GNEFixDemandElements & operator=(const GNEFixDemandElements &)=delete
Invalidated assignment operator.
FixRouteOptions * myFixRouteOptions
fix route options
FXVerticalFrame * myRightFrame
vertical right frame
FixVehicleOptions * myFixVehicleOptions
fix vehicle options
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FixPersonPlanOptions * myFixPersonPlanOptions
fix person plan options
GNEFixDemandElements(const GNEFixDemandElements &)=delete
Invalidated copy constructor.
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
FXuint openDialog(const std::vector< GNEDemandElement * > &invalidDemandElements)
open fix demand elements dialog
FXVerticalFrame * myLeftFrame
vertical left frame
dialog arguments (used for certain functions that opens modal dialogs)
MFXGroupBoxModule (based on FXGroupBox)
every row value