Path: blob/main/src/netedit/dialogs/options/GNENetgenerateOptionsDialog.cpp
193723 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 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 <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 "GNENetgenerateOptionsDialog.h"31#include "GNEOptionsEditor.h"3233// ===========================================================================34// method definitions35// ===========================================================================3637GNENetgenerateOptionsDialog::GNENetgenerateOptionsDialog(GNEApplicationWindow* applicationWindow,38OptionsCont& optionsContainer, const OptionsCont& originalOptionsContainer) :39GNEDialog(applicationWindow, TL("Run netgenerate with advanced options"), GUIIcon::NETGENERATE,40DialogType::OPTIONS_NETGENERATE, GNEDialog::Buttons::RUN_CANCEL_RESET, OpenType::MODAL,41GNEDialog::ResizeMode::RESIZABLE, 800, 600) {42// build options editor43myOptionsEditor = new GNEOptionsEditor(this, "Netgenerate", optionsContainer, originalOptionsContainer);44// open modal dialog45openDialog();46}474849GNENetgenerateOptionsDialog::~GNENetgenerateOptionsDialog() { }505152void53GNENetgenerateOptionsDialog::runInternalTest(const InternalTestStep::DialogArgument* dialogArgument) {54myOptionsEditor->runInternalTest(dialogArgument);55}565758bool59GNENetgenerateOptionsDialog::isOptionModified() const {60return myOptionsEditor->isOptionModified();61}626364long65GNENetgenerateOptionsDialog::onCmdRun(FXObject*, FXSelector, void*) {66// close dialog canceling67closeDialogCanceling();68// run netgenerate69return myApplicationWindow->tryHandle(this, FXSEL(SEL_COMMAND, MID_GNE_RUNNETGENERATE), nullptr);70}717273long74GNENetgenerateOptionsDialog::onCmdCancel(FXObject*, FXSelector, void*) {75// reset options76myOptionsEditor->resetAllOptions();77// close dialog canceling78return closeDialogCanceling();79}808182long83GNENetgenerateOptionsDialog::onCmdReset(FXObject*, FXSelector, void*) {84// reset options85myOptionsEditor->resetAllOptions();86return 1;87}8889/****************************************************************************/909192