Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEAllowVClassesDialog.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-2024 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// Dialog for edit allow VClass attribute
19/****************************************************************************/
20#pragma once
21#include <config.h>
23
24
25// ===========================================================================
26// class definitions
27// ===========================================================================
29class GNEViewNet;
30
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
40class GNEAllowVClassesDialog : public FXDialogBox {
42 FXDECLARE(GNEAllowVClassesDialog)
43
44public:
46 GNEAllowVClassesDialog(GNEViewNet* viewNet, GNEAttributeCarrier* AC, SumoXMLAttr attr, bool* acceptChanges);
47
49 GNEAllowVClassesDialog(GNEViewNet* viewNet, std::string* allow, bool* acceptChanges);
50
53
57 long onCmdValueChanged(FXObject*, FXSelector, void*);
58
60 long onCmdSelectAll(FXObject*, FXSelector, void*);
61
63 long onCmdUnselectAll(FXObject*, FXSelector, void*);
64
66 long onCmdSelectOnlyRoad(FXObject*, FXSelector, void*);
67
69 long onCmdSelectOnlyRail(FXObject*, FXSelector, void*);
70
72 long onCmdAccept(FXObject*, FXSelector, void*);
73
75 long onCmdCancel(FXObject*, FXSelector, void*);
76
78 long onCmdReset(FXObject*, FXSelector, void*);
80
81protected:
83 FOX_CONSTRUCTOR(GNEAllowVClassesDialog)
84
85
87
90
93
96
98 std::string* myAllow;
99
101 FXButton* myAcceptButton;
102
104 FXButton* myCancelButton;
105
107 FXButton* myResetButton;
108
110 std::map<SUMOVehicleClass, std::pair<FXButton*, FXLabel*> > myVClassMap;
111
112private:
114 void constructor();
115
117 void buildVClass(FXVerticalFrame* contentsFrame, SUMOVehicleClass vclass, GUIIcon vclassIcon, const std::string& description);
118
121
124};
GUIIcon
An enumeration of icons used by the gui applications.
Definition GUIIcons.h:33
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Dialog for edit rerouters.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
GNEViewNet * myViewNet
FOX need this.
FXButton * myAcceptButton
accept button
FXButton * myResetButton
cancel button
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
GNEAttributeCarrier * myAC
edited AC
long onCmdSelectOnlyRail(FXObject *, FXSelector, void *)
event when user press select only rail button
void buildVClass(FXVerticalFrame *contentsFrame, SUMOVehicleClass vclass, GUIIcon vclassIcon, const std::string &description)
build VClass
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
FXButton * myCancelButton
cancel button
bool * myAcceptChanges
accept changes
std::map< SUMOVehicleClass, std::pair< FXButton *, FXLabel * > > myVClassMap
map with the buttons for every VClass
std::string * myAllow
allow vehicles
SumoXMLAttr myEditedAttr
the attribute being edited
long onCmdUnselectAll(FXObject *, FXSelector, void *)
event when user press unselect all VClasses button
long onCmdSelectOnlyRoad(FXObject *, FXSelector, void *)
event when user press select only road button
long onCmdValueChanged(FXObject *, FXSelector, void *)
long onCmdSelectAll(FXObject *, FXSelector, void *)
event when user press select all VClasses button
Definition json.hpp:4471