Path: blob/main/src/netedit/dialogs/options/GNESumoOptionsDialog.cpp
193697 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 GNESumoOptionsDialog.cpp14/// @author Pablo Alvarez Lopez15/// @date May 202316///17// A Dialog for setting options (see OptionsCont)18/****************************************************************************/19#include <config.h>2021#include <netedit/GNEApplicationWindow.h>22#include <netedit/GNEViewNet.h>23#include <netedit/GNEViewParent.h>24#include <netedit/frames/common/GNEGroupBoxModule.h>25#include <utils/gui/div/GUIDesigns.h>26#include <utils/options/OptionsLoader.h>27#include <xercesc/parsers/SAXParser.hpp>28#include <utils/foxtools/MFXCheckButtonTooltip.h>2930#include "GNESumoOptionsDialog.h"31#include "GNEOptionsEditor.h"3233// ===========================================================================34// method definitions35// ===========================================================================3637GNESumoOptionsDialog::GNESumoOptionsDialog(GNEApplicationWindow* applicationWindow,38OptionsCont& optionsContainer, const OptionsCont& originalOptionsContainer) :39GNEDialog(applicationWindow, TL("Edit SUMO options"), GUIIcon::SUMO_MINI, DialogType::OPTIONS_SUMO,40GNEDialog::Buttons::ACCEPT_CANCEL_RESET, OpenType::MODAL, GNEDialog::ResizeMode::RESIZABLE, 800, 600) {41// build options editor42myOptionsEditor = new GNEOptionsEditor(this, "SUMO", optionsContainer, originalOptionsContainer);43// open modal dialog44openDialog();45}464748GNESumoOptionsDialog::~GNESumoOptionsDialog() { }495051void52GNESumoOptionsDialog::runInternalTest(const InternalTestStep::DialogArgument* dialogArgument) {53myOptionsEditor->runInternalTest(dialogArgument);54}555657bool58GNESumoOptionsDialog::isOptionModified() const {59return myOptionsEditor->isOptionModified();60}616263long64GNESumoOptionsDialog::onCmdCancel(FXObject*, FXSelector, void*) {65// reset options66myOptionsEditor->resetAllOptions();67// close dialog canceling68return closeDialogCanceling();69}707172long73GNESumoOptionsDialog::onCmdReset(FXObject*, FXSelector, void*) {74// reset options75myOptionsEditor->resetAllOptions();76return 1;77}7879/****************************************************************************/808182