Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netedit/frames/demand/GNEPersonPlanFrame.h
169684 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2025 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
/****************************************************************************/
14
/// @file GNEPersonPlanFrame.h
15
/// @author Pablo Alvarez Lopez
16
/// @date Jun 2019
17
///
18
// The Widget for add PersonPlan elements
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <netedit/frames/GNEFrame.h>
24
25
// ===========================================================================
26
// class declaration
27
// ===========================================================================
28
29
class GNEAttributesEditor;
30
class GNEDemandElementSelector;
31
class GNEElementTree;
32
class GNEPlanCreator;
33
class GNEPlanSelector;
34
35
// ===========================================================================
36
// class definitions
37
// ===========================================================================
38
/**
39
* @class GNEPersonPlanFrame
40
*/
41
class GNEPersonPlanFrame : public GNEFrame {
42
43
public:
44
/**@brief Constructor
45
* @brief viewParent GNEViewParent in which this GNEFrame is placed
46
* @brief viewNet viewNet that uses this GNEFrame
47
*/
48
GNEPersonPlanFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
49
50
/// @brief Destructor
51
~GNEPersonPlanFrame();
52
53
/// @brief show Frame
54
void show();
55
56
/// @brief hide Frame
57
void hide();
58
59
/**@brief add person plan element
60
* @param viewObjects collection of objects under cursor after click over view
61
* @return true if element was successfully added
62
*/
63
bool addPersonPlanElement(const GNEViewNetHelper::ViewObjectsSelector& viewObjects);
64
65
/// @brief reset selected person
66
void resetSelectedPerson();
67
68
/// @brief get plan creator module
69
GNEPlanCreator* getPlanCreator() const;
70
71
/// @brief get Person Hierarchy
72
GNEElementTree* getPersonHierarchy() const;
73
74
/// @brief get person selectors
75
GNEDemandElementSelector* getPersonSelector() const;
76
77
/// @brief get personPlan selector
78
GNEPlanSelector* getPlanSelector() const;
79
80
protected:
81
/// @brief Tag selected in GNETagSelector
82
void tagSelected();
83
84
/// @brief selected demand element in DemandElementSelector
85
void demandElementSelected();
86
87
/// @brief create path
88
bool createPath(const bool useLastRoute);
89
90
private:
91
/// @brief Person selectors
92
GNEDemandElementSelector* myPersonSelector = nullptr;
93
94
/// @brief personPlan selector
95
GNEPlanSelector* myPlanSelector = nullptr;
96
97
/// @brief person plan attributes editor
98
GNEAttributesEditor* myPersonPlanAttributesEditor = nullptr;
99
100
/// @brief plan Creator
101
GNEPlanCreator* myPlanCreator = nullptr;
102
103
/// @brief Person Hierarchy
104
GNEElementTree* myPersonHierarchy = nullptr;
105
106
/// @brief plan creator legend
107
GNEPlanCreatorLegend* myPlanCreatorLegend = nullptr;
108
};
109
110