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 /****************************************************************************/
10 /// @file    GNECalibratorDialog.h
11 /// @author  Pablo Alvarez Lopez
12 /// @date    March 2017
13 /// @version $Id$
14 ///
15 // Dialog for edit calibrators
16 /****************************************************************************/
17 #ifndef GNECalibratorDialog_h
18 #define GNECalibratorDialog_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 
24 #include <config.h>
25 
26 #include "GNEAdditionalDialog.h"
27 
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 
33 class GNECalibrator;
34 class GNERoute;
35 class GNECalibratorFlow;
36 class GNEVehicleType;
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
41 
42 /**
43  * @class GNECalibratorDialog
44  * @brief Dialog for edit calibrators
45  */
46 class GNECalibratorDialog : public GNEAdditionalDialog {
47     /// @brief FOX-declaration
48     FXDECLARE(GNECalibratorDialog)
49 
50 public:
51     /// @brief Constructor
52     GNECalibratorDialog(GNECalibrator* editedCalibrator);
53 
54     /// @brief destructor
55     ~GNECalibratorDialog();
56 
57     /// @name FOX-callbacks
58     /// @{
59     /// @brief event after press accept button
60     long onCmdAccept(FXObject*, FXSelector, void*);
61 
62     /// @brief event after press cancel button
63     long onCmdCancel(FXObject*, FXSelector, void*);
64 
65     /// @brief event after press reset button
66     long onCmdReset(FXObject*, FXSelector, void*);
67 
68     /// @brief add new route
69     long onCmdAddRoute(FXObject*, FXSelector, void*);
70 
71     /// @brief remove or edit route
72     long onCmdClickedRoute(FXObject*, FXSelector, void*);
73 
74     /// @brief add new flow
75     long onCmdAddFlow(FXObject*, FXSelector, void*);
76 
77     /// @brief remove or edit flow
78     long onCmdClickedFlow(FXObject*, FXSelector, void*);
79 
80     /// @brief add new vehicle type
81     long onCmdAddVehicleType(FXObject*, FXSelector, void*);
82 
83     /// @brief remove or edit vehicle type
84     long onCmdClickedVehicleType(FXObject*, FXSelector, void*);
85     /// @}
86 
87 protected:
88     /// @brief FOX needs this
GNECalibratorDialog()89     GNECalibratorDialog() {}
90 
91 private:
92     /// @brief button for add new route
93     FXButton* myAddRoute;
94 
95     /// @brief list with routes
96     FXTable* myRouteList;
97 
98     /// @brief label for flows
99     FXLabel* myLabelFlow;
100 
101     /// @brief button for add new flow
102     FXButton* myAddFlow;
103 
104     /// @brief list with flows
105     FXTable* myFlowList;
106 
107     /// @brief button for add new vehicle type
108     FXButton* myAddVehicleType;
109 
110     /// @brief list with vehicle types
111     FXTable* myVehicleTypeList;
112 
113     /// @brief update data table with routes
114     void updateRouteTable();
115 
116     /// @brief update data table with flows
117     void updateFlowTable();
118 
119     /// @brief update data table with vehicle types
120     void updateVehicleTypeTable();
121 
122     /// @brief update flow and label button
123     void updateFlowAndLabelButton();
124 
125 private:
126     /// @brief Invalidated copy constructor.
127     GNECalibratorDialog(const GNECalibratorDialog&) = delete;
128 
129     /// @brief Invalidated assignment operator.
130     GNECalibratorDialog& operator=(const GNECalibratorDialog&) = delete;
131 };
132 
133 #endif
134