54mySelectingMultipleElements(
false) {
56 myDemandElementsComboBox =
new MFXComboBoxIcon(getCollapsableFrame(), frameParent->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
59 refreshDemandElementSelector();
66 const std::vector<SumoXMLTag> exceptions) :
73 for (
const auto& tagType : tagTypes) {
75 for (
const auto tagProperty : tagPropertiesByType) {
76 if (std::find(exceptions.begin(), exceptions.end(), tagProperty->getTag()) == exceptions.end()) {
100const std::vector<SumoXMLTag>&
111 if (demandElement !=
nullptr) {
128 for (
const auto& demandElement : demandElements) {
167 const auto& ACs =
myFrameParent->getViewNet()->getNet()->getAttributeCarriers();
201 for (
const auto& vType : ACs->getDemandElements().at(demandElementTag)) {
209 std::map<std::string, GNEDemandElement*> sortedElements;
210 for (
const auto& demandElement : ACs->getDemandElements().at(demandElementTag)) {
211 sortedElements[demandElement.second->getID()] = demandElement.second;
213 for (
const auto& demandElement : sortedElements) {
215 demandElement.second->getTagProperty()->getBackGroundColor());
235 if (ACs->getDemandElements().at(*i).size() > 0) {
264 for (
const auto& demandElement :
myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(demandElementTag)) {
FXDEFMAP(GNEDemandElementSelector) DemandElementSelectorMap[]
@ MID_GNE_SET_TYPE
used to select a type of element in a combo box
#define GUIDesignTextColorRed
red color (for invalid text)
#define GUIDesignComboBox
#define GUIDesignComboBoxVisibleItems
#define GUIDesignTextColorBlack
black color (for correct text)
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 override
get ID (all Attribute Carriers have one)
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
std::vector< SumoXMLTag > myDemandElementTags
demand element tags
GNEDemandElementSelector(GNEFrame *frameParent, SumoXMLTag demandElementTag, const GNETagProperties::Type 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
void hideDemandElementSelector()
hide demand element selector
GNETagProperties::Type myTagType
tag type (person, container or vehicle)
GNEViewNet * getViewNet() const
get view net
const GNETagPropertiesDatabase * getTagPropertiesDatabase() const
get tag properties database
const std::vector< const GNETagProperties * > getTagPropertiesByType(const GNETagProperties::Type type) const
get tagProperties associated to the given GNETagProperties::Type (NETWORKELEMENT, ADDITIONALELEMENT,...
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
GNENet * getNet() const
get the net object
GNEViewParent * getViewParent() const
get the net object
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
MFXStaticToolTip * getStaticTooltipMenu() const
get static toolTip for menus
MFXGroupBoxModule (based on FXGroupBox).
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
MFXGroupBoxModule(GNEFrame *frame, const std::string &text, const int options=Options::COLLAPSIBLE)
constructor for frames