Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIDialog_AboutSUMO.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/****************************************************************************/
19// The application's "About" - dialog
20/****************************************************************************/
21#include <config.h>
22
23#ifdef HAVE_VERSION_H
24#include <version.h>
25#endif
26
32#include "GUIDialog_AboutSUMO.h"
33
34
35// ===========================================================================
36// method definitions
37// ===========================================================================
39 FXDialogBox(parent, TL("About Eclipse SUMO sumo-gui"), GUIDesignDialogBox) {
40 // set dialog icon
42
43 // create frame for main info
44 FXHorizontalFrame* mainInfoFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
45
46 // SUMO Icon
47 new FXLabel(mainInfoFrame, "", GUIIconSubSys::getIcon(GUIIcon::SUMO_LOGO), GUIDesignLabelIcon);
48
49 // "SUMO <VERSION>"
50 FXVerticalFrame* descriptionFrame = new FXVerticalFrame(mainInfoFrame, GUIDesignLabelAboutInfo);
51 myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
52 (new FXLabel(descriptionFrame, "SUMO sumo-gui " VERSION_STRING, nullptr, GUIDesignLabelAboutInfo))->setFont(myHeadlineFont);
53 new FXLabel(descriptionFrame, "Eclipse SUMO - Simulation of Urban MObility", nullptr, GUIDesignLabelAboutInfo);
54 new FXLabel(descriptionFrame, TL("Graphical user interface for the microscopic, multi-modal traffic simulation SUMO."), nullptr, GUIDesignLabelAboutInfo);
55 // show modules
56#ifdef JPS_VERSION
57 new FXLabel(descriptionFrame, TLF("Includes JuPedSim %.%.%", int(JPS_VERSION / 100), int(JPS_VERSION % 100 / 10), JPS_VERSION % 10).c_str(), nullptr, GUIDesignLabelAboutInfo);
58#endif
59 new FXLabel(descriptionFrame, HAVE_ENABLED, nullptr, GUIDesignLabelAboutInfo);
60 // SUMO_HOME
61 new FXLabel(descriptionFrame, std::string("SUMO_HOME: " + std::string(getenv("SUMO_HOME") ? getenv("SUMO_HOME") : "not set")).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://eclipse.dev/sumo", nullptr, GUIDesignLabel(JUSTIFY_NORMAL)))->setTipText("https://eclipse.dev/sumo");
70
71 // centered ok-button
72 FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
73 new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
74 GUIDesigns::buildFXButton(buttonFrame, TL("OK"), "", "", GUIIconSubSys::getIcon(GUIIcon::ACCEPT), this, ID_ACCEPT, GUIDesignButtonDialog);
75 new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
76}
77
78
79void
81 FXDialogBox::create();
82}
83
84
88
89
90/****************************************************************************/
#define GUIDesignLabelIcon
design for label with icon
Definition GUIDesigns.h:275
#define GUIDesignLabelAboutInfo
label extended over frame without thick and with text justify to left
Definition GUIDesigns.h:260
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition GUIDesigns.h:430
#define GUIDesignDialogBox
Definition GUIDesigns.h:630
#define GUIDesignLabel(justify)
Definition GUIDesigns.h:245
#define GUIDesignButtonDialog
Definition GUIDesigns.h:174
#define GUIDesignHorizontalFrame
Horizontal frame extended over frame parent with padding and spacing.
Definition GUIDesigns.h:347
@ SUMO_LOGO
Definition GUIIcons.h:39
@ SUMO_MINI
Definition GUIIcons.h:38
#define TL(string)
Definition MsgHandler.h:304
#define TLF(string,...)
Definition MsgHandler.h:306
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
GUIDialog_AboutSUMO(FXWindow *parent)
Constructor.
FXFont * myHeadlineFont
Font for the widget.
void create()
Creates the widget.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon