Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netedit/dialogs/GNEACChooserDialog.h
169678 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 GNEACChooserDialog.h
15
/// @author Pablo Alvarez Lopez
16
/// @date Apr 2018
17
///
18
// Class for the window that allows to choose a street, junction or vehicle
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <utils/gui/windows/GUIDialog_ChooserAbstract.h>
24
25
// ===========================================================================
26
// class declarations
27
// ===========================================================================
28
29
class GNEAttributeCarrier;
30
class GNEViewParent;
31
32
// ===========================================================================
33
// class definition
34
// ===========================================================================
35
36
class GNEACChooserDialog : public GUIDialog_ChooserAbstract {
37
38
public:
39
/** @brief Constructor
40
* @param[in] viewParent GNEViewParent of Netedit
41
* @param[in] icon The icon to use
42
* @param[in] title The title to use
43
* @param[in] ACs map with choosen ACs sorted by IDs
44
*/
45
GNEACChooserDialog(GNEViewParent* viewParent, int messageId, FXIcon* icon, const std::string& title,
46
const std::map<std::string, GNEAttributeCarrier*>& ACs);
47
48
/// @brief Destructor
49
~GNEACChooserDialog();
50
51
protected:
52
FOX_CONSTRUCTOR(GNEACChooserDialog)
53
54
/// @brief toggle selection
55
void toggleSelection(int listIndex) override;
56
57
/// @brief set selection (handled differently in netedit)
58
void select(int listIndex) override;
59
60
/// @brief unset selection (handled differently in netedit)
61
void deselect(int listIndex) override;
62
63
/// @brief filter ACs
64
void filterACs(const std::vector<GUIGlID>& GLIDs) override;
65
66
/// @brief retrieve name for the given object (special case for TLS)
67
std::string getObjectName(GUIGlObject* o) const override;
68
69
private:
70
/// @brief pointer to view parent
71
GNEViewParent* myViewParent;
72
73
/// @brief list of displayed ACs
74
std::vector<GNEAttributeCarrier*> myACs;
75
76
/// @brief list of filtered ACs
77
std::vector<GNEAttributeCarrier*> myFilteredACs;
78
79
/// @brief whether the current locator is for TLS
80
bool myLocateTLS;
81
82
/// @brief Invalidated copy constructor.
83
GNEACChooserDialog(const GNEACChooserDialog&) = delete;
84
85
/// @brief Invalidated assignment operator
86
GNEACChooserDialog& operator=(const GNEACChooserDialog& src) = delete;
87
};
88
89