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