64 myVehicleTypeFrameParent(vehicleTypeFrameParent),
65 myCurrentVehicleType(
nullptr) {
72 for (
const auto& i : myVehicleTypeFrameParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(
SUMO_TAG_VTYPE)) {
74 myTypeMatchBox->appendItem(i.first.c_str());
80 if (myTypeMatchBox->getNumItems() <= 20) {
81 myTypeMatchBox->setNumVisible((
int)myTypeMatchBox->getNumItems());
83 myTypeMatchBox->setNumVisible(20);
185 WRITE_DEBUG(
"Selected invalid item in VehicleTypeSelector");
280 WRITE_DEBUG(
"Opening FXMessageBox 'remove vType'");
282 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
286 " vehicle" + plural +
". Continue?").c_str());
290 WRITE_DEBUG(
"Closed FXMessageBox 'remove vType' with 'No'");
291 }
else if (answer == 4) {
292 WRITE_DEBUG(
"Closed FXMessageBox 'remove vType' with 'ESC'");
374 GNEFrame(horizontalFrameParent, viewNet,
"Vehicle Types") {
const AttributeCarriers & getAttributeCarriers() const
retrieve all attribute carriers of Net
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
#define GUIDesignComboBoxNCol
number of column of every combo box
void setCurrentVehicleType(GNEDemandElement *vType)
set current Vehicle Type
description of a vehicle type
Dialog for edit rerouter intervals.
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
GNEVehicleTypeFrame * myVehicleTypeFrameParent
pointer to vehicle type Frame Parent
void attributesEditorExtendedDialogOpened()
open AttributesCreator extended dialog (used for editing advance attributes of Vehicle Types) ...
GNEDemandElement * myCurrentVehicleType
pointer to current vehicle type
long onCmdSelectItem(FXObject *, FXSelector, void *)
GNEFrameAttributesModuls::AttributesEditorExtended * myAttributesEditorExtended
modul for open extended attributes dialog
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
const std::string DEFAULT_BIKETYPE_ID
VehicleTypeSelector * getVehicleTypeSelector() const
get vehicle type selector
FXButton * myResetDefaultVehicleTypeButton
"delete default vehicle type" button
VehicleTypeEditor()
FOX needs this.
const std::string DEFAULT_VTYPE_ID
GNEViewNet * getViewNet() const
get view net
FXDEFMAP(GNEVehicleTypeFrame::VehicleTypeSelector) vehicleTypeSelectorMap[]
const std::vector< GNEDemandElement * > & getDemandElementChildren() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
#define GUIDesignComboBox
GNEViewNet * myViewNet
View Net.
FXButton * myDeleteVehicleTypeButton
"delete vehicle type" button
GNEUndoList * getUndoList() const
get the undoList object
FXComboBox * myTypeMatchBox
comboBox with the list of elements type
void hideVehicleTypeEditorModul()
hide VehicleTypeEditor box
void refreshVehicleTypeSelector()
refresh vehicle type selector
GNEFrameAttributesModuls::AttributesEditor * myVehicleTypeAttributesEditor
editorinternal vehicle type attributes
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
GNEVehicleTypeFrame * myVehicleTypeFrameParent
pointer to Frame Parent
std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > demandElements
map with the name and pointer to demand elements of net
void showAttributeEditorModul(const std::vector< GNEAttributeCarrier *> &ACs, bool includeExtended)
show attributes of multiple ACs
const std::string getID() const
function to support debugging
VehicleTypeSelector * myVehicleTypeSelector
vehicle type selector
std::string generateDemandElementID(const std::string &prefix, SumoXMLTag type) const
generate demand element id
vehicle is a passenger car (a "normal" car)
long onCmdCopyVehicleType(FXObject *, FXSelector, void *)
Called when "Copy Vehicle Type" button is clicked.
long onCmdResetVehicleType(FXObject *, FXSelector, void *)
Called when "Delete Vehicle Type" button is clicked.
void showVehicleTypeEditorModul()
show VehicleTypeEditor modul
~GNEVehicleTypeFrame()
Destructor.
void refreshVehicleTypeSelectorIDs()
refresh vehicle type selector (only IDs, without refreshing attributes)
virtual void show()
show Frame
Flag to check if VType is a default VType.
GNEVehicleTypeFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
long onCmdCreateVehicleType(FXObject *, FXSelector, void *)
~VehicleTypeSelector()
destructor
GNEDemandElement * getCurrentVehicleType() const
get current Vehicle Type
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 ...
void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/GenericParametersEdit...
FXButton * myCopyVehicleTypeButton
"copy vehicle type"
virtual void hide()
hide Frame
VehicleTypeEditor * myVehicleTypeEditor
Vehicle Type editor (Create, copy, etc.)
GNENet * getNet() const
get the net object
void hideAttributesEditorModul()
hide attribute editor
~VehicleTypeEditor()
destructor
used to select a type of element in a combo box
Flag to check if a default VType was modified.
void refreshVehicleTypeEditorModul()
update VehicleTypeEditor modul
long onCmdDeleteVehicleType(FXObject *, FXSelector, void *)
Called when "Delete Vehicle Type" button is clicked.
virtual std::string getAttribute(SumoXMLAttr key) const =0
C++ TraCI client API implementation.
An Element which don't belongs to GNENet but has influency in the simulation.
FXButton * myCreateVehicleTypeButton
"create vehicle type" button