Eclipse SUMO - Simulation of Urban MObility
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-2024 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 
24 
25 // ===========================================================================
26 // class declaration
27 // ===========================================================================
28 
29 class GNEFrame;
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
34 
37  FXDECLARE(GNEDemandElementSelector)
38 
39 public:
41  GNEDemandElementSelector(GNEFrame* frameParent, SumoXMLTag demandElementTag, int tagType);
42 
44  GNEDemandElementSelector(GNEFrame* frameParent, const std::vector<GNETagProperties::TagType>& tagTypes);
45 
48 
51 
52  // @brief obtain allowed tags (derived from tagTypes)
53  const std::vector<SumoXMLTag>& getAllowedTags() const;
54 
56  void setDemandElement(GNEDemandElement* demandElement);
57 
59  void setDemandElements(const std::vector<GNEDemandElement*>& demandElements);
60 
63 
66 
68  bool isDemandElementSelectorShown() const;
69 
72 
75 
79  long onCmdSelectDemandElement(FXObject*, FXSelector, void*);
81 
82 protected:
84  FOX_CONSTRUCTOR(GNEDemandElementSelector)
85 
86 private:
89 
92 
95 
97  std::vector<SumoXMLTag> myDemandElementTags;
98 
101 
104 };
SumoXMLTag
Numbers representing SUMO-XML - element names.
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
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
ComboBox with icon.
MFXGroupBoxModule (based on FXGroupBox)