Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEKeepElementsDialog.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// Dialog used to ask user if overwrite elements during loading
19/****************************************************************************/
20
23
25
26// ===========================================================================
27// member method definitions
28// ===========================================================================
29
30GNEKeepElementsDialog::GNEKeepElementsDialog(GNEApplicationWindow* applicationWindow, const std::string elementType) :
31 GNEDialog(applicationWindow, TLF("Keep % elements", elementType).c_str(), GUIIcon::QUESTION_SMALL,
32 GNEDialog::Buttons::KEEPNEW_KEEPOLD_CANCEL, GNEDialog::OpenType::MODAL, ResizeMode::STATIC) {
33 // create main frame
34 FXVerticalFrame* mainFrame = new FXVerticalFrame(this, GUIDesignAuxiliarFrame);
35 // create label
36 new FXLabel(mainFrame, (TLF("Selected % file was already loaded.", elementType) + "\n" +
37 TL("Keep new or old elements?")).c_str(), nullptr, GUIDesignLabelKeepElements);
38 // open modal dialog
39 openDialog();
40}
41
42
45
46
47void
49 // nothing to do
50}
51
52/****************************************************************************/
#define GUIDesignLabelKeepElements
label extended over frame without thick and with text justify to left
Definition GUIDesigns.h:263
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
Definition GUIDesigns.h:409
GUIIcon
An enumeration of icons used by the gui applications.
Definition GUIIcons.h:33
@ QUESTION_SMALL
#define TL(string)
Definition MsgHandler.h:305
#define TLF(string,...)
Definition MsgHandler.h:307
The main window of Netedit.
void openDialog(FXWindow *focusableElement=nullptr)
open dialog
OpenType
Open dialog type.
Definition GNEDialog.h:56
GNEKeepElementsDialog(GNEApplicationWindow *applicationWindow, const std::string elementType)
Constructor.
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
dialog arguments, used for certain modal dialogs that can not be edited using tab