Path: blob/main/src/netedit/frames/demand/GNERouteDistributionFrame.cpp
169684 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 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 GNERouteDistributionFrame.cpp14/// @author Pablo Alvarez Lopez15/// @date Jun 202316///17// The Widget for edit route distribution elements18/****************************************************************************/1920#include <netedit/frames/GNEAttributesEditor.h>21#include <utils/gui/images/GUIIconSubSys.h>2223#include "GNERouteDistributionFrame.h"2425// ===========================================================================26// method definitions27// ===========================================================================2829GNERouteDistributionFrame::GNERouteDistributionFrame(GNEViewParent* viewParent, GNEViewNet* viewNet) :30GNEFrame(viewParent, viewNet, TL("Route Distributions")) {3132/// @brief route editor33myDistributionEditor = new GNEDistributionFrame::DistributionEditor(this, SUMO_TAG_ROUTE_DISTRIBUTION, GUIIcon::ROUTEDISTRIBUTION);3435/// @brief route distribution selector36myDistributionSelector = new GNEDistributionFrame::DistributionSelector(this);3738/// @brief distribution attributes editor39myAttributesEditor = new GNEAttributesEditor(this, GNEAttributesEditorType::EditorType::EDITOR);4041// Create route distribution attributes editor42myDistributionValuesEditor = new GNEDistributionFrame::DistributionValuesEditor(this, myDistributionEditor, myDistributionSelector, myAttributesEditor, SUMO_TAG_ROUTE);43}444546GNERouteDistributionFrame::~GNERouteDistributionFrame() {}474849void50GNERouteDistributionFrame::show() {51// refresh route selector52myDistributionSelector->refreshDistributionSelector();53// show frame54GNEFrame::show();55}565758GNEDistributionFrame::DistributionSelector*59GNERouteDistributionFrame::getDistributionSelector() const {60return myDistributionSelector;61}626364void65GNERouteDistributionFrame::attributeUpdated(SumoXMLAttr attribute) {66if (attribute == SUMO_ATTR_ID) {67// refresh distribution selector IDs68myDistributionSelector->refreshDistributionIDs();69}70}7172/****************************************************************************/737475