Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netedit/dialogs/GNEAboutDialog.cpp
193828 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2026 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
/****************************************************************************/
14
/// @file GNEAboutDialog.cpp
15
/// @author Jakob Erdmann
16
/// @date Feb 2011
17
///
18
// The "About" - dialog for netedit, (adapted from GUIDialog_AboutSUMO)
19
/****************************************************************************/
20
21
#include <netedit/GNEApplicationWindow.h>
22
#include <utils/common/MsgHandler.h>
23
#include <utils/foxtools/MFXLinkLabel.h>
24
#include <utils/gui/div/GUIDesigns.h>
25
#include <utils/gui/images/GUIIconSubSys.h>
26
27
#ifdef HAVE_VERSION_H
28
#include <version.h>
29
#endif
30
31
#include "GNEAboutDialog.h"
32
33
// ===========================================================================
34
// method definitions
35
// ===========================================================================
36
37
GNEAboutDialog::GNEAboutDialog(GNEApplicationWindow* applicationWindow) :
38
GNEDialog(applicationWindow, TL("About Eclipse SUMO netedit"), GUIIcon::NETEDIT_MINI,
39
DialogType::ABOUT, GNEDialog::Buttons::OK, OpenType::MODAL, ResizeMode::STATIC) {
40
// Netedit icon
41
new FXLabel(myContentFrame, "", GUIIconSubSys::getIcon(GUIIcon::SUMO_LOGO), GUIDesignLabelIcon);
42
// "SUMO <VERSION>"
43
FXVerticalFrame* descriptionFrame = new FXVerticalFrame(myContentFrame, GUIDesignLabelAboutInfo);
44
myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
45
FXLabel* neteditLabel = new FXLabel(descriptionFrame, "SUMO netedit " VERSION_STRING, nullptr, GUIDesignLabelAboutInfo);
46
neteditLabel->setFont(myHeadlineFont);
47
new FXLabel(descriptionFrame, TL("Network editor for Eclipse SUMO, the Simulation of Urban MObility"), nullptr, GUIDesignLabelAboutInfo);
48
new FXLabel(descriptionFrame, TL("Graphical editor for road networks and infrastructure."), nullptr, GUIDesignLabelAboutInfo);
49
// show modules
50
new FXLabel(descriptionFrame, HAVE_ENABLED, nullptr, GUIDesignLabelAboutInfo);
51
// write HAVE_ENABLED with the current modules (except Windows) in debug mode
52
std::string modules(HAVE_ENABLED);
53
while ((modules.size() > 0) && (modules.front() != ' ')) {
54
modules.erase(modules.begin());
55
}
56
// SUMO_HOME
57
new FXLabel(descriptionFrame, std::string("SUMO_HOME: " + std::string(getenv("SUMO_HOME"))).c_str(), nullptr, GUIDesignLabelAboutInfo);
58
// copyright notice
59
new FXLabel(myContentFrame, "Copyright (C) 2001-2026 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo);
60
new FXLabel(myContentFrame, TL("This application is based on code provided by the Eclipse SUMO project."), nullptr, GUIDesignLabelAboutInfo);
61
new FXLabel(myContentFrame, TL("These core components are available under the conditions of the Eclipse Public License v2."), nullptr, GUIDesignLabelAboutInfo);
62
(new MFXLinkLabel(myContentFrame, "SPDX-License-Identifier: EPL-2.0", nullptr, GUIDesignLabelAboutInfo))->setTipText("https://www.eclipse.org/legal/epl-v20.html");
63
// link to homepage
64
(new MFXLinkLabel(myContentFrame, "https://www.eclipse.dev/sumo", nullptr, GUIDesignLabel(JUSTIFY_NORMAL)))->setTipText("https://www.eclipse.dev/sumo");
65
// open modal dialog
66
openDialog();
67
}
68
69
70
GNEAboutDialog::~GNEAboutDialog() {
71
delete myHeadlineFont;
72
}
73
74
75
void
76
GNEAboutDialog::runInternalTest(const InternalTestStep::DialogArgument* /*dialogArgument*/) {
77
// nothing to do
78
}
79
80
/****************************************************************************/
81
82