Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEAbout.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// The "About" - dialog for netedit, (adapted from GUIDialog_AboutSUMO)
19/****************************************************************************/
20
25
26#ifdef HAVE_VERSION_H
27#include <version.h>
28#endif
29
30#include "GNEAbout.h"
31
32// ===========================================================================
33// method definitions
34// ===========================================================================
35GNEAbout::GNEAbout(FXWindow* parent) :
36 MFXDialogBox(parent, TL("About Eclipse SUMO netedit"), GUIDesignDialogBox) {
37 // set dialog icon
39
40 // create frame for main info
41 FXHorizontalFrame* mainInfoFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
42
43 // Netedit icon
44 new FXLabel(mainInfoFrame, "", GUIIconSubSys::getIcon(GUIIcon::SUMO_LOGO), GUIDesignLabelIcon);
45
46 // "SUMO <VERSION>"
47 FXVerticalFrame* descriptionFrame = new FXVerticalFrame(mainInfoFrame, GUIDesignLabelAboutInfo);
48 myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
49 FXLabel* neteditLabel = new FXLabel(descriptionFrame, "SUMO netedit " VERSION_STRING, nullptr, GUIDesignLabelAboutInfo);
50 neteditLabel->setFont(myHeadlineFont);
51 new FXLabel(descriptionFrame, TL("Network editor for Eclipse SUMO, the Simulation of Urban MObility"), nullptr, GUIDesignLabelAboutInfo);
52 new FXLabel(descriptionFrame, TL("Graphical editor for road networks and infrastructure."), nullptr, GUIDesignLabelAboutInfo);
53 // show modules
54 new FXLabel(descriptionFrame, HAVE_ENABLED, nullptr, GUIDesignLabelAboutInfo);
55 // write HAVE_ENABLED with the current modules (except Windows) in debug mode
56 std::string modules(HAVE_ENABLED);
57 while ((modules.size() > 0) && (modules.front() != ' ')) {
58 modules.erase(modules.begin());
59 }
60 // SUMO_HOME
61 new FXLabel(descriptionFrame, std::string("SUMO_HOME: " + std::string(getenv("SUMO_HOME"))).c_str(), nullptr, GUIDesignLabelAboutInfo);
62 // copyright notice
63 new FXLabel(this, "Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo);
64 new FXLabel(this, TL("This application is based on code provided by the Eclipse SUMO project."), nullptr, GUIDesignLabelAboutInfo);
65 new FXLabel(this, TL("These core components are available under the conditions of the Eclipse Public License v2."), nullptr, GUIDesignLabelAboutInfo);
66 (new MFXLinkLabel(this, "SPDX-License-Identifier: EPL-2.0", nullptr, GUIDesignLabelAboutInfo))->setTipText("https://www.eclipse.org/legal/epl-v20.html");
67
68 // link to homepage
69 (new MFXLinkLabel(this, "https://www.eclipse.dev/sumo", nullptr, GUIDesignLabel(JUSTIFY_NORMAL)))->setTipText("https://www.eclipse.dev/sumo");
70
71 // centered ok-button
72 FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
73 new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
74 FXButton* OKButton = GUIDesigns::buildFXButton(buttonFrame, TL("&OK"), "", "", GUIIconSubSys::getIcon(GUIIcon::ACCEPT), this, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK);
75 new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
76
77 // focus OK button
78 OKButton->setFocus();
79}
80
81
82void
84 MFXDialogBox::create();
85}
86
87
91
92
93void
95 // finish
96}
97
98
99/****************************************************************************/
#define GUIDesignLabelIcon
design for label with icon
Definition GUIDesigns.h:273
#define GUIDesignLabelAboutInfo
label extended over frame without thick and with text justify to left
Definition GUIDesigns.h:258
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition GUIDesigns.h:399
#define GUIDesignDialogBox
Definition GUIDesigns.h:599
#define GUIDesignLabel(justify)
Definition GUIDesigns.h:243
#define GUIDesignButtonOK
Definition GUIDesigns.h:153
#define GUIDesignHorizontalFrame
Horizontal frame extended over frame parent with padding and spacing.
Definition GUIDesigns.h:328
@ NETEDIT_MINI
#define TL(string)
Definition MsgHandler.h:305
GNEAbout(FXWindow *parent)
Constructor.
Definition GNEAbout.cpp:35
void runInternalTest(const InternalTestStep::DialogTest *dialogTest)
run internal test
Definition GNEAbout.cpp:94
~GNEAbout()
Destructor.
Definition GNEAbout.cpp:88
void create()
Creates the widget.
Definition GNEAbout.cpp:83
FXFont * myHeadlineFont
Font for the widget.
Definition GNEAbout.h:47
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
dialog arguments (used for certain functions that opens modal dialogs)