Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netedit/dialogs/elements/GNEDistributionRefDialog.h
193884 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 GNEDistributionRefDialog.h
15
/// @author Pablo Alvarez Lopez
16
/// @date Aug 2025
17
///
18
// Dialog for edit attribute carriers
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <set>
24
25
#include <netedit/dialogs/GNEDialog.h>
26
27
// ===========================================================================
28
// class declaration
29
// ===========================================================================
30
31
class GNEAttributeCarrier;
32
class MFXTextFieldIcon;
33
class MFXComboBoxIcon;
34
35
// ===========================================================================
36
// class definitions
37
// ===========================================================================
38
39
class GNEDistributionRefDialog : public GNEDialog {
40
// FOX-declarations
41
FXDECLARE(GNEDistributionRefDialog)
42
43
public:
44
/// @brief constructor
45
GNEDistributionRefDialog(GNEAttributeCarrier* distributionParent);
46
47
/// @brief destructor
48
~GNEDistributionRefDialog();
49
50
/// @brief run internal test
51
void runInternalTest(const InternalTestStep::DialogArgument* dialogArgument);
52
53
/// @name FOX-callbacks
54
/// @{
55
56
/// @brief event after press accept button
57
long onCmdAccept(FXObject*, FXSelector, void*);
58
59
/// @brief event after choose a reference in the comboBox
60
long onCmdSetReference(FXObject*, FXSelector, void*);
61
62
/// @brief event after choose a reference in the probability
63
long onCmdSetProbability(FXObject*, FXSelector, void*);
64
65
/// @}
66
67
protected:
68
/// @brief FOX needs this
69
FOX_CONSTRUCTOR(GNEDistributionRefDialog)
70
71
/// @brief pointer to distribution parent
72
GNEAttributeCarrier* myDistributionParent = nullptr;
73
74
/// @brief comboBox for references
75
MFXComboBoxIcon* myReferencesComboBox = nullptr;
76
77
/// @brief textField probability
78
MFXTextFieldIcon* myProbabilityTextField = nullptr;
79
80
/// @brief map with candidate IDs;
81
std::map<std::string, GNEDemandElement*> myCandidates;
82
83
/// @brief current referenced element
84
GNEDemandElement* myReferencedElement = nullptr;
85
86
private:
87
/// @brief Invalidated copy constructor.
88
GNEDistributionRefDialog(const GNEDistributionRefDialog&) = delete;
89
90
/// @brief Invalidated assignment operator.
91
GNEDistributionRefDialog& operator=(const GNEDistributionRefDialog&) = delete;
92
};
93
94