Eclipse SUMO - Simulation of Urban MObility
GNEVehicleTypeDialog.cpp
Go to the documentation of this file.
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 /****************************************************************************/
15 // Dialog for edit vehicleTypes
16 /****************************************************************************/
17 
18 // ===========================================================================
19 // included modules
20 // ===========================================================================
21 #include <config.h>
22 
23 #include <netedit/GNEUndoList.h>
24 #include <netedit/GNEViewNet.h>
30 
31 #include "GNEVehicleTypeDialog.h"
32 
33 
34 // ===========================================================================
35 // FOX callback mapping
36 // ===========================================================================
37 
38 FXDEFMAP(GNEVehicleTypeDialog::VTypeAtributes) VTypeAtributesMap[] = {
41 };
42 
43 FXDEFMAP(GNEVehicleTypeDialog::CarFollowingModelParameters) CarFollowingModelParametersMap[] = {
45 };
46 
47 // Object implementation
48 FXIMPLEMENT(GNEVehicleTypeDialog::VTypeAtributes, FXVerticalFrame, VTypeAtributesMap, ARRAYNUMBER(VTypeAtributesMap))
49 FXIMPLEMENT(GNEVehicleTypeDialog::CarFollowingModelParameters, FXGroupBox, CarFollowingModelParametersMap, ARRAYNUMBER(CarFollowingModelParametersMap))
50 
51 // ===========================================================================
52 // member method definitions
53 // ===========================================================================
54 
55 // ---------------------------------------------------------------------------
56 // GNEVehicleTypeDialog::VClassRow - methods
57 // ---------------------------------------------------------------------------
58 
59 GNEVehicleTypeDialog::VTypeAtributes::VClassRow::VClassRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* column) :
60  FXHorizontalFrame(column, GUIDesignAuxiliarHorizontalFrame),
61  myVTypeAtributesParent(VTypeAtributesParent) {
62  // create two auxiliar frames
63  FXVerticalFrame* verticalFrameLabelAndComboBox = new FXVerticalFrame(this, GUIDesignAuxiliarVerticalFrame);
64  // create FXComboBox for VClass
65  new FXLabel(verticalFrameLabelAndComboBox, toString(SUMO_ATTR_VCLASS).c_str(), nullptr, GUIDesignLabelAttribute150);
66  myComboBoxVClass = new FXComboBox(verticalFrameLabelAndComboBox, GUIDesignComboBoxNCol,
67  VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBox);
68  myComboBoxVClassLabelImage = new FXLabel(this, "", nullptr, GUIDesignLabelTickedIcon180x46);
69  myComboBoxVClassLabelImage->setBackColor(FXRGBA(255, 255, 255, 255));
70  // fill combo Box with all allowed VClass for the current edited VType
71  for (const auto& i : myVTypeAtributesParent->myVehicleTypeDialog->getEditedDemandElement()->getTagProperty().getAttributeProperties(SUMO_ATTR_VCLASS).getDiscreteValues()) {
72  if (i != SumoVehicleClassStrings.getString(SVC_IGNORING)) {
73  myComboBoxVClass->appendItem(i.c_str());
74  }
75  }
76  // only show as maximum 10 VClasses
77  if (myComboBoxVClass->getNumItems() > 10) {
78  myComboBoxVClass->setNumVisible(10);
79  } else {
80  myComboBoxVClass->setNumVisible(myComboBoxVClass->getNumItems());
81  }
82 }
83 
84 
87  // set color of myComboBoxVClass, depending if current value is valid or not
88  myComboBoxVClass->setTextColor(FXRGB(0, 0, 0));
90  myComboBoxVClass->setTextColor(FXRGB(0, 0, 0));
91  // check if VType has to be updated
93  // update VClass in VType
96  // update label image
98  // obtain default vType parameters
100  // check if mutable rows haben to be updated
102  myVTypeAtributesParent->myLength->updateValue(toString(defaultVTypeParameters.length));
103  }
105  myVTypeAtributesParent->myMinGap->updateValue(toString(defaultVTypeParameters.minGap));
106  }
108  myVTypeAtributesParent->myMaxSpeed->updateValue(toString(defaultVTypeParameters.maxSpeed));
109  }
111  myVTypeAtributesParent->mySpeedFactor->updateValue(toString(defaultVTypeParameters.speedFactor.getParameter()[0]));
112  }
114  myVTypeAtributesParent->mySpeedDev->updateValue(toString(defaultVTypeParameters.speedFactor.getParameter()[1]));
115  }
117  myVTypeAtributesParent->myEmissionClass->updateValue(toString(defaultVTypeParameters.emissionClass));
118  }
120  myVTypeAtributesParent->myWidth->updateValue(toString(defaultVTypeParameters.width));
121  }
123  myVTypeAtributesParent->myHeight->updateValue(toString(defaultVTypeParameters.height));
124  }
126  myVTypeAtributesParent->myOSGFile->updateValue(toString(defaultVTypeParameters.osgFile));
127  }
129  myVTypeAtributesParent->myPersonCapacity->updateValue(toString(defaultVTypeParameters.personCapacity));
130  }
132  myVTypeAtributesParent->myContainerCapacity->updateValue(toString(defaultVTypeParameters.containerCapacity));
133  }
135  myVTypeAtributesParent->myCarriageLength->updateValue(toString(defaultVTypeParameters.containerCapacity));
136  }
138  myVTypeAtributesParent->myLocomotiveLength->updateValue(toString(defaultVTypeParameters.containerCapacity));
139  }
140  }
141  } else {
142  myComboBoxVClass->setTextColor(FXRGB(255, 0, 0));
145  }
147 }
148 
149 
152  myComboBoxVClass->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_VCLASS).c_str());
153  setVClassLabelImage();
154  return myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getVClass();
155 }
156 
157 
158 void
160  // by default vclass is passenger
161  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_VCLASS).empty()) {
162  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PASSENGER));
163  } else {
164  // set Icon in label depending of current VClass
165  switch (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getVClass()) {
166  case SVC_PRIVATE:
167  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PRIVATE));
168  break;
169  case SVC_EMERGENCY:
170  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_EMERGENCY));
171  break;
172  case SVC_AUTHORITY:
173  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_AUTHORITY));
174  break;
175  case SVC_ARMY:
176  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_ARMY));
177  break;
178  case SVC_VIP:
179  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_VIP));
180  break;
181  case SVC_PASSENGER:
182  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PASSENGER));
183  break;
184  case SVC_HOV:
185  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_HOV));
186  break;
187  case SVC_TAXI:
188  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TAXI));
189  break;
190  case SVC_BUS:
191  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_BUS));
192  break;
193  case SVC_COACH:
194  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_COACH));
195  break;
196  case SVC_DELIVERY:
197  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_DELIVERY));
198  break;
199  case SVC_TRUCK:
200  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TRUCK));
201  break;
202  case SVC_TRAILER:
203  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TRAILER));
204  break;
205  case SVC_TRAM:
206  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_TRAM));
207  break;
208  case SVC_RAIL_URBAN:
209  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_RAIL_URBAN));
210  break;
211  case SVC_RAIL:
212  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_RAIL));
213  break;
214  case SVC_RAIL_ELECTRIC:
215  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_RAIL_ELECTRIC));
216  break;
217  case SVC_RAIL_FAST:
218  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_RAIL_ELECTRIC));
219  break;
220  case SVC_MOTORCYCLE:
221  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_MOTORCYCLE));
222  break;
223  case SVC_MOPED:
224  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_MOPED));
225  break;
226  case SVC_BICYCLE:
227  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_BICYCLE));
228  break;
229  case SVC_PEDESTRIAN:
230  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_PEDESTRIAN));
231  break;
232  case SVC_E_VEHICLE:
233  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_EVEHICLE));
234  break;
235  case SVC_SHIP:
236  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_SHIP));
237  break;
238  case SVC_CUSTOM1:
239  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_CUSTOM1));
240  break;
241  case SVC_CUSTOM2:
242  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_CUSTOM2));
243  break;
244  default:
245  myComboBoxVClassLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_IGNORING));
246  break;
247  }
248  }
249 }
250 
251 // ---------------------------------------------------------------------------
252 // GNEVehicleTypeDialog::VShapeRow - methods
253 // ---------------------------------------------------------------------------
254 
255 GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::VShapeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* column) :
256  FXHorizontalFrame(column, GUIDesignAuxiliarHorizontalFrame),
257  myVTypeAtributesParent(VTypeAtributesParent) {
258  // create two auxiliar frames
259  FXVerticalFrame* verticalFrameLabelAndComboBox = new FXVerticalFrame(this, GUIDesignAuxiliarVerticalFrame);
260  // create combo for for vehicle shapes
261  new FXLabel(verticalFrameLabelAndComboBox, toString(SUMO_ATTR_GUISHAPE).c_str(), nullptr, GUIDesignLabelAttribute150);
262  myComboBoxShape = new FXComboBox(verticalFrameLabelAndComboBox, GUIDesignComboBoxNCol,
263  VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBox);
264  myComboBoxShapeLabelImage = new FXLabel(this, "", nullptr, GUIDesignLabelTickedIcon180x46);
265  myComboBoxShapeLabelImage->setBackColor(FXRGBA(255, 255, 255, 255));
266  // fill combo Box with all vehicle shapes
267  std::vector<std::string> VShapeStrings = SumoVehicleShapeStrings.getStrings();
268  for (auto i : VShapeStrings) {
269  if (i != SumoVehicleShapeStrings.getString(SVS_UNKNOWN)) {
270  myComboBoxShape->appendItem(i.c_str());
271  }
272  }
273  // only show 10 Shapes
274  myComboBoxShape->setNumVisible(10);
275 }
276 
277 
278 void
280  // set color of myComboBoxShape, depending if current value is valid or not
281  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text())) {
282  myComboBoxShape->setTextColor(FXRGB(0, 0, 0));
283  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_GUISHAPE, myComboBoxShape->getText().text(),
284  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
285  setVShapeLabelImage();
286  } else {
287  myComboBoxShape->setTextColor(FXRGB(255, 0, 0));
288  myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid = false;
289  myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_GUISHAPE;
290  }
291 }
292 
293 
294 void
296  myComboBoxShape->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_GUISHAPE).c_str());
297  setVShapeLabelImage();
298 }
299 
300 
301 void
303  // set Icon in label depending of current VClass
304  switch (getVehicleShapeID(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_GUISHAPE))) {
305  case SVS_UNKNOWN:
306  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_UNKNOWN));
307  break;
308  case SVS_PEDESTRIAN:
309  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PEDESTRIAN));
310  break;
311  case SVS_BICYCLE:
312  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_BICYCLE));
313  break;
314  case SVS_MOPED:
315  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_MOPED));
316  break;
317  case SVS_MOTORCYCLE:
318  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_MOTORCYCLE));
319  break;
320  case SVS_PASSENGER:
321  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PASSENGER));
322  break;
323  case SVS_PASSENGER_SEDAN:
324  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PASSENGER_SEDAN));
325  break;
327  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PASSENGER_HATCHBACK));
328  break;
329  case SVS_PASSENGER_WAGON:
330  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PASSENGER_WAGON));
331  break;
332  case SVS_PASSENGER_VAN:
333  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_PASSENGER_VAN));
334  break;
335  case SVS_DELIVERY:
336  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_DELIVERY));
337  break;
338  case SVS_TRUCK:
339  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_TRUCK));
340  break;
342  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_TRUCK_SEMITRAILER));
343  break;
344  case SVS_TRUCK_1TRAILER:
345  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_TRUCK_1TRAILER));
346  break;
347  case SVS_BUS:
348  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_BUS));
349  break;
350  case SVS_BUS_COACH:
351  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_BUS_COACH));
352  break;
353  case SVS_BUS_FLEXIBLE:
354  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_BUS_FLEXIBLE));
355  break;
356  case SVS_BUS_TROLLEY:
357  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_BUS_TROLLEY));
358  break;
359  case SVS_RAIL:
360  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_RAIL));
361  break;
362  case SVS_RAIL_CAR:
363  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_RAIL_CAR));
364  break;
365  case SVS_RAIL_CARGO:
366  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_RAIL_CARGO));
367  break;
368  case SVS_E_VEHICLE:
369  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_E_VEHICLE));
370  break;
371  case SVS_ANT:
372  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_ANT));
373  break;
374  case SVS_SHIP:
375  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_SHIP));
376  break;
377  case SVS_EMERGENCY:
378  case SVS_FIREBRIGADE:
379  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_EMERGENCY));
380  break;
381  case SVS_POLICE:
382  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_POLICE));
383  break;
384  case SVS_RICKSHAW:
385  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VSHAPE_RICKSHAW));
386  break;
387  default:
388  myComboBoxShapeLabelImage->setIcon(GUIIconSubSys::getIcon(ICON_VCLASS_IGNORING));
389  break;
390  }
391 }
392 
393 // ---------------------------------------------------------------------------
394 // GNEVehicleTypeDialog::VTypeAtributes - methods
395 // ---------------------------------------------------------------------------
396 
397 GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::VTypeAttributeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* verticalFrame, const SumoXMLAttr attr, const RowAttrType rowAttrType, const std::vector<std::string>& values) :
398  FXHorizontalFrame(verticalFrame, GUIDesignAuxiliarHorizontalFrame),
399  myVTypeAtributesParent(VTypeAtributesParent),
400  myAttr(attr),
401  myRowAttrType(rowAttrType),
402  myButton(nullptr),
403  myTextField(nullptr),
404  myComboBox(nullptr) {
405  // first check if we have to create a button or a label
406  if ((rowAttrType == ROWTYPE_COLOR) || (rowAttrType == ROWTYPE_FILENAME)) {
407  myButton = new FXButton(this, filterAttributeName(attr), nullptr, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE_DIALOG, GUIDesignButtonRectangular150x23);
408  } else {
409  new FXLabel(this, filterAttributeName(attr), nullptr, GUIDesignLabelAttribute150);
410  }
411  // now check if we have to create a textfield or a ComboBox
412  if (rowAttrType == ROWTYPE_INT) {
413  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Int);
414  } else if (rowAttrType == ROWTYPE_REAL) {
415  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Real);
416  } else if ((rowAttrType == ROWTYPE_STRING) || (rowAttrType == ROWTYPE_COLOR)) {
417  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180);
418  } else if (rowAttrType == ROWTYPE_FILENAME) {
419  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180);
420  } else if (rowAttrType == ROWTYPE_COMBOBOX) {
421  myComboBox = new FXComboBox(this, GUIDesignComboBoxNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBoxWidth180);
422  // fill combo Box with values
423  for (auto i : values) {
424  myComboBox->appendItem(i.c_str());
425  }
426  // set 10 visible elements as maximum
427  if (myComboBox->getNumItems() < 10) {
428  myComboBox->setNumVisible(myComboBox->getNumItems());
429  } else {
430  myComboBox->setNumVisible(10);
431  }
432  } else {
433  throw ProcessError("Invalid row type");
434  }
435 }
436 
437 
438 void
440  if (myRowAttrType == ROWTYPE_COMBOBOX) {
441  // set color of myComboBox, depending if current value is valid or not
442  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myComboBox->getText().text())) {
443  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myComboBox->getText().text(),
444  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
445  // update value after setting it
446  updateValue();
447  } else {
448  myComboBox->setTextColor(FXRGB(255, 0, 0));
449  // mark VType as invalid
450  myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid = false;
451  myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
452  }
453  } else if (myRowAttrType == ROWTYPE_COLOR) {
454  // set color of myTextFieldColor, depending if current value is valid or not
455  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(SUMO_ATTR_COLOR, myTextField->getText().text())) {
456  // set color depending if is a default value
457  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(SUMO_ATTR_COLOR) != myTextField->getText().text()) {
458  myTextField->setTextColor(FXRGB(0, 0, 0));
459  } else {
460  myTextField->setTextColor(FXRGB(195, 195, 195));
461  }
462  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_COLOR, myTextField->getText().text(), myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
463  } else {
464  myTextField->setTextColor(FXRGB(255, 0, 0));
465  myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid = false;
466  myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_COLOR;
467  }
468  } else {
469  // set color of textField, depending if current value is valid or not
470  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myTextField->getText().text())) {
471  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myTextField->getText().text(),
472  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
473  // update value after setting it
474  updateValue();
475  } else {
476  myTextField->setTextColor(FXRGB(255, 0, 0));
477  // mark VType as invalid
478  myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid = false;
479  myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
480  }
481  }
482 }
483 
484 
485 void
487  if (myComboBox) {
488  // set color of myComboBox, depending if current value is valid or not
489  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myComboBox->getText().text())) {
490  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myComboBox->getText().text(),
491  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
492  // update value after setting it
493  updateValue(defaultValue);
494  } else {
495  myComboBox->setTextColor(FXRGB(255, 0, 0));
496  // mark VType as invalid
497  myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid = false;
498  myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
499  }
500  } else {
501  // set color of textField, depending if current value is valid or not
502  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myTextField->getText().text())) {
503  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myTextField->getText().text(),
504  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
505  // update value after setting it
506  updateValue(defaultValue);
507  } else {
508  myTextField->setTextColor(FXRGB(255, 0, 0));
509  // mark VType as invalid
510  myVTypeAtributesParent->myVehicleTypeDialog->myVehicleTypeValid = false;
511  myVTypeAtributesParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
512  }
513  }
514 }
515 
516 
517 void
519  if (myRowAttrType == ROWTYPE_COMBOBOX) {
520  // set text of myComboBox using current value of VType
521  myComboBox->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
522  // set color depending if is a default value
523  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myComboBox->getText().text()) {
524  myComboBox->setTextColor(FXRGB(0, 0, 0));
525  } else {
526  myComboBox->setTextColor(FXRGB(195, 195, 195));
527  }
528  } else if (myRowAttrType == ROWTYPE_COLOR) {
529  // set field color
530  myTextField->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
531  // set color depending if is a default value
532  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
533  myTextField->setTextColor(FXRGB(0, 0, 0));
534  } else {
535  myTextField->setTextColor(FXRGB(195, 195, 195));
536  }
537  } else {
538  // set text of myTextField using current value of VType
539  myTextField->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
540  // set color depending if is a default value
541  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
542  myTextField->setTextColor(FXRGB(0, 0, 0));
543  } else {
544  myTextField->setTextColor(FXRGB(195, 195, 195));
545  }
546  }
547 }
548 
549 
550 void
552  if (myComboBox) {
553  // set text of myComboBox using current value of VType
554  myComboBox->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
555  // set color depending if is a default value
556  if (defaultValue != myComboBox->getText().text()) {
557  myComboBox->setTextColor(FXRGB(0, 0, 0));
558  } else {
559  myComboBox->setTextColor(FXRGB(195, 195, 195));
560  }
561  } else {
562  // set text of myTextField using current value of VType
563  myTextField->setText(myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
564  // set color depending if is a default value
565  if (defaultValue != myTextField->getText().text()) {
566  myTextField->setTextColor(FXRGB(0, 0, 0));
567  } else {
568  myTextField->setTextColor(FXRGB(195, 195, 195));
569  }
570  }
571 }
572 
573 
574 const FXButton*
576  return myButton;
577 }
578 
579 
580 void
582  // create FXColorDialog
583  FXColorDialog colordialog(this, tr("Color Dialog"));
584  colordialog.setTarget(this);
585  // If previous attribute wasn't correct, set black as default color
586  if (GNEAttributeCarrier::canParse<RGBColor>(myTextField->getText().text())) {
587  colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::parseColor(myTextField->getText().text())));
588  } else {
589  colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::BLACK));
590  }
591  // execute dialog to get a new color
592  if (colordialog.execute()) {
593  std::string newValue = toString(MFXUtils::getRGBColor(colordialog.getRGBA()));
594  myTextField->setText(newValue.c_str());
595  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, newValue)) {
596  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, newValue, myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
597  // If previously value was incorrect, change font color to black
598  myTextField->setTextColor(FXRGB(0, 0, 0));
599  myTextField->killFocus();
600  }
601  }
602 }
603 
604 
605 void
607  // get the new image file
608  FXFileDialog opendialog(this, "Open Image");
609  opendialog.setIcon(GUIIconSubSys::getIcon(ICON_VTYPE));
610  opendialog.setSelectMode(SELECTFILE_EXISTING);
611  opendialog.setPatternList("All files (*)");
612  if (gCurrentFolder.length() != 0) {
613  opendialog.setDirectory(gCurrentFolder);
614  }
615  if (opendialog.execute()) {
616  // update global current folder
617  gCurrentFolder = opendialog.getDirectory();
618  // get image path
619  std::string imagePath = opendialog.getFilename().text();
620  // check if image is valid
621  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, imagePath)) {
622  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, imagePath, myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
623  myTextField->setText(imagePath.c_str());
624  // If previously value was incorrect, change font color to black
625  myTextField->setTextColor(FXRGB(0, 0, 0));
626  myTextField->killFocus();
627  }
628  }
629 }
630 
631 
632 void
634  // get the new file name
635  FXFileDialog opendialog(this, "Open OSG File");
636  opendialog.setIcon(GUIIconSubSys::getIcon(ICON_VTYPE));
637  opendialog.setSelectMode(SELECTFILE_EXISTING);
638  opendialog.setPatternList("OSG file (*.obj)");
639  if (gCurrentFolder.length() != 0) {
640  opendialog.setDirectory(gCurrentFolder);
641  }
642  if (opendialog.execute()) {
643  // update global current folder
644  gCurrentFolder = opendialog.getDirectory();
645  // get image path
646  std::string imagePath = opendialog.getFilename().text();
647  // check if image is valid
648  if (myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, imagePath)) {
649  myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, imagePath, myVTypeAtributesParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
650  myTextField->setText(imagePath.c_str());
651  // If previously value was incorrect, change font color to black
652  myTextField->setTextColor(FXRGB(0, 0, 0));
653  myTextField->killFocus();
654  }
655  }
656 }
657 
658 
659 FXString
661  switch (attr) {
662  // JM
664  return "crossingGap";
666  return "driveAfterYellowTime";
668  return "driveAfterRedTime";
670  return "driveRedSpeed";
672  return "ignoreKeepClearTime";
674  return "ignoreFoeSpeed";
676  return "ignoreFoeProb";
678  return "sigmaMinor";
680  return "timegapMinor";
681  // LCM
683  return "strategic";
685  return "cooperative";
687  return "speedGain";
689  return "keepRight";
691  return "sublane";
693  return "opposite";
694  case SUMO_ATTR_LCA_PUSHY:
695  return "pushy";
697  return "pushyGap";
699  return "assertive";
701  return "impatience";
703  return "timeToImpatience";
705  return "accelLat";
707  return "lookaheadLeft";
709  return "speedGainRight";
711  return "maxSpeedLatStanding";
713  return "maxSpeedLatFactor";
715  return "turnAlignDistance";
717  return "overtakeRight";
718  /* case SUMO_ATTR_LCA_EXPERIMENTAL1:
719  return "experimental1";
720  */
721  default:
722  return toString(attr).c_str();
723  }
724 }
725 
726 // ---------------------------------------------------------------------------
727 // GNEVehicleTypeDialog::VTypeAtributes - methods
728 // ---------------------------------------------------------------------------
729 
730 GNEVehicleTypeDialog::VTypeAtributes::VTypeAtributes(GNEVehicleTypeDialog* vehicleTypeDialog, FXHorizontalFrame* column) :
731  FXVerticalFrame(column, GUIDesignAuxiliarVerticalFrame),
732  myVehicleTypeDialog(vehicleTypeDialog) {
733  // declare two auxiliar horizontal frames
734  FXHorizontalFrame* firstAuxiliarHorizontalFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
735  FXVerticalFrame* firstAuxiliarVerticalFrame = new FXVerticalFrame(firstAuxiliarHorizontalFrame, GUIDesignAuxiliarVerticalFrame);
736  // create attributes for common attributes
737  FXGroupBox* commonAttributes = new FXGroupBox(firstAuxiliarVerticalFrame, "Vehicle Type attributes", GUIDesignGroupBoxFrame);
738  // create horizontal frame for columns of attributes
739  FXHorizontalFrame* columnsBasicVTypeAttributes = new FXHorizontalFrame(commonAttributes, GUIDesignAuxiliarHorizontalFrame);
740  // build left attributes
741  buildAttributesA(new FXVerticalFrame(columnsBasicVTypeAttributes, GUIDesignAuxiliarFrame));
742  // build right attributes
743  buildAttributesB(new FXVerticalFrame(columnsBasicVTypeAttributes, GUIDesignAuxiliarFrame));
744  // create GroupBox for Junction Model Attributes
745  FXGroupBox* JMAttributes = new FXGroupBox(firstAuxiliarVerticalFrame, "Junction Model attributes", GUIDesignGroupBoxFrame);
746  // create horizontal frame for columns of Junction Model attributes
747  FXHorizontalFrame* columnsJMVTypeAttributes = new FXHorizontalFrame(JMAttributes, GUIDesignAuxiliarHorizontalFrame);
748  // build left attributes
749  buildJunctionModelAttributesA(new FXVerticalFrame(columnsJMVTypeAttributes, GUIDesignAuxiliarFrame));
750  // build right attributes
751  buildJunctionModelAttributesB(new FXVerticalFrame(columnsJMVTypeAttributes, GUIDesignAuxiliarFrame));
752  // create GroupBox for Junction Model Attributes
753  FXGroupBox* LCMAttributes = new FXGroupBox(firstAuxiliarHorizontalFrame, "Lane Change Model attributes", GUIDesignGroupBoxFrame);
754  // create Lane Change Model Attributes
755  buildLaneChangeModelAttributes(new FXVerticalFrame(LCMAttributes, GUIDesignAuxiliarFrame));
756 }
757 
758 
759 void
761  // 01 Create VClassRow
762  myVClassRow = new VClassRow(this, column);
763 
764  // 02 create FXTextField and Label for vehicleTypeID
765  FXHorizontalFrame* row = new FXHorizontalFrame(column, GUIDesignAuxiliarHorizontalFrame);
766  new FXLabel(row, toString(SUMO_ATTR_ID).c_str(), nullptr, GUIDesignLabelAttribute150);
767  myTextFieldVehicleTypeID = new FXTextField(row, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Real);
768 
769  // 03 create FXTextField and Button for Color
770  myColor = new VTypeAttributeRow(this, column, SUMO_ATTR_COLOR, VTypeAttributeRow::RowAttrType::ROWTYPE_COLOR);
771 
772  // 04 create FXTextField and Label for Length
773  myLength = new VTypeAttributeRow(this, column, SUMO_ATTR_LENGTH, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
774 
775  // 05 create FXTextField and Label for MinGap
776  myMinGap = new VTypeAttributeRow(this, column, SUMO_ATTR_MINGAP, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
777 
778  // 06 create FXTextField and Label for MaxSpeed
779  myMaxSpeed = new VTypeAttributeRow(this, column, SUMO_ATTR_MAXSPEED, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
780 
781  // 07 create FXTextField and Label for SpeedFactor
782  mySpeedFactor = new VTypeAttributeRow(this, column, SUMO_ATTR_SPEEDFACTOR, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
783 
784  // 08 create FXTextField and Label for SpeedDev
785  mySpeedDev = new VTypeAttributeRow(this, column, SUMO_ATTR_SPEEDDEV, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
786 
787  // 09 create FXTextField and Label for EmissionClass
788  myEmissionClass = new VTypeAttributeRow(this, column, SUMO_ATTR_EMISSIONCLASS, VTypeAttributeRow::RowAttrType::ROWTYPE_COMBOBOX, PollutantsInterface::getAllClassesStr());
789 
790  // 10 create FXTextField and Label for Width
791  myWidth = new VTypeAttributeRow(this, column, SUMO_ATTR_WIDTH, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
792 
793  // 11 create FXTextField and Label for Height
794  myHeight = new VTypeAttributeRow(this, column, SUMO_ATTR_HEIGHT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
795 
796  // 12 create FXTextField and Label for Filename
797  myFilename = new VTypeAttributeRow(this, column, SUMO_ATTR_IMGFILE, VTypeAttributeRow::RowAttrType::ROWTYPE_FILENAME);
798 
799  // 13 create FXTextField and Label for Filename
800  myOSGFile = new VTypeAttributeRow(this, column, SUMO_ATTR_OSGFILE, VTypeAttributeRow::RowAttrType::ROWTYPE_FILENAME);
801 
802  // 14 create VTypeAttributeRow and Label for Probability
803  myProbability = new VTypeAttributeRow(this, column, SUMO_ATTR_PROB, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
804 }
805 
806 
807 void
809  // 01 Create VShapeRow
810  myVShapeRow = new VShapeRow(this, column);
811 
812  // 02 create VTypeAttributeRow and Label for LaneChangeModel
813  myLaneChangeModel = new VTypeAttributeRow(this, column, SUMO_ATTR_LANE_CHANGE_MODEL, VTypeAttributeRow::RowAttrType::ROWTYPE_COMBOBOX, SUMOXMLDefinitions::LaneChangeModels.getStrings());
814 
815  // 03 create VTypeAttributeRow and Label for PersonCapacity
816  myPersonCapacity = new VTypeAttributeRow(this, column, SUMO_ATTR_PERSON_CAPACITY, VTypeAttributeRow::RowAttrType::ROWTYPE_INT);
817 
818  // 04 create VTypeAttributeRow and Label for ContainerCapacity
819  myContainerCapacity = new VTypeAttributeRow(this, column, SUMO_ATTR_CONTAINER_CAPACITY, VTypeAttributeRow::RowAttrType::ROWTYPE_INT);
820 
821  // 05 create VTypeAttributeRow and Label for BoardingDuration
822  myBoardingDuration = new VTypeAttributeRow(this, column, SUMO_ATTR_BOARDING_DURATION, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
823 
824  // 06 create VTypeAttributeRow and Label for LoadingDuration
825  myLoadingDuration = new VTypeAttributeRow(this, column, SUMO_ATTR_LOADING_DURATION, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
826 
827  // 07 create ComboBox and Label for LatAlignment
828  myLatAlignment = new VTypeAttributeRow(this, column, SUMO_ATTR_LATALIGNMENT, VTypeAttributeRow::RowAttrType::ROWTYPE_COMBOBOX, SUMOXMLDefinitions::LateralAlignments.getStrings());
829 
830  // 08 create VTypeAttributeRow and Label for MinGapLat
831  myMinGapLat = new VTypeAttributeRow(this, column, SUMO_ATTR_MINGAP_LAT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
832 
833  // 09 create VTypeAttributeRow and Label for MaxSpeedLat
834  myMaxSpeedLat = new VTypeAttributeRow(this, column, SUMO_ATTR_MAXSPEED_LAT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
835 
836  // 10 create VTypeAttributeRow and Label for ActionStepLenght
837  myActionStepLenght = new VTypeAttributeRow(this, column, SUMO_ATTR_ACTIONSTEPLENGTH, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
838 
839  // 11 create VTypeAttributeRow and Label for HasDriveStateu
840  myHasDriveState = new VTypeAttributeRow(this, column, SUMO_ATTR_HASDRIVERSTATE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
841 
842  // 12 create FXTextField and Label for Carriage length
843  myCarriageLength = new VTypeAttributeRow(this, column, SUMO_ATTR_CARRIAGE_LENGTH, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
844 
845  // 13 create FXTextField and Label for Locomotive length
846  myLocomotiveLength = new VTypeAttributeRow(this, column, SUMO_ATTR_LOCOMOTIVE_LENGTH, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
847 
848  // 14 create FXTextField and Label for carriage GAP
849  myCarriageGap = new VTypeAttributeRow(this, column, SUMO_ATTR_CARRIAGE_GAP, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
850 }
851 
852 
853 void
855  // 01 create VTypeAttributeRow and Label for JMCrossingGap
856  myJMCrossingGap = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_CROSSING_GAP, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
857 
858  // 02 create VTypeAttributeRow and Label for JMIgnoreKeepclearTime
859  myJMIgnoreKeepclearTime = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
860 
861  // 03 create VTypeAttributeRow and Label for JMDriveAfterYellowTime
862  myJMDriveAfterYellowTime = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_DRIVE_AFTER_YELLOW_TIME, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
863 
864  // 04 create VTypeAttributeRow and Label for JMDriveAfterRedTime
865  myJMDriveAfterRedTime = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
866 
867  // 05 create VTypeAttributeRow and Label for JMDriveRedSpeed
868  myJMDriveRedSpeed = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_DRIVE_RED_SPEED, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
869 }
870 
871 
872 void
874  // 01 create VTypeAttributeRow and Label for JMIgnoreFoeProb
875  myJMIgnoreFoeProb = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_IGNORE_FOE_PROB, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
876 
877  // 02 create VTypeAttributeRow and Label for JMIgnoreFoeSpeed
878  myJMIgnoreFoeSpeed = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_IGNORE_FOE_SPEED, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
879 
880  // 03 create VTypeAttributeRow and Label for JMSigmaMinor
881  myJMSigmaMinor = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_SIGMA_MINOR, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
882 
883  // 04 create VTypeAttributeRow and Label for JMTimeGapMinor
884  myJMTimeGapMinor = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_TIMEGAP_MINOR, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
885 
886  // 05 create VTypeAttributeRow and Label for Impatience
887  myJMImpatience = new VTypeAttributeRow(this, column, SUMO_ATTR_IMPATIENCE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
888 }
889 
890 
891 void
893  // 01 create VTypeAttributeRow and Label for strategic param
894  myLCAStrategicParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_STRATEGIC_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
895 
896  // 02 create VTypeAttributeRow and Label for cooperative param
897  myLCACooperativeParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_COOPERATIVE_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
898 
899  // 03 create VTypeAttributeRow and Label for speed gain param
900  myLCASpeedgainParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_SPEEDGAIN_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
901 
902  // 04 create VTypeAttributeRow and Label for keepright param
903  myLCAKeeprightParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_KEEPRIGHT_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
904 
905  // 05 create VTypeAttributeRow and Label for sublane param
906  myLCASublaneParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_SUBLANE_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
907 
908  // 06 create VTypeAttributeRow and Label for opposite param
909  myLCAOppositeParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_OPPOSITE_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
910 
911  // 07 create VTypeAttributeRow and Label for pushy
912  myLCAPushy = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_PUSHY, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
913 
914  // 08 create VTypeAttributeRow and Label for pushy gap
915  myLCAPushygap = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_PUSHYGAP, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
916 
917  // 09 create VTypeAttributeRow and Label for assertive
918  myLCAAssertive = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_ASSERTIVE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
919 
920  // 10 create VTypeAttributeRow and Label for impatience
921  myLCAImpatience = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_IMPATIENCE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
922 
923  // 11 create VTypeAttributeRow and Label for time to impatience
924  myLCATimeToImpatience = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_TIME_TO_IMPATIENCE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
925 
926  // 12 create VTypeAttributeRow and Label for accel lat
927  myLCAAccelLat = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_ACCEL_LAT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
928 
929  // 13 create VTypeAttributeRow and Label for look ahead lefth
930  myLCALookAheadLeft = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_LOOKAHEADLEFT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
931 
932  // 14 create VTypeAttributeRow and Label for speed gain right
933  myLCASpeedGainRight = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_SPEEDGAINRIGHT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
934 
935  // 15 create VTypeAttributeRow and Label for max speed lat standing
936  myLCAMaxSpeedLatStanding = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_MAXSPEEDLATSTANDING, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
937 
938  // 16 create VTypeAttributeRow and Label for max speed lat factor
939  myLCAMaxSpeedLatFactor = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_MAXSPEEDLATFACTOR, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
940 
941  // 17 create VTypeAttributeRow and Label for turn alignment distance
942  myLCATurnAlignmentDistance = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
943 
944  // 18 create VTypeAttributeRow and Label for overtake right
945  myLCAOvertakeRight = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_OVERTAKE_RIGHT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
946 
947  // 19 create VTypeAttributeRow and Label for experimental
948  /* myLCAExperimental = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_EXPERIMENTAL1, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL); */
949 }
950 
951 
952 void
954  //set values of myEditedDemandElement into fields
955  myTextFieldVehicleTypeID->setText(myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_ID).c_str());
956  // set variables of special rows VClass and VShape
957  SUMOVTypeParameter::VClassDefaultValues defaultVTypeParameters(myVClassRow->updateValue());
958  myVShapeRow->updateValues();
959  // update rows
960  myLaneChangeModel->updateValue();
961  myLatAlignment->updateValue();
962  myColor->updateValue();
963  myLength->updateValue(toString(defaultVTypeParameters.length));
964  myMinGap->updateValue(toString(defaultVTypeParameters.minGap));
965  myMaxSpeed->updateValue(toString(defaultVTypeParameters.maxSpeed));
966  mySpeedFactor->updateValue(toString(defaultVTypeParameters.speedFactor.getParameter()[0]));
967  mySpeedDev->updateValue(toString(defaultVTypeParameters.speedFactor.getParameter()[1]));
968  myEmissionClass->updateValue(toString(defaultVTypeParameters.emissionClass));
969  myWidth->updateValue(toString(defaultVTypeParameters.width));
970  myHeight->updateValue(toString(defaultVTypeParameters.height));
971  myFilename->updateValue();
972  myOSGFile->updateValue(toString(defaultVTypeParameters.osgFile));
973  myPersonCapacity->updateValue(toString(defaultVTypeParameters.personCapacity));
974  myContainerCapacity->updateValue(toString(defaultVTypeParameters.containerCapacity));
975  myCarriageLength->updateValue(toString(defaultVTypeParameters.carriageLength));
976  myLocomotiveLength->updateValue(toString(defaultVTypeParameters.locomotiveLength));
977  myBoardingDuration->updateValue();
978  myLoadingDuration->updateValue();
979  myMinGapLat->updateValue();
980  myMaxSpeedLat->updateValue();
981  myActionStepLenght->updateValue();
982  myHasDriveState->updateValue();
983  myProbability->updateValue();
984  myCarriageGap->updateValue();
985  // JM Parameters
986  myJMCrossingGap->updateValue();
987  myJMIgnoreKeepclearTime->updateValue();
988  myJMDriveAfterYellowTime->updateValue();
989  myJMDriveAfterRedTime->updateValue();
990  myJMDriveRedSpeed->updateValue();
991  myJMIgnoreFoeProb->updateValue();
992  myJMIgnoreFoeSpeed->updateValue();
993  myJMSigmaMinor->updateValue();
994  myJMTimeGapMinor->updateValue();
995  myJMImpatience->updateValue();
996  // LCM Attributes
997  myLCAStrategicParam->updateValue();
998  myLCACooperativeParam->updateValue();
999  myLCASpeedgainParam->updateValue();
1000  myLCAKeeprightParam->updateValue();
1001  myLCASublaneParam->updateValue();
1002  myLCAOppositeParam->updateValue();
1003  myLCAPushy->updateValue();
1004  myLCAPushygap->updateValue();
1005  myLCAAssertive->updateValue();
1006  myLCAImpatience->updateValue();
1007  myLCATimeToImpatience->updateValue();
1008  myLCAAccelLat->updateValue();
1009  myLCALookAheadLeft->updateValue();
1010  myLCASpeedGainRight->updateValue();
1011  myLCAMaxSpeedLatStanding->updateValue();
1012  myLCAMaxSpeedLatFactor->updateValue();
1013  myLCATurnAlignmentDistance->updateValue();
1014  myLCAOvertakeRight->updateValue();
1015  /* myLCAExperimental->updateValue(); */
1016 }
1017 
1018 
1019 long
1021  // At start we assumed, that all values are valid
1022  myVehicleTypeDialog->myVehicleTypeValid = true;
1023  myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_NOTHING;
1024  // set color of myTextFieldVehicleTypeID, depending if current value is valid or not
1025  if (myVehicleTypeDialog->myEditedDemandElement->isValid(SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text())) {
1026  myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0));
1027  myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
1028  } else if (myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_ID) == myTextFieldVehicleTypeID->getText().text()) {
1029  myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0));
1030  myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_ID, myTextFieldVehicleTypeID->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
1031  } else {
1032  myTextFieldVehicleTypeID->setTextColor(FXRGB(255, 0, 0));
1033  myVehicleTypeDialog->myVehicleTypeValid = false;
1034  myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_ID;
1035  }
1036  // set variables of special rows VClass and VShape
1037  SUMOVTypeParameter::VClassDefaultValues defaultVTypeParameters(myVClassRow->setVariable());
1038  // set variables of special rows VShape
1039  myVShapeRow->setVariable();
1040  // set attributes in rest rows
1041  myColor->setVariable();
1042  myLength->setVariable(toString(defaultVTypeParameters.length));
1043  myMinGap->setVariable(toString(defaultVTypeParameters.minGap));
1044  myMaxSpeed->setVariable(toString(defaultVTypeParameters.maxSpeed));
1045  mySpeedFactor->setVariable(toString(defaultVTypeParameters.speedFactor.getParameter()[0]));
1046  mySpeedDev->setVariable(toString(defaultVTypeParameters.speedFactor.getParameter()[1]));
1047  myEmissionClass->setVariable(toString(defaultVTypeParameters.emissionClass));
1048  myWidth->setVariable(toString(defaultVTypeParameters.width));
1049  myHeight->setVariable(toString(defaultVTypeParameters.height));
1050  myOSGFile->setVariable(toString(defaultVTypeParameters.osgFile));
1051  // set attributes in rows
1052  myLaneChangeModel->setVariable();
1053  myLatAlignment->setVariable();
1054  myLength->setVariable(toString(defaultVTypeParameters.length));
1055  myMinGap->setVariable(toString(defaultVTypeParameters.minGap));
1056  myMaxSpeed->setVariable(toString(defaultVTypeParameters.maxSpeed));
1057  mySpeedFactor->setVariable(toString(defaultVTypeParameters.speedFactor.getParameter()[0]));
1058  mySpeedDev->setVariable(toString(defaultVTypeParameters.speedFactor.getParameter()[1]));
1059  myEmissionClass->setVariable(toString(defaultVTypeParameters.emissionClass));
1060  myWidth->setVariable(toString(defaultVTypeParameters.width));
1061  myHeight->setVariable(toString(defaultVTypeParameters.height));
1062  myFilename->setVariable();
1063  myOSGFile->setVariable(toString(defaultVTypeParameters.osgFile));
1064  myPersonCapacity->setVariable(toString(defaultVTypeParameters.personCapacity));
1065  myContainerCapacity->setVariable(toString(defaultVTypeParameters.containerCapacity));
1066  myCarriageLength->setVariable(toString(defaultVTypeParameters.carriageLength));
1067  myLocomotiveLength->setVariable(toString(defaultVTypeParameters.locomotiveLength));
1068  myBoardingDuration->setVariable();
1069  myLoadingDuration->setVariable();
1070  myMinGapLat->setVariable();
1071  myMaxSpeedLat->setVariable();
1072  myActionStepLenght->setVariable();
1073  myHasDriveState->setVariable();
1074  myProbability->setVariable();
1075  myCarriageGap->setVariable();
1076  // JM Variables
1077  myJMCrossingGap->setVariable();
1078  myJMIgnoreKeepclearTime->setVariable();
1079  myJMDriveAfterYellowTime->setVariable();
1080  myJMDriveAfterRedTime->setVariable();
1081  myJMDriveRedSpeed->setVariable();
1082  myJMIgnoreFoeProb->setVariable();
1083  myJMIgnoreFoeSpeed->setVariable();
1084  myJMSigmaMinor->setVariable();
1085  myJMTimeGapMinor->setVariable();
1086  myJMImpatience->setVariable();
1087  // LCM Attributes
1088  myLCAStrategicParam->setVariable();
1089  myLCACooperativeParam->setVariable();
1090  myLCASpeedgainParam->setVariable();
1091  myLCAKeeprightParam->setVariable();
1092  myLCASublaneParam->setVariable();
1093  myLCAOppositeParam->setVariable();
1094  myLCAPushy->setVariable();
1095  myLCAPushygap->setVariable();
1096  myLCAAssertive->setVariable();
1097  myLCAImpatience->setVariable();
1098  myLCATimeToImpatience->setVariable();
1099  myLCAAccelLat->setVariable();
1100  myLCALookAheadLeft->setVariable();
1101  myLCASpeedGainRight->setVariable();
1102  myLCAMaxSpeedLatStanding->setVariable();
1103  myLCAMaxSpeedLatFactor->setVariable();
1104  myLCATurnAlignmentDistance->setVariable();
1105  myLCAOvertakeRight->setVariable();
1106  /* myLCAExperimental->setVariable(); */
1107  return true;
1108 }
1109 
1110 
1111 long
1113  // check what dialog has to be opened
1114  if (obj == myColor->getButton()) {
1115  myColor->openColorDialog();
1116  } else if (obj == myFilename->getButton()) {
1117  myFilename->openImageFileDialog();
1118  } else if (obj == myOSGFile->getButton()) {
1119  myFilename->openOSGFileDialog();
1120  }
1121  return 1;
1122 }
1123 
1124 // ---------------------------------------------------------------------------
1125 // GNEVehicleTypeDialog::VShapeRow - methods
1126 // ---------------------------------------------------------------------------
1127 
1129  FXGroupBox(column, "Car Following Model attributes", GUIDesignGroupBoxFrame),
1130  myVehicleTypeDialog(vehicleTypeDialog) {
1131 
1132  // create vertical frame for rows
1133  myVerticalFrameRows = new FXVerticalFrame(this, GUIDesignAuxiliarFrame);
1134 
1135  // declare combo box
1136  FXHorizontalFrame* row = new FXHorizontalFrame(myVerticalFrameRows, GUIDesignAuxiliarHorizontalFrame);
1137  new FXLabel(row, "Algorithm", nullptr, GUIDesignLabelAttribute150);
1139 
1140  // fill combo Box with all Car following models
1141  std::vector<std::string> CFModels = SUMOXMLDefinitions::CarFollowModels.getStrings();
1142  for (auto i : CFModels) {
1143  myComboBoxCarFollowModel->appendItem(i.c_str());
1144  }
1145  myComboBoxCarFollowModel->setNumVisible(10);
1146 
1147  // 01 create FX and Label for Accel
1149  myRows.push_back(myAccelRow);
1150 
1151  // 02 create FX and Label for Decel
1153  myRows.push_back(myDecelRow);
1154 
1155  // 03 create FX and Label for Apparent decel
1157  myRows.push_back(myApparentDecelRow);
1158 
1159  // 04 create FX and Label for emergency decel
1161  myRows.push_back(myEmergencyDecelRow);
1162 
1163  // 05 create FX and Label for Sigma
1165  myRows.push_back(mySigmaRow);
1166 
1167  // 06 create FX and Label for Tau
1169  myRows.push_back(myTauRow);
1170 
1171  // 07 myMinGapFactor FX and Label for MinGapFactor
1173  myRows.push_back(myMinGapFactorRow);
1174 
1175  // 08 create FX and Label for K
1177  myRows.push_back(myKRow);
1178 
1179  // 09 create FX and Label for PHI
1181  myRows.push_back(myPhiRow);
1182 
1183  // 10 create FX and Label for Deleta
1185  myRows.push_back(myDeltaRow);
1186 
1187  // 11 create FX and Label for Stepping
1189  myRows.push_back(mySteppingRow);
1190 
1191  // 12 create FX and Label for Security
1193  myRows.push_back(mySecurityRow);
1194 
1195  // 13 create FX and Label for Estimation
1197  myRows.push_back(myEstimationRow);
1198 
1199  // 14 create FX and Label for TMP1
1201  myRows.push_back(myTmp1Row);
1202 
1203  // 15 create FX and Label for TMP2
1205  myRows.push_back(myTmp2Row);
1206 
1207  // 16 create FX and Label for TMP3
1209  myRows.push_back(myTmp3Row);
1210 
1211  // 17 create FX and Label for TMP4
1213  myRows.push_back(myTmp4Row);
1214 
1215  // 18 create FX and Label for TMP5
1217  myRows.push_back(myTmp5Row);
1218 
1219  // 19 create FX and Label for trainType (allow strings)
1221  myRows.push_back(myTrainTypeRow);
1222 
1223  // 20 create FX and Label for Tau Last
1225  myRows.push_back(myTrauLastRow);
1226 
1227  // 21 create FX and Label for Aprob
1229  myRows.push_back(myAprobRow);
1230 
1231  // 22 create FX and Label for Adapt Factor
1233  myRows.push_back(myAdaptFactorRow);
1234 
1235  // 23 create FX and Label for Adapt Time
1237  myRows.push_back(myAdaptTimeRow);
1238 
1239  // create myLabelIncompleteAttribute
1240  myLabelIncompleteAttribute = new FXLabel(myVerticalFrameRows, "Some attributes wasn't\nimplemented yet", nullptr, GUIDesignLabelAboutInfoCenter);
1242 
1243  // show or hidde ComboBox depending of current selected CFM
1244  refreshCFMFields();
1245 }
1246 
1247 
1248 void
1250  // start hidding all rows
1251  for (const auto& i : myRows) {
1252  i->hide();
1253  }
1254  // hide myLabelIncompleteAttribute
1255  myLabelIncompleteAttribute->hide();
1256  // show textfield depending of current CFM
1257  if (SUMOXMLDefinitions::CarFollowModels.hasString(myComboBoxCarFollowModel->getText().text())) {
1258  // show textfield depending of selected CFM
1259  switch (SUMOXMLDefinitions::CarFollowModels.get(myComboBoxCarFollowModel->getText().text())) {
1260  case SUMO_TAG_CF_KRAUSS:
1263  myTauRow->show();
1264  myAccelRow->show();
1265  myDecelRow->show();
1266  myApparentDecelRow->show();
1267  myEmergencyDecelRow->show();
1268  mySigmaRow->show();
1269  break;
1270  case SUMO_TAG_CF_KRAUSSX:
1271  myTauRow->show();
1272  myTmp1Row->show();
1273  myTmp2Row->show();
1274  myTmp3Row->show();
1275  myTmp4Row->show();
1276  myTmp5Row->show();
1277  break;
1278  case SUMO_TAG_CF_SMART_SK:
1279  case SUMO_TAG_CF_DANIEL1:
1280  myTauRow->show();
1281  myAccelRow->show();
1282  myDecelRow->show();
1283  myEmergencyDecelRow->show();
1284  mySigmaRow->show();
1285  myMinGapFactorRow->show();
1286  myTmp1Row->show();
1287  myTmp2Row->show();
1288  myTmp3Row->show();
1289  myTmp4Row->show();
1290  myTmp5Row->show();
1291  break;
1293  myTauRow->show();
1294  myAccelRow->show();
1295  myDecelRow->show();
1296  myEmergencyDecelRow->show();
1297  mySigmaRow->show();
1298  myMinGapFactorRow->show();
1299  myTrauLastRow->show();
1300  myAprobRow->show();
1301  break;
1302  case SUMO_TAG_CF_IDM:
1303  myTauRow->show();
1304  myAccelRow->show();
1305  myDecelRow->show();
1306  myEmergencyDecelRow->show();
1307  mySteppingRow->show();
1308  myMinGapFactorRow->show();
1309  break;
1310  case SUMO_TAG_CF_IDMM:
1311  myTauRow->show();
1312  myAccelRow->show();
1313  myDecelRow->show();
1314  myEmergencyDecelRow->show();
1315  mySteppingRow->show();
1316  myMinGapFactorRow->show();
1317  myAdaptFactorRow->show();
1318  myAdaptTimeRow->show();
1319  break;
1320  case SUMO_TAG_CF_BKERNER:
1321  myTauRow->show();
1322  myAccelRow->show();
1323  myDecelRow->show();
1324  myEmergencyDecelRow->show();
1325  myKRow->show();
1326  myPhiRow->show();
1327  myMinGapFactorRow->show();
1328  break;
1329  case SUMO_TAG_CF_WIEDEMANN:
1330  myTauRow->show();
1331  myAccelRow->show();
1332  myDecelRow->show();
1333  myEmergencyDecelRow->show();
1334  myMinGapFactorRow->show();
1335  mySecurityRow->show();
1336  myEstimationRow->show();
1337  break;
1338  case SUMO_TAG_CF_RAIL:
1339  myTauRow->show();
1340  myTrainTypeRow->show();
1341  break;
1342  case SUMO_TAG_CF_ACC:
1343  myTauRow->show();
1344  myAccelRow->show();
1345  myDecelRow->show();
1346  myEmergencyDecelRow->show();
1347  myMinGapFactorRow->show();
1348  // show myLabelIncompleteAttribute
1349  myLabelIncompleteAttribute->show();
1360  break;
1361  case SUMO_TAG_CF_CACC:
1362  myTauRow->show();
1363  myAccelRow->show();
1364  myDecelRow->show();
1365  myEmergencyDecelRow->show();
1366  myMinGapFactorRow->show();
1367  // show myLabelIncompleteAttribute
1368  myLabelIncompleteAttribute->show();
1385  break;
1386  case SUMO_TAG_CF_CC:
1387  myTauRow->show();
1388  myAccelRow->show();
1389  myDecelRow->show();
1390  // show myLabelIncompleteAttribute
1391  myLabelIncompleteAttribute->show();
1413  break;
1414  default:
1415  break;
1416  }
1417  }
1418  myVerticalFrameRows->recalc();
1419  update();
1420 }
1421 
1422 
1423 void
1425  //set values of myEditedDemandElement into fields
1426  if (myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL).empty()) {
1427  myComboBoxCarFollowModel->setCurrentItem(0);
1428  } else {
1429  myComboBoxCarFollowModel->setText(myVehicleTypeDialog->myEditedDemandElement->getAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL).c_str());
1430  }
1431  // refresh fields
1432  refreshCFMFields();
1433  // update value in all Rows
1434  for (const auto& i : myRows) {
1435  i->updateValue();
1436  }
1437 }
1438 
1439 
1440 long
1442  // At start we assumed, that all values are valid
1443  myVehicleTypeDialog->myVehicleTypeValid = true;
1444  myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_NOTHING;
1445  // set color of myTextFieldCarFollowModel, depending if current value is valid or not
1446  if (myVehicleTypeDialog->myEditedDemandElement->isValid(SUMO_ATTR_CAR_FOLLOW_MODEL, myComboBoxCarFollowModel->getText().text())) {
1447  myComboBoxCarFollowModel->setTextColor(FXRGB(0, 0, 0));
1448  myVehicleTypeDialog->myEditedDemandElement->setAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL, myComboBoxCarFollowModel->getText().text(), myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
1449  } else {
1450  myComboBoxCarFollowModel->setTextColor(FXRGB(255, 0, 0));
1451  myVehicleTypeDialog->myVehicleTypeValid = false;
1452  myVehicleTypeDialog->myInvalidAttr = SUMO_ATTR_CAR_FOLLOW_MODEL;
1453  }
1454  // set variable in all Rows
1455  for (const auto& i : myRows) {
1456  i->setVariable();
1457  }
1458  // refresh fields
1459  refreshCFMFields();
1460  return true;
1461 }
1462 
1463 // ---------------------------------------------------------------------------
1464 // GNEVehicleTypeDialog - public methods
1465 // ---------------------------------------------------------------------------
1466 
1467 GNEVehicleTypeDialog::GNEVehicleTypeDialog(GNEDemandElement* editedVehicleType, bool updatingElement) :
1468  GNEDemandElementDialog(editedVehicleType, updatingElement, /*1022*/ /*1322*/ 1372, 575),
1469  myVehicleTypeValid(true),
1471 
1472  // change default header
1473  changeDemandElementDialogHeader(updatingElement ? "Edit " + myEditedDemandElement->getTagStr() : "Create " + myEditedDemandElement->getTagStr());
1474 
1475  // Create auxiliar frames for values
1476  FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignAuxiliarHorizontalFrame);
1477 
1478  // create vehicle type attributes
1479  myVTypeAtributes = new VTypeAtributes(this, columns);
1480 
1481  // create car following model parameters
1483 
1484  // start a undo list for editing local to this additional
1485  initChanges();
1486 
1487  // add element if we aren't updating an existent element
1488  if (myUpdatingElement == false) {
1490  }
1491 
1492  // update values of Vehicle Type common attributes
1494 
1495  // update values of Car Following Model Parameters
1497 
1498  // open as modal dialog
1500 }
1501 
1502 
1504 
1505 
1506 long
1507 GNEVehicleTypeDialog::onCmdAccept(FXObject*, FXSelector, void*) {
1508  if (myVehicleTypeValid == false) {
1509  // write warning if netedit is running in testing mode
1510  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
1511  std::string operation1 = myUpdatingElement ? ("updating") : ("creating");
1512  std::string operation2 = myUpdatingElement ? ("updated") : ("created");
1513  std::string tagString = myEditedDemandElement->getTagStr();
1514  // open warning dialogBox
1515  FXMessageBox::warning(getApp(), MBOX_OK,
1516  ("Error " + operation1 + " " + tagString).c_str(), "%s",
1517  (tagString + " cannot be " + operation2 +
1518  " because parameter " + toString(myInvalidAttr) +
1519  " is invalid.").c_str());
1520  // write warning if netedit is running in testing mode
1521  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
1522  return 0;
1523  } else {
1524  // accept changes before closing dialog
1525  acceptChanges();
1526  // stop dialgo sucesfully
1527  getApp()->stopModal(this, TRUE);
1528  return 1;
1529  }
1530 }
1531 
1532 
1533 long
1534 GNEVehicleTypeDialog::onCmdCancel(FXObject*, FXSelector, void*) {
1535  // cancel changes
1536  cancelChanges();
1537  // Stop Modal
1538  getApp()->stopModal(this, FALSE);
1539  return 1;
1540 }
1541 
1542 
1543 long
1544 GNEVehicleTypeDialog::onCmdReset(FXObject*, FXSelector, void*) {
1545  // reset changes
1546  resetChanges();
1547  // update values of Vehicle Type common attributes
1549  // update values of Car Following Model Parameters
1551  return 1;
1552 }
1553 
1554 // ---------------------------------------------------------------------------
1555 // GNEVehicleTypeDialog - private methods
1556 // ---------------------------------------------------------------------------
1557 
1558 GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelRow::CarFollowingModelRow(CarFollowingModelParameters* carFollowingModelParametersParent, FXVerticalFrame* verticalFrame, SumoXMLAttr attr, bool allowString) :
1559  FXHorizontalFrame(verticalFrame, GUIDesignAuxiliarHorizontalFrame),
1560  myCarFollowingModelParametersParent(carFollowingModelParametersParent),
1561  myAttr(attr),
1562  myTextField(nullptr) {
1563  new FXLabel(this, toString(attr).c_str(), nullptr, GUIDesignLabelAttribute150);
1564  if (allowString) {
1565  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, carFollowingModelParametersParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180);
1566  } else {
1567  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, carFollowingModelParametersParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Real);
1568  }
1569 }
1570 
1571 
1572 void
1574  // set color of textField, depending if current value is valid or not
1575  if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->isValid(myAttr, myTextField->getText().text())) {
1576  // set color depending if is a default value
1577  if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
1578  myTextField->setTextColor(FXRGB(0, 0, 0));
1579  } else {
1580  myTextField->setTextColor(FXRGB(195, 195, 195));
1581  }
1582  myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->setAttribute(myAttr, myTextField->getText().text(),
1583  myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getViewNet()->getUndoList());
1584  // update value after setting it
1585  updateValue();
1586  } else {
1587  myTextField->setTextColor(FXRGB(255, 0, 0));
1588  // mark VType as invalid
1589  myCarFollowingModelParametersParent->myVehicleTypeDialog->myVehicleTypeValid = false;
1590  myCarFollowingModelParametersParent->myVehicleTypeDialog->myInvalidAttr = myAttr;
1591  }
1592 }
1593 
1594 
1595 void
1597  // set text of myTextField using current value of VType
1598  myTextField->setText(myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getAttribute(myAttr).c_str());
1599  // set color depending if is a default value
1600  if (myCarFollowingModelParametersParent->myVehicleTypeDialog->myEditedDemandElement->getTagProperty().getDefaultValue(myAttr) != myTextField->getText().text()) {
1601  myTextField->setTextColor(FXRGB(0, 0, 0));
1602  } else {
1603  myTextField->setTextColor(FXRGB(195, 195, 195));
1604  }
1605 }
1606 
1607 /****************************************************************************/
GNEVehicleTypeDialog::VTypeAtributes::updateValues
void updateValues()
update values
Definition: GNEVehicleTypeDialog.cpp:953
GNEVehicleTypeDialog::VTypeAtributes::VClassRow::myComboBoxVClass
FXComboBox * myComboBoxVClass
FXComboBox for VClass.
Definition: GNEVehicleTypeDialog.h:72
SVC_RAIL_FAST
vehicle that is allowed to drive on high-speed rail tracks
Definition: SUMOVehicleClass.h:193
GNEVehicleTypeDialog::VTypeAtributes::buildLaneChangeModelAttributes
void buildLaneChangeModelAttributes(FXVerticalFrame *column)
build LaneChangeModel attributes
Definition: GNEVehicleTypeDialog.cpp:892
SUMO_ATTR_MAXSPEED
Definition: SUMOXMLDefinitions.h:442
GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelRow::setVariable
void setVariable()
set Variablen in VehicleType
Definition: GNEVehicleTypeDialog.cpp:1573
GNEVehicleTypeDialog::VTypeAtributes::myVehicleTypeDialog
GNEVehicleTypeDialog * myVehicleTypeDialog
VTypeAttributeRow for experimental.
Definition: GNEVehicleTypeDialog.h:397
SUMO_ATTR_OSGFILE
Definition: SUMOXMLDefinitions.h:788
GUIDesignLabelAboutInfoCenter
#define GUIDesignLabelAboutInfoCenter
label extended over frame with thick and with text justify to center
Definition: GUIDesigns.h:195
SUMO_ATTR_BOARDING_DURATION
Definition: SUMOXMLDefinitions.h:462
GUIDesignAuxiliarHorizontalFrame
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:289
ICON_VSHAPE_E_VEHICLE
Definition: GUIIcons.h:367
SUMO_ATTR_LCA_SPEEDGAIN_PARAM
Definition: SUMOXMLDefinitions.h:590
SVC_PEDESTRIAN
pedestrian
Definition: SUMOVehicleClass.h:157
GNEVehicleTypeDialog::CarFollowingModelParameters::myDeltaRow
CarFollowingModelRow * myDeltaRow
Row for MinGap (only for IDM)
Definition: GNEVehicleTypeDialog.h:489
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:134
SUMOXMLDefinitions::LaneChangeModels
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
Definition: SUMOXMLDefinitions.h:1390
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::updateValue
void updateValue()
update value of Vehicle Type (using default value obtained from GNEAttributeCarrier)
Definition: GNEVehicleTypeDialog.cpp:518
SUMO_ATTR_CF_WIEDEMANN_ESTIMATION
Definition: SUMOXMLDefinitions.h:839
ICON_VCLASS_EVEHICLE
Definition: GUIIcons.h:339
GNEDemandElementDialog::acceptChanges
void acceptChanges()
Accept changes did in this dialog.
Definition: GNEDemandElementDialog.cpp:125
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:54
GNEVehicleTypeDialog::VTypeAtributes::VClassRow::setVariable
SUMOVehicleClass setVariable()
set vehicle class
Definition: GNEVehicleTypeDialog.cpp:86
GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelParameters
CarFollowingModelParameters()
fox need this
Definition: GNEVehicleTypeDialog.h:423
SVC_E_VEHICLE
is an electric vehicle
Definition: SUMOVehicleClass.h:182
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::ROWTYPE_COMBOBOX
Definition: GNEVehicleTypeDialog.h:120
ICON_VCLASS_TRAILER
Definition: GUIIcons.h:330
GUIDesignLabelAttribute150
#define GUIDesignLabelAttribute150
label extended over the matrix column with thick frame and height of 23
Definition: GUIDesigns.h:189
GUIDesignTextFieldNCol
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:58
GNEVehicleTypeDialog::onCmdReset
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
Definition: GNEVehicleTypeDialog.cpp:1544
GNEChange_DemandElement
Definition: GNEChange_DemandElement.h:46
GNEVehicleTypeDialog::VTypeAtributes::VClassRow::setVClassLabelImage
void setVClassLabelImage()
set VClass texture
Definition: GNEVehicleTypeDialog.cpp:159
SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME
Definition: SUMOXMLDefinitions.h:615
SVC_EMERGENCY
public emergency vehicles
Definition: SUMOVehicleClass.h:144
GNEVehicleTypeDialog::VTypeAtributes::myContainerCapacity
VTypeAttributeRow * myContainerCapacity
VTypeAttributeRow for ContainerCapacity.
Definition: GNEVehicleTypeDialog.h:269
GNEDemandElement::getVClass
virtual SUMOVehicleClass getVClass() const =0
obtain VClass related with this demand element
SUMO_ATTR_IMGFILE
Definition: SUMOXMLDefinitions.h:789
GNEVehicleTypeDialog::CarFollowingModelParameters::myTmp2Row
CarFollowingModelRow * myTmp2Row
Row for TMP2.
Definition: GNEVehicleTypeDialog.h:504
SUMO_ATTR_MINGAP_LAT
Definition: SUMOXMLDefinitions.h:445
GNEVehicleTypeDialog::VTypeAtributes::buildAttributesB
void buildAttributesB(FXVerticalFrame *column)
build commmon attributes (B)
Definition: GNEVehicleTypeDialog.cpp:808
SUMO_ATTR_CF_IDMM_ADAPT_FACTOR
Definition: SUMOXMLDefinitions.h:835
GNEVehicleTypeDialog::CarFollowingModelParameters::myTrauLastRow
CarFollowingModelRow * myTrauLastRow
Row for TauLast.
Definition: GNEVehicleTypeDialog.h:519
SVS_MOTORCYCLE
render as a motorcycle
Definition: SUMOVehicleClass.h:61
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::RowAttrType
RowAttrType
Attribute type.
Definition: GNEVehicleTypeDialog.h:114
GUIDesignTextFielWidth180
#define GUIDesignTextFielWidth180
text field with thick frame, size of 180x23 /doubles (Used in GNEVehicleType)
Definition: GUIDesigns.h:55
GNEVehicleTypeDialog::CarFollowingModelParameters::myAccelRow
CarFollowingModelRow * myAccelRow
Row for Accel.
Definition: GNEVehicleTypeDialog.h:462
SVC_COACH
vehicle is a coach
Definition: SUMOVehicleClass.h:168
GNEVehicleTypeDialog::VTypeAtributes::myCarriageLength
VTypeAttributeRow * myCarriageLength
VTypeAttributeRow for carriage length.
Definition: GNEVehicleTypeDialog.h:254
SUMO_ATTR_LATALIGNMENT
Definition: SUMOXMLDefinitions.h:444
SUMO_ATTR_LENGTH
Definition: SUMOXMLDefinitions.h:394
GNEChange_DemandElement.h
ICON_VSHAPE_POLICE
Definition: GUIIcons.h:372
SUMO_ATTR_LCA_COOPERATIVE_PARAM
Definition: SUMOXMLDefinitions.h:589
SUMO_ATTR_CF_IDM_STEPPING
Definition: SUMOXMLDefinitions.h:834
GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelRow
class used for represent rows with Car Following Model parameters
Definition: GNEVehicleTypeDialog.h:426
SUMO_TAG_CF_KRAUSS_ORIG1
Definition: SUMOXMLDefinitions.h:278
GNEVehicleTypeDialog::CarFollowingModelParameters::myAdaptFactorRow
CarFollowingModelRow * myAdaptFactorRow
Row for Adapt Factor.
Definition: GNEVehicleTypeDialog.h:525
SUMO_ATTR_MAXSPEED_LAT
Definition: SUMOXMLDefinitions.h:443
SVS_BUS_TROLLEY
render as a trolley bus
Definition: SUMOVehicleClass.h:89
ICON_VCLASS_CUSTOM1
Definition: GUIIcons.h:341
RGBColor::BLACK
static const RGBColor BLACK
Definition: RGBColor.h:198
SVC_CUSTOM2
is a user-defined type
Definition: SUMOVehicleClass.h:201
SUMO_ATTR_TMP2
Definition: SUMOXMLDefinitions.h:551
GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::setVShapeLabelImage
void setVShapeLabelImage()
set VShape texture
Definition: GNEVehicleTypeDialog.cpp:302
SUMO_ATTR_SPEEDFACTOR
Definition: SUMOXMLDefinitions.h:456
SUMO_TAG_CF_CACC
Definition: SUMOXMLDefinitions.h:289
GUIDesignTextFielWidth180Real
#define GUIDesignTextFielWidth180Real
text field with thick frame, size of 180x23 and limited to doubles/floats (Used in GNEVehicleType)
Definition: GUIDesigns.h:52
ICON_VSHAPE_PEDESTRIAN
Definition: GUIIcons.h:347
GNEVehicleTypeDialog::VTypeAtributes::myLocomotiveLength
VTypeAttributeRow * myLocomotiveLength
VTypeAttributeRow for locomotive length.
Definition: GNEVehicleTypeDialog.h:257
SUMO_TAG_CF_RAIL
Definition: SUMOXMLDefinitions.h:290
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::openOSGFileDialog
void openOSGFileDialog()
open OSG file dialog
Definition: GNEVehicleTypeDialog.cpp:633
SUMO_ATTR_JM_DRIVE_AFTER_YELLOW_TIME
Definition: SUMOXMLDefinitions.h:612
SUMO_ATTR_TMP1
Definition: SUMOXMLDefinitions.h:550
SUMO_TAG_CF_IDMM
Definition: SUMOXMLDefinitions.h:283
StringBijection::getStrings
std::vector< std::string > getStrings() const
Definition: StringBijection.h:132
ICON_VCLASS_SHIP
Definition: GUIIcons.h:340
SUMO_ATTR_CF_PWAGNER2009_APPROB
Definition: SUMOXMLDefinitions.h:832
ICON_VCLASS_RAIL
Definition: GUIIcons.h:333
GUIDesignComboBoxNCol
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:233
GNEVehicleTypeDialog::CarFollowingModelParameters::myTmp5Row
CarFollowingModelRow * myTmp5Row
Row for TMP5.
Definition: GNEVehicleTypeDialog.h:513
SUMO_ATTR_LOADING_DURATION
Definition: SUMOXMLDefinitions.h:463
SUMO_TAG_CF_KRAUSS
Definition: SUMOXMLDefinitions.h:276
SVS_TRUCK
render as a transport vehicle
Definition: SUMOVehicleClass.h:77
SUMO_ATTR_COLOR
A color information.
Definition: SUMOXMLDefinitions.h:701
SVC_BICYCLE
vehicle is a bicycle
Definition: SUMOVehicleClass.h:180
GNEVehicleTypeDialog::CarFollowingModelParameters::myTrainTypeRow
CarFollowingModelRow * myTrainTypeRow
Row for TrainType.
Definition: GNEVehicleTypeDialog.h:516
SVC_DELIVERY
vehicle is a small delivery vehicle
Definition: SUMOVehicleClass.h:170
GNEVehicleTypeDialog::CarFollowingModelParameters::myComboBoxCarFollowModel
FXComboBox * myComboBoxCarFollowModel
Row for CarFollowModel.
Definition: GNEVehicleTypeDialog.h:456
GNEVehicleTypeDialog::CarFollowingModelParameters::myEmergencyDecelRow
CarFollowingModelRow * myEmergencyDecelRow
Row for emergency Decel.
Definition: GNEVehicleTypeDialog.h:471
ICON_VCLASS_BUS
Definition: GUIIcons.h:326
SUMO_ATTR_CONTAINER_CAPACITY
Definition: SUMOXMLDefinitions.h:648
GNEVehicleTypeDialog::CarFollowingModelParameters::myTmp4Row
CarFollowingModelRow * myTmp4Row
Row for TMP4.
Definition: GNEVehicleTypeDialog.h:510
GNEVehicleTypeDialog::VTypeAtributes::VTypeAtributes
VTypeAtributes()
fox need this
Definition: GNEVehicleTypeDialog.h:206
SUMO_ATTR_SPEEDDEV
Definition: SUMOXMLDefinitions.h:457
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:379
GNEVehicleTypeDialog::CarFollowingModelParameters::updateValues
void updateValues()
update values
Definition: GNEVehicleTypeDialog.cpp:1424
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::filterAttributeName
FXString filterAttributeName(const SumoXMLAttr attr) const
filter attribute name
Definition: GNEVehicleTypeDialog.cpp:660
GNEDemandElement::getViewNet
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which demand element element is located.
Definition: GNEDemandElement.cpp:408
ICON_VCLASS_VIP
Definition: GUIIcons.h:322
FXDEFMAP
FXDEFMAP(GNEVehicleTypeDialog::VTypeAtributes) VTypeAtributesMap[]
GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::VShapeRow
VShapeRow(VTypeAtributes *VTypeAtributesParent, FXVerticalFrame *column)
constructor
Definition: GNEVehicleTypeDialog.cpp:255
GUIDesigns.h
SUMO_ATTR_CF_IDM_DELTA
Definition: SUMOXMLDefinitions.h:833
GNEDemandElement::isValid
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
MID_GNE_SET_ATTRIBUTE
attribute edited
Definition: GUIAppEnum.h:619
SUMO_ATTR_LCA_MAXSPEEDLATFACTOR
Definition: SUMOXMLDefinitions.h:603
SUMO_ATTR_LCA_KEEPRIGHT_PARAM
Definition: SUMOXMLDefinitions.h:591
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:602
GNEVehicleTypeDialog::CarFollowingModelParameters::mySigmaRow
CarFollowingModelRow * mySigmaRow
Row for Sigma.
Definition: GNEVehicleTypeDialog.h:474
SUMO_ATTR_LANE_CHANGE_MODEL
Definition: SUMOXMLDefinitions.h:458
ICON_VSHAPE_ANT
Definition: GUIIcons.h:368
SUMO_ATTR_TMP5
Definition: SUMOXMLDefinitions.h:554
GNEVehicleTypeDialog::VTypeAtributes::myOSGFile
VTypeAttributeRow * myOSGFile
VTypeAttributeRow for OSG.
Definition: GNEVehicleTypeDialog.h:251
SUMO_ATTR_TMP3
Definition: SUMOXMLDefinitions.h:552
SVC_RAIL
vehicle is a not electrified rail
Definition: SUMOVehicleClass.h:189
GNEVehicleTypeDialog::CarFollowingModelParameters::myKRow
CarFollowingModelRow * myKRow
Row for MinGap (only for Kerner)
Definition: GNEVehicleTypeDialog.h:483
SVC_RAIL_URBAN
vehicle is a city rail
Definition: SUMOVehicleClass.h:187
ICON_VSHAPE_TRUCK_1TRAILER
Definition: GUIIcons.h:359
GNEDemandElementDialog::cancelChanges
void cancelChanges()
Cancel changes did in this dialog.
Definition: GNEDemandElementDialog.cpp:136
SVC_AUTHORITY
authorities vehicles
Definition: SUMOVehicleClass.h:146
SUMO_ATTR_JM_IGNORE_FOE_PROB
Definition: SUMOXMLDefinitions.h:617
GNEVehicleTypeDialog::VTypeAtributes::myHeight
VTypeAttributeRow * myHeight
VTypeAttributeRow for Height.
Definition: GNEVehicleTypeDialog.h:245
SUMO_ATTR_JM_TIMEGAP_MINOR
Definition: SUMOXMLDefinitions.h:619
ICON_VSHAPE_BUS
Definition: GUIIcons.h:360
GNEVehicleTypeDialog::myVTypeAtributes
VTypeAtributes * myVTypeAtributes
Vehicle Type Common Attributes.
Definition: GNEVehicleTypeDialog.h:563
SUMO_TAG_CF_IDM
Definition: SUMOXMLDefinitions.h:282
ICON_VSHAPE_MOTORCYCLE
Definition: GUIIcons.h:350
SVS_BUS_FLEXIBLE
render as a flexible city bus
Definition: SUMOVehicleClass.h:87
SUMO_ATTR_HASDRIVERSTATE
Definition: SUMOXMLDefinitions.h:450
SUMO_TAG_CF_KRAUSSX
Definition: SUMOXMLDefinitions.h:279
GNEVehicleTypeDialog::CarFollowingModelParameters::myPhiRow
CarFollowingModelRow * myPhiRow
Row for MinGap (only for Kerner)
Definition: GNEVehicleTypeDialog.h:486
MFXUtils::getRGBColor
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:108
SVS_PASSENGER_SEDAN
render as a sedan passenger vehicle ("Stufenheck")
Definition: SUMOVehicleClass.h:65
SumoVehicleClassStrings
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
SUMO_ATTR_JM_IGNORE_FOE_SPEED
Definition: SUMOXMLDefinitions.h:616
GUIAppEnum.h
SVC_PRIVATE
private vehicles
Definition: SUMOVehicleClass.h:142
ICON_VSHAPE_RAIL
Definition: GUIIcons.h:364
ICON_VSHAPE_BICYCLE
Definition: GUIIcons.h:348
GNEVehicleTypeDialog::VTypeAtributes::mySpeedDev
VTypeAttributeRow * mySpeedDev
VTypeAttributeRow for SpeedDev.
Definition: GNEVehicleTypeDialog.h:233
ICON_VCLASS_TRUCK
Definition: GUIIcons.h:329
SVS_UNKNOWN
not defined
Definition: SUMOVehicleClass.h:53
GNEVehicleTypeDialog::CarFollowingModelParameters::myTauRow
CarFollowingModelRow * myTauRow
Row for Tau.
Definition: GNEVehicleTypeDialog.h:477
SUMO_TAG_CF_CC
Definition: SUMOXMLDefinitions.h:291
SUMOXMLDefinitions::CarFollowModels
static StringBijection< SumoXMLTag > CarFollowModels
car following models
Definition: SUMOXMLDefinitions.h:1393
GNEVehicleTypeDialog::CarFollowingModelParameters::mySteppingRow
CarFollowingModelRow * mySteppingRow
Row for MinGap(only for IDM)
Definition: GNEVehicleTypeDialog.h:492
SUMO_ATTR_LCA_PUSHYGAP
Definition: SUMOXMLDefinitions.h:595
GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::setVariable
void setVariable()
set variables
Definition: GNEVehicleTypeDialog.cpp:279
SUMO_ATTR_LCA_MAXSPEEDLATSTANDING
Definition: SUMOXMLDefinitions.h:602
SVS_BICYCLE
render as a bicycle
Definition: SUMOVehicleClass.h:57
GNEVehicleTypeDialog::VTypeAtributes::VShapeRow
class for VShapeRow
Definition: GNEVehicleTypeDialog.h:82
SVC_TRAM
vehicle is a light rail
Definition: SUMOVehicleClass.h:185
ICON_VCLASS_EMERGENCY
Definition: GUIIcons.h:319
GNEVehicleTypeDialog::~GNEVehicleTypeDialog
~GNEVehicleTypeDialog()
destructor
Definition: GNEVehicleTypeDialog.cpp:1503
SUMO_ATTR_LCA_SUBLANE_PARAM
Definition: SUMOXMLDefinitions.h:592
ICON_VCLASS_DELIVERY
Definition: GUIIcons.h:328
ICON_VSHAPE_RAIL_CAR
Definition: GUIIcons.h:365
ICON_VSHAPE_BUS_COACH
Definition: GUIIcons.h:361
SVS_DELIVERY
automated car (with cruise controllers)
Definition: SUMOVehicleClass.h:75
GNEVehicleTypeDialog.h
SUMO_ATTR_APPARENTDECEL
Definition: SUMOXMLDefinitions.h:449
GNEVehicleTypeDialog::CarFollowingModelParameters::onCmdSetVariable
long onCmdSetVariable(FXObject *, FXSelector, void *)
Definition: GNEVehicleTypeDialog.cpp:1441
ICON_VCLASS_ARMY
Definition: GUIIcons.h:321
SUMO_ATTR_PROB
Definition: SUMOXMLDefinitions.h:627
GNEVehicleTypeDialog::CarFollowingModelParameters::myLabelIncompleteAttribute
FXLabel * myLabelIncompleteAttribute
temporal label for incomplete attributes
Definition: GNEVehicleTypeDialog.h:531
GNEDemandElementDialog
Dialog to edit sequences, parameters, etc.. of DemandElements.
Definition: GNEDemandElementDialog.h:45
SUMO_ATTR_DECEL
Definition: SUMOXMLDefinitions.h:447
SVC_TRUCK
vehicle is a large transport vehicle
Definition: SUMOVehicleClass.h:172
SUMO_ATTR_COLLISION_MINGAP_FACTOR
Definition: SUMOXMLDefinitions.h:461
SVC_CUSTOM1
is a user-defined type
Definition: SUMOVehicleClass.h:199
SUMO_ATTR_ACCEL
Definition: SUMOXMLDefinitions.h:446
SVC_ARMY
army vehicles
Definition: SUMOVehicleClass.h:148
SVS_BUS
render as a bus
Definition: SUMOVehicleClass.h:83
ICON_VCLASS_IGNORING
Definition: GUIIcons.h:317
SUMO_TAG_CF_ACC
Definition: SUMOXMLDefinitions.h:288
GNEVehicleTypeDialog::GNEVehicleTypeDialog
GNEVehicleTypeDialog(GNEDemandElement *editedVehicleType, bool updatingElement)
constructor
Definition: GNEVehicleTypeDialog.cpp:1467
PollutantsInterface.h
SUMO_ATTR_LCA_OPPOSITE_PARAM
Definition: SUMOXMLDefinitions.h:593
ICON_VSHAPE_MOPED
Definition: GUIIcons.h:349
GNEDemandElement::getAttribute
virtual std::string getAttribute(SumoXMLAttr key) const =0
GNEVehicleTypeDialog::CarFollowingModelParameters::myMinGapFactorRow
CarFollowingModelRow * myMinGapFactorRow
Row for MinGapFactor.
Definition: GNEVehicleTypeDialog.h:480
GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelRow::myTextField
FXTextField * myTextField
text field
Definition: GNEVehicleTypeDialog.h:445
GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelRow::updateValue
void updateValue()
update value of Vehicle Type
Definition: GNEVehicleTypeDialog.cpp:1596
GUIDesignAuxiliarVerticalFrame
#define GUIDesignAuxiliarVerticalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:292
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::ROWTYPE_COLOR
Definition: GNEVehicleTypeDialog.h:118
SVC_HOV
vehicle is a HOV
Definition: SUMOVehicleClass.h:162
SUMO_ATTR_NOTHING
invalid attribute
Definition: SUMOXMLDefinitions.h:375
GNEViewNet.h
RGBColor::parseColor
static RGBColor parseColor(std::string coldef)
Parses a color information.
Definition: RGBColor.cpp:177
SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
Definition: SUMOVehicleClass.h:160
SUMO_ATTR_LCA_SPEEDGAINRIGHT
Definition: SUMOXMLDefinitions.h:601
SUMO_ATTR_WIDTH
Definition: SUMOXMLDefinitions.h:387
update
ICON_VSHAPE_SHIP
Definition: GUIIcons.h:369
GNEDemandElementDialog::myContentFrame
FXVerticalFrame * myContentFrame
frame for contents
Definition: GNEDemandElementDialog.h:89
GNEVehicleTypeDialog::VTypeAtributes
class for VClasses
Definition: GNEVehicleTypeDialog.h:49
SVC_RAIL_ELECTRIC
rail vehicle that requires electrified tracks
Definition: SUMOVehicleClass.h:191
SUMO_ATTR_JM_DRIVE_RED_SPEED
Definition: SUMOXMLDefinitions.h:614
GNEVehicleTypeDialog::VTypeAtributes::myWidth
VTypeAttributeRow * myWidth
VTypeAttributeRow for Width.
Definition: GNEVehicleTypeDialog.h:242
GNEVehicleTypeDialog::VTypeAtributes::VClassRow::myVTypeAtributesParent
VTypeAtributes * myVTypeAtributesParent
pointer to VTypeAtributes parent
Definition: GNEVehicleTypeDialog.h:69
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::setVariable
void setVariable()
set Variablen in VehicleType (using default value obtained from GNEAttributeCarrier)
Definition: GNEVehicleTypeDialog.cpp:439
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::ROWTYPE_STRING
Definition: GNEVehicleTypeDialog.h:117
SVS_RAIL_CARGO
render as a cargo train
Definition: SUMOVehicleClass.h:95
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::VTypeAttributeRow
VTypeAttributeRow(VTypeAtributes *VTypeAtributesParent, FXVerticalFrame *verticalFrame, const SumoXMLAttr attr, const RowAttrType rowAttrType, const std::vector< std::string > &values={})
constructor
Definition: GNEVehicleTypeDialog.cpp:397
ProcessError
Definition: UtilExceptions.h:40
SUMO_ATTR_PERSON_CAPACITY
Definition: SUMOXMLDefinitions.h:647
SVS_PASSENGER_HATCHBACK
render as a hatchback passenger vehicle ("Fliessheck")
Definition: SUMOVehicleClass.h:67
GNEVehicleTypeDialog::VTypeAtributes::myMaxSpeed
VTypeAttributeRow * myMaxSpeed
VTypeAttributeRow for MaxSpeed.
Definition: GNEVehicleTypeDialog.h:227
SUMO_TAG_CF_KRAUSS_PLUS_SLOPE
Definition: SUMOXMLDefinitions.h:277
ICON_VSHAPE_UNKNOWN
Definition: GUIIcons.h:374
SUMO_ATTR_LCA_LOOKAHEADLEFT
Definition: SUMOXMLDefinitions.h:600
GNEVehicleTypeDialog::VTypeAtributes::buildJunctionModelAttributesB
void buildJunctionModelAttributesB(FXVerticalFrame *column)
build JunctionModel attributes (B)
Definition: GNEVehicleTypeDialog.cpp:873
ICON_VSHAPE_EMERGENCY
Definition: GUIIcons.h:370
ICON_VCLASS_MOTORCYCLE
Definition: GUIIcons.h:335
GNEDemandElementDialog::initChanges
void initChanges()
init a new group of changes that will be do it in dialog
Definition: GNEDemandElementDialog.cpp:116
GNEVehicleTypeDialog::VTypeAtributes::buildAttributesA
void buildAttributesA(FXVerticalFrame *column)
build commmon attributes (A)
Definition: GNEVehicleTypeDialog.cpp:760
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::myButton
FXButton * myButton
button
Definition: GNEVehicleTypeDialog.h:161
SUMO_ATTR_LCA_OVERTAKE_RIGHT
Definition: SUMOXMLDefinitions.h:605
SVS_MOPED
render as a moped
Definition: SUMOVehicleClass.h:59
ICON_VSHAPE_TRUCK
Definition: GUIIcons.h:357
GNEViewNet::getUndoList
GNEUndoList * getUndoList() const
get the undoList object
Definition: GNEViewNet.cpp:933
ICON_VCLASS_COACH
Definition: GUIIcons.h:327
SUMO_ATTR_LCA_STRATEGIC_PARAM
Definition: SUMOXMLDefinitions.h:588
GNEDemandElementDialog::myUpdatingElement
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog)
Definition: GNEDemandElementDialog.h:86
GUIDesignGroupBoxFrame
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:255
SUMO_ATTR_JM_SIGMA_MINOR
Definition: SUMOXMLDefinitions.h:618
GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::myComboBoxShape
FXComboBox * myComboBoxShape
FXComboBox for Shape.
Definition: GNEVehicleTypeDialog.h:99
GNEVehicleTypeDialog::onCmdCancel
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
Definition: GNEVehicleTypeDialog.cpp:1534
SVS_POLICE
render as a police car
Definition: SUMOVehicleClass.h:107
GUIDesignComboBoxWidth180
#define GUIDesignComboBoxWidth180
comboBox with thick frame, size of 180x23 /doubles (Used in GNEVehicleType)
Definition: GUIDesigns.h:230
GNEVehicleTypeDialog::CarFollowingModelParameters::myTmp3Row
CarFollowingModelRow * myTmp3Row
Row for TMP3.
Definition: GNEVehicleTypeDialog.h:507
GNEVehicleTypeDialog::myVehicleTypeValid
bool myVehicleTypeValid
flag to check if current vehicleType is valid
Definition: GNEVehicleTypeDialog.h:557
GNEVehicleTypeDialog::VTypeAtributes::myPersonCapacity
VTypeAttributeRow * myPersonCapacity
VTypeAttributeRow for PersonCapacity.
Definition: GNEVehicleTypeDialog.h:266
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::ROWTYPE_REAL
Definition: GNEVehicleTypeDialog.h:116
GNEDemandElementDialog::myEditedDemandElement
GNEDemandElement * myEditedDemandElement
pointer to edited aditional
Definition: GNEDemandElementDialog.h:83
SUMO_TAG_CF_PWAGNER2009
Definition: SUMOXMLDefinitions.h:284
GNEVehicleTypeDialog::VTypeAtributes::myLength
VTypeAttributeRow * myLength
VTypeAttributeRow for Length.
Definition: GNEVehicleTypeDialog.h:221
gCurrentFolder
FXString gCurrentFolder
The folder used as last.
Definition: GUIIOGlobals.cpp:33
ICON_VCLASS_BICYCLE
Definition: GUIIcons.h:337
ICON_VCLASS_HOV
Definition: GUIIcons.h:324
SVC_VIP
vip vehicles
Definition: SUMOVehicleClass.h:150
SVC_SHIP
is an arbitrary ship
Definition: SUMOVehicleClass.h:196
SUMO_ATTR_LCA_IMPATIENCE
Definition: SUMOXMLDefinitions.h:597
GNEVehicleTypeDialog::CarFollowingModelParameters::myEstimationRow
CarFollowingModelRow * myEstimationRow
Row for Estimation (only for Wiedemann)
Definition: GNEVehicleTypeDialog.h:498
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::getButton
const FXButton * getButton() const
get button
Definition: GNEVehicleTypeDialog.cpp:575
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::openImageFileDialog
void openImageFileDialog()
open image file dialog
Definition: GNEVehicleTypeDialog.cpp:606
SVS_RAIL_CAR
render as a (city) rail without locomotive
Definition: SUMOVehicleClass.h:93
ICON_VTYPE
Definition: GUIIcons.h:293
SUMO_ATTR_LCA_ASSERTIVE
Definition: SUMOXMLDefinitions.h:596
SUMO_ATTR_CF_WIEDEMANN_SECURITY
Definition: SUMOXMLDefinitions.h:838
GNEVehicleTypeDialog::CarFollowingModelParameters::refreshCFMFields
void refreshCFMFields()
refresh Car Following Model Fields
Definition: GNEVehicleTypeDialog.cpp:1249
SUMO_ATTR_CARRIAGE_GAP
Definition: SUMOXMLDefinitions.h:1011
SVS_PASSENGER_VAN
render as a van
Definition: SUMOVehicleClass.h:71
GNEDemandElement::setAttribute
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform demand element changes
SVS_PEDESTRIAN
render as a pedestrian
Definition: SUMOVehicleClass.h:55
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::openColorDialog
void openColorDialog()
open color dialog
Definition: GNEVehicleTypeDialog.cpp:581
GNEVehicleTypeDialog::myInvalidAttr
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
Definition: GNEVehicleTypeDialog.h:560
ICON_VCLASS_PEDESTRIAN
Definition: GUIIcons.h:338
GNEVehicleTypeDialog::VTypeAtributes::myEmissionClass
VTypeAttributeRow * myEmissionClass
VTypeAttributeRow for EmissionClass.
Definition: GNEVehicleTypeDialog.h:236
SUMO_TAG_CF_WIEDEMANN
Definition: SUMOXMLDefinitions.h:286
ICON_VSHAPE_BUS_TROLLEY
Definition: GUIIcons.h:363
ICON_VCLASS_PASSENGER
Definition: GUIIcons.h:323
SUMO_ATTR_JM_CROSSING_GAP
Definition: SUMOXMLDefinitions.h:611
SumoVehicleShapeStrings
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false)
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::ROWTYPE_FILENAME
Definition: GNEVehicleTypeDialog.h:119
SUMO_ATTR_HEIGHT
Definition: SUMOXMLDefinitions.h:786
GUIDesignLabelTickedIcon180x46
#define GUIDesignLabelTickedIcon180x46
label ticked filled extended over frame used for VClasses/VShapes. (can be used by icons of 64x32 pix...
Definition: GUIDesigns.h:207
ICON_VCLASS_PRIVATE
Definition: GUIIcons.h:318
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
SUMO_ATTR_CF_PWAGNER2009_TAULAST
Definition: SUMOXMLDefinitions.h:831
GNEVehicleTypeDialog::CarFollowingModelParameters::myVerticalFrameRows
FXVerticalFrame * myVerticalFrameRows
Vertical Frame for CarFollowingModelRow.
Definition: GNEVehicleTypeDialog.h:459
GNEVehicleTypeDialog::CarFollowingModelParameters::myRows
std::vector< CarFollowingModelRow * > myRows
vector with the Car Following Model Row
Definition: GNEVehicleTypeDialog.h:453
SUMO_ATTR_TRAIN_TYPE
Definition: SUMOXMLDefinitions.h:583
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::ROWTYPE_INT
Definition: GNEVehicleTypeDialog.h:115
SUMO_ATTR_SIGMA
Definition: SUMOXMLDefinitions.h:548
GNEVehicleTypeDialog::CarFollowingModelParameters::myDecelRow
CarFollowingModelRow * myDecelRow
Row for Decel.
Definition: GNEVehicleTypeDialog.h:465
SVC_MOPED
vehicle is a moped
Definition: SUMOVehicleClass.h:178
ICON_VSHAPE_TRUCK_SEMITRAILER
Definition: GUIIcons.h:358
SUMO_ATTR_CAR_FOLLOW_MODEL
Definition: SUMOXMLDefinitions.h:459
GNEVehicleTypeDialog::CarFollowingModelParameters::myAprobRow
CarFollowingModelRow * myAprobRow
Row for Aprob.
Definition: GNEVehicleTypeDialog.h:522
SUMO_ATTR_IMPATIENCE
Definition: SUMOXMLDefinitions.h:793
GUIDesignButtonRectangular150x23
#define GUIDesignButtonRectangular150x23
button rectangular with thick and raise frame with a size of 150x23
Definition: GUIDesigns.h:84
ICON_VCLASS_RAIL_URBAN
Definition: GUIIcons.h:332
MID_GNE_SET_ATTRIBUTE_DIALOG
attribute edited trought dialog
Definition: GUIAppEnum.h:645
GNEVehicleTypeDialog::CarFollowingModelParameters
class for CarFollowingModel
Definition: GNEVehicleTypeDialog.h:401
GUIDesignTextFielWidth180Int
#define GUIDesignTextFielWidth180Int
text field with thick frame, size of 180x23 and limited to integers (Used in GNEVehicleType)
Definition: GUIDesigns.h:49
SVC_TAXI
vehicle is a taxi
Definition: SUMOVehicleClass.h:164
SUMO_ATTR_LCA_TIME_TO_IMPATIENCE
Definition: SUMOXMLDefinitions.h:598
SUMO_ATTR_GUISHAPE
Definition: SUMOXMLDefinitions.h:787
SUMOVTypeParameter::VClassDefaultValues
struct for default values that depend of VClass
Definition: SUMOVTypeParameter.h:89
SUMO_ATTR_K
Definition: SUMOXMLDefinitions.h:816
ICON_VCLASS_CUSTOM2
Definition: GUIIcons.h:342
SUMO_TAG_CF_DANIEL1
Definition: SUMOXMLDefinitions.h:281
GNEVehicleTypeDialog::CarFollowingModelParameters::mySecurityRow
CarFollowingModelRow * mySecurityRow
Row for Security (only for Wiedemann)
Definition: GNEVehicleTypeDialog.h:495
GNEVehicleTypeDialog
Dialog for edit rerouter intervals.
Definition: GNEVehicleTypeDialog.h:45
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow
class used for represent rows with Vehicle Type parameters
Definition: GNEVehicleTypeDialog.h:110
GNEDemandElementDialog::openAsModalDialog
FXint openAsModalDialog(FXuint placement=PLACEMENT_CURSOR)
execute dialog as modal
Definition: GNEDemandElementDialog.cpp:78
GNEVehicleTypeDialog::CarFollowingModelParameters::myTmp1Row
CarFollowingModelRow * myTmp1Row
Row for TMP1.
Definition: GNEVehicleTypeDialog.h:501
GUIDesignComboBox
#define GUIDesignComboBox
Definition: GUIDesigns.h:221
SVS_PASSENGER
render as a passenger vehicle
Definition: SUMOVehicleClass.h:63
ICON_VCLASS_TAXI
Definition: GUIIcons.h:325
SUMO_ATTR_CARRIAGE_LENGTH
Definition: SUMOXMLDefinitions.h:1009
GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::myComboBoxShapeLabelImage
FXLabel * myComboBoxShapeLabelImage
label with image of Shape
Definition: GNEVehicleTypeDialog.h:102
ICON_VSHAPE_PASSENGER
Definition: GUIIcons.h:351
GNEDemandElementDialog::resetChanges
void resetChanges()
reset changes did in this dialog.
Definition: GNEDemandElementDialog.cpp:142
SVS_EMERGENCY
render as an emergency vehicle
Definition: SUMOVehicleClass.h:103
SVS_E_VEHICLE
render as a (futuristic) e-vehicle
Definition: SUMOVehicleClass.h:97
SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME
Definition: SUMOXMLDefinitions.h:613
SVS_SHIP
render as a arbitrary ship
Definition: SUMOVehicleClass.h:101
SUMO_ATTR_EMERGENCYDECEL
Definition: SUMOXMLDefinitions.h:448
SVS_TRUCK_SEMITRAILER
render as a semi-trailer transport vehicle ("Sattelschlepper")
Definition: SUMOVehicleClass.h:79
ICON_VSHAPE_PASSENGER_WAGON
Definition: GUIIcons.h:354
SUMO_ATTR_VCLASS
Definition: SUMOXMLDefinitions.h:452
ICON_VSHAPE_PASSENGER_HATCHBACK
Definition: GUIIcons.h:353
ICON_VSHAPE_DELIVERY
Definition: GUIIcons.h:356
SUMO_TAG_CF_BKERNER
Definition: SUMOXMLDefinitions.h:285
ICON_VCLASS_MOPED
Definition: GUIIcons.h:336
GUIDesignAuxiliarFrame
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions
Definition: GUIDesigns.h:286
getVehicleShapeID
SUMOVehicleShape getVehicleShapeID(const std::string &name)
Returns the class id of the shape class given by its name.
Definition: SUMOVehicleClass.cpp:343
GNEVehicleTypeDialog::CarFollowingModelParameters::myAdaptTimeRow
CarFollowingModelRow * myAdaptTimeRow
Row for Adapt Time.
Definition: GNEVehicleTypeDialog.h:528
SUMO_ATTR_MINGAP
Definition: SUMOXMLDefinitions.h:460
GNEVehicleTypeDialog::VTypeAtributes::onCmdSetAttribute
long onCmdSetAttribute(FXObject *, FXSelector, void *)
Definition: GNEVehicleTypeDialog.cpp:1020
config.h
SVS_FIREBRIGADE
render as a fire brigade
Definition: SUMOVehicleClass.h:105
GNEVehicleTypeDialog::VTypeAtributes::onCmdSetAttributeDialog
long onCmdSetAttributeDialog(FXObject *obj, FXSelector, void *)
@event called after press a button dialog
Definition: GNEVehicleTypeDialog.cpp:1112
GNEVehicleTypeDialog::onCmdAccept
long onCmdAccept(FXObject *, FXSelector, void *)
Definition: GNEVehicleTypeDialog.cpp:1507
ICON_VSHAPE_BUS_FLEXIBLE
Definition: GUIIcons.h:362
SVC_TRAILER
vehicle is a large transport vehicle
Definition: SUMOVehicleClass.h:174
SVC_BUS
vehicle is a bus
Definition: SUMOVehicleClass.h:166
SUMO_ATTR_ACTIONSTEPLENGTH
Definition: SUMOXMLDefinitions.h:451
GNEVehicleType.h
ICON_VSHAPE_RAIL_CARGO
Definition: GUIIcons.h:366
GNEVehicleTypeDialog::VTypeAtributes::buildJunctionModelAttributesA
void buildJunctionModelAttributesA(FXVerticalFrame *column)
build JunctionModel attributes (A)
Definition: GNEVehicleTypeDialog.cpp:854
SVS_ANT
render as a giant ant
Definition: SUMOVehicleClass.h:99
SUMO_ATTR_LOCOMOTIVE_LENGTH
Definition: SUMOXMLDefinitions.h:1010
PollutantsInterface::getAllClassesStr
static const std::vector< std::string > & getAllClassesStr()
Get all SUMOEmissionClass in string format.
Definition: PollutantsInterface.cpp:83
ICON_VSHAPE_RICKSHAW
Definition: GUIIcons.h:373
SVS_TRUCK_1TRAILER
render as a transport vehicle with one trailer
Definition: SUMOVehicleClass.h:81
GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelRow::CarFollowingModelRow
CarFollowingModelRow(CarFollowingModelParameters *carFollowingModelParametersParent, FXVerticalFrame *verticalFrame, SumoXMLAttr attr, bool allowString=false)
constructor
Definition: GNEVehicleTypeDialog.cpp:1558
SVS_PASSENGER_WAGON
render as a wagon passenger vehicle ("Combi")
Definition: SUMOVehicleClass.h:69
SUMO_ATTR_TMP4
Definition: SUMOXMLDefinitions.h:553
SUMOXMLDefinitions::LateralAlignments
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
Definition: SUMOXMLDefinitions.h:1396
GNEVehicleTypeDialog::myCarFollowingModelParameters
CarFollowingModelParameters * myCarFollowingModelParameters
Car Following model parameters.
Definition: GNEVehicleTypeDialog.h:566
SUMO_TAG_CF_SMART_SK
Definition: SUMOXMLDefinitions.h:280
MFXUtils::getFXColor
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:114
SVC_MOTORCYCLE
vehicle is a motorcycle
Definition: SUMOVehicleClass.h:176
GNEAttributeCarrier::getTagStr
const std::string & getTagStr() const
get tag assigned to this object in string format
Definition: GNEAttributeCarrier.cpp:1165
GNEVehicleTypeDialog::VTypeAtributes::mySpeedFactor
VTypeAttributeRow * mySpeedFactor
VTypeAttributeRow for SpeedFactor.
Definition: GNEVehicleTypeDialog.h:230
SVS_BUS_COACH
render as a coach
Definition: SUMOVehicleClass.h:85
GNEAttributeCarrier::isAttributeEnabled
virtual bool isAttributeEnabled(SumoXMLAttr key) const =0
GNEVehicleTypeDialog::VTypeAtributes::myMinGap
VTypeAttributeRow * myMinGap
VTypeAttributeRow for MinGap.
Definition: GNEVehicleTypeDialog.h:224
ICON_VSHAPE_PASSENGER_VAN
Definition: GUIIcons.h:355
GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::updateValues
void updateValues()
update values
Definition: GNEVehicleTypeDialog.cpp:295
SVS_RICKSHAW
render as a rickshaw
Definition: SUMOVehicleClass.h:109
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:373
SVC_IGNORING
vehicles ignoring classes
Definition: SUMOVehicleClass.h:136
ICON_VCLASS_RAIL_ELECTRIC
Definition: GUIIcons.h:334
GNEDemandElementDialog::changeDemandElementDialogHeader
void changeDemandElementDialogHeader(const std::string &newHeader)
change additional dialog header
Definition: GNEDemandElementDialog.cpp:109
GNEVehicleTypeDialog::CarFollowingModelParameters::myApparentDecelRow
CarFollowingModelRow * myApparentDecelRow
Row for aparent Decel.
Definition: GNEVehicleTypeDialog.h:468
SUMO_ATTR_EMISSIONCLASS
Definition: SUMOXMLDefinitions.h:792
ICON_VCLASS_TRAM
Definition: GUIIcons.h:331
WRITE_DEBUG
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:246
GNEVehicleTypeDialog::VTypeAtributes::VClassRow::updateValue
SUMOVehicleClass updateValue()
update values
Definition: GNEVehicleTypeDialog.cpp:151
SUMO_ATTR_LCA_PUSHY
Definition: SUMOXMLDefinitions.h:594
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::myTextField
FXTextField * myTextField
text field
Definition: GNEVehicleTypeDialog.h:164
ICON_VCLASS_AUTHORITY
Definition: GUIIcons.h:320
SUMO_ATTR_CF_KERNER_PHI
Definition: SUMOXMLDefinitions.h:837
GNEVehicleTypeDialog::VTypeAtributes::VClassRow
FOX-declaration.
Definition: GNEVehicleTypeDialog.h:55
GNEUndoList.h
SUMO_ATTR_TAU
Definition: SUMOXMLDefinitions.h:549
SUMO_ATTR_CF_IDMM_ADAPT_TIME
Definition: SUMOXMLDefinitions.h:836
SUMO_ATTR_LCA_ACCEL_LAT
Definition: SUMOXMLDefinitions.h:599
SVS_RAIL
render as a rail
Definition: SUMOVehicleClass.h:91
SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE
Definition: SUMOXMLDefinitions.h:604
ICON_VSHAPE_PASSENGER_SEDAN
Definition: GUIIcons.h:352
GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::myComboBox
FXComboBox * myComboBox
ComboBox for attributes with limited values.
Definition: GNEVehicleTypeDialog.h:167