Eclipse SUMO - Simulation of Urban MObility
GNEAbout.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2022 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 #include <config.h>
21 
22 #ifdef HAVE_VERSION_H
23 #include <version.h>
24 #endif
25 
30 
31 #include "GNEAbout.h"
32 
33 
34 // ===========================================================================
35 // method definitions
36 // ===========================================================================
37 GNEAbout::GNEAbout(FXWindow* parent) :
38  FXDialogBox(parent, "About Eclipse SUMO netedit", GUIDesignDialogBox) {
39  // set dialog icon
41 
42  // create frame for main info
43  FXHorizontalFrame* mainInfoFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
44 
45  // Netedit icon
46  new FXLabel(mainInfoFrame, "", GUIIconSubSys::getIcon(GUIIcon::SUMO_LOGO), GUIDesignLabelIcon);
47 
48  // "SUMO <VERSION>"
49  FXVerticalFrame* descriptionFrame = new FXVerticalFrame(mainInfoFrame, GUIDesignLabelAboutInfo);
50  myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
51  FXLabel* neteditLabel = new FXLabel(descriptionFrame, "SUMO netedit " VERSION_STRING, nullptr, GUIDesignLabelAboutInfo);
52  neteditLabel->setFont(myHeadlineFont);
53  new FXLabel(descriptionFrame, "Network editor for Eclipse SUMO, the Simulation of Urban MObility", nullptr, GUIDesignLabelAboutInfo);
54  new FXLabel(descriptionFrame, "Graphical editor for road networks and infrastructure.", nullptr, GUIDesignLabelAboutInfo);
55  new FXLabel(descriptionFrame, HAVE_ENABLED, nullptr, GUIDesignLabelAboutInfo);
56 
57  // write HAVE_ENABLED with the current modules (except Windows) in debug mode
58  std::string modules(HAVE_ENABLED);
59  while ((modules.size() > 0) && (modules.front() != ' ')) {
60  modules.erase(modules.begin());
61  }
62  WRITE_DEBUG(("Modules: " + modules).c_str());
63 
64  // copyright notice
65  new FXLabel(this, "Copyright (C) 2001-2022 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo);
66  new FXLabel(this, "This application is based on code provided by the Eclipse SUMO project.", nullptr, GUIDesignLabelAboutInfo);
67  new FXLabel(this, "These core components are available under the conditions of the Eclipse Public License v2.", nullptr, GUIDesignLabelAboutInfo);
68  (new FXLinkLabel(this, "SPDX-License-Identifier: EPL-2.0", nullptr, GUIDesignLabelAboutInfo))->setTipText("https://www.eclipse.org/legal/epl-v20.html");
69 
70  // link to homepage
71  (new FXLinkLabel(this, "https://www.eclipse.org/sumo", nullptr, GUIDesignLabelCenter))->setTipText("https://www.eclipse.org/sumo");
72 
73  // centered ok-button
74  FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
75  new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
76  FXButton* OKButton = new FXButton(buttonFrame, "&OK\t\t", GUIIconSubSys::getIcon(GUIIcon::ACCEPT), this, ID_ACCEPT, GUIDesignButtonOK);
77  new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
78 
79  // focus OK button
80  OKButton->setFocus();
81 }
82 
83 
84 void
86  FXDialogBox::create();
87 }
88 
89 
91  delete myHeadlineFont;
92 }
93 
94 
95 /****************************************************************************/
#define GUIDesignLabelIcon
design for label with icon
Definition: GUIDesigns.h:235
#define GUIDesignLabelCenter
label extended over frame without thick and with text justify to center
Definition: GUIDesigns.h:199
#define GUIDesignLabelAboutInfo
label extended over frame without thick and with text justify to left
Definition: GUIDesigns.h:223
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:343
#define GUIDesignDialogBox
Definition: GUIDesigns.h:527
#define GUIDesignButtonOK
Definition: GUIDesigns.h:124
#define GUIDesignHorizontalFrame
Definition: GUIDesigns.h:293
@ NETEDIT_MINI
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:290
GNEAbout(FXWindow *parent)
Constructor.
Definition: GNEAbout.cpp:37
~GNEAbout()
Destructor.
Definition: GNEAbout.cpp:90
void create()
Creates the widget.
Definition: GNEAbout.cpp:85
FXFont * myHeadlineFont
Font for the widget.
Definition: GNEAbout.h:48
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon