Eclipse SUMO - Simulation of Urban MObility
GNEDialog_FixDemandElements.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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Dialog used to fix demand elements during saving
16 /****************************************************************************/
17 #ifndef GNEDialog_FixDemandElements_h
18 #define GNEDialog_FixDemandElements_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 
24 #include <config.h>
25 
26 #include <fx.h>
27 
28 // ===========================================================================
29 // class declarations
30 // ===========================================================================
31 class GNEDemandElement;
32 class GNEViewNet;
33 
34 // ===========================================================================
35 // class definitions
36 // ===========================================================================
37 
42 class GNEDialog_FixDemandElements : public FXDialogBox {
45 
46 public:
48  GNEDialog_FixDemandElements(GNEViewNet* viewNet, const std::vector<GNEDemandElement*>& invalidDemandElements);
49 
52 
56  long onCmdSelectOption(FXObject* obj, FXSelector, void*);
57 
59  long onCmdAccept(FXObject*, FXSelector, void*);
60 
62  long onCmdCancel(FXObject*, FXSelector, void*);
64 
65 protected:
67  class DemandList : protected FXGroupBox {
68 
69  public:
71  DemandList(GNEDialog_FixDemandElements* fixDemandElementsDialogParents, const std::vector<GNEDemandElement*>& invalidDemandElements);
72 
74  std::vector<GNEDemandElement*> myInvalidRoutes;
75 
77  std::vector<GNEDemandElement*> myInvalidVehicles;
78 
80  std::vector<GNEDemandElement*> myInvalidStops;
81 
83  FXTable* myTable;
84  };
85 
87  class FixRouteOptions : protected FXGroupBox {
88 
89  public:
91  FixRouteOptions(GNEDialog_FixDemandElements* 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(GNEDialog_FixDemandElements* fixDemandElementsDialogParents);
118 
120  void selectOption(FXObject* option);
121 
123  void enableFixVehicleOptions();
124 
126  void disableFixVehicleOptions();
127 
129  FXRadioButton* removeInvalidVehicles;
130 
132  FXRadioButton* saveInvalidVehicles;
133 
136  };
137 
139  class FixStopOptions : public FXGroupBox {
140 
141  public:
143  FixStopOptions(GNEDialog_FixDemandElements* 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 
169 
172 
174  FXVerticalFrame* myMainFrame;
175 
178 
181 
184 
187 
189  FXButton* myAcceptButton;
190 
192  FXButton* myCancelButton;
193 
194 private:
197 
200 };
201 
202 #endif
FXRadioButton * fixPositionsAndSave
Option "Fix Positions and save".
groupbox for all radio buttons related with fix stop options
FXRadioButton * removeInvalidVehicles
Option "remove invalid elements".
FXRadioButton * selectInvalidRoutesAndCancel
Option "Select invalid routes and cancel".
FXRadioButton * activateFriendlyPositionAndSave
Option "Activate friendlyPos and save".
FXRadioButton * selectInvalidVehiclesAndCancel
Option "Select invalid vehicles and cancel".
long onCmdSelectOption(FXObject *obj, FXSelector, void *)
std::vector< GNEDemandElement * > myInvalidRoutes
vector with the invalid routes
groupbox for all radio buttons related with fix vehicle options
std::vector< GNEDemandElement * > myInvalidVehicles
vector with the invalid vehicles
FXRadioButton * saveInvalidRoutes
Option "Save invalid routes".
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
FixRouteOptions * myFixRouteOptions
fix route options
FXRadioButton * selectInvalidStopsAndCancel
Option "Select invalid stops and cancel".
FixStopOptions * myFixStopOptions
fix stop options
std::vector< GNEDemandElement * > myInvalidStops
vector with the invalid stops
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FXVerticalFrame * myMainFrame
main frame
FXTable * myTable
list with the demand elements
GNEDialog_FixDemandElements & operator=(const GNEDialog_FixDemandElements &)=delete
Invalidated assignment operator.
DemandList * myDemandList
list with the demand elements
FXButton * myAcceptButton
accept button
groupbox for all radio buttons related with fix route options
FXButton * myCancelButton
cancel button
FXRadioButton * saveInvalid
Option "Save invalid".
DemandList(GNEDialog_FixDemandElements *fixDemandElementsDialogParents, const std::vector< GNEDemandElement *> &invalidDemandElements)
constructor
FixVehicleOptions * myFixVehicleOptions
fix vehicle options
FXRadioButton * saveInvalidVehicles
Option "save invalid vehicles".
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
FXRadioButton * removeInvalidRoutes
Option "Remove invalid routes".