Eclipse SUMO - Simulation of Urban MObility
GNEPersonTypeFrame.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 person type (VTypes with vclass='pedestrian) elements
19 /****************************************************************************/
20 #pragma once
21 
23 
24 // ===========================================================================
25 // class declarations
26 // ===========================================================================
27 
28 class GNEPerson;
29 
30 // ===========================================================================
31 // class definitions
32 // ===========================================================================
36 class GNEPersonTypeFrame : public GNEFrame {
37 
38 public:
39 
40  // ===========================================================================
41  // class PersonTypeSelector
42  // ===========================================================================
43 
44  class PersonTypeSelector : protected FXGroupBox {
47 
48  public:
50  PersonTypeSelector(GNEPersonTypeFrame* personTypeFrameParent);
51 
54 
57 
60 
63 
67  long onCmdSelectItem(FXObject*, FXSelector, void*);
69 
70  protected:
71  FOX_CONSTRUCTOR(PersonTypeSelector)
72 
73  private:
76 
79 
81  FXComboBox* myTypeMatchBox;
82  };
83 
84  // ===========================================================================
85  // class PersonTypeEditor
86  // ===========================================================================
87 
88  class PersonTypeEditor : protected FXGroupBox {
91 
92  public:
94  PersonTypeEditor(GNEPersonTypeFrame* personTypeFrameParent);
95 
98 
101 
104 
107 
111  long onCmdCreatePersonType(FXObject*, FXSelector, void*);
112 
114  long onCmdDeletePersonType(FXObject*, FXSelector, void*);
115 
117  long onCmdResetPersonType(FXObject*, FXSelector, void*);
118 
120  long onCmdCopyPersonType(FXObject*, FXSelector, void*);
122 
123  protected:
124  FOX_CONSTRUCTOR(PersonTypeEditor)
125 
126  private:
129 
132 
135 
138 
141  };
142 
147  GNEPersonTypeFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
148 
151 
153  void show();
154 
157 
158 protected:
160  void attributeUpdated();
161 
162 private:
165 
168 
171 };
An Element which don't belongs to GNENet but has influency in the simulation.
FXButton * myResetDefaultPersonTypeButton
"delete default person type" button
long onCmdCreatePersonType(FXObject *, FXSelector, void *)
PersonTypeEditor(GNEPersonTypeFrame *personTypeFrameParent)
FOX-declaration.
GNEPersonTypeFrame * myPersonTypeFrameParent
pointer to person type Frame Parent
void showPersonTypeEditorModul()
show PersonTypeEditor modul
FXButton * myCopyPersonTypeButton
"copy person type"
long onCmdDeletePersonType(FXObject *, FXSelector, void *)
Called when "Delete Vehicle Type" button is clicked.
void refreshPersonTypeEditorModul()
update PersonTypeEditor modul
FXButton * myDeletePersonTypeButton
"delete person type" button
long onCmdResetPersonType(FXObject *, FXSelector, void *)
Called when "Delete Vehicle Type" button is clicked.
FXButton * myCreatePersonTypeButton
"create person type" button
void hidePersonTypeEditorModul()
hide PersonTypeEditor box
long onCmdCopyPersonType(FXObject *, FXSelector, void *)
Called when "Copy Vehicle Type" button is clicked.
void setCurrentPersonType(GNEDemandElement *vType)
set current Vehicle Type
void refreshPersonTypeSelector()
refresh person type
PersonTypeSelector(GNEPersonTypeFrame *personTypeFrameParent)
FOX-declaration.
GNEDemandElement * getCurrentPersonType() const
get current Vehicle Type
GNEDemandElement * myCurrentPersonType
pointer to current person type
GNEPersonTypeFrame * myPersonTypeFrameParent
pointer to Frame Parent
FXComboBox * myTypeMatchBox
comboBox with the list of elements type
long onCmdSelectItem(FXObject *, FXSelector, void *)
PersonTypeSelector * myPersonTypeSelector
person type selector
void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
~GNEPersonTypeFrame()
Destructor.
GNEFrameAttributesModuls::AttributesEditor * myPersonTypeAttributesEditor
editorinternal person type attributes
PersonTypeEditor * myPersonTypeEditor
Vehicle Type editor (Create, copy, etc.)
GNEPersonTypeFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
PersonTypeSelector * getPersonTypeSelector() const
get person type selector