Eclipse SUMO - Simulation of Urban MObility
GNEPlanSelector.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 person/container plans
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
23 #include "GNETagSelector.h"
24 
25 // ===========================================================================
26 // class declaration
27 // ===========================================================================
28 
29 class GNEFrame;
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
34 
37  FXDECLARE(GNEPlanSelector)
38 
39 public:
41  GNEPlanSelector(GNEFrame* frameParent, SumoXMLTag planType);
42 
45 
47  void showPlanSelector();
48 
50  void hidePlanSelector();
51 
54 
57 
59  void refreshPlanSelector();
60 
62  bool markRoutes() const;
63 
65  bool markEdges() const;
66 
68  bool markJunctions() const;
69 
71  bool markBusStops() const;
72 
74  bool markTrainStops() const;
75 
77  bool markContainerStops() const;
78 
80  bool markTAZs() const;
81 
84 
86  long onCmdSelectPlan(FXObject*, FXSelector, void*);
87 
89 
90 protected:
92  FOX_CONSTRUCTOR(GNEPlanSelector)
93 
94 
95  bool isPlanValid() const;
96 
99 
102 
103 private:
106 
109 
111  std::pair<GNETagProperties, GNEDemandElement*> myCurrentPlanTemplate;
112 
114  std::vector<std::pair<GNETagProperties, GNEDemandElement*> > myPlanTemplates;
115 };
SumoXMLTag
Numbers representing SUMO-XML - element names.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:42
bool markContainerStops() const
check if mark containerStops with dotted contours
std::vector< std::pair< GNETagProperties, GNEDemandElement * > > myPlanTemplates
list with demand templates
GNEDemandElement * getCurrentPlanTemplate() const
get current plan template
bool markJunctions() const
check if mark junctions with dotted contours
void showPlanSelector()
show plan selector
void fillPersonPlanTemplates(GNENet *net)
fill person templates
bool markRoutes() const
check if mark routes with dotted contours
const GNETagProperties & getCurrentPlanTagProperties() const
get current plan tag properties
void hidePlanSelector()
plan item selector
GNEPlanSelector(GNEFrame *frameParent, SumoXMLTag planType)
FOX-declaration.
bool markTAZs() const
check if mark TAZs with dotted contours
~GNEPlanSelector()
destructor
GNEFrame * myFrameParent
pointer to Frame Parent
std::pair< GNETagProperties, GNEDemandElement * > myCurrentPlanTemplate
current plan template;
bool markBusStops() const
check if mark busStops with dotted contours
MFXComboBoxIcon * myPlansComboBox
comboBox with the tags
long onCmdSelectPlan(FXObject *, FXSelector, void *)
Called when the user select an element in ComboBox.
bool markEdges() const
check if mark edges with dotted contours
void refreshPlanSelector()
refresh plan selector (used when frameParent is show)
void fillContainerPlanTemplates(GNENet *net)
fill container templates
bool markTrainStops() const
check if mark trainStops with dotted contours
bool isPlanValid() const
FOX need this.
ComboBox with icon.
MFXGroupBoxModule (based on FXGroupBox)