KiCad PCB EDA Suite
AboutDialog_main.cpp File Reference
#include <boost/version.hpp>
#include <wx/aboutdlg.h>
#include <wx/arrimpl.cpp>
#include <wx/textctrl.h>
#include <wx/utils.h>
#include <bitmaps.h>
#include <build_version.h>
#include <common.h>
#include <pgm_base.h>
#include <wxstruct.h>
#include "aboutinfo.h"
#include "dialog_about.h"

Go to the source code of this file.

Macros

#define OTHERS_IN_TRANSLATION   _( "Others" )
 
#define ICON_CONTRIBUTION   _( "Icons by" )
 
#define MODELS_3D_CONTRIBUTION   _( "3D models by" )
 
#define SYMBOL_LIB_CONTRIBUTION   _( "Symbols by" )
 
#define FOOTPRINT_LIB_CONTRIBUTION   _( "Footprints by" )
 

Functions

static wxString HtmlHyperlink (const wxString &aUrl, const wxString &aDescription)
 Helper functions. More...
 
static wxString HtmlNewline (const unsigned int aCount)
 Create an HTML newline character sequence of aCount. More...
 
static void buildKicadAboutBanner (EDA_BASE_FRAME *aParent, ABOUT_APP_INFO &aInfo)
 Initializes the ABOUT_APP_INFO object with application specific information. More...
 
void ShowAboutDialog (EDA_BASE_FRAME *aParent)
 

Macro Definition Documentation

#define FOOTPRINT_LIB_CONTRIBUTION   _( "Footprints by" )

Referenced by buildKicadAboutBanner().

#define ICON_CONTRIBUTION   _( "Icons by" )

Referenced by buildKicadAboutBanner().

#define MODELS_3D_CONTRIBUTION   _( "3D models by" )

Referenced by buildKicadAboutBanner().

#define OTHERS_IN_TRANSLATION   _( "Others" )

Referenced by buildKicadAboutBanner().

#define SYMBOL_LIB_CONTRIBUTION   _( "Symbols by" )

Referenced by buildKicadAboutBanner().

Function Documentation

static void buildKicadAboutBanner ( EDA_BASE_FRAME aParent,
ABOUT_APP_INFO aInfo 
)
static

Initializes the ABOUT_APP_INFO object with application specific information.

This is the object which holds all information about the application

Definition at line 58 of file AboutDialog_main.cpp.

References FOOTPRINT_LIB_CONTRIBUTION, GetBuildVersion(), HtmlHyperlink(), HtmlNewline(), ICON_CONTRIBUTION, KiBitmapNew(), MODELS_3D_CONTRIBUTION, OTHERS_IN_TRANSLATION, Pgm(), and SYMBOL_LIB_CONTRIBUTION.

Referenced by ShowAboutDialog().

59 {
60  // Set application specific icon
61  aInfo.SetAppIcon( aParent->GetIcon() );
62 
63  /* Set title */
64  aInfo.SetAppName( Pgm().App().GetAppName() );
65 
66  /* Copyright information */
67  aInfo.SetCopyright( "(C) 1992-2017 KiCad Developers Team" );
68 
69  /* KiCad build version */
70  wxString version;
71  version << GetBuildVersion()
72 #ifdef DEBUG
73  << ", debug"
74 #else
75  << ", release"
76 #endif
77  << " build";
78 
79  aInfo.SetBuildVersion( version );
80 
81  /* wxWidgets version */
82  wxString libVersion;
83  libVersion << wxGetLibraryVersionInfo().GetVersionString();
84 
85  /* Unicode or ANSI version */
86 #if wxUSE_UNICODE
87  libVersion << wxT( " Unicode " );
88 #else
89  libVersion << wxT( " ANSI " );
90 #endif
91 
92  // Just in case someone builds KiCad with the platform native of Boost instead of
93  // the version included with the KiCad source.
94  libVersion << "and Boost " << ( BOOST_VERSION / 100000 ) << "."
95  << ( BOOST_VERSION / 100 % 1000 ) << "." << ( BOOST_VERSION % 100 )
96  << "\n";
97 
98  // Operating System Information
99 
100  wxPlatformInfo platformInfo;
101 
102  libVersion << "Platform: " << wxGetOsDescription() << ", " << platformInfo.GetArchName();
103 
104  aInfo.SetLibVersion( libVersion );
105 
106 
107  /* info/description part HTML formatted */
108 
109  wxString description;
110 
111  /* short description */
112  description << "<p>";
113  description << "<b><u>"
114  << _( "Description" )
115  << "</u></b>"; // bold & underlined font for caption
116 
117  description << "<p>"
118  << _( "The KiCad EDA Suite is a set of open source applications for the "
119  "creation of electronic schematics and printed circuit boards." )
120  << "</p>";
121 
122  description << "</p>";
123 
124  /* websites */
125  description << "<p><b><u>"
126  << _( "KiCad on the web" )
127  << "</u></b>"; // bold & underlined font for caption
128 
129  // bullet-ed list with some http links
130  description << "<ul>";
131  description << "<li>"
132  << "The official KiCad website - "
133  << HtmlHyperlink( "http://www.kicad-pcb.org" )
134  << "</li>";
135  description << "<li>"
136  << "Developer website on Launchpad - "
137  << HtmlHyperlink( "https://launchpad.net/kicad" )
138  << "</li>";
139 
140  description << "<li>"
141  << "Official KiCad library repositories - "
142  << HtmlHyperlink( "https://github.com/KiCad/" )
143  << "</li>";
144 
145  description << "</ul></p>";
146 
147  description << "<p><b><u>"
148  << _( "Bug tracker" )
149  << "</u></b>"; // bold & underlined font caption
150 
151  // bullet-ed list with some http links
152  description << "<ul>";
153  description << "<li>"
154  << "Report or examine bugs - "
155  << HtmlHyperlink( "https://bugs.launchpad.net/kicad/+bugs?orderby=-id&start=0",
156  "https://bugs.launchpad.net/kicad" )
157  << "</li>";
158  description << "</ul></p>";
159 
160  description << "<p><b><u>"
161  << _( "KiCad user's groups and community" )
162  << "</u></b>"; // bold & underlined font caption
163 
164  description << "<ul>";
165  description << "<li>"
166  << "KiCad forum - "
167  << HtmlHyperlink( "https://forum.kicad.info" )
168  << "</li>";
169 
170  description << "<li>"
171  << "KiCad user's group - "
172  << HtmlHyperlink( "https://groups.yahoo.com/neo/groups/kicad-users/info" )
173  << "</li>";
174 
175  description << "</ul></p>";
176 
177  aInfo.SetDescription( description );
178 
179 
180  // License information also HTML formatted:
181  wxString license;
182  license
183  << "<div align='center'>"
184  << HtmlNewline( 4 )
185  << _( "The complete KiCad EDA Suite is released under the" ) << HtmlNewline( 2 )
186  << HtmlHyperlink( "http://www.gnu.org/licenses",
187  _( "GNU General Public License (GPL) version 3 or any later version" ) )
188  << "</div>";
189 
190  aInfo.SetLicense( license );
191 
192 
193  /* A contributor consists of the following information:
194  * Mandatory:
195  * - Name
196  * Optional:
197  * - EMail address
198  * - Category
199  * - Category specific icon
200  *
201  * All contributors of the same category will be enumerated under this category
202  * which should be represented by the same icon.
203  */
204 
205  // The core developers
206  aInfo.AddDeveloper( new CONTRIBUTOR( "Jean-Pierre Charras" ) );
207  aInfo.AddDeveloper( new CONTRIBUTOR( "Dick Hollenbeck" ) );
208  aInfo.AddDeveloper( new CONTRIBUTOR( "Wayne Stambaugh" ) );
209 
210  // alphabetically by last name after main 3 above:
211  aInfo.AddDeveloper( new CONTRIBUTOR( "Frank Bennett" ) );
212  aInfo.AddDeveloper( new CONTRIBUTOR( "Cirilo Bernardo" ) );
213  aInfo.AddDeveloper( new CONTRIBUTOR( "Jonas Diemer" ) );
214  aInfo.AddDeveloper( new CONTRIBUTOR( "Jon Evans" ) );
215  aInfo.AddDeveloper( new CONTRIBUTOR( "Seth Hillbrand" ) );
216  aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Torsten Hüter" ) ) );
217  aInfo.AddDeveloper( new CONTRIBUTOR( "Jerry Jacobs" ) );
218  aInfo.AddDeveloper( new CONTRIBUTOR( "Mario Luzeiro" ) );
219  aInfo.AddDeveloper( new CONTRIBUTOR( "Daniel Majewski" ) );
220  aInfo.AddDeveloper( new CONTRIBUTOR( "Lorenzo Marcantonio" ) );
221  aInfo.AddDeveloper( new CONTRIBUTOR( "Marco Mattila" ) );
222  aInfo.AddDeveloper( new CONTRIBUTOR( "Russell Oliver" ) );
223  aInfo.AddDeveloper( new CONTRIBUTOR( "Chris Pavlina" ) );
224  aInfo.AddDeveloper( new CONTRIBUTOR( "Miguel Angel Ajo Pelayo" ) );
225  aInfo.AddDeveloper( new CONTRIBUTOR( "Jacobo Aragunde Perez" ) );
226  aInfo.AddDeveloper( new CONTRIBUTOR( "Simon Richter" ) );
227  aInfo.AddDeveloper( new CONTRIBUTOR( "Mark Roszko" ) );
228  aInfo.AddDeveloper( new CONTRIBUTOR( "Marco Serantoni" ) );
229  aInfo.AddDeveloper( new CONTRIBUTOR( "Brian Sidebotham" ) );
230  aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mateusz Skowroński" ) ) );
231  aInfo.AddDeveloper( new CONTRIBUTOR( "Rafael Sokolowski" ) );
232  aInfo.AddDeveloper( new CONTRIBUTOR( "Vesa Solonen" ) );
233  aInfo.AddDeveloper( new CONTRIBUTOR( "Bernhard Stegmaier" ) );
234  aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Orson (Maciej Sumiński)" ) ) );
235  aInfo.AddDeveloper( new CONTRIBUTOR( "Oliver Walters" ) );
236  aInfo.AddDeveloper( new CONTRIBUTOR( "Tomasz Wlostowski" ) );
237  aInfo.AddDeveloper( new CONTRIBUTOR( "Adam Wolf" ) );
238  aInfo.AddDeveloper( new CONTRIBUTOR( "Alexander Zakamaldin" ) );
239  aInfo.AddDeveloper( new CONTRIBUTOR( "Henner Zeller" ) );
240  aInfo.AddDeveloper( new CONTRIBUTOR( "Andrew Zonenberg" ) );
241  aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Nick Østergaard" ) ) );
242 
243  // The document writers
244  aInfo.AddDocWriter( new CONTRIBUTOR( "Jean-Pierre Charras" ) );
245  aInfo.AddDocWriter( new CONTRIBUTOR( "Marco Ciampa" ) );
246  aInfo.AddDocWriter( new CONTRIBUTOR( "Dick Hollenbeck" ) );
247  aInfo.AddDocWriter( new CONTRIBUTOR( "Igor Plyatov" ) );
248  aInfo.AddDocWriter( new CONTRIBUTOR( "Wayne Stambaugh" ) );
249  aInfo.AddDocWriter( new CONTRIBUTOR( "Fabrizio Tappero" ) );
250 
251  /* The translators
252  * As category the language to which the translation was done is used
253  * and as icon the national flag of the corresponding country.
254  */
255  aInfo.AddTranslator( new CONTRIBUTOR( "Robert Buj",
256  wxEmptyString,
257  wxEmptyString,
258  "Catalan (CA)",
259  KiBitmapNew( lang_catalan_xpm ) ) );
260  aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Martin Kratoška" ),
261  wxEmptyString,
262  wxEmptyString,
263  "Czech (CZ)",
264  KiBitmapNew( lang_cs_xpm ) ) );
265  aInfo.AddTranslator( new CONTRIBUTOR( "Jerry Jacobs",
266  wxEmptyString,
267  wxEmptyString,
268  "Dutch (NL)",
269  KiBitmapNew( lang_nl_xpm ) ) );
270  aInfo.AddTranslator( new CONTRIBUTOR( "Vesa Solonen",
271  wxEmptyString,
272  wxEmptyString,
273  "Finnish (FI)",
274  KiBitmapNew( lang_fi_xpm ) ) );
275  aInfo.AddTranslator( new CONTRIBUTOR( "Jean-Pierre Charras",
276  wxEmptyString,
277  wxEmptyString,
278  "French (FR)",
279  KiBitmapNew( lang_fr_xpm ) ) );
280  aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mateusz Skowroński" ),
281  wxEmptyString,
282  wxEmptyString,
283  "Polish (PL)",
284  KiBitmapNew( lang_pl_xpm ) ) );
285  aInfo.AddTranslator( new CONTRIBUTOR( "Kerusey Karyu",
286  wxEmptyString,
287  wxEmptyString,
288  "Polish (PL)",
289  KiBitmapNew( lang_pl_xpm ) ) );
290  aInfo.AddTranslator( new CONTRIBUTOR( "Renie Marquet",
291  wxEmptyString,
292  wxEmptyString,
293  "Portuguese (PT)",
294  KiBitmapNew( lang_pt_xpm ) ) );
295  aInfo.AddTranslator( new CONTRIBUTOR( "Igor Plyatov",
296  wxEmptyString,
297  wxEmptyString,
298  "Russian (RU)",
299  KiBitmapNew( lang_ru_xpm ) ) );
300  aInfo.AddTranslator( new CONTRIBUTOR( "Andrey Fedorushkov",
301  wxEmptyString,
302  wxEmptyString,
303  "Russian (RU)",
304  KiBitmapNew( lang_ru_xpm ) ) );
305  aInfo.AddTranslator( new CONTRIBUTOR( "Eldar Khayrullin",
306  wxEmptyString,
307  wxEmptyString,
308  "Russian (RU)",
309  KiBitmapNew( lang_ru_xpm ) ) );
310  aInfo.AddTranslator( new CONTRIBUTOR( "Pedro Martin del Valle",
311  wxEmptyString,
312  wxEmptyString,
313  "Spanish (ES)",
314  KiBitmapNew( lang_es_xpm ) ) );
315  aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Zuluaga" ),
316  wxEmptyString,
317  wxEmptyString,
318  "Spanish (ES)",
319  KiBitmapNew( lang_es_xpm ) ) );
320  aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Figuero" ),
321  wxEmptyString,
322  wxEmptyString,
323  "Spanish (ES)",
324  KiBitmapNew( lang_es_xpm ) ) );
325  aInfo.AddTranslator( new CONTRIBUTOR( "Rafael Sokolowski",
326  wxEmptyString,
327  wxEmptyString,
328  "German (DE)",
329  KiBitmapNew( lang_de_xpm ) ) );
330  aInfo.AddTranslator( new CONTRIBUTOR( "Kenta Yonekura",
331  wxEmptyString,
332  wxEmptyString,
333  "Japanese (JA)",
334  KiBitmapNew( lang_jp_xpm ) ) );
335  aInfo.AddTranslator( new CONTRIBUTOR( "Manolis Stefanis",
336  wxEmptyString,
337  wxEmptyString,
338  "Greek (el_GR)",
339  KiBitmapNew( lang_gr_xpm ) ) );
340  aInfo.AddTranslator( new CONTRIBUTOR( "Athanasios Vlastos",
341  wxEmptyString,
342  wxEmptyString,
343  "Greek (el_GR)",
344  KiBitmapNew( lang_gr_xpm ) ) );
345  aInfo.AddTranslator( new CONTRIBUTOR( "Milonas Kostas",
346  wxEmptyString,
347  wxEmptyString,
348  "Greek (el_GR)",
349  KiBitmapNew( lang_gr_xpm ) ) );
350  aInfo.AddTranslator( new CONTRIBUTOR( "Michail Misirlis",
351  wxEmptyString,
352  wxEmptyString,
353  "Greek (el_GR)",
354  KiBitmapNew( lang_gr_xpm ) ) );
355  aInfo.AddTranslator( new CONTRIBUTOR( "Massimo Cioce",
356  wxEmptyString,
357  wxEmptyString,
358  "Italian (IT)",
359  KiBitmapNew( lang_it_xpm ) ) );
360  aInfo.AddTranslator( new CONTRIBUTOR( "Marco Ciampa",
361  wxEmptyString,
362  wxEmptyString,
363  "Italian (IT)",
364  KiBitmapNew( lang_it_xpm ) ) );
365  aInfo.AddTranslator( new CONTRIBUTOR( "Evgeniy Ivanov",
366  wxEmptyString,
367  wxEmptyString,
368  "Bulgarian (BG)",
369  KiBitmapNew( lang_bg_xpm ) ) );
370 
371  // Maintainer who helper in translations, but not in a specific translation
372  #define OTHERS_IN_TRANSLATION _( "Others" )
373  aInfo.AddTranslator( new CONTRIBUTOR( "Remy Halvick",
374  wxEmptyString,
375  wxEmptyString,
377  aInfo.AddTranslator( new CONTRIBUTOR( "David Briscoe",
378  wxEmptyString,
379  wxEmptyString,
381  aInfo.AddTranslator( new CONTRIBUTOR( "Dominique Laigle",
382  wxEmptyString,
383  wxEmptyString,
385  aInfo.AddTranslator( new CONTRIBUTOR( "Paul Burke",
386  wxEmptyString,
387  wxEmptyString,
389 
390  // Programm credits for icons
391  #define ICON_CONTRIBUTION _( "Icons by" )
392  aInfo.AddArtist( new CONTRIBUTOR( wxT( "Iñigo Zuluaga" ),
393  wxEmptyString,
394  wxEmptyString,
396  KiBitmapNew( svg_file_xpm ) ) );
397  aInfo.AddArtist( new CONTRIBUTOR( "Konstantin Baranovskiy",
398  wxEmptyString,
399  wxEmptyString,
401  KiBitmapNew( svg_file_xpm ) ) );
402  aInfo.AddArtist( new CONTRIBUTOR( "Fabrizio Tappero",
403  wxEmptyString,
404  wxEmptyString,
406  KiBitmapNew( svg_file_xpm ) ) );
407 
408  // Program credits for 3d models
409  #define MODELS_3D_CONTRIBUTION _( "3D models by" )
410  aInfo.AddArtist( new CONTRIBUTOR( "GitHub contributors",
411  wxEmptyString,
412  "https://github.com/KiCad/kicad-packages3D/graphs/contributors",
414  KiBitmapNew( three_d_xpm ) ) );
415  aInfo.AddArtist( new CONTRIBUTOR( "Christophe Boschat",
416  wxEmptyString,
417  wxEmptyString,
419  KiBitmapNew( three_d_xpm ) ) );
420  aInfo.AddArtist( new CONTRIBUTOR( "Renie Marquet",
421  wxEmptyString,
422  wxEmptyString,
424  KiBitmapNew( three_d_xpm ) ) );
425 
426  #define SYMBOL_LIB_CONTRIBUTION _( "Symbols by" )
427  aInfo.AddArtist( new CONTRIBUTOR( "GitHub contributors",
428  wxEmptyString,
429  "https://github.com/KiCad/kicad-symbols/graphs/contributors",
431  KiBitmapNew( edit_component_xpm ) ) );
432 
433  #define FOOTPRINT_LIB_CONTRIBUTION _( "Footprints by" )
434  aInfo.AddArtist( new CONTRIBUTOR( "GitHub contributors",
435  wxEmptyString,
436  "https://github.com/KiCad/kicad-footprints/graphs/contributors",
438  KiBitmapNew( edit_module_xpm ) ) );
439 
440  // Program credits for package developers.
441  aInfo.AddPackager( new CONTRIBUTOR( "Jean-Samuel Reynaud" ) );
442  aInfo.AddPackager( new CONTRIBUTOR( "Bernhard Stegmaier" ) );
443  aInfo.AddPackager( new CONTRIBUTOR( "Adam Wolf" ) );
444  aInfo.AddPackager( new CONTRIBUTOR( wxT( "Nick Østergaard" ) ) );
445 }
void SetCopyright(const wxString &text)
Definition: aboutinfo.h:90
#define ICON_CONTRIBUTION
void AddTranslator(const CONTRIBUTOR *translator)
Definition: aboutinfo.h:66
#define OTHERS_IN_TRANSLATION
void AddDocWriter(const CONTRIBUTOR *docwriter)
Definition: aboutinfo.h:54
static wxString HtmlNewline(const unsigned int amount=1)
Create an HTML newline character sequence of aCount.
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
void SetAppIcon(const wxIcon &aIcon)
Definition: aboutinfo.h:102
#define SYMBOL_LIB_CONTRIBUTION
wxBitmap * KiBitmapNew(BITMAP_DEF aBitmap)
Function KiBitmapNew allocates a wxBitmap on heap from a memory record, held in a BITMAP_DEF...
Definition: bitmap.cpp:46
void SetBuildVersion(const wxString &version)
Definition: aboutinfo.h:96
void SetDescription(const wxString &text)
Definition: aboutinfo.h:84
wxString GetBuildVersion()
Function GetBuildVersion Return the build version string.
void SetLibVersion(const wxString &version)
Definition: aboutinfo.h:99
#define MODELS_3D_CONTRIBUTION
void AddArtist(const CONTRIBUTOR *artist)
Definition: aboutinfo.h:60
void SetLicense(const wxString &text)
Definition: aboutinfo.h:87
static wxString HtmlHyperlink(const wxString &url, const wxString &description=wxEmptyString)
Helper functions.
A contributor, a person which was involved in the development of the application or which has contrib...
Definition: aboutinfo.h:136
void AddPackager(const CONTRIBUTOR *packager)
Definition: aboutinfo.h:72
void AddDeveloper(const CONTRIBUTOR *developer)
Definition: aboutinfo.h:48
#define FOOTPRINT_LIB_CONTRIBUTION
void SetAppName(const wxString &name)
Definition: aboutinfo.h:93
static wxString HtmlHyperlink ( const wxString &  aUrl,
const wxString &  aDescription 
)
static

Helper functions.

Wrap aUrl with a HTML anchor tag containing a hyperlink text reference to form a HTML hyperlink.

Parameters
aUrlthe url that will be embedded in an anchor tag containing a hyperlink reference
aDescriptionthe optional describing text that will be represented as a hyperlink. If not specified the url will be used as hyperlink.
Returns
a HTML conform hyperlink like description

Definition at line 471 of file AboutDialog_main.cpp.

Referenced by buildKicadAboutBanner().

472 {
473  wxString hyperlink = wxEmptyString;
474 
475  if( aDescription.IsEmpty() )
476  hyperlink << "<a href='" << aUrl << "'>" << aUrl << "</a>";
477  else
478  hyperlink << "<a href='" << aUrl << "'>" << aDescription << "</a>";
479 
480  return hyperlink;
481 }
static wxString HtmlNewline ( const unsigned int  aCount)
static

Create an HTML newline character sequence of aCount.

Parameters
aCountthe number of HTML newline tags to concatenate, default is to return just one
tag.
Returns
the concatenated amount of HTML newline tag(s)

Definition at line 491 of file AboutDialog_main.cpp.

Referenced by buildKicadAboutBanner().

492 {
493  wxString newlineTags = wxEmptyString;
494 
495  for( size_t i = 0; i<aCount; ++i )
496  newlineTags << "<br>";
497 
498  return newlineTags;
499 }
void ShowAboutDialog ( EDA_BASE_FRAME aParent)

Definition at line 448 of file AboutDialog_main.cpp.

References buildKicadAboutBanner().

Referenced by EDA_BASE_FRAME::GetKicadAbout().

449 {
450  ABOUT_APP_INFO info;
451  buildKicadAboutBanner( aParent, info );
452 
453  DIALOG_ABOUT dlg( aParent, info );
454  dlg.ShowModal();
455 }
An object of this class is meant to be used to store application specific information like who has co...
Definition: aboutinfo.h:42
static void buildKicadAboutBanner(EDA_BASE_FRAME *aParent, ABOUT_APP_INFO &aInfo)
Initializes the ABOUT_APP_INFO object with application specific information.
About dialog to show application specific information.
Definition: dialog_about.h:40