Path: blob/main/src/netedit/frames/demand/GNERouteDistributionFrame.cpp
193871 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 GNERouteDistributionFrame.cpp14/// @author Pablo Alvarez Lopez15/// @date Jun 202316///17// The Widget for edit route distribution elements18/****************************************************************************/1920#include <netedit/frames/GNEAttributesEditor.h>2122#include "GNERouteDistributionFrame.h"2324// ===========================================================================25// method definitions26// ===========================================================================2728GNERouteDistributionFrame::GNERouteDistributionFrame(GNEViewParent* viewParent, GNEViewNet* viewNet) :29GNEFrame(viewParent, viewNet, TL("Route Distributions")) {3031/// @brief route editor32myDistributionEditor = new GNEDistributionFrame::DistributionEditor(this, SUMO_TAG_ROUTE_DISTRIBUTION, GUIIcon::ROUTEDISTRIBUTION);3334/// @brief route distribution selector35myDistributionSelector = new GNEDistributionFrame::DistributionSelector(this);3637/// @brief distribution attributes editor38myAttributesEditor = new GNEAttributesEditor(this, GNEAttributesEditorType::EditorType::EDITOR);3940// Create route distribution attributes editor41myDistributionValuesEditor = new GNEDistributionFrame::DistributionValuesEditor(this, myDistributionEditor, myDistributionSelector, myAttributesEditor);42}434445GNERouteDistributionFrame::~GNERouteDistributionFrame() {}464748void49GNERouteDistributionFrame::show() {50// refresh route selector51myDistributionSelector->refreshDistributionSelector();52// show frame53GNEFrame::show();54}555657GNEDistributionFrame::DistributionSelector*58GNERouteDistributionFrame::getDistributionSelector() const {59return myDistributionSelector;60}616263GNEDistributionFrame::DistributionValuesEditor*64GNERouteDistributionFrame::getDistributionValuesEditor() const {65return myDistributionValuesEditor;66}676869void70GNERouteDistributionFrame::attributeUpdated(SumoXMLAttr attribute) {71if (attribute == SUMO_ATTR_ID) {72// refresh distribution selector IDs73myDistributionSelector->refreshDistributionIDs();74}75}7677/****************************************************************************/787980