Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEDemandSelector.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2026 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Frame for select demand elements
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25
26// ===========================================================================
27// class declaration
28// ===========================================================================
29
30class GNEFrame;
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
39
40public:
42 GNEDemandElementSelector(GNEFrame* frameParent, SumoXMLTag demandElementTag, const GNETagProperties::Type tagType, const bool checkIcon);
43
45 GNEDemandElementSelector(GNEFrame* frameParent, const std::vector<SumoXMLTag> demandElementTags, const GNETagProperties::Type tagType, const bool checkIcon);
46
48 GNEDemandElementSelector(GNEFrame* frameParent, const std::vector<GNETagProperties::Type> tagTypes,
49 const std::vector<SumoXMLTag> exceptions, const bool checkIcon);
50
53
56
57 // @brief obtain allowed tags (derived from tagTypes)
58 const std::vector<SumoXMLTag>& getAllowedTags() const;
59
61 void setDemandElement(GNEDemandElement* demandElement);
62
64 void setDemandElements(const std::vector<GNEDemandElement*>& demandElements);
65
68
71
74
77
80
84 long onCmdSelectDemandElement(FXObject*, FXSelector, void*);
86
87protected:
89 FOX_CONSTRUCTOR(GNEDemandElementSelector)
90
91private:
94
97
100
102 std::vector<SumoXMLTag> myDemandElementTags;
103
106
109
112};
SumoXMLTag
Numbers representing SUMO-XML - element names.
std::vector< SumoXMLTag > myDemandElementTags
demand element tags
void setDemandElements(const std::vector< GNEDemandElement * > &demandElements)
set multiple demand elements to filter
GNEDemandElement * getPreviousPlanElement() const
get previous plan element
GNEFrame * myFrameParent
FOX need this.
bool myCheckIcon
flag to check if we have to compare icons when we choose an element in the comboBox
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)
GNEGroupBoxModule (based on FXGroupBox)