Eclipse SUMO - Simulation of Urban MObility
GNEFixDemandElements.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-2020 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 
23 #include <fx.h>
24 
25 // ===========================================================================
26 // class declarations
27 // ===========================================================================
28 class GNEDemandElement;
29 class GNEViewNet;
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
34 
39 class GNEFixDemandElements : public FXDialogBox {
41  FXDECLARE(GNEFixDemandElements)
42 
43 public:
45  GNEFixDemandElements(GNEViewNet* viewNet, const std::vector<GNEDemandElement*>& invalidDemandElements);
46 
49 
53  long onCmdSelectOption(FXObject* obj, FXSelector, void*);
54 
56  long onCmdAccept(FXObject*, FXSelector, void*);
57 
59  long onCmdCancel(FXObject*, FXSelector, void*);
61 
62 protected:
64  class DemandList : protected FXGroupBox {
65 
66  public:
68  DemandList(GNEFixDemandElements* fixDemandElementsDialogParents, const std::vector<GNEDemandElement*>& invalidDemandElements);
69 
71  std::vector<GNEDemandElement*> myInvalidRoutes;
72 
74  std::vector<GNEDemandElement*> myInvalidVehicles;
75 
77  std::vector<GNEDemandElement*> myInvalidStops;
78 
80  std::vector<GNEDemandElement*> myInvalidPersonPlans;
81 
83  FXTable* myTable;
84  };
85 
87  class FixRouteOptions : protected FXGroupBox {
88 
89  public:
91  FixRouteOptions(GNEFixDemandElements* fixDemandElementsDialogParents);
92 
94  void selectOption(FXObject* option);
95 
97  void enableFixRouteOptions();
98 
100  void disableFixRouteOptions();
101 
103  FXRadioButton* removeInvalidRoutes;
104 
106  FXRadioButton* saveInvalidRoutes;
107 
110  };
111 
113  class FixVehicleOptions : protected FXGroupBox {
114 
115  public:
117  FixVehicleOptions(GNEFixDemandElements* fixDemandElementsDialogParents);
118 
120  void selectOption(FXObject* option);
121 
124 
127 
129  FXRadioButton* removeInvalidVehicles;
130 
132  FXRadioButton* saveInvalidVehicles;
133 
136  };
137 
139  class FixStopOptions : public FXGroupBox {
140 
141  public:
143  FixStopOptions(GNEFixDemandElements* fixDemandElementsDialogParents);
144 
146  void selectOption(FXObject* option);
147 
149  void enableFixStopOptions();
150 
152  void disableFixStopOptions();
153 
156 
158  FXRadioButton* fixPositionsAndSave;
159 
161  FXRadioButton* saveInvalid;
162 
165  };
166 
168  class FixPersonPlanOptions : public FXGroupBox {
169 
170  public:
172  FixPersonPlanOptions(GNEFixDemandElements* fixDemandElementsDialogParents);
173 
175  void selectOption(FXObject* option);
176 
179 
182 
184  FXRadioButton* deletePersonPlan;
185 
187  FXRadioButton* saveInvalid;
188 
191  };
192 
193  FOX_CONSTRUCTOR(GNEFixDemandElements)
194 
195 
197 
199  FXVerticalFrame* myMainFrame;
200 
203 
206 
209 
212 
215 
217  FXButton* myAcceptButton;
218 
220  FXButton* myCancelButton;
221 
222 private:
225 
227  GNEFixDemandElements& operator=(const GNEFixDemandElements&) = delete;
228 };
229 
An Element which don't belongs to GNENet but has influency in the simulation.
DemandList(GNEFixDemandElements *fixDemandElementsDialogParents, const std::vector< GNEDemandElement * > &invalidDemandElements)
constructor
std::vector< GNEDemandElement * > myInvalidVehicles
vector with the invalid vehicles
std::vector< GNEDemandElement * > myInvalidRoutes
vector with the invalid routes
std::vector< GNEDemandElement * > myInvalidPersonPlans
vector with the invalid person plans
std::vector< GNEDemandElement * > myInvalidStops
vector with the invalid stops
FXTable * myTable
list with the demand elements
groupbox for all radio buttons related with fix person plan options
FXRadioButton * deletePersonPlan
Option "delete person plan".
void selectOption(FXObject *option)
select option
FXRadioButton * selectInvalidPersonPlansAndCancel
Option "Select invalid person plans and cancel".
void enableFixPersonPlanOptions()
enable position options
FixPersonPlanOptions(GNEFixDemandElements *fixDemandElementsDialogParents)
build Position Options
void disableFixPersonPlanOptions()
disable position options
FXRadioButton * saveInvalid
Option "Save invalid".
groupbox for all radio buttons related with fix route options
void selectOption(FXObject *option)
select option
void disableFixRouteOptions()
disable position options
FXRadioButton * removeInvalidRoutes
Option "Remove invalid routes".
FXRadioButton * saveInvalidRoutes
Option "Save invalid routes".
void enableFixRouteOptions()
enable position options
FXRadioButton * selectInvalidRoutesAndCancel
Option "Select invalid routes and cancel".
FixRouteOptions(GNEFixDemandElements *fixDemandElementsDialogParents)
constructor
groupbox for all radio buttons related with fix stop options
void disableFixStopOptions()
disable position options
void selectOption(FXObject *option)
select option
FXRadioButton * saveInvalid
Option "Save invalid".
FixStopOptions(GNEFixDemandElements *fixDemandElementsDialogParents)
build Position Options
FXRadioButton * fixPositionsAndSave
Option "Fix Positions and save".
FXRadioButton * selectInvalidStopsAndCancel
Option "Select invalid stops and cancel".
FXRadioButton * activateFriendlyPositionAndSave
Option "Activate friendlyPos and save".
void enableFixStopOptions()
enable position options
groupbox for all radio buttons related with fix vehicle options
FXRadioButton * saveInvalidVehicles
Option "save invalid vehicles".
void disableFixVehicleOptions()
disable consecutive lane options
void selectOption(FXObject *option)
select option
FXRadioButton * selectInvalidVehiclesAndCancel
Option "Select invalid vehicles and cancel".
FixVehicleOptions(GNEFixDemandElements *fixDemandElementsDialogParents)
constructor
void enableFixVehicleOptions()
enable consecutive lane options
FXRadioButton * removeInvalidVehicles
Option "remove invalid elements".
Dialog for edit rerouters.
DemandList * myDemandList
list with the demand elements
long onCmdSelectOption(FXObject *obj, FXSelector, void *)
FixStopOptions * myFixStopOptions
fix stop options
FixRouteOptions * myFixRouteOptions
fix route options
FXButton * myAcceptButton
accept button
FXVerticalFrame * myMainFrame
main frame
FixVehicleOptions * myFixVehicleOptions
fix vehicle options
GNEViewNet * myViewNet
view net
GNEFixDemandElements(GNEViewNet *viewNet, const std::vector< GNEDemandElement * > &invalidDemandElements)
FOX-declaration.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FixPersonPlanOptions * myFixPersonPlanOptions
fix person plan options
FXButton * myCancelButton
cancel button
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button