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 /****************************************************************************/
14 // The Widget for add PersonPlan elements
15 /****************************************************************************/
16 #ifndef GNEPersonPlanFrame_h
17 #define GNEPersonPlanFrame_h
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include "GNEFrame.h"
24 
25 
26 // ===========================================================================
27 // class definitions
28 // ===========================================================================
32 class GNEPersonPlanFrame : public GNEFrame {
33 
34 public:
35 
36  // ===========================================================================
37  // class HelpCreation
38  // ===========================================================================
39 
40  class HelpCreation : protected FXGroupBox {
41 
42  public:
44  HelpCreation(GNEPersonPlanFrame* vehicleFrameParent);
45 
47  ~HelpCreation();
48 
50  void showHelpCreation();
51 
53  void hideHelpCreation();
54 
56  void updateHelpCreation();
57 
58  private:
61 
64  };
65 
66  // ===========================================================================
67  // class PersonPlanCreator
68  // ===========================================================================
69 
70  class PersonPlanCreator : protected FXGroupBox {
73 
74  public:
77 
80 
82  void edgePathCreatorName(const std::string& name);
83 
85  void showPersonPlanCreator();
86 
88  void hidePersonPlanCreator();
89 
92 
94  std::vector<GNEEdge*> getClickedEdges() const;
95 
97  const std::vector<GNEEdge*>& getEdgePath() const;
98 
100  bool addEdge(GNEEdge* edge);
101 
103  void drawTemporalRoute() const;
104 
107 
110 
112  void removeLastAddedElement();
113 
117  long onCmdAbortPersonPlanCreation(FXObject*, FXSelector, void*);
118 
120  long onCmdFinishPersonPlanCreation(FXObject*, FXSelector, void*);
121 
123  long onCmdRemoveLastElement(FXObject*, FXSelector, void*);
125 
126  protected:
128 
129  private:
132 
135 
138 
141 
143  FXButton* myRemoveLastEdge;
144 
146  std::vector<GNEEdge*> myClickedEdges;
147 
149  std::vector<GNEEdge*> myTemporalEdgePath;
150  };
151 
156  GNEPersonPlanFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
157 
160 
162  void show();
163 
165  void hide();
166 
171  bool addPersonPlan(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
172 
175 
176 protected:
178  void tagSelected();
179 
181  void demandElementSelected();
182 
184  bool personPlanCreated(GNEAdditional* busStop, GNEDemandElement* route);
185 
186 private:
189 
192 
195 
198 
201 
204 };
205 
206 
207 #endif
208 
209 /****************************************************************************/
GNEPersonPlanFrame::tagSelected
void tagSelected()
Tag selected in TagSelector.
Definition: GNEPersonPlanFrame.cpp:516
GNEPersonPlanFrame::HelpCreation::myPersonPlanFrameParent
GNEPersonPlanFrame * myPersonPlanFrameParent
pointer to PersonPlan Frame Parent
Definition: GNEPersonPlanFrame.h:60
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:55
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
GNEPersonPlanFrame::PersonPlanCreator::onCmdFinishPersonPlanCreation
long onCmdFinishPersonPlanCreation(FXObject *, FXSelector, void *)
Called when the user click over button "Finish route creation".
Definition: GNEPersonPlanFrame.cpp:368
GNEPersonPlanFrame::getPersonPlanCreator
PersonPlanCreator * getPersonPlanCreator() const
get PersonPlanCreator modul
Definition: GNEPersonPlanFrame.cpp:507
GNEPersonPlanFrame::PersonPlanCreator::addEdge
bool addEdge(GNEEdge *edge)
add edge to route
Definition: GNEPersonPlanFrame.cpp:273
GNEPersonPlanFrame::PersonPlanCreator::abortPersonPlanCreation
void abortPersonPlanCreation()
abort person plan creation
Definition: GNEPersonPlanFrame.cpp:334
GNEPersonPlanFrame::PersonPlanCreator::~PersonPlanCreator
~PersonPlanCreator()
destructor
Definition: GNEPersonPlanFrame.cpp:168
GNEPersonPlanFrame::PersonPlanCreator::myClickedEdges
std::vector< GNEEdge * > myClickedEdges
current clicked edges
Definition: GNEPersonPlanFrame.h:146
GNEPersonPlanFrame::HelpCreation::~HelpCreation
~HelpCreation()
destructor
Definition: GNEPersonPlanFrame.cpp:67
GNEFrameAttributesModuls::AttributesCreator
Definition: GNEFrameAttributesModuls.h:148
GNEPersonPlanFrame::PersonPlanCreator::myCurrentBeginElementLabel
FXLabel * myCurrentBeginElementLabel
Label with current begin element.
Definition: GNEPersonPlanFrame.h:134
GNEFrame
Definition: GNEFrame.h:34
GNEViewNet
Definition: GNEViewNet.h:42
GNEPersonPlanFrame::PersonPlanCreator::removeLastAddedElement
void removeLastAddedElement()
remove last added element
Definition: GNEPersonPlanFrame.cpp:350
GNEPersonPlanFrame::myPersonPlanTagSelector
GNEFrameModuls::TagSelector * myPersonPlanTagSelector
personPlan selector
Definition: GNEPersonPlanFrame.h:191
GNEPersonPlanFrame::PersonPlanCreator::myTemporalEdgePath
std::vector< GNEEdge * > myTemporalEdgePath
vector with temporal edge path
Definition: GNEPersonPlanFrame.h:149
GNEPersonPlanFrame::PersonPlanCreator::refreshPersonPlanCreator
void refreshPersonPlanCreator()
show PersonPlanCreator
Definition: GNEPersonPlanFrame.cpp:213
GNEPersonPlanFrame::PersonPlanCreator::getClickedEdges
std::vector< GNEEdge * > getClickedEdges() const
get clicked edges
Definition: GNEPersonPlanFrame.cpp:261
GNEPersonPlanFrame::PersonPlanCreator::finishPersonPlanCreation
void finishPersonPlanCreation()
finish person plan creation
Definition: GNEPersonPlanFrame.cpp:342
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNEPersonPlanFrame::~GNEPersonPlanFrame
~GNEPersonPlanFrame()
Destructor.
Definition: GNEPersonPlanFrame.cpp:429
GNEPersonPlanFrame::PersonPlanCreator::myFinishCreationButton
FXButton * myFinishCreationButton
button for finish route creation
Definition: GNEPersonPlanFrame.h:137
GNEPersonPlanFrame::myPersonPlanAttributes
GNEFrameAttributesModuls::AttributesCreator * myPersonPlanAttributes
internal vehicle attributes
Definition: GNEPersonPlanFrame.h:194
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:148
GNEFrameModuls::DemandElementSelector
Definition: GNEFrameModuls.h:112
GNEPersonPlanFrame::PersonPlanCreator::getEdgePath
const std::vector< GNEEdge * > & getEdgePath() const
get current edge path
Definition: GNEPersonPlanFrame.cpp:267
GNEFrameModuls::TagSelector
Definition: GNEFrameModuls.h:44
GNEPersonPlanFrame::PersonPlanCreator::PersonPlanCreator
PersonPlanCreator(GNEPersonPlanFrame *frameParent)
FOX-declaration.
Definition: GNEPersonPlanFrame.cpp:147
GNEPersonPlanFrame::PersonPlanCreator::hidePersonPlanCreator
void hidePersonPlanCreator()
show PersonPlanCreator
Definition: GNEPersonPlanFrame.cpp:192
GNEPersonPlanFrame::HelpCreation
Definition: GNEPersonPlanFrame.h:40
FOX_CONSTRUCTOR
#define FOX_CONSTRUCTOR(classname)
Definition: config.h:13
GNEPersonPlanFrame::myPersonHierarchy
GNEFrameModuls::AttributeCarrierHierarchy * myPersonHierarchy
Person Hierarchy.
Definition: GNEPersonPlanFrame.h:200
GNEPersonPlanFrame::personPlanCreated
bool personPlanCreated(GNEAdditional *busStop, GNEDemandElement *route)
finish person plan creation
Definition: GNEPersonPlanFrame.cpp:587
GNEPersonPlanFrame::GNEPersonPlanFrame
GNEPersonPlanFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Definition: GNEPersonPlanFrame.cpp:403
GNEPersonPlanFrame::HelpCreation::showHelpCreation
void showHelpCreation()
show HelpCreation
Definition: GNEPersonPlanFrame.cpp:71
GNEFrameModuls::AttributeCarrierHierarchy
Definition: GNEFrameModuls.h:287
GNEPersonPlanFrame::PersonPlanCreator::drawTemporalRoute
void drawTemporalRoute() const
draw temporal route
Definition: GNEPersonPlanFrame.cpp:306
GNEPersonPlanFrame::PersonPlanCreator::showPersonPlanCreator
void showPersonPlanCreator()
show PersonPlanCreator
Definition: GNEPersonPlanFrame.cpp:183
GNEPersonPlanFrame::PersonPlanCreator::myRemoveLastEdge
FXButton * myRemoveLastEdge
button for removing last edge
Definition: GNEPersonPlanFrame.h:143
GNEPersonPlanFrame::HelpCreation::myInformationLabel
FXLabel * myInformationLabel
Label with creation information.
Definition: GNEPersonPlanFrame.h:63
GNEPersonPlanFrame::PersonPlanCreator::onCmdAbortPersonPlanCreation
long onCmdAbortPersonPlanCreation(FXObject *, FXSelector, void *)
Definition: GNEPersonPlanFrame.cpp:358
GNEPersonPlanFrame::hide
void hide()
hide Frame
Definition: GNEPersonPlanFrame.cpp:464
GNEPersonPlanFrame::PersonPlanCreator::onCmdRemoveLastElement
long onCmdRemoveLastElement(FXObject *, FXSelector, void *)
Called when the user click over button "Remove last inserted edge".
Definition: GNEPersonPlanFrame.cpp:385
GNEPersonPlanFrame::PersonPlanCreator::myPersonPlanFrameParent
GNEPersonPlanFrame * myPersonPlanFrameParent
pointer to Person Plan Frame Parent
Definition: GNEPersonPlanFrame.h:131
GNEPersonPlanFrame::myPersonPlanCreator
PersonPlanCreator * myPersonPlanCreator
Person Plan Creator.
Definition: GNEPersonPlanFrame.h:197
GNEPersonPlanFrame::HelpCreation::HelpCreation
HelpCreation(GNEPersonPlanFrame *vehicleFrameParent)
constructor
Definition: GNEPersonPlanFrame.cpp:60
GNEPersonPlanFrame::demandElementSelected
void demandElementSelected()
selected demand element in DemandElementSelector
Definition: GNEPersonPlanFrame.cpp:546
GNEPersonPlanFrame::myPersonSelector
GNEFrameModuls::DemandElementSelector * myPersonSelector
Person selectors.
Definition: GNEPersonPlanFrame.h:188
GNEPersonPlanFrame::PersonPlanCreator::edgePathCreatorName
void edgePathCreatorName(const std::string &name)
update PersonPlanCreator name
Definition: GNEPersonPlanFrame.cpp:172
GNEPersonPlanFrame::PersonPlanCreator
Definition: GNEPersonPlanFrame.h:70
GNEPersonPlanFrame::PersonPlanCreator::myAbortCreationButton
FXButton * myAbortCreationButton
button for abort route creation
Definition: GNEPersonPlanFrame.h:140
GNEPersonPlanFrame::addPersonPlan
bool addPersonPlan(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
Definition: GNEPersonPlanFrame.cpp:473
GNEFrame.h
GNEPersonPlanFrame::myHelpCreation
HelpCreation * myHelpCreation
Help creation.
Definition: GNEPersonPlanFrame.h:203
GNEPersonPlanFrame::show
void show()
show Frame
Definition: GNEPersonPlanFrame.cpp:433
GNEPersonPlanFrame
Definition: GNEPersonPlanFrame.h:32
GNEPersonPlanFrame::HelpCreation::hideHelpCreation
void hideHelpCreation()
hide HelpCreation
Definition: GNEPersonPlanFrame.cpp:80
GNEPersonPlanFrame::HelpCreation::updateHelpCreation
void updateHelpCreation()
update HelpCreation
Definition: GNEPersonPlanFrame.cpp:85