Path: blob/main/src/netedit/dialogs/options/GNENetgenerateOptionsDialog.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 GNENetgenerateOptionsDialog.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 "GNENetgenerateOptionsDialog.h"31#include "GNEOptionsEditor.h"3233// ===========================================================================34// Defines35// ===========================================================================3637#define TREELISTWIDTH 2003839// ===========================================================================40// method definitions41// ===========================================================================4243GNENetgenerateOptionsDialog::GNENetgenerateOptionsDialog(GNEApplicationWindow* applicationWindow,44OptionsCont& optionsContainer, const OptionsCont& originalOptionsContainer) :45GNEDialog(applicationWindow, TL("Run netgenerate with advanced options"), GUIIcon::NETGENERATE,46DialogType::OPTIONS_NETGENERATE, GNEDialog::Buttons::RUN_CANCEL_RESET, OpenType::MODAL,47GNEDialog::ResizeMode::RESIZABLE, 800, 600) {48// build options editor49myOptionsEditor = new GNEOptionsEditor(this, "Netgenerate", optionsContainer, originalOptionsContainer);50// open modal dialog51openDialog();52}535455GNENetgenerateOptionsDialog::~GNENetgenerateOptionsDialog() { }565758void59GNENetgenerateOptionsDialog::runInternalTest(const InternalTestStep::DialogArgument* dialogArgument) {60myOptionsEditor->runInternalTest(dialogArgument);61}626364bool65GNENetgenerateOptionsDialog::isOptionModified() const {66return myOptionsEditor->isOptionModified();67}686970long71GNENetgenerateOptionsDialog::onCmdCancel(FXObject*, FXSelector, void*) {72// reset options73myOptionsEditor->resetAllOptions();74// close dialog canceling75return closeDialogCanceling();76}777879long80GNENetgenerateOptionsDialog::onCmdReset(FXObject*, FXSelector, void*) {81// reset options82myOptionsEditor->resetAllOptions();83return 1;84}8586/****************************************************************************/878889