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.org/sumo
3// Copyright (C) 2001-2022 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
29class GNEFrame;
30
31// ===========================================================================
32// class definitions
33// ===========================================================================
34
37 FXDECLARE(DemandElementSelector)
38
39public:
41 DemandElementSelector(GNEFrame* frameParent, SumoXMLTag demandElementTag, GNEDemandElement* defaultElement = nullptr);
42
44 DemandElementSelector(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
69
72
75
78
82 long onCmdSelectDemandElement(FXObject*, FXSelector, void*);
84
85protected:
87 FOX_CONSTRUCTOR(DemandElementSelector)
88
89private:
92
95
97 FXLabel* myInfoLabel;
98
101
103 std::vector<SumoXMLTag> myDemandElementTags;
104
107};
SumoXMLTag
Numbers representing SUMO-XML - element names.
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
An Element which don't belong to GNENet but has influence in the simulation.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:53
MFXGroupBoxModule (based on FXGroupBox)
ComboBox with icon.