Eclipse SUMO - Simulation of Urban MObility
GNEPersonPlanFrame.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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // The Widget for add PersonPlan elements
16 /****************************************************************************/
17 #ifndef GNEPersonPlanFrame_h
18 #define GNEPersonPlanFrame_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include "GNEFrame.h"
25 
26 
27 // ===========================================================================
28 // class definitions
29 // ===========================================================================
33 class GNEPersonPlanFrame : public GNEFrame {
34 
35 public:
36 
37  // ===========================================================================
38  // class HelpCreation
39  // ===========================================================================
40 
41  class HelpCreation : protected FXGroupBox {
42 
43  public:
45  HelpCreation(GNEPersonPlanFrame* vehicleFrameParent);
46 
48  ~HelpCreation();
49 
51  void showHelpCreation();
52 
54  void hideHelpCreation();
55 
57  void updateHelpCreation();
58 
59  private:
62 
65  };
66 
67  // ===========================================================================
68  // class PersonPlanCreator
69  // ===========================================================================
70 
71  class PersonPlanCreator : protected FXGroupBox {
74 
75  public:
78 
81 
83  void edgePathCreatorName(const std::string& name);
84 
86  void showPersonPlanCreator();
87 
89  void hidePersonPlanCreator();
90 
92  void refreshPersonPlanCreator();
93 
95  std::vector<GNEEdge*> getClickedEdges() const;
96 
98  const std::vector<GNEEdge*>& getEdgePath() const;
99 
101  bool addEdge(GNEEdge* edge);
102 
104  void drawTemporalRoute() const;
105 
107  void abortPersonPlanCreation();
108 
110  void finishPersonPlanCreation();
111 
113  void removeLastAddedElement();
114 
118  long onCmdAbortPersonPlanCreation(FXObject*, FXSelector, void*);
119 
121  long onCmdFinishPersonPlanCreation(FXObject*, FXSelector, void*);
122 
124  long onCmdRemoveLastElement(FXObject*, FXSelector, void*);
126 
127  protected:
130 
131  private:
134 
137 
140 
143 
145  FXButton* myRemoveLastEdge;
146 
148  std::vector<GNEEdge*> myClickedEdges;
149 
151  std::vector<GNEEdge*> myTemporalEdgePath;
152  };
153 
158  GNEPersonPlanFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
159 
162 
164  void show();
165 
167  void hide();
168 
173  bool addPersonPlan(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
174 
177 
178 protected:
180  void tagSelected();
181 
183  void demandElementSelected();
184 
186  bool personPlanCreated(GNEAdditional* busStop, GNEDemandElement* route);
187 
188 private:
191 
194 
197 
200 
203 
206 };
207 
208 
209 #endif
210 
211 /****************************************************************************/
GNEPersonPlanFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
void hideHelpCreation()
hide HelpCreation
FXButton * myRemoveLastEdge
button for removing last edge
bool personPlanCreated(GNEAdditional *busStop, GNEDemandElement *route)
finish person plan creation
void hide()
hide Frame
GNEFrameAttributesModuls::AttributesCreator * myPersonPlanAttributes
internal vehicle attributes
GNEPersonPlanFrame * myPersonPlanFrameParent
pointer to PersonPlan Frame Parent
FXButton * myAbortCreationButton
button for abort route creation
void updateHelpCreation()
update HelpCreation
std::vector< GNEEdge * > myClickedEdges
current clicked edges
FXLabel * myInformationLabel
Label with creation information.
HelpCreation * myHelpCreation
Help creation.
void show()
show Frame
FXLabel * myCurrentBeginElementLabel
Label with current begin element.
void tagSelected()
Tag selected in TagSelector.
HelpCreation(GNEPersonPlanFrame *vehicleFrameParent)
constructor
class used to group all variables related with objects under cursor after a click over view ...
PersonPlanCreator * getPersonPlanCreator() const
get PersonPlanCreator modul
PersonPlanCreator * myPersonPlanCreator
Person Plan Creator.
std::vector< GNEEdge * > myTemporalEdgePath
vector with temporal edge path
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
GNEFrameModuls::TagSelector * myPersonPlanTagSelector
personPlan selector
~GNEPersonPlanFrame()
Destructor.
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
GNEPersonPlanFrame * myPersonPlanFrameParent
pointer to Person Plan Frame Parent
bool addPersonPlan(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
void showHelpCreation()
show HelpCreation
GNEFrameModuls::DemandElementSelector * myPersonSelector
Person selectors.
GNEFrameModuls::AttributeCarrierHierarchy * myPersonHierarchy
Person Hierarchy.
FXButton * myFinishCreationButton
button for finish route creation
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
void demandElementSelected()
selected demand element in DemandElementSelector