SUMO - Simulation of Urban MObility
GNEDialog_About.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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // The "About" - dialog for NETEDIT, (adapted from GUIDialog_AboutSUMO)
16 /****************************************************************************/
17 
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include <config.h>
23 
24 #ifdef HAVE_VERSION_H
25 #include <version.h>
26 #endif
27 
28 #include <utils/common/StdDefs.h>
34 
35 #include "GNEDialog_About.h"
36 
37 
38 // ===========================================================================
39 // method definitions
40 // ===========================================================================
42  FXDialogBox(parent, "About Eclipse SUMO netedit", GUIDesignDialogBox) {
43  // set dialog icon
45 
46  // create frame for main info
47  FXHorizontalFrame* mainInfoFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
48 
49  // Netedit icon
50  new FXLabel(mainInfoFrame, "", GUIIconSubSys::getIcon(ICON_SUMO_LOGO), GUIDesignLabelIcon);
51 
52  // "SUMO <VERSION>"
53  FXVerticalFrame* descriptionFrame = new FXVerticalFrame(mainInfoFrame, GUIDesignLabelAboutInfo);
54  myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
55  FXLabel* neteditLabel = new FXLabel(descriptionFrame, "SUMO netedit " VERSION_STRING, nullptr, GUIDesignLabelAboutInfo);
56  neteditLabel->setFont(myHeadlineFont);
57  new FXLabel(descriptionFrame, "Network editor for Eclipse SUMO, the Simulation of Urban MObility", nullptr, GUIDesignLabelAboutInfo);
58  new FXLabel(descriptionFrame, "Graphical editor for road networks and infrastructure.", nullptr, GUIDesignLabelAboutInfo);
59  new FXLabel(descriptionFrame, HAVE_ENABLED, nullptr, GUIDesignLabelAboutInfo);
60 
61  // write HAVE_ENABLED with the current modules (except Windows) in debug mode
62  std::string modules(HAVE_ENABLED);
63  while ((modules.size() > 0) && (modules.front() != ' ')) {
64  modules.erase(modules.begin());
65  }
66  WRITE_DEBUG(("Modules: " + modules).c_str());
67 
68  // copyright notice
69  new FXLabel(this, "Copyright (C) 2001-2018 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo);
70  new FXLabel(this, "This application is based on code provided by the Eclipse SUMO project.", nullptr, GUIDesignLabelAboutInfo);
71  new FXLabel(this, "These core components are available under the conditions of the Eclipse Public License v2.", nullptr, GUIDesignLabelAboutInfo);
72  (new FXLinkLabel(this, "SPDX-License-Identifier: EPL-2.0", nullptr, GUIDesignLabelAboutInfo))->setTipText("http://www.eclipse.org/legal/epl-v20.html");
73 
74  // link to homepage
75  (new FXLinkLabel(this, "http://sumo.dlr.de", nullptr, GUIDesignLabelCenter))->setTipText("http://sumo.dlr.de");
76 
77  // centered ok-button
78  FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
79  new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
80  FXButton* OKButton = new FXButton(buttonFrame, "&OK\t\t", GUIIconSubSys::getIcon(ICON_ACCEPT), this, ID_ACCEPT, GUIDesignButtonOK);
81  new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
82 
83  // focus OK button
84  OKButton->setFocus();
85 }
86 
87 
88 void
90  FXDialogBox::create();
91 }
92 
93 
95  delete myHeadlineFont;
96 }
97 
98 
99 /****************************************************************************/
#define GUIDesignLabelAboutInfo
label extended over frame without thick and with text justify to center and without vertical spaces ...
Definition: GUIDesigns.h:169
#define GUIDesignHorizontalFrame
Definition: GUIDesigns.h:212
void create()
Creates the widget.
FXFont * myHeadlineFont
Font for the widget.
GNEDialog_About(FXWindow *parent)
Constructor.
#define GUIDesignLabelIcon
design for label with icon
Definition: GUIDesigns.h:178
#define HAVE_ENABLED
Definition: config.h:26
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
Definition: GUIDesigns.h:261
#define GUIDesignLabelCenter
label extended over frame without thick and with text justify to center and height of 23 ...
Definition: GUIDesigns.h:151
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:248
#define VERSION_STRING
Definition: config.h:207
#define GUIDesignDialogBox
Definition: GUIDesigns.h:410
#define GUIDesignButtonOK
Definition: GUIDesigns.h:96
~GNEDialog_About()
Destructor.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon