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 
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 
108 
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::tagSelected
void tagSelected()
Tag selected in TagSelector.
Definition: GNEPersonPlanFrame.cpp:517
GNEPersonPlanFrame::HelpCreation::myPersonPlanFrameParent
GNEPersonPlanFrame * myPersonPlanFrameParent
pointer to PersonPlan Frame Parent
Definition: GNEPersonPlanFrame.h:61
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:54
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
GNEPersonPlanFrame::PersonPlanCreator::onCmdFinishPersonPlanCreation
long onCmdFinishPersonPlanCreation(FXObject *, FXSelector, void *)
Called when the user click over button "Finish route creation".
Definition: GNEPersonPlanFrame.cpp:369
GNEPersonPlanFrame::getPersonPlanCreator
PersonPlanCreator * getPersonPlanCreator() const
get PersonPlanCreator modul
Definition: GNEPersonPlanFrame.cpp:508
GNEPersonPlanFrame::PersonPlanCreator::addEdge
bool addEdge(GNEEdge *edge)
add edge to route
Definition: GNEPersonPlanFrame.cpp:274
GNEPersonPlanFrame::PersonPlanCreator::abortPersonPlanCreation
void abortPersonPlanCreation()
abort person plan creation
Definition: GNEPersonPlanFrame.cpp:335
GNEPersonPlanFrame::PersonPlanCreator::~PersonPlanCreator
~PersonPlanCreator()
destructor
Definition: GNEPersonPlanFrame.cpp:169
GNEPersonPlanFrame::PersonPlanCreator::myClickedEdges
std::vector< GNEEdge * > myClickedEdges
current clicked edges
Definition: GNEPersonPlanFrame.h:148
GNEPersonPlanFrame::HelpCreation::~HelpCreation
~HelpCreation()
destructor
Definition: GNEPersonPlanFrame.cpp:68
GNEFrameAttributesModuls::AttributesCreator
Definition: GNEFrameAttributesModuls.h:157
GNEPersonPlanFrame::PersonPlanCreator::myCurrentBeginElementLabel
FXLabel * myCurrentBeginElementLabel
Label with current begin element.
Definition: GNEPersonPlanFrame.h:136
GNEFrame
Definition: GNEFrame.h:35
GNEViewNet
Definition: GNEViewNet.h:43
GNEPersonPlanFrame::PersonPlanCreator::removeLastAddedElement
void removeLastAddedElement()
remove last added element
Definition: GNEPersonPlanFrame.cpp:351
GNEPersonPlanFrame::myPersonPlanTagSelector
GNEFrameModuls::TagSelector * myPersonPlanTagSelector
personPlan selector
Definition: GNEPersonPlanFrame.h:193
GNEPersonPlanFrame::PersonPlanCreator::myTemporalEdgePath
std::vector< GNEEdge * > myTemporalEdgePath
vector with temporal edge path
Definition: GNEPersonPlanFrame.h:151
GNEPersonPlanFrame::PersonPlanCreator::refreshPersonPlanCreator
void refreshPersonPlanCreator()
show PersonPlanCreator
Definition: GNEPersonPlanFrame.cpp:214
GNEPersonPlanFrame::PersonPlanCreator::getClickedEdges
std::vector< GNEEdge * > getClickedEdges() const
get clicked edges
Definition: GNEPersonPlanFrame.cpp:262
GNEPersonPlanFrame::PersonPlanCreator::finishPersonPlanCreation
void finishPersonPlanCreation()
finish person plan creation
Definition: GNEPersonPlanFrame.cpp:343
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
GNEPersonPlanFrame::~GNEPersonPlanFrame
~GNEPersonPlanFrame()
Destructor.
Definition: GNEPersonPlanFrame.cpp:430
GNEPersonPlanFrame::PersonPlanCreator::myFinishCreationButton
FXButton * myFinishCreationButton
button for finish route creation
Definition: GNEPersonPlanFrame.h:139
GNEPersonPlanFrame::myPersonPlanAttributes
GNEFrameAttributesModuls::AttributesCreator * myPersonPlanAttributes
internal vehicle attributes
Definition: GNEPersonPlanFrame.h:196
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:149
GNEFrameModuls::DemandElementSelector
Definition: GNEFrameModuls.h:114
GNEPersonPlanFrame::PersonPlanCreator::getEdgePath
const std::vector< GNEEdge * > & getEdgePath() const
get current edge path
Definition: GNEPersonPlanFrame.cpp:268
GNEFrameModuls::TagSelector
Definition: GNEFrameModuls.h:45
GNEPersonPlanFrame::PersonPlanCreator::PersonPlanCreator
PersonPlanCreator()
FOX needs this.
Definition: GNEPersonPlanFrame.h:129
GNEPersonPlanFrame::PersonPlanCreator::hidePersonPlanCreator
void hidePersonPlanCreator()
show PersonPlanCreator
Definition: GNEPersonPlanFrame.cpp:193
GNEPersonPlanFrame::HelpCreation
Definition: GNEPersonPlanFrame.h:41
GNEPersonPlanFrame::myPersonHierarchy
GNEFrameModuls::AttributeCarrierHierarchy * myPersonHierarchy
Person Hierarchy.
Definition: GNEPersonPlanFrame.h:202
GNEPersonPlanFrame::personPlanCreated
bool personPlanCreated(GNEAdditional *busStop, GNEDemandElement *route)
finish person plan creation
Definition: GNEPersonPlanFrame.cpp:588
GNEPersonPlanFrame::GNEPersonPlanFrame
GNEPersonPlanFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Definition: GNEPersonPlanFrame.cpp:404
GNEPersonPlanFrame::HelpCreation::showHelpCreation
void showHelpCreation()
show HelpCreation
Definition: GNEPersonPlanFrame.cpp:72
GNEFrameModuls::AttributeCarrierHierarchy
Definition: GNEFrameModuls.h:291
GNEPersonPlanFrame::PersonPlanCreator::drawTemporalRoute
void drawTemporalRoute() const
draw temporal route
Definition: GNEPersonPlanFrame.cpp:307
GNEPersonPlanFrame::PersonPlanCreator::showPersonPlanCreator
void showPersonPlanCreator()
show PersonPlanCreator
Definition: GNEPersonPlanFrame.cpp:184
GNEPersonPlanFrame::PersonPlanCreator::myRemoveLastEdge
FXButton * myRemoveLastEdge
button for removing last edge
Definition: GNEPersonPlanFrame.h:145
GNEPersonPlanFrame::HelpCreation::myInformationLabel
FXLabel * myInformationLabel
Label with creation information.
Definition: GNEPersonPlanFrame.h:64
GNEPersonPlanFrame::PersonPlanCreator::onCmdAbortPersonPlanCreation
long onCmdAbortPersonPlanCreation(FXObject *, FXSelector, void *)
Definition: GNEPersonPlanFrame.cpp:359
GNEPersonPlanFrame::hide
void hide()
hide Frame
Definition: GNEPersonPlanFrame.cpp:465
GNEPersonPlanFrame::PersonPlanCreator::onCmdRemoveLastElement
long onCmdRemoveLastElement(FXObject *, FXSelector, void *)
Called when the user click over button "Remove last inserted edge".
Definition: GNEPersonPlanFrame.cpp:386
GNEPersonPlanFrame::PersonPlanCreator::myPersonPlanFrameParent
GNEPersonPlanFrame * myPersonPlanFrameParent
pointer to Person Plan Frame Parent
Definition: GNEPersonPlanFrame.h:133
GNEPersonPlanFrame::myPersonPlanCreator
PersonPlanCreator * myPersonPlanCreator
Person Plan Creator.
Definition: GNEPersonPlanFrame.h:199
GNEPersonPlanFrame::HelpCreation::HelpCreation
HelpCreation(GNEPersonPlanFrame *vehicleFrameParent)
constructor
Definition: GNEPersonPlanFrame.cpp:61
GNEPersonPlanFrame::demandElementSelected
void demandElementSelected()
selected demand element in DemandElementSelector
Definition: GNEPersonPlanFrame.cpp:547
GNEPersonPlanFrame::myPersonSelector
GNEFrameModuls::DemandElementSelector * myPersonSelector
Person selectors.
Definition: GNEPersonPlanFrame.h:190
GNEPersonPlanFrame::PersonPlanCreator::edgePathCreatorName
void edgePathCreatorName(const std::string &name)
update PersonPlanCreator name
Definition: GNEPersonPlanFrame.cpp:173
GNEPersonPlanFrame::PersonPlanCreator
Definition: GNEPersonPlanFrame.h:71
GNEPersonPlanFrame::PersonPlanCreator::myAbortCreationButton
FXButton * myAbortCreationButton
button for abort route creation
Definition: GNEPersonPlanFrame.h:142
GNEPersonPlanFrame::addPersonPlan
bool addPersonPlan(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
Definition: GNEPersonPlanFrame.cpp:474
GNEFrame.h
GNEPersonPlanFrame::myHelpCreation
HelpCreation * myHelpCreation
Help creation.
Definition: GNEPersonPlanFrame.h:205
GNEPersonPlanFrame::show
void show()
show Frame
Definition: GNEPersonPlanFrame.cpp:434
GNEPersonPlanFrame
Definition: GNEPersonPlanFrame.h:33
GNEPersonPlanFrame::HelpCreation::hideHelpCreation
void hideHelpCreation()
hide HelpCreation
Definition: GNEPersonPlanFrame.cpp:81
GNEPersonPlanFrame::HelpCreation::updateHelpCreation
void updateHelpCreation()
update HelpCreation
Definition: GNEPersonPlanFrame.cpp:86