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