49 myFrameParent(frameParent),
50 myCurrentDemandElement(defaultElement),
51 myDemandElementTags({demandElementTag}),
52mySelectingMultipleElements(
false) {
58 refreshDemandElementSelector();
66 myFrameParent(frameParent),
67 myCurrentDemandElement(nullptr),
68 mySelectingMultipleElements(false) {
70 for (
const auto& tagType : tagTypes) {
72 for (
const auto& tagProperty : tagProperties) {
96const std::vector<SumoXMLTag>&
107 if (demandElement ==
nullptr) {
110 myInfoLabel->setText(
"-Select an item in the list or\n click over an element in view");
130 for (
const auto& demandElement : demandElements) {
135 myInfoLabel->setText(
"-Clicked over multiple\n elements\n-Select an item in the\n list or click over an\n element in view");
187 for (
const auto& vType : demandElements.at(demandElementTag)) {
195 for (
const auto& demandElement : demandElements.at(demandElementTag)) {
224 if (demandElements.at(*i).size() > 0) {
266 return lastPersonPlan->
getParentAdditionals().back()->getParentLanes().front()->getParentEdge();
305 return lastContainerPlan->
getParentAdditionals().back()->getParentLanes().front()->getParentEdge();
339 WRITE_DEBUG(
"Selected invalid item in DemandElementSelector");
FXDEFMAP(DemandElementSelector) DemandElementSelectorMap[]
@ MID_GNE_SET_TYPE
used to select a type of element in a combo box
#define GUIDesignComboBox
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
const std::string DEFAULT_TAXITYPE_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
const std::string DEFAULT_BIKETYPE_ID
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_TRANSPORT_CONTAINERSTOP
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ GNE_TAG_PERSONTRIP_BUSSTOP
@ GNE_TAG_STOPCONTAINER_EDGE
@ GNE_TAG_STOPPERSON_BUSSTOP
@ GNE_TAG_STOPCONTAINER_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_EDGE
@ GNE_TAG_STOPPERSON_EDGE
@ GNE_TAG_TRANSHIP_CONTAINERSTOP
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
GNEDemandElement * getCurrentDemandElement() const
get current demand element
bool mySelectingMultipleElements
flag for enable/disable multiple element selection
long onCmdSelectDemandElement(FXObject *, FXSelector, void *)
~DemandElementSelector()
destructor
bool isDemandElementSelectorShown() const
check if demand element selector is shown
GNEDemandElement * myCurrentDemandElement
current demand element
void refreshDemandElementSelector()
refresh demand element selector
GNEEdge * getPersonPlanPreviousEdge() const
get previous edge for the current person plan
DemandElementSelector(GNEFrame *frameParent, SumoXMLTag demandElementTag, GNEDemandElement *defaultElement=nullptr)
FOX-declaration.
MFXIconComboBox * myDemandElementsMatchBox
comboBox with the list of elements type
FXLabel * myInfoLabel
info label
const std::vector< SumoXMLTag > & getAllowedTags() const
void setDemandElement(GNEDemandElement *demandElement)
set current demand element
GNEEdge * getContainerPlanPreviousEdge() const
get previous edge for the current container plan
std::vector< SumoXMLTag > myDemandElementTags
demand element tags
void showDemandElementSelector()
show demand element selector
void setDemandElements(const std::vector< GNEDemandElement * > &demandElements)
set multiple demand elements to filter
GNEFrame * myFrameParent
FOX need this.
void hideDemandElementSelector()
hide demand element selector
const std::string getID() const
get ID (all Attribute Carriers have one)
FXIcon * getACIcon() const
get FXIcon associated to this AC
static const std::vector< GNETagProperties > getTagPropertiesByType(const int tagPropertyCategory)
get tagProperties associated to the given GNETagProperties::TagType (NETWORKELEMENT,...
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
An Element which don't belong to GNENet but has influence in the simulation.
A road/street connecting two junctions (netedit-version)
GNEViewNet * getViewNet() const
get view net
virtual void demandElementSelected()
selected demand element in DemandElementSelector
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
const std::map< SumoXMLTag, std::set< GNEDemandElement * > > & getDemandElements() const
get demand elements
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
GNEDemandElement * getDefaultType() const
get default type
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
bool isContainer() const
return true if tag correspond to a container element
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool isPerson() const
return true if tag correspond to a person element
GNENet * getNet() const
get the net object
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
FXString getItem(FXint index) const
Return the item at the given index.
FXString getText() const
Get the text.
void setCurrentItem(FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
void setTextColor(FXColor clr)
Change text color.
void clearItems()
Remove all items from the list.
FXint getNumItems() const
Return the number of items in the list.
void setNumVisible(FXint nvis)
Set the number of visible items in the drop down list.
void setCustomText(const FXString text)
set custom text
bool setItem(const FXString &text, FXIcon *icon)
set Item
FXint appendIconItem(const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append icon