Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netedit/frames/demand/GNEContainerPlanFrame.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 GNEContainerPlanFrame.h
15
/// @author Pablo Alvarez Lopez
16
/// @date Jun 2019
17
///
18
// The Widget for add ContainerPlan 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 GNEContainerPlanFrame
40
*/
41
class GNEContainerPlanFrame : public GNEFrame {
42
43
public:
44
45
/**@brief Constructor
46
* @brief viewParent GNEViewParent in which this GNEFrame is placed
47
* @brief viewNet viewNet that uses this GNEFrame
48
*/
49
GNEContainerPlanFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
50
51
/// @brief Destructor
52
~GNEContainerPlanFrame();
53
54
/// @brief show Frame
55
void show();
56
57
/// @brief hide Frame
58
void hide();
59
60
/**@brief add container plan element
61
* @param viewObjects collection of objects under cursor after click over view
62
* @return true if element was successfully added
63
*/
64
bool addContainerPlanElement(const GNEViewNetHelper::ViewObjectsSelector& viewObjects);
65
66
/// @brief reset selected container
67
void resetSelectedContainer();
68
69
/// @brief get plan creator module
70
GNEPlanCreator* getPlanCreator() const;
71
72
/// @brief get Container Hierarchy
73
GNEElementTree* getContainerHierarchy() const;
74
75
/// @brief get container selectors
76
GNEDemandElementSelector* getContainerSelector() const;
77
78
/// @brief get containerPlan selector
79
GNEPlanSelector* getPlanSelector() const;
80
81
protected:
82
/// @brief Tag selected in GNETagSelector
83
void tagSelected();
84
85
/// @brief selected demand element in DemandElementSelector
86
void demandElementSelected();
87
88
/// @brief create path
89
bool createPath(const bool useLastRoute);
90
91
private:
92
/// @brief Container selectors
93
GNEDemandElementSelector* myContainerSelector = nullptr;
94
95
/// @brief containerPlan selector
96
GNEPlanSelector* myPlanSelector = nullptr;
97
98
/// @brief container plan attributes editor
99
GNEAttributesEditor* myContainerPlanAttributesEditor = nullptr;
100
101
/// @brief plan Creator
102
GNEPlanCreator* myPlanCreator = nullptr;
103
104
/// @brief Container Hierarchy
105
GNEElementTree* myContainerHierarchy = nullptr;
106
107
/// @brief plan creator legend
108
GNEPlanCreatorLegend* myPlanCreatorLegend;
109
};
110
111