63 myPersonTypeFrameParent(personTypeFrameParent),
64 myCurrentPersonType(
nullptr) {
68 for (
const auto& i : myPersonTypeFrameParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(
SUMO_TAG_PTYPE)) {
69 myTypeMatchBox->appendItem(i.first.c_str());
74 if (myTypeMatchBox->getNumItems() <= 20) {
75 myTypeMatchBox->setNumVisible((
int)myTypeMatchBox->getNumItems());
77 myTypeMatchBox->setNumVisible(20);
165 WRITE_DEBUG(
"Selected invalid item in PersonTypeSelector");
260 WRITE_DEBUG(
"Opening FXMessageBox 'remove vType'");
262 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
266 " person" + plural +
". Continue?").c_str());
270 WRITE_DEBUG(
"Closed FXMessageBox 'remove vType' with 'No'");
271 }
else if (answer == 4) {
272 WRITE_DEBUG(
"Closed FXMessageBox 'remove vType' with 'ESC'");
352 GNEFrame(horizontalFrameParent, viewNet,
"Person Types") {
const AttributeCarriers & getAttributeCarriers() const
retrieve all attribute carriers of Net
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
PersonTypeEditor * myPersonTypeEditor
Vehicle Type editor (Create, copy, etc.)
#define GUIDesignComboBoxNCol
number of column of every combo box
void showPersonTypeEditorModul()
show PersonTypeEditor modul
PersonTypeEditor()
FOX needs this.
GNEDemandElement * myCurrentPersonType
pointer to current person type
long onCmdCopyPersonType(FXObject *, FXSelector, void *)
Called when "Copy Vehicle Type" button is clicked.
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
GNEFrameAttributesModuls::AttributesEditor * myPersonTypeAttributesEditor
editorinternal person type attributes
~GNEPersonTypeFrame()
Destructor.
long onCmdCreatePersonType(FXObject *, FXSelector, void *)
void refreshPersonTypeSelector()
refresh person type
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...
GNEPersonTypeFrame * myPersonTypeFrameParent
pointer to person type Frame Parent
void hidePersonTypeEditorModul()
hide PersonTypeEditor box
const std::string DEFAULT_VTYPE_ID
GNEViewNet * getViewNet() const
get view net
const std::vector< GNEDemandElement * > & getDemandElementChildren() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
FXButton * myDeletePersonTypeButton
"delete person type" button
#define GUIDesignComboBox
GNEViewNet * myViewNet
View Net.
void setCurrentPersonType(GNEDemandElement *vType)
set current Vehicle Type
GNEUndoList * getUndoList() const
get the undoList object
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
long onCmdSelectItem(FXObject *, FXSelector, void *)
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.
PersonTypeSelector * getPersonTypeSelector() const
get person type selector
void refreshPersonTypeEditorModul()
update PersonTypeEditor modul
long onCmdDeletePersonType(FXObject *, FXSelector, void *)
Called when "Delete Vehicle Type" button is clicked.
FXButton * myResetDefaultPersonTypeButton
"delete default person type" button
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
std::string generateDemandElementID(const std::string &prefix, SumoXMLTag type) const
generate demand element id
~PersonTypeSelector()
destructor
~PersonTypeEditor()
destructor
GNEDemandElement * getCurrentPersonType() const
get current Vehicle Type
FXDEFMAP(GNEPersonTypeFrame::PersonTypeSelector) personTypeSelectorMap[]
virtual void show()
show Frame
Flag to check if VType is a default VType.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
const std::string DEFAULT_PEDTYPE_ID
FXButton * myCreatePersonTypeButton
"create person type" button
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 ...
virtual void hide()
hide Frame
FXButton * myCopyPersonTypeButton
"copy person type"
GNENet * getNet() const
get the net object
FXComboBox * myTypeMatchBox
comboBox with the list of elements type
void hideAttributesEditorModul()
hide attribute editor
description of a person type (used in NETEDIT)
long onCmdResetPersonType(FXObject *, FXSelector, void *)
Called when "Delete Vehicle Type" button is clicked.
used to select a type of element in a combo box
PersonTypeSelector * myPersonTypeSelector
person type selector
GNEPersonTypeFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Flag to check if a default VType was modified.
C++ TraCI client API implementation.
virtual std::string getAttribute(SumoXMLAttr key) const =0
GNEPersonTypeFrame * myPersonTypeFrameParent
pointer to Frame Parent
An Element which don't belongs to GNENet but has influency in the simulation.
void attributeUpdated()
function called after set a valid attribute in AttributeCreator/AttributeEditor/GenericParametersEdit...