Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNECalibratorFlowDialog.cpp
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 calibrator flows
19/****************************************************************************/
20
24#include <netedit/GNEViewNet.h>
25#include <netedit/GNENet.h>
26
27#include <netedit/GNEUndoList.h>
28
30
31
32// ===========================================================================
33// FOX callback mapping
34// ===========================================================================
35
42
43// Object implementation
44FXIMPLEMENT(GNECalibratorFlowDialog, GNEAdditionalDialog, GNECalibratorFlowDialogMap, ARRAYNUMBER(GNECalibratorFlowDialogMap))
45
46// ===========================================================================
47// member method definitions
48// ===========================================================================
49
50GNECalibratorFlowDialog::GNECalibratorFlowDialog(GNEAdditional* editedCalibratorFlow, bool updatingElement) :
51 GNEAdditionalDialog(editedCalibratorFlow, updatingElement, 600, 280),
52 myCalibratorFlowValid(false),
53 myInvalidAttr(SUMO_ATTR_VEHSPERHOUR) {
54 // change default header
55 std::string typeOfOperation = updatingElement ? "Edit " + myEditedAdditional->getTagStr() + " of " : "Create " + myEditedAdditional->getTagStr() + " for ";
56 changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getParentAdditionals().at(0)->getTagStr() + " '" + myEditedAdditional->getParentAdditionals().at(0)->getID() + "'");
57
58 // Create auxiliar frames for tables
59 FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame);
60 FXVerticalFrame* columnLeftLabel = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
61 FXVerticalFrame* columnLeftValue = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
62 FXVerticalFrame* columnRightLabel = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
63 FXVerticalFrame* columnRightValue = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
64
65 // 1 create combobox for type
66 new FXLabel(columnLeftLabel, toString(SUMO_TAG_VTYPE).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
67 myComboBoxVehicleType = new MFXComboBoxIcon(columnLeftValue, GUIDesignComboBoxNCol, true, GUIDesignComboBoxVisibleItemsMedium,
69 // 2 create combobox for route
70 new FXLabel(columnLeftLabel, toString(SUMO_ATTR_ROUTE).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
71 myComboBoxRoute = new MFXComboBoxIcon(columnLeftValue, GUIDesignComboBoxNCol, true, GUIDesignComboBoxVisibleItemsMedium,
73 // 3 create textfield for vehs per hour
74 new FXLabel(columnLeftLabel, toString(SUMO_ATTR_VEHSPERHOUR).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
75 myTextFieldVehsPerHour = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
76 // 4 create textfield for vehs per hour
77 new FXLabel(columnLeftLabel, toString(SUMO_ATTR_SPEED).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
78 myTextFieldSpeed = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
79 // 5 create textfield for color
80 new FXLabel(columnLeftLabel, toString(SUMO_ATTR_COLOR).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
81 myTextFieldColor = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
82 // 6 create textfield for lane
83 new FXLabel(columnLeftLabel, toString(SUMO_ATTR_DEPARTLANE).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
84 myTextFieldDepartLane = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
85 // 7 create textfield for pos
86 new FXLabel(columnLeftLabel, toString(SUMO_ATTR_DEPARTPOS).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
87 myTextFieldDepartPos = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
88 // 8 create textfield for speed
89 new FXLabel(columnLeftLabel, toString(SUMO_ATTR_DEPARTSPEED).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
90 myTextFieldDepartSpeed = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
91 // 9 create textfield for lane
92 new FXLabel(columnLeftLabel, toString(SUMO_ATTR_ARRIVALLANE).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
93 myTextFieldArrivalLane = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
94 // 10 create textfield for arrival pos
95 new FXLabel(columnLeftLabel, toString(SUMO_ATTR_ARRIVALPOS).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
96 myTextFieldArrivalPos = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
97 // 11 create textfield for arrival speed
98 new FXLabel(columnRightLabel, toString(SUMO_ATTR_ARRIVALSPEED).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
99 myTextFieldArrivalSpeed = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
100 // 12 create textfield for arrival line
101 new FXLabel(columnRightLabel, toString(SUMO_ATTR_LINE).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
102 myTextFieldLine = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
103 // 13 create textfield for person number
104 new FXLabel(columnRightLabel, toString(SUMO_ATTR_PERSON_NUMBER).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
105 myTextFieldPersonNumber = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
106 // 14 create textfield for container number
107 new FXLabel(columnRightLabel, toString(SUMO_ATTR_CONTAINER_NUMBER).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
108 myTextFieldContainerNumber = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
109 // 15 create textfield for reroute
110 new FXLabel(columnRightLabel, toString(SUMO_ATTR_REROUTE).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
111 myRerouteCheckButton = new FXCheckButton(columnRightValue, "false", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
112 // 16 create textfield for depart pos lat
113 new FXLabel(columnRightLabel, toString(SUMO_ATTR_DEPARTPOS_LAT).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
114 myTextFieldDepartPosLat = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
115 // 17 create textfield for arrival pos lat
116 new FXLabel(columnRightLabel, toString(SUMO_ATTR_ARRIVALPOS_LAT).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
117 myTextFieldArrivalPosLat = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
118 // 18 create textfield for begin
119 new FXLabel(columnRightLabel, toString(SUMO_ATTR_BEGIN).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
120 myTextFieldBegin = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
121 // 19 create textfield for end
122 new FXLabel(columnRightLabel, toString(SUMO_ATTR_END).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
123 myTextFieldEnd = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
124
125 // fill comboBox of VTypes
126 for (const auto& vType : myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VTYPE)) {
127 myComboBoxVehicleType->appendIconItem(vType.second->getID().c_str(), vType.second->getACIcon());
128 }
129
130 // fill comboBox of Routes
131 for (const auto& route : myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_ROUTE)) {
132 myComboBoxRoute->appendIconItem(route.second->getID().c_str(), route.second->getACIcon());
133 }
134
135 // update tables
136 updateCalibratorFlowValues();
137
138 // start a undo list for editing local to this additional
139 initChanges();
140
141 // add element if we aren't updating an existent element
142 if (!myUpdatingElement) {
143 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(myEditedAdditional, true), true);
144 }
145
146 // open as modal dialog
147 openAsModalDialog();
148}
149
150
152
153
154long
155GNECalibratorFlowDialog::onCmdAccept(FXObject*, FXSelector, void*) {
156 std::string operation1 = myUpdatingElement ? ("updating") : ("creating");
157 std::string operation2 = myUpdatingElement ? ("updated") : ("created");
158 std::string parentTagString = myEditedAdditional->getParentAdditionals().at(0)->getTagStr();
159 std::string tagString = myEditedAdditional->getTagStr();
161 // write warning if netedit is running in testing mode
162 WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
163 // open warning dialog box
164 FXMessageBox::warning(getApp(), MBOX_OK,
165 ("Error " + operation1 + " " + parentTagString + "'s " + tagString).c_str(), "%s",
166 (parentTagString + "'s " + tagString + " cannot be " + operation2 +
167 " because parameter " + toString(myInvalidAttr) +
168 " is invalid.").c_str());
169 // write warning if netedit is running in testing mode
170 WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
171 return 0;
172 } else if (!myEditedAdditional->getParentAdditionals().at(0)->checkChildAdditionalsOverlapping()) {
173 // write warning if netedit is running in testing mode
174 WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
175 // open warning dialog box
176 FXMessageBox::warning(getApp(), MBOX_OK,
177 ("Error " + operation1 + " " + parentTagString + "'s " + tagString).c_str(), "%s",
178 (parentTagString + "'s " + tagString + " cannot be " + operation2 +
179 " because there is overlapping with another " + tagString + ".").c_str());
180 // write warning if netedit is running in testing mode
181 WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
182 return 0;
185 // write warning if netedit is running in testing mode
186 WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
187 // open warning dialog box
188 FXMessageBox::warning(getApp(), MBOX_OK,
189 ("Error " + operation1 + " " + parentTagString + "'s " + tagString).c_str(), "%s",
190 (parentTagString + "'s " + tagString + " cannot be " + operation2 +
191 " because parameters " + toString(SUMO_ATTR_VEHSPERHOUR) + " and " + toString(SUMO_ATTR_SPEED) +
192 " cannot be defined together.").c_str());
193 // write warning if netedit is running in testing mode
194 WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
195 return 0;
196 } else {
197 // accept changes before closing dialog
199 // stop dialog successfully
200 getApp()->stopModal(this, TRUE);
201 return 1;
202 }
203}
204
205
206long
207GNECalibratorFlowDialog::onCmdCancel(FXObject*, FXSelector, void*) {
208 // cancel changes
210 // Stop Modal
211 getApp()->stopModal(this, FALSE);
212 return 1;
213}
214
215
216long
217GNECalibratorFlowDialog::onCmdReset(FXObject*, FXSelector, void*) {
218 // reset changes
219 resetChanges();
220 // update tables
222 return 1;
223}
224
225
226long
227GNECalibratorFlowDialog::onCmdSetVariable(FXObject*, FXSelector, void*) {
228 // At start we assumed, that all values are valid
231 // get pointer to undo list (Only for code legibility)
233 // set color of myComboBoxVehicleType, depending if current value is valid or not
235 myComboBoxVehicleType->setTextColor(FXRGB(0, 0, 0));
237 } else {
238 myComboBoxVehicleType->setTextColor(FXRGB(255, 0, 0));
239 myCalibratorFlowValid = false;
241 }
242 // set color of myComboBoxRoute, depending if current value is valid or not
244 myComboBoxRoute->setTextColor(FXRGB(0, 0, 0));
246 } else {
247 myComboBoxRoute->setTextColor(FXRGB(255, 0, 0));
248 myCalibratorFlowValid = false;
250 }
251 // set color of myTextFieldVehsPerHour, depending if current value is valid or not
253 myTextFieldVehsPerHour->setTextColor(FXRGB(0, 0, 0));
255 } else {
256 myTextFieldVehsPerHour->setTextColor(FXRGB(255, 0, 0));
257 myCalibratorFlowValid = false;
259 }
260 // set color of myTextFieldSpeed, depending if current value is valid or not
262 myTextFieldSpeed->setTextColor(FXRGB(0, 0, 0));
264 // Check VehsPerHour again
266 myTextFieldVehsPerHour->setTextColor(FXRGB(0, 0, 0));
271 }
272 }
273 } else {
274 myTextFieldSpeed->setTextColor(FXRGB(255, 0, 0));
275 myCalibratorFlowValid = false;
277 }
278 // set color of myTextFieldColor, depending if current value is valid or not
280 myTextFieldColor->setTextColor(FXRGB(0, 0, 0));
282 } else {
283 myTextFieldColor->setTextColor(FXRGB(255, 0, 0));
284 myCalibratorFlowValid = false;
286 }
287 // set color of myTextFieldDepartLane, depending if current value is valid or not
289 myTextFieldDepartLane->setTextColor(FXRGB(0, 0, 0));
291 } else {
292 myTextFieldDepartLane->setTextColor(FXRGB(255, 0, 0));
293 myCalibratorFlowValid = false;
295 }
296 // set color of myTextFieldDepartPos, depending if current value is valid or not
298 myTextFieldDepartPos->setTextColor(FXRGB(0, 0, 0));
300 } else {
301 myTextFieldDepartPos->setTextColor(FXRGB(255, 0, 0));
302 myCalibratorFlowValid = false;
304 }
305 // set color of setDepartSpeed, depending if current value is valid or not
307 myTextFieldDepartSpeed->setTextColor(FXRGB(0, 0, 0));
309 } else {
310 myTextFieldDepartSpeed->setTextColor(FXRGB(255, 0, 0));
311 myCalibratorFlowValid = false;
313 }
314 // set color of myTextFieldArrivalLane, depending if current value is valid or not
316 myTextFieldArrivalLane->setTextColor(FXRGB(0, 0, 0));
318 } else {
319 myTextFieldArrivalLane->setTextColor(FXRGB(255, 0, 0));
320 myCalibratorFlowValid = false;
322 }
323 // set color of myTextFieldArrivalPos, depending if current value is valid or not
325 myTextFieldArrivalPos->setTextColor(FXRGB(0, 0, 0));
327 } else {
328 myTextFieldArrivalPos->setTextColor(FXRGB(255, 0, 0));
329 myCalibratorFlowValid = false;
331 }
332 // set color of setArrivalSpeed, depending if current value is valid or not
334 myTextFieldArrivalSpeed->setTextColor(FXRGB(0, 0, 0));
336 } else {
337 myTextFieldArrivalSpeed->setTextColor(FXRGB(255, 0, 0));
338 myCalibratorFlowValid = false;
340 }
341 // set color of myTextFieldLine, depending if current value is valid or not
342 if (myEditedAdditional->isValid(SUMO_ATTR_LINE, myTextFieldLine->getText().text())) {
343 myTextFieldLine->setTextColor(FXRGB(0, 0, 0));
344 myEditedAdditional->setAttribute(SUMO_ATTR_LINE, myTextFieldLine->getText().text(), undoList);
345 } else {
346 myTextFieldLine->setTextColor(FXRGB(255, 0, 0));
347 myCalibratorFlowValid = false;
349 }
350 // set color of myTextFieldPersonNumber, depending if current value is valid or not
352 myTextFieldPersonNumber->setTextColor(FXRGB(0, 0, 0));
354 } else {
355 myTextFieldPersonNumber->setTextColor(FXRGB(255, 0, 0));
356 myCalibratorFlowValid = false;
358 }
359 // set color of myTextFieldContainerNumber, depending if current value is valid or not
361 myTextFieldContainerNumber->setTextColor(FXRGB(0, 0, 0));
363 } else {
364 myTextFieldContainerNumber->setTextColor(FXRGB(255, 0, 0));
365 myCalibratorFlowValid = false;
367 }
368 // set reroute
369 if (myRerouteCheckButton->getCheck()) {
371 myRerouteCheckButton->setText("true");
372 } else {
374 myRerouteCheckButton->setText("false");
375 }
376 // set color of myTextFieldDepartPosLat, depending if current value is valid or not
378 myTextFieldDepartPosLat->setTextColor(FXRGB(0, 0, 0));
380 } else {
381 myTextFieldDepartPosLat->setTextColor(FXRGB(255, 0, 0));
382 myCalibratorFlowValid = false;
384 }
385 // set color of myTextFieldArrivalPosLat, depending if current value is valid or not
387 myTextFieldArrivalPosLat->setTextColor(FXRGB(0, 0, 0));
389 } else {
390 myTextFieldArrivalPosLat->setTextColor(FXRGB(255, 0, 0));
391 myCalibratorFlowValid = false;
393 }
394 // set color of myTextFieldBegin, depending if current value is valid or not
396 myTextFieldBegin->setTextColor(FXRGB(0, 0, 0));
398 } else {
399 myTextFieldBegin->setTextColor(FXRGB(255, 0, 0));
400 myCalibratorFlowValid = false;
402 }
403 // set color of myTextFieldEnd, depending if current value is valid or not
404 if (myEditedAdditional->isValid(SUMO_ATTR_END, myTextFieldEnd->getText().text())) {
405 myTextFieldEnd->setTextColor(FXRGB(0, 0, 0));
406 myEditedAdditional->setAttribute(SUMO_ATTR_END, myTextFieldEnd->getText().text(), undoList);
407 } else {
408 myTextFieldEnd->setTextColor(FXRGB(255, 0, 0));
409 myCalibratorFlowValid = false;
411 }
412 return 1;
413}
414
415
416void
418 // update fields
433 myRerouteCheckButton->setCheck(GNEAttributeCarrier::parse<bool>(myEditedAdditional->getAttribute(SUMO_ATTR_REROUTE).c_str()));
438}
439
440
441/****************************************************************************/
FXDEFMAP(GNECalibratorFlowDialog) GNECalibratorFlowDialogMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
Definition GUIAppEnum.h:939
@ MID_GNE_BUTTON_CANCEL
cancel button
@ MID_GNE_BUTTON_RESET
reset button
@ MID_GNE_BUTTON_ACCEPT
accept button
#define GUIDesignComboBox
Definition GUIDesigns.h:299
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition GUIDesigns.h:317
#define GUIDesignTextField
Definition GUIDesigns.h:65
#define GUIDesignComboBoxVisibleItemsMedium
combo box medium small
Definition GUIDesigns.h:53
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition GUIDesigns.h:80
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
Definition GUIDesigns.h:414
#define GUIDesignLabelThick(justify)
label extended over frame with thick and with text justify to left
Definition GUIDesigns.h:255
#define GUIDesignCheckButton
checkButton placed in left position
Definition GUIDesigns.h:198
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
Definition GUIDesigns.h:396
#define WRITE_DEBUG(msg)
Definition MsgHandler.h:306
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_ATTR_ARRIVALSPEED
@ SUMO_ATTR_ARRIVALLANE
@ SUMO_ATTR_VEHSPERHOUR
@ SUMO_ATTR_SPEED
@ SUMO_ATTR_DEPARTPOS_LAT
@ SUMO_ATTR_ARRIVALPOS
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_CONTAINER_NUMBER
@ SUMO_ATTR_LINE
@ SUMO_ATTR_DEPARTPOS
@ SUMO_ATTR_REROUTE
@ SUMO_ATTR_DEPARTSPEED
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_DEPARTLANE
@ SUMO_ATTR_TYPE
@ SUMO_ATTR_ROUTE
@ SUMO_ATTR_PERSON_NUMBER
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_ARRIVALPOS_LAT
@ SUMO_ATTR_NOTHING
invalid attribute, must be the last one
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
Dialog to edit sequences, parameters, etc.. of Additionals.
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog)
void acceptChanges()
Accept changes did in this dialog.
void cancelChanges()
Cancel changes did in this dialog.
GNEAdditional * myEditedAdditional
pointer to edited additional
void resetChanges()
reset changes did in this dialog.
An Element which don't belong to GNENet but has influence in the simulation.
virtual std::string getAttribute(SumoXMLAttr key) const =0
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their correspondent attribute are valids
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * getNet() const
get pointer to net
Dialog for editing calibrator flows.
FXTextField * myTextFieldPersonNumber
TextField for PersonNumber.
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
FXTextField * myTextFieldDepartPos
TextField for Depart Pos.
long onCmdSetVariable(FXObject *, FXSelector, void *)
event after change value
long onCmdAccept(FXObject *, FXSelector, void *)
FXTextField * myTextFieldVehsPerHour
TextField for VehsPerHour.
FXTextField * myTextFieldEnd
TextField for End.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FXTextField * myTextFieldColor
TextField for Color.
MFXComboBoxIcon * myComboBoxVehicleType
ComboBox for Type.
FXTextField * myTextFieldBegin
TextField for Begin.
MFXComboBoxIcon * myComboBoxRoute
TextField for Route.
FXTextField * myTextFieldArrivalSpeed
TextField for Arrival Speed.
FXTextField * myTextFieldArrivalLane
TextField for Arrival Lane.
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
FXTextField * myTextFieldDepartPosLat
TextField for DepartPosLat.
FXTextField * myTextFieldLine
TextField for Line.
FXTextField * myTextFieldDepartSpeed
TextField for Depart Speed.
FXTextField * myTextFieldDepartLane
TextField for Depart Lane.
FXTextField * myTextFieldContainerNumber
TextField for Container Number.
FXTextField * myTextFieldArrivalPosLat
TextField for ArrivalPosLat.
FXTextField * myTextFieldSpeed
TextField for Speed.
FXTextField * myTextFieldArrivalPos
TextField for Arrival Pos.
FXCheckButton * myRerouteCheckButton
checkButton for Reroute
void updateCalibratorFlowValues()
update data fields
bool myCalibratorFlowValid
flag to check if current calibrator flow is valid
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
GNEViewNet * getViewNet() const
get view net
Definition GNENet.cpp:2155
GNEUndoList * getUndoList() const
get the undoList object
ComboBox with icon.
long setCurrentItem(const FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXint findItem(const FXString &text) const
find item
FXString getText() const
Get the text.
void setTextColor(FXColor clr)
Change text color.