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-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 // The Widget for edit Vehicle Type elements
19 /****************************************************************************/
20 #pragma once
21 
23 
24 // ===========================================================================
25 // class declarations
26 // ===========================================================================
27 
28 class GNEVehicle;
29 
30 // ===========================================================================
31 // class definitions
32 // ===========================================================================
36 class GNEVehicleTypeFrame : public GNEFrame {
37 
38 public:
39 
40  // ===========================================================================
41  // class VehicleTypeSelector
42  // ===========================================================================
43 
44  class VehicleTypeSelector : protected FXGroupBox {
47 
48  public:
50  VehicleTypeSelector(GNEVehicleTypeFrame* vehicleTypeFrameParent);
51 
54 
57 
60 
63 
66 
70  long onCmdSelectItem(FXObject*, FXSelector, void*);
72 
73  protected:
74  FOX_CONSTRUCTOR(VehicleTypeSelector)
75 
76  private:
79 
82 
84  FXComboBox* myTypeMatchBox;
85  };
86 
87  // ===========================================================================
88  // class VehicleTypeEditor
89  // ===========================================================================
90 
91  class VehicleTypeEditor : protected FXGroupBox {
94 
95  public:
97  VehicleTypeEditor(GNEVehicleTypeFrame* vehicleTypeFrameParent);
98 
101 
104 
107 
110 
114  long onCmdCreateVehicleType(FXObject*, FXSelector, void*);
115 
117  long onCmdDeleteVehicleType(FXObject*, FXSelector, void*);
118 
120  long onCmdResetVehicleType(FXObject*, FXSelector, void*);
121 
123  long onCmdCopyVehicleType(FXObject*, FXSelector, void*);
125 
126  protected:
127  FOX_CONSTRUCTOR(VehicleTypeEditor)
128 
129  private:
132 
135 
138 
141 
144  };
145 
150  GNEVehicleTypeFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
151 
154 
156  void show();
157 
160 
161 protected:
163  void attributeUpdated();
164 
167 
168 private:
171 
174 
177 
180 };
An Element which don't belongs to GNENet but has influency in the simulation.
long onCmdDeleteVehicleType(FXObject *, FXSelector, void *)
Called when "Delete Vehicle Type" button is clicked.
FXButton * myResetDefaultVehicleTypeButton
"delete default vehicle type" button
long onCmdCreateVehicleType(FXObject *, FXSelector, void *)
long onCmdCopyVehicleType(FXObject *, FXSelector, void *)
Called when "Copy Vehicle Type" button is clicked.
void refreshVehicleTypeEditorModul()
update VehicleTypeEditor modul
GNEVehicleTypeFrame * myVehicleTypeFrameParent
pointer to vehicle type Frame Parent
long onCmdResetVehicleType(FXObject *, FXSelector, void *)
Called when "Delete Vehicle Type" button is clicked.
void hideVehicleTypeEditorModul()
hide VehicleTypeEditor box
FXButton * myDeleteVehicleTypeButton
"delete vehicle type" button
void showVehicleTypeEditorModul()
show VehicleTypeEditor modul
FXButton * myCreateVehicleTypeButton
"create vehicle type" button
VehicleTypeEditor(GNEVehicleTypeFrame *vehicleTypeFrameParent)
FOX-declaration.
FXButton * myCopyVehicleTypeButton
"copy vehicle type"
long onCmdSelectItem(FXObject *, FXSelector, void *)
VehicleTypeSelector(GNEVehicleTypeFrame *vehicleTypeFrameParent)
FOX-declaration.
GNEDemandElement * getCurrentVehicleType() const
get current Vehicle Type
void refreshVehicleTypeSelector()
refresh vehicle type selector
void refreshVehicleTypeSelectorIDs()
refresh vehicle type selector (only IDs, without refreshing attributes)
GNEVehicleTypeFrame * myVehicleTypeFrameParent
pointer to Frame Parent
void setCurrentVehicleType(GNEDemandElement *vType)
set current Vehicle Type
FXComboBox * myTypeMatchBox
comboBox with the list of elements type
GNEDemandElement * myCurrentVehicleType
pointer to current vehicle type
VehicleTypeSelector * getVehicleTypeSelector() const
get vehicle type selector
VehicleTypeEditor * myVehicleTypeEditor
Vehicle Type editor (Create, copy, etc.)
GNEFrameAttributesModuls::AttributesEditor * myVehicleTypeAttributesEditor
editorinternal vehicle type attributes
GNEFrameAttributesModuls::AttributesEditorExtended * myAttributesEditorExtended
modul for open extended attributes dialog
void attributesEditorExtendedDialogOpened()
open AttributesCreator extended dialog (used for editing advance attributes of Vehicle Types)
void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
VehicleTypeSelector * myVehicleTypeSelector
vehicle type selector
GNEVehicleTypeFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.