Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNETypeFrame.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 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 Type elements (vehicle, person and container)
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25
26// ===========================================================================
27// class declarations
28// ===========================================================================
29
32class MFXComboBoxIcon;
33
34// ===========================================================================
35// class definitions
36// ===========================================================================
37
38class GNETypeFrame : public GNEFrame {
39
40public:
41 // ===========================================================================
42 // class TypeSelector
43 // ===========================================================================
44
48
49 public:
51 TypeSelector(GNETypeFrame* typeFrameParent);
52
55
58
61
63 void refreshTypeSelector(const bool updateModuls);
64
67
69 long onCmdSelectItem(FXObject*, FXSelector, void*);
70
72
73 protected:
74 FOX_CONSTRUCTOR(TypeSelector)
75
76 private:
79
82
85 };
86
87 // ===========================================================================
88 // class TypeEditor
89 // ===========================================================================
90
94
95 public:
97 TypeEditor(GNETypeFrame* typeFrameParent);
98
100 ~TypeEditor();
101
104
107
110
114 long onCmdCreateType(FXObject*, FXSelector, void*);
115
117 long onCmdDeleteResetType(FXObject*, FXSelector, void*);
118
120 long onCmdCopyType(FXObject*, FXSelector, void*);
122
123 protected:
124 FOX_CONSTRUCTOR(TypeEditor)
125
126
127 void resetType();
128
130 void deleteType();
131
132 private:
135
138
141
144 };
145
150 GNETypeFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
151
154
156 void show();
157
160
161protected:
163 void attributeUpdated(SumoXMLAttr attribute);
164
165private:
168
171
174};
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEFrame(GNEViewParent *viewParent, GNEViewNet *viewNet, const std::string &frameLabel)
Constructor.
Definition GNEFrame.cpp:42
void resetType()
reset type
long onCmdDeleteResetType(FXObject *, FXSelector, void *)
Called when "Delete/Reset Vehicle Type" button is clicked.
void deleteType()
delete type
void showTypeEditorModule()
show TypeEditor modul
FXButton * myCreateTypeButton
"create vehicle type" button
long onCmdCreateType(FXObject *, FXSelector, void *)
FXButton * myDeleteResetTypeButton
"delete/reset vehicle type" button
GNETypeFrame * myTypeFrameParent
pointer to vehicle type Frame Parent
FXButton * myCopyTypeButton
"copy vehicle type"
TypeEditor(GNETypeFrame *typeFrameParent)
FOX-declaration.
void hideTypeEditorModule()
hide TypeEditor box
void refreshTypeEditorModule()
update TypeEditor modul
long onCmdCopyType(FXObject *, FXSelector, void *)
Called when "Copy Vehicle Type" button is clicked.
TypeSelector(GNETypeFrame *typeFrameParent)
FOX-declaration.
void setCurrentType(GNEDemandElement *vType)
set current Vehicle Type
GNETypeFrame * myTypeFrameParent
pointer to Frame Parent
MFXComboBoxIcon * myTypeComboBox
comboBox with the list of vTypes
GNEDemandElement * myCurrentType
pointer to current vehicle type
long onCmdSelectItem(FXObject *, FXSelector, void *)
Called when the user select another element in ComboBox.
void refreshTypeSelector(const bool updateModuls)
refresh vehicle type selector
GNEDemandElement * getCurrentType() const
get current Vehicle Type
void show()
show Frame
GNETypeFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
TypeSelector * getTypeSelector() const
get vehicle type selector
GNEAttributesEditor * myTypeAttributesEditor
editorinternal vehicle type attributes
TypeEditor * myTypeEditor
Vehicle Type editor (Create, copy, etc.).
~GNETypeFrame()
Destructor.
TypeSelector * myTypeSelector
vehicle type selector
void attributeUpdated(SumoXMLAttr attribute)
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
A single child window which contains a view of the simulation area.
MFXGroupBoxModule(GNEFrame *frame, const std::string &text, const int options=Options::COLLAPSIBLE)
constructor for frames