Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netedit/frames/demand/GNEStopFrame.h
193741 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2026 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 GNEStopFrame.h
15
/// @author Pablo Alvarez Lopez
16
/// @date March 2019
17
///
18
// The Widget for add Stops elements
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <netedit/frames/GNEFrame.h>
24
#include <netedit/frames/common/GNEGroupBoxModule.h>
25
26
// ===========================================================================
27
// class declaration
28
// ===========================================================================
29
30
class GNEAttributesEditor;
31
class GNEDemandElementSelector;
32
class GNETagSelector;
33
class MFXDynamicLabel;
34
35
// ===========================================================================
36
// class definitions
37
// ===========================================================================
38
39
class GNEStopFrame : public GNEFrame {
40
41
public:
42
43
// ===========================================================================
44
// class HelpCreation
45
// ===========================================================================
46
47
class HelpCreation : public GNEGroupBoxModule {
48
49
public:
50
/// @brief constructor
51
HelpCreation(GNEStopFrame* StopFrameParent);
52
53
/// @brief destructor
54
~HelpCreation();
55
56
/// @brief show HelpCreation
57
void showHelpCreation();
58
59
/// @brief hide HelpCreation
60
void hideHelpCreation();
61
62
/// @brief update HelpCreation
63
void updateHelpCreation();
64
65
private:
66
/// @brief pointer to Stop Frame Parent
67
GNEStopFrame* myStopFrameParent;
68
69
/// @brief Label with creation information
70
MFXDynamicLabel* myInformationLabel;
71
};
72
73
/**@brief Constructor
74
* @brief viewParent GNEViewParent in which this GNEFrame is placed
75
* @brief viewNet viewNet that uses this GNEFrame
76
*/
77
GNEStopFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
78
79
/// @brief Destructor
80
~GNEStopFrame();
81
82
/// @brief show Frame
83
void show();
84
85
/**@brief add Stop element
86
* @param viewObjects collection of objects under cursor after click over view
87
* @param mouseButtonKeyPressed key pressed during click
88
* @return true if Stop was successfully added
89
*/
90
bool addStop(const GNEViewNetHelper::ViewObjectsSelector& viewObjects, const GNEViewNetHelper::MouseButtonKeyPressed& mouseButtonKeyPressed);
91
92
/// @brief get stop parameters
93
bool getStopParameter(const SumoXMLTag stopTag, const GNELane* lane, const GNEAdditional* stoppingPlace);
94
95
/// @brief get stop parent selector
96
GNEDemandElementSelector* getStopParentSelector() const;
97
98
protected:
99
/// @brief Tag selected in GNETagSelector
100
void tagSelected();
101
102
/// @brief selected demand element in DemandElementSelector
103
void demandElementSelected();
104
105
/// @brief last clicked position
106
Position myLastClickedPosition;
107
108
private:
109
/// @brief stop parent base object
110
CommonXMLStructure::SumoBaseObject* myStopParentBaseObject = nullptr;
111
112
/// @brief plan parameters
113
CommonXMLStructure::PlanParameters myPlanParameters;
114
115
/// @brief Stop parent selectors
116
GNEDemandElementSelector* myStopParentSelector = nullptr;
117
118
/// @brief stop tag selector selector (used to select diffent kind of Stops)
119
GNETagSelector* myStopTagSelector = nullptr;
120
121
/// @brief attributes editor
122
GNEAttributesEditor* myAttributesEditor = nullptr;
123
124
/// @brief Help creation
125
HelpCreation* myHelpCreation = nullptr;
126
};
127
128