Eclipse SUMO - Simulation of Urban MObility
GNEVehicleTypeFrame.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 // The Widget for edit Vehicle Type elements
16 /****************************************************************************/
17 #ifndef GNEVehicleTypeFrame_h
18 #define GNEVehicleTypeFrame_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include "GNEFrame.h"
25 
26 // ===========================================================================
27 // class declarations
28 // ===========================================================================
29 
30 class GNEVehicle;
31 
32 // ===========================================================================
33 // class definitions
34 // ===========================================================================
38 class GNEVehicleTypeFrame : public GNEFrame {
39 
40 public:
41 
42  // ===========================================================================
43  // class VehicleTypeSelector
44  // ===========================================================================
45 
46  class VehicleTypeSelector : protected FXGroupBox {
49 
50  public:
52  VehicleTypeSelector(GNEVehicleTypeFrame* vehicleTypeFrameParent);
53 
56 
59 
62 
65 
68 
72  long onCmdSelectItem(FXObject*, FXSelector, void*);
74 
75  protected:
78 
79  private:
82 
85 
87  FXComboBox* myTypeMatchBox;
88  };
89 
90  // ===========================================================================
91  // class VehicleTypeEditor
92  // ===========================================================================
93 
94  class VehicleTypeEditor : protected FXGroupBox {
97 
98  public:
100  VehicleTypeEditor(GNEVehicleTypeFrame* vehicleTypeFrameParent);
101 
104 
106  void showVehicleTypeEditorModul();
107 
109  void hideVehicleTypeEditorModul();
110 
112  void refreshVehicleTypeEditorModul();
113 
117  long onCmdCreateVehicleType(FXObject*, FXSelector, void*);
118 
120  long onCmdDeleteVehicleType(FXObject*, FXSelector, void*);
121 
123  long onCmdResetVehicleType(FXObject*, FXSelector, void*);
124 
126  long onCmdCopyVehicleType(FXObject*, FXSelector, void*);
128 
129  protected:
132 
133  private:
136 
139 
142 
145 
148  };
149 
154  GNEVehicleTypeFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
155 
158 
160  void show();
161 
164 
165 protected:
167  void attributeUpdated();
168 
171 
172 private:
175 
178 
181 
184 };
185 
186 
187 #endif
188 
189 /****************************************************************************/
void setCurrentVehicleType(GNEDemandElement *vType)
set current Vehicle Type
void attributesEditorExtendedDialogOpened()
open AttributesCreator extended dialog (used for editing advance attributes of Vehicle Types) ...
GNEDemandElement * myCurrentVehicleType
pointer to current vehicle type
long onCmdSelectItem(FXObject *, FXSelector, void *)
GNEFrameAttributesModuls::AttributesEditorExtended * myAttributesEditorExtended
modul for open extended attributes dialog
VehicleTypeSelector * getVehicleTypeSelector() const
get vehicle type selector
FXButton * myResetDefaultVehicleTypeButton
"delete default vehicle type" button
FXButton * myDeleteVehicleTypeButton
"delete vehicle type" button
FXComboBox * myTypeMatchBox
comboBox with the list of elements type
void refreshVehicleTypeSelector()
refresh vehicle type selector
GNEFrameAttributesModuls::AttributesEditor * myVehicleTypeAttributesEditor
editorinternal vehicle type attributes
GNEVehicleTypeFrame * myVehicleTypeFrameParent
pointer to Frame Parent
VehicleTypeSelector * myVehicleTypeSelector
vehicle type selector
~GNEVehicleTypeFrame()
Destructor.
void refreshVehicleTypeSelectorIDs()
refresh vehicle type selector (only IDs, without refreshing attributes)
GNEVehicleTypeFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
GNEDemandElement * getCurrentVehicleType() const
get current Vehicle Type
void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/GenericParametersEdit...
FXButton * myCopyVehicleTypeButton
"copy vehicle type"
VehicleTypeEditor * myVehicleTypeEditor
Vehicle Type editor (Create, copy, etc.)
An Element which don't belongs to GNENet but has influency in the simulation.
FXButton * myCreateVehicleTypeButton
"create vehicle type" button