Eclipse SUMO - Simulation of Urban MObility
GNETypeFrame.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 // The Widget for edit Type elements (vehicle, person and container)
19 /****************************************************************************/
20 #include <config.h>
21 
22 #include <netedit/GNENet.h>
23 #include <netedit/GNEUndoList.h>
24 #include <netedit/GNEViewNet.h>
31 
32 #include "GNETypeFrame.h"
33 
34 
35 // ===========================================================================
36 // FOX callback mapping
37 // ===========================================================================
38 
39 FXDEFMAP(GNETypeFrame::TypeSelector) typeSelectorMap[] = {
41 };
42 
43 FXDEFMAP(GNETypeFrame::TypeEditor) typeEditorMap[] = {
47 };
48 
49 // Object implementation
50 FXIMPLEMENT(GNETypeFrame::TypeSelector, MFXGroupBoxModule, typeSelectorMap, ARRAYNUMBER(typeSelectorMap))
51 FXIMPLEMENT(GNETypeFrame::TypeEditor, MFXGroupBoxModule, typeEditorMap, ARRAYNUMBER(typeEditorMap))
52 
53 // ===========================================================================
54 // method definitions
55 // ===========================================================================
56 
57 // ---------------------------------------------------------------------------
58 // GNETypeFrame::TypeSelector - methods
59 // ---------------------------------------------------------------------------
60 
62  MFXGroupBoxModule(typeFrameParent, TL("Current Type")),
63  myTypeFrameParent(typeFrameParent),
64  myCurrentType(nullptr) {
65  // Create MFXComboBoxIcon
66  myTypeComboBox = new MFXComboBoxIcon(getCollapsableFrame(), GUIDesignComboBoxNCol, true, GUIDesignComboBoxVisibleItemsLarge,
68  // add default Types (always first)
69  for (const auto& vType : myTypeFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VTYPE)) {
70  if (DEFAULT_VTYPES.count(vType.second->getID()) != 0) {
71  myTypeComboBox->appendIconItem(vType.second->getID().c_str(), vType.second->getACIcon(), FXRGB(255, 255, 200));
72  }
73  }
74  // fill myTypeMatchBox with list of VTypes IDs
75  for (const auto& vType : myTypeFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VTYPE)) {
76  if (DEFAULT_VTYPES.count(vType.second->getID()) == 0) {
77  myTypeComboBox->appendIconItem(vType.second->getID().c_str(), vType.second->getACIcon());
78  }
79  }
80  // set DEFAULT_VEHTYPE as default VType
81  myCurrentType = myTypeFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDemandElement(SUMO_TAG_VTYPE, DEFAULT_VTYPE_ID);
82  myTypeComboBox->setCurrentItem(myTypeComboBox->findItem(DEFAULT_VTYPE_ID.c_str()));
83  // TypeSelector is always shown
84  show();
85 }
86 
87 
89 
90 
93  return myCurrentType;
94 }
95 
96 
97 void
99  myCurrentType = vType;
100  refreshTypeSelector(true);
101 }
102 
103 
104 void
106  bool valid = false;
107  // clear items
108  myTypeComboBox->clearItems();
109  // add default Vehicle an Bike types in the first and second positions
110  for (const auto& vType : myTypeFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VTYPE)) {
111  if (DEFAULT_VTYPES.count(vType.second->getID()) != 0) {
112  myTypeComboBox->appendIconItem(vType.second->getID().c_str(), vType.second->getACIcon(), FXRGB(255, 255, 200));
113  }
114  }
115  // fill myTypeMatchBox with list of VTypes IDs sorted by ID
116  std::map<std::string, GNEDemandElement*> types;
117  for (const auto& vType : myTypeFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VTYPE)) {
118  if (DEFAULT_VTYPES.count(vType.second->getID()) == 0) {
119  types[vType.second->getID()] = vType.second;
120  }
121  }
122  for (const auto& vType : types) {
123  myTypeComboBox->appendIconItem(vType.first.c_str(), vType.second->getACIcon());
124  }
125  // make sure that tag is in myTypeMatchBox
126  if (myCurrentType) {
127  for (int i = 0; i < (int)myTypeComboBox->getNumItems(); i++) {
128  if (myTypeComboBox->getItemText(i) == myCurrentType->getID()) {
129  myTypeComboBox->setCurrentItem(i);
130  valid = true;
131  }
132  }
133  }
134  // Check that give vType type is valid
135  if (!valid) {
136  // set DEFAULT_VEHTYPE as default VType
137  myCurrentType = myTypeFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveDemandElement(SUMO_TAG_VTYPE, DEFAULT_VTYPE_ID);
138  // refresh myTypeMatchBox again
139  for (int i = 0; i < (int)myTypeComboBox->getNumItems(); i++) {
140  if (myTypeComboBox->getItemText(i) == myCurrentType->getID()) {
141  myTypeComboBox->setCurrentItem(i);
142  }
143  }
144  }
145  // check if update other moduls
146  if (updateModuls) {
147  // refresh vehicle type editor module
148  myTypeFrameParent->myTypeEditor->refreshTypeEditorModule();
149  // set myCurrentType as inspected element
150  myTypeFrameParent->getViewNet()->setInspectedAttributeCarriers({myCurrentType});
151  // show modules
152  myTypeFrameParent->myTypeAttributesEditor->showAttributeEditorModule(false);
153  myTypeFrameParent->myAttributesEditorExtended->showAttributesEditorExtendedModule();
154  myTypeFrameParent->myParametersEditor->refreshParametersEditor();
155  }
156 }
157 
158 
159 long
160 GNETypeFrame::TypeSelector::onCmdSelectItem(FXObject*, FXSelector, void*) {
161  // Check if value of myTypeMatchBox correspond of an allowed additional tags
162  for (const auto& vType : myTypeFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VTYPE)) {
163  if (vType.second->getID() == myTypeComboBox->getText().text()) {
164  // set pointer
165  myCurrentType = vType.second;
166  // set color of myTypeMatchBox to black (valid)
167  myTypeComboBox->setTextColor(FXRGB(0, 0, 0));
168  // refresh vehicle type editor module
169  myTypeFrameParent->myTypeEditor->refreshTypeEditorModule();
170  // set myCurrentType as inspected element
171  myTypeFrameParent->getViewNet()->setInspectedAttributeCarriers({myCurrentType});
172  // show modules if selected item is valid
173  myTypeFrameParent->myTypeAttributesEditor->showAttributeEditorModule(false);
174  myTypeFrameParent->myAttributesEditorExtended->showAttributesEditorExtendedModule();
175  myTypeFrameParent->myParametersEditor->refreshParametersEditor();
176  // Write Warning in console if we're in testing mode
177  WRITE_DEBUG(("Selected item '" + myTypeComboBox->getText() + "' in TypeSelector").text());
178  // update viewNet
179  myTypeFrameParent->getViewNet()->updateViewNet();
180  return 1;
181  }
182  }
183  myCurrentType = nullptr;
184  // refresh vehicle type editor module
185  myTypeFrameParent->myTypeEditor->refreshTypeEditorModule();
186  // hide all modules if selected item isn't valid
187  myTypeFrameParent->myTypeAttributesEditor->hideAttributesEditorModule();
188  myTypeFrameParent->myAttributesEditorExtended->hideAttributesEditorExtendedModule();
189  // set color of myTypeMatchBox to red (invalid)
190  myTypeComboBox->setTextColor(FXRGB(255, 0, 0));
191  // Write Warning in console if we're in testing mode
192  WRITE_DEBUG("Selected invalid item in TypeSelector");
193  // update viewNet
194  myTypeFrameParent->getViewNet()->updateViewNet();
195  return 1;
196 }
197 
198 // ---------------------------------------------------------------------------
199 // GNETypeFrame::TypeEditor - methods
200 // ---------------------------------------------------------------------------
201 
203  MFXGroupBoxModule(typeFrameParent, TL("Type Editor")),
204  myTypeFrameParent(typeFrameParent) {
205  // Create new vehicle type
207  // Create delete/reset vehicle type
209  // Create copy vehicle type
211 }
212 
213 
215 
216 
217 void
219  refreshTypeEditorModule();
220  show();
221 }
222 
223 
224 void
226  hide();
227 }
228 
229 
230 void
232  // first check if selected VType is valid
233  if (myTypeFrameParent->myTypeSelector->getCurrentType() == nullptr) {
234  // disable buttons
235  myDeleteResetTypeButton->disable();
236  myCopyTypeButton->disable();
237  } else if (GNEAttributeCarrier::parse<bool>(myTypeFrameParent->myTypeSelector->getCurrentType()->getAttribute(GNE_ATTR_DEFAULT_VTYPE))) {
238  // enable copy button
239  myCopyTypeButton->enable();
240  // enable and set myDeleteTypeButton as "reset")
241  myDeleteResetTypeButton->setText(TL("Reset Type"));
242  myDeleteResetTypeButton->setIcon(GUIIconSubSys::getIcon(GUIIcon::RESET));
243  // check if reset default vehicle type button has to be enabled or disabled
244  if (GNEAttributeCarrier::parse<bool>(myTypeFrameParent->myTypeSelector->getCurrentType()->getAttribute(GNE_ATTR_DEFAULT_VTYPE_MODIFIED))) {
245  myDeleteResetTypeButton->enable();
246  } else {
247  myDeleteResetTypeButton->disable();
248  }
249  } else {
250  // enable copy button
251  myCopyTypeButton->enable();
252  // enable and set myDeleteTypeButton as "delete")
253  myDeleteResetTypeButton->setText(TL("Delete Type"));
254  myDeleteResetTypeButton->setIcon(GUIIconSubSys::getIcon(GUIIcon::MODEDELETE));
255  myDeleteResetTypeButton->enable();
256  }
257  // update module
258  recalc();
259 }
260 
261 
262 long
263 GNETypeFrame::TypeEditor::onCmdCreateType(FXObject*, FXSelector, void*) {
264  // obtain a new valid Type ID
265  const std::string typeID = myTypeFrameParent->myViewNet->getNet()->getAttributeCarriers()->generateDemandElementID(SUMO_TAG_VTYPE);
266  // create new vehicle type
267  GNEDemandElement* type = new GNEVType(myTypeFrameParent->myViewNet->getNet(), typeID);
268  // add it using undoList (to allow undo-redo)
269  myTypeFrameParent->myViewNet->getUndoList()->begin(type, TL("create vehicle type"));
270  myTypeFrameParent->myViewNet->getUndoList()->add(new GNEChange_DemandElement(type, true), true);
271  myTypeFrameParent->myViewNet->getUndoList()->end();
272  // set created vehicle type in selector
273  myTypeFrameParent->myTypeSelector->setCurrentType(type);
274  return 1;
275 }
276 
277 
278 long
279 GNETypeFrame::TypeEditor::onCmdDeleteResetType(FXObject*, FXSelector, void*) {
280  // continue depending of current mode
281  if (myDeleteResetTypeButton->getIcon() == GUIIconSubSys::getIcon(GUIIcon::MODEDELETE)) {
282  deleteType();
283  } else {
284  resetType();
285  }
286  return 1;
287 }
288 
289 
290 long
291 GNETypeFrame::TypeEditor::onCmdCopyType(FXObject*, FXSelector, void*) {
292  // obtain a new valid Type ID
293  const std::string typeID = myTypeFrameParent->myViewNet->getNet()->getAttributeCarriers()->generateDemandElementID(SUMO_TAG_VTYPE);
294  // obtain vehicle type in which new Type will be based
295  GNEVType* vType = dynamic_cast<GNEVType*>(myTypeFrameParent->myTypeSelector->getCurrentType());
296  // check that vType exist
297  if (vType) {
298  // create a new Type based on the current selected vehicle type
299  GNEDemandElement* typeCopy = new GNEVType(myTypeFrameParent->myViewNet->getNet(), typeID, vType);
300  // begin undo list operation
301  myTypeFrameParent->myViewNet->getUndoList()->begin(typeCopy, TL("copy vehicle type"));
302  // add it using undoList (to allow undo-redo)
303  myTypeFrameParent->myViewNet->getUndoList()->add(new GNEChange_DemandElement(typeCopy, true), true);
304  // end undo list operation
305  myTypeFrameParent->myViewNet->getUndoList()->end();
306  // set created vehicle type in selector
307  myTypeFrameParent->myTypeSelector->setCurrentType(typeCopy);
308  }
309  return 1;
310 }
311 
312 
313 void
315  // begin reset default vehicle type values
316  myTypeFrameParent->getViewNet()->getUndoList()->begin(GUIIcon::VTYPE, TL("reset default vehicle type values"));
317  // reset all values of default vehicle type
318  for (const auto& attrProperty : GNEAttributeCarrier::getTagProperty(SUMO_TAG_VTYPE)) {
319  // change all attributes with "" to reset it (except ID and vClass)
320  if ((attrProperty.getAttr() != SUMO_ATTR_ID) && (attrProperty.getAttr() != SUMO_ATTR_VCLASS)) {
321  myTypeFrameParent->myTypeSelector->getCurrentType()->setAttribute(attrProperty.getAttr(), "", myTypeFrameParent->myViewNet->getUndoList());
322  }
323  }
324  // change manually VClass (because it depends of Default VType)
325  if (myTypeFrameParent->myTypeSelector->getCurrentType()->getAttribute(SUMO_ATTR_ID) == DEFAULT_VTYPE_ID) {
326  myTypeFrameParent->myTypeSelector->getCurrentType()->setAttribute(SUMO_ATTR_VCLASS, toString(SVC_PASSENGER), myTypeFrameParent->myViewNet->getUndoList());
327  } else if (myTypeFrameParent->myTypeSelector->getCurrentType()->getAttribute(SUMO_ATTR_ID) == DEFAULT_BIKETYPE_ID) {
328  myTypeFrameParent->myTypeSelector->getCurrentType()->setAttribute(SUMO_ATTR_VCLASS, toString(SVC_BICYCLE), myTypeFrameParent->myViewNet->getUndoList());
329  } else if (myTypeFrameParent->myTypeSelector->getCurrentType()->getAttribute(SUMO_ATTR_ID) == DEFAULT_TAXITYPE_ID) {
330  myTypeFrameParent->myTypeSelector->getCurrentType()->setAttribute(SUMO_ATTR_VCLASS, toString(SVC_TAXI), myTypeFrameParent->myViewNet->getUndoList());
331  } else if (myTypeFrameParent->myTypeSelector->getCurrentType()->getAttribute(SUMO_ATTR_ID) == DEFAULT_RAILTYPE_ID) {
332  myTypeFrameParent->myTypeSelector->getCurrentType()->setAttribute(SUMO_ATTR_VCLASS, toString(SVC_RAIL), myTypeFrameParent->myViewNet->getUndoList());
333  } else if (myTypeFrameParent->myTypeSelector->getCurrentType()->getAttribute(SUMO_ATTR_ID) == DEFAULT_PEDTYPE_ID) {
334  myTypeFrameParent->myTypeSelector->getCurrentType()->setAttribute(SUMO_ATTR_VCLASS, toString(SVC_PEDESTRIAN), myTypeFrameParent->myViewNet->getUndoList());
335  } else if (myTypeFrameParent->myTypeSelector->getCurrentType()->getAttribute(SUMO_ATTR_ID) == DEFAULT_CONTAINERTYPE_ID) {
336  myTypeFrameParent->myTypeSelector->getCurrentType()->setAttribute(SUMO_ATTR_VCLASS, toString(SVC_PEDESTRIAN), myTypeFrameParent->myViewNet->getUndoList());
337  }
338  // change special attribute GNE_ATTR_DEFAULT_VTYPE_MODIFIED
339  myTypeFrameParent->myTypeSelector->getCurrentType()->setAttribute(GNE_ATTR_DEFAULT_VTYPE_MODIFIED, "false", myTypeFrameParent->myViewNet->getUndoList());
340  // finish reset default vehicle type values
341  myTypeFrameParent->getViewNet()->getUndoList()->end();
342  // refresh TypeSelector
343  myTypeFrameParent->myTypeSelector->refreshTypeSelector(true);
344 }
345 
346 
347 void
349  // show question dialog if vtype has already assigned vehicles
350  if (myTypeFrameParent->myTypeSelector->getCurrentType()->getChildDemandElements().size() > 0) {
351  std::string plural = myTypeFrameParent->myTypeSelector->getCurrentType()->getChildDemandElements().size() == 1 ? ("") : ("s");
352  // show warning in gui testing debug mode
353  WRITE_DEBUG("Opening FXMessageBox 'remove vType'");
354  // Ask confirmation to user
355  FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
356  ("Remove " + toString(SUMO_TAG_VTYPE) + "s").c_str(), "%s",
357  ("Delete " + toString(SUMO_TAG_VTYPE) + " '" + myTypeFrameParent->myTypeSelector->getCurrentType()->getID() +
358  "' will remove " + toString(myTypeFrameParent->myTypeSelector->getCurrentType()->getChildDemandElements().size()) +
359  " vehicle" + plural + ". Continue?").c_str());
360  if (answer != 1) { // 1:yes, 2:no, 4:esc
361  // write warning if netedit is running in testing mode
362  if (answer == 2) {
363  WRITE_DEBUG("Closed FXMessageBox 'remove vType' with 'No'");
364  } else if (answer == 4) {
365  WRITE_DEBUG("Closed FXMessageBox 'remove vType' with 'ESC'");
366  }
367  } else {
368  // begin undo list operation
369  myTypeFrameParent->myViewNet->getUndoList()->begin(myTypeFrameParent->myTypeSelector->getCurrentType(), ("delete vehicle type"));
370  // remove vehicle type (and all of their children)
371  myTypeFrameParent->myViewNet->getNet()->deleteDemandElement(myTypeFrameParent->myTypeSelector->getCurrentType(),
372  myTypeFrameParent->myViewNet->getUndoList());
373  // end undo list operation
374  myTypeFrameParent->myViewNet->getUndoList()->end();
375  }
376  } else {
377  // begin undo list operation
378  myTypeFrameParent->myViewNet->getUndoList()->begin(myTypeFrameParent->myTypeSelector->getCurrentType(), ("delete vehicle type"));
379  // remove vehicle type (and all of their children)
380  myTypeFrameParent->myViewNet->getNet()->deleteDemandElement(myTypeFrameParent->myTypeSelector->getCurrentType(),
381  myTypeFrameParent->myViewNet->getUndoList());
382  // end undo list operation
383  myTypeFrameParent->myViewNet->getUndoList()->end();
384  }
385 }
386 
387 // ---------------------------------------------------------------------------
388 // GNETypeFrame - methods
389 // ---------------------------------------------------------------------------
390 
392  GNEFrame(viewParent, viewNet, TL("Types")) {
393 
394  // create module for edit vehicle types (Create, copy, etc.)
395  myTypeEditor = new TypeEditor(this);
396 
397  // create vehicle type selector
398  myTypeSelector = new TypeSelector(this);
399 
400  // Create vehicle type attributes editor
402 
403  // create module for open extended attributes dialog
405 
408 
409  // set "VTYPE_DEFAULT" as default vehicle Type
411 }
412 
413 
415 
416 
417 void
419  // refresh vehicle type and Attribute Editor
421  // set myCurrentType as inspected element
423  // show modules
426  // show frame
427  GNEFrame::show();
428 }
429 
430 
433  return myTypeSelector;
434 }
435 
436 
437 void
439  // after changing an attribute myTypeSelector, we need to update the list of typeSelector, because ID could be changed
441  //... and typeEditor (due reset)
443 }
444 
445 
446 void
448  // open vehicle type dialog
450  GNEVehicleTypeDialog(myTypeSelector->getCurrentType(), true); // NOSONAR, constructor returns after dialog has been closed
451  // set myCurrentType as inspected element
453  // call "showAttributeEditorModule" to refresh attribute list
456  }
457 }
458 
459 
460 /****************************************************************************/
FXDEFMAP(GNETypeFrame::TypeSelector) typeSelectorMap[]
@ MID_GNE_DELETE
delete element
Definition: GUIAppEnum.h:934
@ MID_GNE_COPY
copy element
Definition: GUIAppEnum.h:944
@ MID_GNE_CREATE
create element
Definition: GUIAppEnum.h:932
@ MID_GNE_SET_TYPE
used to select a type of element in a combo box
Definition: GUIAppEnum.h:950
#define GUIDesignButton
Definition: GUIDesigns.h:88
#define GUIDesignComboBox
Definition: GUIDesigns.h:299
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:317
#define GUIDesignComboBoxVisibleItemsLarge
combo box large small
Definition: GUIDesigns.h:56
GLenum myCurrentType
Definition: GUIPolygon.cpp:53
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:306
#define TL(string)
Definition: MsgHandler.h:315
const std::string DEFAULT_TAXITYPE_ID
const std::string DEFAULT_RAILTYPE_ID
const std::string DEFAULT_PEDTYPE_ID
const std::set< std::string > DEFAULT_VTYPES
const std::string DEFAULT_VTYPE_ID
const std::string DEFAULT_CONTAINERTYPE_ID
@ SVC_RAIL
vehicle is a not electrified rail
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_TAXI
vehicle is a taxi
@ SVC_PEDESTRIAN
pedestrian
const std::string DEFAULT_BIKETYPE_ID
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_DEFAULT_VTYPE
Flag to check if VType is a default VType.
@ SUMO_ATTR_VCLASS
@ SUMO_ATTR_ID
@ GNE_ATTR_DEFAULT_VTYPE_MODIFIED
Flag to check if a default VType was modified.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:46
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
void showAttributesEditorExtendedModule()
show AttributesEditorExtended modul
GNEFrame * getFrameParent() const
pointer to GNEFrame parent
void showAttributeEditorModule(bool includeExtended)
show attributes of multiple ACs
void refreshParametersEditor()
refresh netedit attributes
GNEViewNet * getViewNet() const
get view net
Definition: GNEFrame.cpp:150
GNEViewNet * myViewNet
FOX need this.
Definition: GNEFrame.h:117
virtual void show()
show Frame
Definition: GNEFrame.cpp:115
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:124
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition: GNENet.cpp:121
void resetType()
reset type
long onCmdDeleteResetType(FXObject *, FXSelector, void *)
Called when "Delete/Reset Vehicle Type" button is clicked.
void deleteType()
delete type
void showTypeEditorModule()
show TypeEditor modul
FXButton * myCreateTypeButton
"create vehicle type" button
Definition: GNETypeFrame.h:137
long onCmdCreateType(FXObject *, FXSelector, void *)
FXButton * myDeleteResetTypeButton
"delete/reset vehicle type" button
Definition: GNETypeFrame.h:140
FXButton * myCopyTypeButton
"copy vehicle type"
Definition: GNETypeFrame.h:143
TypeEditor(GNETypeFrame *typeFrameParent)
FOX-declaration.
void hideTypeEditorModule()
hide TypeEditor box
void refreshTypeEditorModule()
update TypeEditor modul
long onCmdCopyType(FXObject *, FXSelector, void *)
Called when "Copy Vehicle Type" button is clicked.
void setCurrentType(GNEDemandElement *vType)
set current Vehicle Type
long onCmdSelectItem(FXObject *, FXSelector, void *)
Called when the user select another element in ComboBox.
void refreshTypeSelector(const bool updateModuls)
refresh vehicle type selector
GNEDemandElement * getCurrentType() const
get current Vehicle Type
GNEFrameAttributeModules::AttributesEditorExtended * myAttributesEditorExtended
modul for open extended attributes dialog
Definition: GNETypeFrame.h:179
void attributesEditorExtendedDialogOpened()
open GNEAttributesCreator extended dialog (used for editing advance attributes of Vehicle Types)
void show()
show Frame
GNEFrameAttributeModules::ParametersEditor * myParametersEditor
Parameters editor inspector.
Definition: GNETypeFrame.h:182
GNETypeFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
TypeSelector * getTypeSelector() const
get vehicle type selector
GNEFrameAttributeModules::AttributesEditor * myTypeAttributesEditor
editorinternal vehicle type attributes
Definition: GNETypeFrame.h:176
TypeEditor * myTypeEditor
Vehicle Type editor (Create, copy, etc.)
Definition: GNETypeFrame.h:173
~GNETypeFrame()
Destructor.
TypeSelector * myTypeSelector
vehicle type selector
Definition: GNETypeFrame.h:170
void attributeUpdated(SumoXMLAttr attribute)
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/....
Dialog for editing calibrator vehicle types.
GNENet * getNet() const
get the net object
void setInspectedAttributeCarriers(const std::vector< GNEAttributeCarrier * > ACs)
set inspected attributeCarrier
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:88
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
Definition: GUIDesigns.cpp:128
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
ComboBox with icon.
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)