49 myFrameParent(frameParent),
50 myCurrentDemandElement(
nullptr),
51 myDemandElementTags({demandElementTag}),
53mySelectingMultipleElements(
false) {
58 refreshDemandElementSelector();
66 myFrameParent(frameParent),
67 myCurrentDemandElement(nullptr),
68 mySelectingMultipleElements(false) {
70 for (
const auto& tagType : tagTypes) {
72 for (
const auto& tagProperty : tagProperties) {
95const std::vector<SumoXMLTag>&
106 if (demandElement !=
nullptr) {
123 for (
const auto& demandElement : demandElements) {
196 for (
const auto& vType : ACs->getDemandElements().at(demandElementTag)) {
204 std::map<std::string, GNEDemandElement*> sortedElements;
205 for (
const auto& demandElement : ACs->getDemandElements().at(demandElementTag)) {
206 sortedElements[demandElement.second->getID()] = demandElement.second;
208 for (
const auto& demandElement : sortedElements) {
210 demandElement.second->getTagProperty().getBackGroundColor());
230 if (ACs->getDemandElements().at(*i).size() > 0) {
281 WRITE_DEBUG(
TL(
"Selected invalid item in DemandElementSelector"));
FXDEFMAP(GNEDemandElementSelector) 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 GUIDesignComboBoxVisibleItemsMedium
combo box medium small
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
const std::string DEFAULT_BIKETYPE_ID
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string getID() const
get ID (all Attribute Carriers have one)
static const std::vector< GNETagProperties > getTagPropertiesByType(const int tagPropertyCategory, const bool mergeCommonPlans)
get tagProperties associated to the given GNETagProperties::TagType (NETWORKELEMENT,...
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
std::vector< SumoXMLTag > myDemandElementTags
demand element tags
GNEDemandElementSelector(GNEFrame *frameParent, SumoXMLTag demandElementTag, int tagType)
FOX-declaration.
void setDemandElements(const std::vector< GNEDemandElement * > &demandElements)
set multiple demand elements to filter
GNEDemandElement * getPreviousPlanElement() const
get previous plan element
~GNEDemandElementSelector()
destructor
GNEFrame * myFrameParent
FOX need this.
bool isDemandElementSelectorShown() const
check if demand element selector is shown
void showDemandElementSelector()
show demand element selector
void setDemandElement(GNEDemandElement *demandElement)
set current demand element
long onCmdSelectDemandElement(FXObject *, FXSelector, void *)
void refreshDemandElementSelector()
refresh demand element selector
GNEDemandElement * myCurrentDemandElement
current demand element
GNEDemandElement * getCurrentDemandElement() const
get current demand element
bool mySelectingMultipleElements
flag for enable/disable multiple element selection
const std::vector< SumoXMLTag > & getAllowedTags() const
MFXComboBoxIcon * myDemandElementsComboBox
comboBox with the list of elements type
int myTagType
tag type (person, container or vehicle)
void hideDemandElementSelector()
hide demand element selector
GNEViewNet * getViewNet() const
get view net
virtual void demandElementSelected()
selected demand element in DemandElementSelector
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
const std::map< SumoXMLTag, std::map< const GUIGlObject *, GNEDemandElement * > > & getDemandElements() const
get demand elements
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
long setCurrentItem(const FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXint getNumItems() const
Return the number of items in the list.
FXString getText() const
Get the text.
void setTextColor(FXColor clr)
Change text color.
void clearItems()
Remove all items from the list.
std::string getItemText(FXint index) const
Get text for specified item.
FXint appendIconItem(const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append icon item in the last position
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)