Path: blob/main/src/netedit/dialogs/elements/GNEDistributionRefDialog.h
193884 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2026 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GNEDistributionRefDialog.h14/// @author Pablo Alvarez Lopez15/// @date Aug 202516///17// Dialog for edit attribute carriers18/****************************************************************************/19#pragma once20#include <config.h>2122#include <set>2324#include <netedit/dialogs/GNEDialog.h>2526// ===========================================================================27// class declaration28// ===========================================================================2930class GNEAttributeCarrier;31class MFXTextFieldIcon;32class MFXComboBoxIcon;3334// ===========================================================================35// class definitions36// ===========================================================================3738class GNEDistributionRefDialog : public GNEDialog {39// FOX-declarations40FXDECLARE(GNEDistributionRefDialog)4142public:43/// @brief constructor44GNEDistributionRefDialog(GNEAttributeCarrier* distributionParent);4546/// @brief destructor47~GNEDistributionRefDialog();4849/// @brief run internal test50void runInternalTest(const InternalTestStep::DialogArgument* dialogArgument);5152/// @name FOX-callbacks53/// @{5455/// @brief event after press accept button56long onCmdAccept(FXObject*, FXSelector, void*);5758/// @brief event after choose a reference in the comboBox59long onCmdSetReference(FXObject*, FXSelector, void*);6061/// @brief event after choose a reference in the probability62long onCmdSetProbability(FXObject*, FXSelector, void*);6364/// @}6566protected:67/// @brief FOX needs this68FOX_CONSTRUCTOR(GNEDistributionRefDialog)6970/// @brief pointer to distribution parent71GNEAttributeCarrier* myDistributionParent = nullptr;7273/// @brief comboBox for references74MFXComboBoxIcon* myReferencesComboBox = nullptr;7576/// @brief textField probability77MFXTextFieldIcon* myProbabilityTextField = nullptr;7879/// @brief map with candidate IDs;80std::map<std::string, GNEDemandElement*> myCandidates;8182/// @brief current referenced element83GNEDemandElement* myReferencedElement = nullptr;8485private:86/// @brief Invalidated copy constructor.87GNEDistributionRefDialog(const GNEDistributionRefDialog&) = delete;8889/// @brief Invalidated assignment operator.90GNEDistributionRefDialog& operator=(const GNEDistributionRefDialog&) = delete;91};929394