Path: blob/main/src/netedit/dialogs/options/GNESumoOptionsDialog.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 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 <utils/foxtools/MFXGroupBoxModule.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// Defines35// ===========================================================================3637#define TREELISTWIDTH 2003839// ===========================================================================40// method definitions41// ===========================================================================4243GNESumoOptionsDialog::GNESumoOptionsDialog(GNEApplicationWindow* applicationWindow, OptionsCont& optionsContainer,44const OptionsCont& originalOptionsContainer) :45GNEDialog(applicationWindow, TL("Edit SUMO options"), GUIIcon::SUMO_MINI, DialogType::OPTIONS_SUMO,46GNEDialog::Buttons::ACCEPT_CANCEL_RESET, OpenType::MODAL, GNEDialog::ResizeMode::RESIZABLE, 800, 600) {47// build options editor48myOptionsEditor = new GNEOptionsEditor(this, "SUMO", optionsContainer, originalOptionsContainer);49// open modal dialog50openDialog();51}525354GNESumoOptionsDialog::~GNESumoOptionsDialog() { }555657void58GNESumoOptionsDialog::runInternalTest(const InternalTestStep::DialogArgument* dialogArgument) {59myOptionsEditor->runInternalTest(dialogArgument);60}616263bool64GNESumoOptionsDialog::isOptionModified() const {65return myOptionsEditor->isOptionModified();66}676869long70GNESumoOptionsDialog::onCmdCancel(FXObject*, FXSelector, void*) {71// reset options72myOptionsEditor->resetAllOptions();73// close dialog canceling74return closeDialogCanceling();75}767778long79GNESumoOptionsDialog::onCmdReset(FXObject*, FXSelector, void*) {80// reset options81myOptionsEditor->resetAllOptions();82return 1;83}8485/****************************************************************************/868788