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