Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNENetgenerateOptionsDialog.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// A Dialog for setting options (see OptionsCont)
19/****************************************************************************/
20#include <config.h>
21
23#include <netedit/GNEViewNet.h>
28#include <xercesc/parsers/SAXParser.hpp>
30
32#include "GNEOptionsEditor.h"
33
34// ===========================================================================
35// method definitions
36// ===========================================================================
37
39 OptionsCont& optionsContainer, const OptionsCont& originalOptionsContainer) :
40 GNEDialog(applicationWindow, TL("Run netgenerate with advanced options"), GUIIcon::NETGENERATE,
41 DialogType::OPTIONS_NETGENERATE, GNEDialog::Buttons::RUN_CANCEL_RESET, OpenType::MODAL,
42 GNEDialog::ResizeMode::RESIZABLE, 800, 600) {
43 // build options editor
44 myOptionsEditor = new GNEOptionsEditor(this, "Netgenerate", optionsContainer, originalOptionsContainer);
45 // open modal dialog
46 openDialog();
47}
48
49
51
52
53void
57
58
59bool
63
64
65long
66GNENetgenerateOptionsDialog::onCmdRun(FXObject*, FXSelector, void*) {
67 // close dialog canceling
69 // run netgenerate
70 return myApplicationWindow->tryHandle(this, FXSEL(SEL_COMMAND, MID_GNE_RUNNETGENERATE), nullptr);
71}
72
73
74long
75GNENetgenerateOptionsDialog::onCmdCancel(FXObject*, FXSelector, void*) {
76 // reset options
78 // close dialog canceling
79 return closeDialogCanceling();
80}
81
82
83long
84GNENetgenerateOptionsDialog::onCmdReset(FXObject*, FXSelector, void*) {
85 // reset options
87 return 1;
88}
89
90/****************************************************************************/
DialogType
@ OPTIONS_NETGENERATE
@ MID_GNE_RUNNETGENERATE
run netgenerate tool
Definition GUIAppEnum.h:775
GUIIcon
An enumeration of icons used by the gui applications.
Definition GUIIcons.h:33
#define TL(string)
Definition MsgHandler.h:304
The main window of Netedit.
GNEApplicationWindow * myApplicationWindow
FOX needs this.
Definition GNEDialog.h:146
void openDialog(FXWindow *focusableElement=nullptr)
open dialog
OpenType
Open dialog type.
Definition GNEDialog.h:58
long closeDialogCanceling()
close dialog declining the changes
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
long onCmdCancel(FXObject *, FXSelector, void *)
called when cancel button is pressed (or dialog is closed)
GNEOptionsEditor * myOptionsEditor
the options editor
long onCmdReset(FXObject *, FXSelector, void *)
called when user press reset button
GNENetgenerateOptionsDialog(GNEApplicationWindow *applicationWindow, OptionsCont &optionsContainer, const OptionsCont &originalOptionsContainer)
Constructor.
long onCmdRun(FXObject *, FXSelector, void *)
event after press run button
bool isOptionModified() const
check if option was modified
void resetAllOptions()
reset options
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
bool isOptionModified() const
check if option was modified
dialog arguments, used for certain modal dialogs that can not be edited using tab
A storage for options typed value containers)
Definition OptionsCont.h:89