KiCad PCB EDA Suite
DIALOG_ABOUT Class Reference

About dialog to show application specific information. More...

#include <dialog_about.h>

Inheritance diagram for DIALOG_ABOUT:
DIALOG_ABOUT_BASE

Public Member Functions

 DIALOG_ABOUT (EDA_BASE_FRAME *aParent, ABOUT_APP_INFO &aAppInfo)
 
 ~DIALOG_ABOUT ()
 

Protected Attributes

wxStaticBitmap * m_bitmapApp
 
wxStaticText * m_staticTextAppTitle
 
wxStaticText * m_staticTextCopyright
 
wxStaticText * m_staticTextBuildVersion
 
wxStaticText * m_staticTextLibVersion
 
wxButton * m_btCopyVersionInfo
 
wxButton * m_btReportBug
 
wxAuiNotebook * m_auiNotebook
 
wxButton * m_btOk
 

Private Member Functions

void initDialog ()
 
void onHtmlLinkClicked (wxHtmlLinkEvent &event)
 
void onCopyVersionInfo (wxCommandEvent &event) override
 
void onReportBug (wxCommandEvent &event) override
 
wxFlexGridSizer * createFlexGridSizer ()
 
void createNotebooks ()
 
void createNotebookPage (wxAuiNotebook *aParent, const wxString &aCaption, const wxBitmap &aIcon, const CONTRIBUTORS &aContributors)
 
void createNotebookPageByCategory (wxAuiNotebook *aParent, const wxString &aCaption, const wxBitmap &aIcon, const CONTRIBUTORS &aContributors)
 
void createNotebookHtmlPage (wxAuiNotebook *aParent, const wxString &aCaption, const wxBitmap &aIcon, const wxString &aHtmlMessage, bool aSelection=false)
 
wxStaticText * wxStaticTextMail (wxScrolledWindow *aParent, const wxString &email)
 
wxStaticBitmap * createStaticBitmap (wxScrolledWindow *aParent, wxBitmap *icon)
 

Private Attributes

wxBitmap m_picInformation
 
wxBitmap m_picVersion
 
wxBitmap m_picDevelopers
 
wxBitmap m_picDocWriters
 
wxBitmap m_picArtists
 
wxBitmap m_picTranslators
 
wxBitmap m_picPackagers
 
wxBitmap m_picLicense
 
wxString m_titleName
 
ABOUT_APP_INFOm_info
 

Detailed Description

About dialog to show application specific information.

Needs a ABOUT_APP_INFO object that contains the data to be displayed.

Definition at line 40 of file dialog_about.h.

Constructor & Destructor Documentation

◆ DIALOG_ABOUT()

DIALOG_ABOUT::DIALOG_ABOUT ( EDA_BASE_FRAME aParent,
ABOUT_APP_INFO aAppInfo 
)

Definition at line 51 of file dialog_about.cpp.

52  : DIALOG_ABOUT_BASE( aParent ), m_info( aAppInfo )
53 {
54  wxASSERT( aParent != nullptr );
55 
64 
65  if( m_info.GetAppIcon().IsOk() )
66  {
67  SetIcon( m_info.GetAppIcon() );
68  m_bitmapApp->SetBitmap( m_info.GetAppIcon() );
69  }
70  else
71  {
72  wxIcon icon;
73  icon.CopyFromBitmap( KiBitmap( icon_kicad_xpm ) );
74  SetIcon( icon );
75  m_bitmapApp->SetBitmap( icon );
76  }
77 
78  m_titleName = aParent->GetAboutTitle();
79  m_staticTextAppTitle->SetLabel( m_titleName );
81  m_staticTextBuildVersion->SetLabel( "Version: " + m_info.GetBuildVersion() );
83 
84  SetTitle( wxString::Format( _( "About %s" ), m_titleName ) );
86 
87  GetSizer()->SetSizeHints( this );
88  m_auiNotebook->Update();
89  SetFocus();
90  Centre();
91 }
wxAuiNotebook * m_auiNotebook
wxBitmap m_picDevelopers
Definition: dialog_about.h:47
wxString & GetLibVersion()
Definition: aboutinfo.h:105
const BITMAP_OPAQUE editor_xpm[1]
Definition: editor.cpp:83
const BITMAP_OPAQUE palette_xpm[1]
Definition: palette.cpp:89
const BITMAP_OPAQUE icon_kicad_xpm[1]
Definition: icon_kicad.cpp:153
wxStaticText * m_staticTextAppTitle
const BITMAP_OPAQUE zip_xpm[1]
Definition: zip.cpp:60
wxBitmap m_picPackagers
Definition: dialog_about.h:51
void createNotebooks()
wxString & GetBuildVersion()
Definition: aboutinfo.h:99
wxStaticText * m_staticTextLibVersion
wxIcon & GetAppIcon()
Definition: aboutinfo.h:108
wxStaticBitmap * m_bitmapApp
const BITMAP_OPAQUE recent_xpm[1]
Definition: recent.cpp:68
wxBitmap m_picDocWriters
Definition: dialog_about.h:48
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:80
DIALOG_ABOUT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("About"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(570, 500), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxBitmap m_picArtists
Definition: dialog_about.h:49
wxStaticText * m_staticTextBuildVersion
wxBitmap m_picTranslators
Definition: dialog_about.h:50
wxString GetCopyright()
Definition: aboutinfo.h:93
wxStaticText * m_staticTextCopyright
wxBitmap m_picInformation
Definition: dialog_about.h:45
wxBitmap m_picLicense
Definition: dialog_about.h:52
const BITMAP_OPAQUE info_xpm[1]
Definition: info.cpp:75
const BITMAP_OPAQUE language_xpm[1]
Definition: language.cpp:104
const BITMAP_OPAQUE tools_xpm[1]
Definition: tools.cpp:113
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
#define _(s)
Definition: 3d_actions.cpp:33
const wxString & GetAboutTitle() const
wxString m_titleName
Definition: dialog_about.h:53
wxBitmap m_picVersion
Definition: dialog_about.h:46
const BITMAP_OPAQUE preference_xpm[1]
Definition: preference.cpp:66
ABOUT_APP_INFO & m_info
Definition: dialog_about.h:55

References _, createNotebooks(), editor_xpm, Format(), EDA_BASE_FRAME::GetAboutTitle(), ABOUT_APP_INFO::GetAppIcon(), ABOUT_APP_INFO::GetBuildVersion(), ABOUT_APP_INFO::GetCopyright(), ABOUT_APP_INFO::GetLibVersion(), icon_kicad_xpm, info_xpm, KiBitmap(), language_xpm, DIALOG_ABOUT_BASE::m_auiNotebook, DIALOG_ABOUT_BASE::m_bitmapApp, m_info, m_picArtists, m_picDevelopers, m_picDocWriters, m_picInformation, m_picLicense, m_picPackagers, m_picTranslators, m_picVersion, DIALOG_ABOUT_BASE::m_staticTextAppTitle, DIALOG_ABOUT_BASE::m_staticTextBuildVersion, DIALOG_ABOUT_BASE::m_staticTextCopyright, DIALOG_ABOUT_BASE::m_staticTextLibVersion, m_titleName, palette_xpm, preference_xpm, recent_xpm, tools_xpm, and zip_xpm.

◆ ~DIALOG_ABOUT()

DIALOG_ABOUT::~DIALOG_ABOUT ( )

Definition at line 94 of file dialog_about.cpp.

95 {
96 }

Member Function Documentation

◆ createFlexGridSizer()

wxFlexGridSizer * DIALOG_ABOUT::createFlexGridSizer ( )
private

Definition at line 99 of file dialog_about.cpp.

100 {
101  // three columns with vertical and horizontal extra space of two pixels
102  wxFlexGridSizer* fgSizer = new wxFlexGridSizer( 3, 2, 2 );
103  fgSizer->SetFlexibleDirection( wxHORIZONTAL );
104  fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
105 
106  return fgSizer;
107 }

Referenced by createNotebookPage(), and createNotebookPageByCategory().

◆ createNotebookHtmlPage()

void DIALOG_ABOUT::createNotebookHtmlPage ( wxAuiNotebook *  aParent,
const wxString &  aCaption,
const wxBitmap &  aIcon,
const wxString &  aHtmlMessage,
bool  aSelection = false 
)
private

Definition at line 353 of file dialog_about.cpp.

356 {
357  wxPanel* panel = new wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
358  wxTAB_TRAVERSAL );
359 
360  wxBoxSizer* bSizer = new wxBoxSizer( wxVERTICAL );
361 
362  wxString htmlPage = wxEmptyString, htmlContent = html;
363 
364  // to have a unique look background color for HTML pages is set to the default as it is
365  // used for all the other widgets
366  wxString htmlColor = ( this->GetBackgroundColour() ).GetAsString( wxC2S_HTML_SYNTAX );
367 
368  // beginning of HTML structure
369  htmlPage.Append( wxT( "<html><body bgcolor='" ) + htmlColor + wxT( "'>" ) );
370 
371  htmlPage.Append( htmlContent );
372 
373  // end of HTML structure indicated by closing tags
374  htmlPage.Append( wxT( "</body></html>" ) );
375 
376  int flags = aSelection ? wxHW_SCROLLBAR_AUTO : ( wxHW_SCROLLBAR_AUTO | wxHW_NO_SELECTION );
377 
378  // the HTML page is going to be created with previously created HTML content
379  auto htmlWindow = new wxHtmlWindow( panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, flags );
380 
381  // HTML font set to font properties as they are used for widgets to have an unique look
382  // under different platforms with HTML
383  wxFont font = this->GetFont();
384  htmlWindow->SetStandardFonts( font.GetPointSize(), font.GetFaceName(), font.GetFaceName() );
385  htmlWindow->SetPage( htmlPage );
386 
387  // the HTML window shall not be used to open external links, thus this task is delegated
388  // to users default browser
389  htmlWindow->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED,
390  wxHtmlLinkEventHandler( DIALOG_ABOUT::onHtmlLinkClicked ), NULL, this );
391 
392  // no additional space around the HTML window as it is also the case by the other notebook pages
393  bSizer->Add( htmlWindow, 1, wxALL|wxEXPAND, 0 );
394  panel->SetSizer( bSizer );
395  panel->Layout();
396  bSizer->Fit( panel );
397  aParent->AddPage( panel, aCaption, false, aIcon );
398 }
#define NULL
void onHtmlLinkClicked(wxHtmlLinkEvent &event)

References NULL, and onHtmlLinkClicked().

Referenced by createNotebooks().

◆ createNotebookPage()

void DIALOG_ABOUT::createNotebookPage ( wxAuiNotebook *  aParent,
const wxString &  aCaption,
const wxBitmap &  aIcon,
const CONTRIBUTORS &  aContributors 
)
private

Definition at line 134 of file dialog_about.cpp.

136 {
137  wxBoxSizer* bSizer = new wxBoxSizer( wxHORIZONTAL );
138 
139  wxScrolledWindow* m_scrolledWindow1 = new wxScrolledWindow( aParent, wxID_ANY,
140  wxDefaultPosition,
141  wxDefaultSize,
142  wxHSCROLL|wxVSCROLL );
143  m_scrolledWindow1->SetScrollRate( 5, 5 );
144 
145  /* Panel for additional space at the left,
146  * but can also be used to show an additional bitmap.
147  */
148  wxPanel* panel1 = new wxPanel( m_scrolledWindow1 );
149 
150  wxFlexGridSizer* fgSizer1 = createFlexGridSizer();
151 
152  for( size_t i=0; i<aContributors.GetCount(); ++i )
153  {
154  CONTRIBUTOR* contributor = &aContributors.Item( i );
155 
156  // Icon at first column
157  wxStaticBitmap* m_bitmap1 = createStaticBitmap( m_scrolledWindow1, contributor->GetIcon() );
158  fgSizer1->Add( m_bitmap1, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 );
159 
160  // Name of contributor at second column
161  if ( contributor->GetName() != wxEmptyString )
162  {
163  wxStaticText* m_staticText1 = new wxStaticText( m_scrolledWindow1, wxID_ANY,
164  contributor->GetName(),
165  wxDefaultPosition, wxDefaultSize, 0 );
166  m_staticText1->Wrap( -1 );
167  fgSizer1->Add( m_staticText1, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
168  }
169  else
170  {
171  fgSizer1->AddSpacer( 5 );
172  }
173 
174  // Email address of contributor at third column
175  if ( contributor->GetEMail() != wxEmptyString )
176  {
177  wxStaticText* hyperlink = wxStaticTextMail( m_scrolledWindow1,
178  contributor->GetEMail() );
179  fgSizer1->Add( hyperlink, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
180  }
181  else
182  {
183  fgSizer1->AddSpacer( 5 );
184  }
185  }
186 
187  bSizer->Add( panel1, 1, wxEXPAND|wxALL, 10 );
188  bSizer->Add( fgSizer1, 7, wxEXPAND|wxALL, 10 ); // adjust width of panel with first int value
189  m_scrolledWindow1->SetSizer( bSizer );
190  m_scrolledWindow1->Layout();
191  bSizer->Fit( m_scrolledWindow1 );
192  aParent->AddPage( m_scrolledWindow1, aCaption, false, aIcon );
193 }
wxFlexGridSizer * createFlexGridSizer()
wxString & GetName()
Definition: aboutinfo.h:171
wxStaticText * wxStaticTextMail(wxScrolledWindow *aParent, const wxString &email)
wxString & GetEMail()
Definition: aboutinfo.h:172
wxStaticBitmap * createStaticBitmap(wxScrolledWindow *aParent, wxBitmap *icon)
wxBitmap * GetIcon()
Definition: aboutinfo.h:175
A contributor, a person which was involved in the development of the application or which has contrib...
Definition: aboutinfo.h:152

References createFlexGridSizer(), createStaticBitmap(), CONTRIBUTOR::GetEMail(), CONTRIBUTOR::GetIcon(), CONTRIBUTOR::GetName(), and wxStaticTextMail().

Referenced by createNotebooks().

◆ createNotebookPageByCategory()

void DIALOG_ABOUT::createNotebookPageByCategory ( wxAuiNotebook *  aParent,
const wxString &  aCaption,
const wxBitmap &  aIcon,
const CONTRIBUTORS &  aContributors 
)
private

Definition at line 196 of file dialog_about.cpp.

199 {
200  wxBoxSizer* bSizer = new wxBoxSizer( wxHORIZONTAL );
201 
202  wxScrolledWindow* m_scrolledWindow1 = new wxScrolledWindow( aParent, wxID_ANY,
203  wxDefaultPosition,
204  wxDefaultSize,
205  wxHSCROLL|wxVSCROLL );
206  m_scrolledWindow1->SetScrollRate( 5, 5 );
207 
208  /* Panel for additional space at the left,
209  * but can also be used to show an additional bitmap.
210  */
211  wxPanel* panel1 = new wxPanel( m_scrolledWindow1 );
212 
213  wxFlexGridSizer* fgSizer1 = createFlexGridSizer();
214 
215  for( size_t i=0; i < aContributors.GetCount(); ++i )
216  {
217  CONTRIBUTOR* contributor = &aContributors.Item( i );
218 
219  wxBitmap* icon = contributor->GetIcon();
220  wxString category = contributor->GetCategory();
221 
222  /* to construct the next row we expect to have
223  * a category and a contributor that was not considered up to now
224  */
225  if( ( category != wxEmptyString ) && !( contributor->IsChecked() ) )
226  {
227  // Icon at first column
228  wxStaticBitmap* m_bitmap1 = createStaticBitmap( m_scrolledWindow1, icon );
229  fgSizer1->Add( m_bitmap1, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 );
230 
231  // Category name at second column
232  wxStaticText* m_staticText1 = new wxStaticText( m_scrolledWindow1, wxID_ANY,
233  contributor->GetCategory() + wxT( ":" ),
234  wxDefaultPosition, wxDefaultSize, 0 );
235  m_staticText1->SetFont( wxFont( -1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
236  wxFONTWEIGHT_BOLD, false,
237  wxEmptyString ) ); // bold font
238  m_staticText1->Wrap( -1 );
239  fgSizer1->Add( m_staticText1, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
240 
241  // Nothing at third column
242  fgSizer1->AddSpacer( 5 );
243 
244  // Now, all contributors of the same category will follow
245  for( size_t j=0; j < aContributors.GetCount(); ++j )
246  {
247  CONTRIBUTOR* sub_contributor = &aContributors.Item( j );
248 
249  if ( sub_contributor->GetCategory() == category )
250  {
251  // First column is empty
252  fgSizer1->AddSpacer(5);
253 
254  wxControl* ctrl;
255 
256  // No URL supplied, display normal text control
257  if( sub_contributor->GetUrl().IsEmpty() )
258  {
259  ctrl = new wxStaticText( m_scrolledWindow1, wxID_ANY,
260  wxT( " • " ) + sub_contributor->GetName(),
261  wxDefaultPosition,
262  wxDefaultSize, 0 );
263  }
264  else
265  {
266  // Display a hyperlink control instead
267  ctrl = new wxHyperlinkCtrl( m_scrolledWindow1, wxID_ANY,
268  wxT( "• " ) + sub_contributor->GetName(),
269  sub_contributor->GetUrl(),
270  wxDefaultPosition,
271  wxDefaultSize, wxHL_ALIGN_LEFT );
272  }
273 
274  m_staticText1->Wrap( -1 );
275 
276  fgSizer1->Add( ctrl, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
277 
278  // Email address of contributor at third column
279  if( sub_contributor->GetEMail() != wxEmptyString )
280  {
281  wxStaticText* mail = wxStaticTextMail( m_scrolledWindow1,
282  sub_contributor->GetEMail() );
283  fgSizer1->Add( mail, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
284  }
285  else
286  {
287  fgSizer1->AddSpacer( 5 );
288  }
289 
290  /* this contributor was added to the GUI,
291  * thus can be ignored next time
292  */
293  sub_contributor->SetChecked( true );
294  }
295  }
296  }
297  else
298  {
299  continue;
300  }
301  }
302 
303  /* Now, lets list the remaining contributors that have not been considered
304  * because they were not assigned to any category.
305  */
306  for ( size_t k=0; k < aContributors.GetCount(); ++k )
307  {
308  CONTRIBUTOR* contributor = &aContributors.Item( k );
309 
310  if ( contributor->IsChecked() )
311  continue;
312 
313  // Icon at first column
314  wxStaticBitmap* m_bitmap1 = createStaticBitmap( m_scrolledWindow1, contributor->GetIcon() );
315  fgSizer1->Add( m_bitmap1, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 );
316 
317  // Name of contributor at second column
318  if( contributor->GetName() != wxEmptyString )
319  {
320  wxStaticText* m_staticText1 = new wxStaticText( m_scrolledWindow1, wxID_ANY,
321  contributor->GetName(),
322  wxDefaultPosition, wxDefaultSize, 0 );
323  m_staticText1->Wrap( -1 );
324  fgSizer1->Add( m_staticText1, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
325  }
326  else
327  {
328  fgSizer1->AddSpacer( 5 );
329  }
330 
331  // Email address of contributor at third column
332  if ( contributor->GetEMail() != wxEmptyString )
333  {
334  wxStaticText* mail = wxStaticTextMail( m_scrolledWindow1,
335  contributor->GetEMail() );
336  fgSizer1->Add( mail, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
337  }
338  else
339  {
340  fgSizer1->AddSpacer( 5 );
341  }
342  }
343 
344  bSizer->Add( panel1, 1, wxEXPAND|wxALL, 10 );
345  bSizer->Add( fgSizer1, 7, wxEXPAND|wxALL, 10 ); // adjust width of panel with first int value
346  m_scrolledWindow1->SetSizer( bSizer );
347  m_scrolledWindow1->Layout();
348  bSizer->Fit( m_scrolledWindow1 );
349  aParent->AddPage( m_scrolledWindow1, aCaption, false, aIcon );
350 }
wxFlexGridSizer * createFlexGridSizer()
wxString & GetUrl()
Definition: aboutinfo.h:173
void SetChecked(bool status)
Definition: aboutinfo.h:176
wxString & GetCategory()
Definition: aboutinfo.h:174
wxString & GetName()
Definition: aboutinfo.h:171
wxStaticText * wxStaticTextMail(wxScrolledWindow *aParent, const wxString &email)
wxString & GetEMail()
Definition: aboutinfo.h:172
wxStaticBitmap * createStaticBitmap(wxScrolledWindow *aParent, wxBitmap *icon)
wxBitmap * GetIcon()
Definition: aboutinfo.h:175
A contributor, a person which was involved in the development of the application or which has contrib...
Definition: aboutinfo.h:152
bool IsChecked()
Definition: aboutinfo.h:177

References createFlexGridSizer(), createStaticBitmap(), CONTRIBUTOR::GetCategory(), CONTRIBUTOR::GetEMail(), CONTRIBUTOR::GetIcon(), CONTRIBUTOR::GetName(), CONTRIBUTOR::GetUrl(), CONTRIBUTOR::IsChecked(), CONTRIBUTOR::SetChecked(), and wxStaticTextMail().

Referenced by createNotebooks().

◆ createNotebooks()

void DIALOG_ABOUT::createNotebooks ( )
private

Definition at line 110 of file dialog_about.cpp.

111 {
114 
115  wxString version = GetVersionInfoData( m_titleName, true );
116 
117  createNotebookHtmlPage( m_auiNotebook, _( "Version" ), m_picVersion, version, true );
118 
120  m_info.GetDevelopers() );
122  m_info.GetDocWriters() );
123 
125  m_info.GetArtists() );
129  m_info.GetPackagers() );
130 
132 }
wxAuiNotebook * m_auiNotebook
wxBitmap m_picDevelopers
Definition: dialog_about.h:47
CONTRIBUTORS GetTranslators()
Definition: aboutinfo.h:83
void createNotebookHtmlPage(wxAuiNotebook *aParent, const wxString &aCaption, const wxBitmap &aIcon, const wxString &aHtmlMessage, bool aSelection=false)
wxString GetVersionInfoData(const wxString &aTitle, bool aHtml, bool aBrief)
Create a version info string for bug reports and the about dialog.
void createNotebookPageByCategory(wxAuiNotebook *aParent, const wxString &aCaption, const wxBitmap &aIcon, const CONTRIBUTORS &aContributors)
wxBitmap m_picPackagers
Definition: dialog_about.h:51
wxString & GetLicense()
Definition: aboutinfo.h:90
wxBitmap m_picDocWriters
Definition: dialog_about.h:48
wxBitmap m_picArtists
Definition: dialog_about.h:49
CONTRIBUTORS GetDocWriters()
Definition: aboutinfo.h:81
CONTRIBUTORS GetArtists()
Definition: aboutinfo.h:82
wxBitmap m_picTranslators
Definition: dialog_about.h:50
wxBitmap m_picInformation
Definition: dialog_about.h:45
wxBitmap m_picLicense
Definition: dialog_about.h:52
CONTRIBUTORS GetPackagers()
Definition: aboutinfo.h:84
CONTRIBUTORS GetDevelopers()
Definition: aboutinfo.h:80
#define _(s)
Definition: 3d_actions.cpp:33
wxString m_titleName
Definition: dialog_about.h:53
wxString & GetDescription()
Definition: aboutinfo.h:87
wxBitmap m_picVersion
Definition: dialog_about.h:46
ABOUT_APP_INFO & m_info
Definition: dialog_about.h:55
void createNotebookPage(wxAuiNotebook *aParent, const wxString &aCaption, const wxBitmap &aIcon, const CONTRIBUTORS &aContributors)

References _, createNotebookHtmlPage(), createNotebookPage(), createNotebookPageByCategory(), ABOUT_APP_INFO::GetArtists(), ABOUT_APP_INFO::GetDescription(), ABOUT_APP_INFO::GetDevelopers(), ABOUT_APP_INFO::GetDocWriters(), ABOUT_APP_INFO::GetLicense(), ABOUT_APP_INFO::GetPackagers(), ABOUT_APP_INFO::GetTranslators(), GetVersionInfoData(), DIALOG_ABOUT_BASE::m_auiNotebook, m_info, m_picArtists, m_picDevelopers, m_picDocWriters, m_picInformation, m_picLicense, m_picPackagers, m_picTranslators, m_picVersion, and m_titleName.

Referenced by DIALOG_ABOUT().

◆ createStaticBitmap()

wxStaticBitmap * DIALOG_ABOUT::createStaticBitmap ( wxScrolledWindow *  aParent,
wxBitmap *  icon 
)
private

Definition at line 410 of file dialog_about.cpp.

411 {
412  wxStaticBitmap* bitmap = new wxStaticBitmap( aParent, wxID_ANY, wxNullBitmap,
413  wxDefaultPosition, wxDefaultSize, 0 );
414 
415  if( aIcon )
416  {
417  bitmap->SetBitmap( *aIcon );
418  }
419  else
420  {
421  bitmap->SetBitmap( KiBitmap( right_xpm ) );
422  }
423 
424  return bitmap;
425 }
const BITMAP_OPAQUE right_xpm[1]
Definition: right.cpp:49
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:80

References KiBitmap(), and right_xpm.

Referenced by createNotebookPage(), and createNotebookPageByCategory().

◆ initDialog()

void DIALOG_ABOUT::initDialog ( )
private

◆ onCopyVersionInfo()

void DIALOG_ABOUT::onCopyVersionInfo ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_ABOUT_BASE.

Definition at line 434 of file dialog_about.cpp.

435 {
436  if( !wxTheClipboard->Open() )
437  {
438  wxMessageBox( _( "Could not open clipboard to write version information." ),
439  _( "Clipboard Error" ), wxOK | wxICON_EXCLAMATION, this );
440  return;
441  }
442 
443  wxString msg_version = GetVersionInfoData( m_titleName );
444 
445  wxTheClipboard->SetData( new wxTextDataObject( msg_version ) );
446  wxTheClipboard->Close();
447  m_btCopyVersionInfo->SetLabel( _( "Copied..." ) );
448 }
wxString GetVersionInfoData(const wxString &aTitle, bool aHtml, bool aBrief)
Create a version info string for bug reports and the about dialog.
#define _(s)
Definition: 3d_actions.cpp:33
wxString m_titleName
Definition: dialog_about.h:53
wxButton * m_btCopyVersionInfo

References _, GetVersionInfoData(), DIALOG_ABOUT_BASE::m_btCopyVersionInfo, and m_titleName.

◆ onHtmlLinkClicked()

void DIALOG_ABOUT::onHtmlLinkClicked ( wxHtmlLinkEvent &  event)
private

Definition at line 428 of file dialog_about.cpp.

429 {
430  ::wxLaunchDefaultBrowser( event.GetLinkInfo().GetHref() );
431 }

Referenced by createNotebookHtmlPage().

◆ onReportBug()

void DIALOG_ABOUT::onReportBug ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from DIALOG_ABOUT_BASE.

Definition at line 451 of file dialog_about.cpp.

452 {
453  if( TOOL_MANAGER* mgr = static_cast<EDA_BASE_FRAME*>( GetParent() )->GetToolManager() )
454  mgr->RunAction( "common.SuiteControl.reportBug", true );
455 }
TOOL_MANAGER.
Definition: tool_manager.h:50

◆ wxStaticTextMail()

wxStaticText * DIALOG_ABOUT::wxStaticTextMail ( wxScrolledWindow *  aParent,
const wxString &  email 
)
private

Definition at line 401 of file dialog_about.cpp.

402 {
403  wxStaticText* text = new wxStaticText( aParent, wxID_ANY,
404  wxT( "<" ) + aEmail + wxT( ">" ) );
405 
406  return text;
407 }

Referenced by createNotebookPage(), and createNotebookPageByCategory().

Member Data Documentation

◆ m_auiNotebook

wxAuiNotebook* DIALOG_ABOUT_BASE::m_auiNotebook
protectedinherited

◆ m_bitmapApp

wxStaticBitmap* DIALOG_ABOUT_BASE::m_bitmapApp
protectedinherited

Definition at line 38 of file dialog_about_base.h.

Referenced by DIALOG_ABOUT(), and DIALOG_ABOUT_BASE::DIALOG_ABOUT_BASE().

◆ m_btCopyVersionInfo

wxButton* DIALOG_ABOUT_BASE::m_btCopyVersionInfo
protectedinherited

◆ m_btOk

wxButton* DIALOG_ABOUT_BASE::m_btOk
protectedinherited

Definition at line 46 of file dialog_about_base.h.

Referenced by DIALOG_ABOUT_BASE::DIALOG_ABOUT_BASE().

◆ m_btReportBug

wxButton* DIALOG_ABOUT_BASE::m_btReportBug
protectedinherited

◆ m_info

ABOUT_APP_INFO& DIALOG_ABOUT::m_info
private

Definition at line 55 of file dialog_about.h.

Referenced by createNotebooks(), and DIALOG_ABOUT().

◆ m_picArtists

wxBitmap DIALOG_ABOUT::m_picArtists
private

Definition at line 49 of file dialog_about.h.

Referenced by createNotebooks(), and DIALOG_ABOUT().

◆ m_picDevelopers

wxBitmap DIALOG_ABOUT::m_picDevelopers
private

Definition at line 47 of file dialog_about.h.

Referenced by createNotebooks(), and DIALOG_ABOUT().

◆ m_picDocWriters

wxBitmap DIALOG_ABOUT::m_picDocWriters
private

Definition at line 48 of file dialog_about.h.

Referenced by createNotebooks(), and DIALOG_ABOUT().

◆ m_picInformation

wxBitmap DIALOG_ABOUT::m_picInformation
private

Definition at line 45 of file dialog_about.h.

Referenced by createNotebooks(), and DIALOG_ABOUT().

◆ m_picLicense

wxBitmap DIALOG_ABOUT::m_picLicense
private

Definition at line 52 of file dialog_about.h.

Referenced by createNotebooks(), and DIALOG_ABOUT().

◆ m_picPackagers

wxBitmap DIALOG_ABOUT::m_picPackagers
private

Definition at line 51 of file dialog_about.h.

Referenced by createNotebooks(), and DIALOG_ABOUT().

◆ m_picTranslators

wxBitmap DIALOG_ABOUT::m_picTranslators
private

Definition at line 50 of file dialog_about.h.

Referenced by createNotebooks(), and DIALOG_ABOUT().

◆ m_picVersion

wxBitmap DIALOG_ABOUT::m_picVersion
private

Definition at line 46 of file dialog_about.h.

Referenced by createNotebooks(), and DIALOG_ABOUT().

◆ m_staticTextAppTitle

wxStaticText* DIALOG_ABOUT_BASE::m_staticTextAppTitle
protectedinherited

Definition at line 39 of file dialog_about_base.h.

Referenced by DIALOG_ABOUT(), and DIALOG_ABOUT_BASE::DIALOG_ABOUT_BASE().

◆ m_staticTextBuildVersion

wxStaticText* DIALOG_ABOUT_BASE::m_staticTextBuildVersion
protectedinherited

Definition at line 41 of file dialog_about_base.h.

Referenced by DIALOG_ABOUT(), and DIALOG_ABOUT_BASE::DIALOG_ABOUT_BASE().

◆ m_staticTextCopyright

wxStaticText* DIALOG_ABOUT_BASE::m_staticTextCopyright
protectedinherited

Definition at line 40 of file dialog_about_base.h.

Referenced by DIALOG_ABOUT(), and DIALOG_ABOUT_BASE::DIALOG_ABOUT_BASE().

◆ m_staticTextLibVersion

wxStaticText* DIALOG_ABOUT_BASE::m_staticTextLibVersion
protectedinherited

Definition at line 42 of file dialog_about_base.h.

Referenced by DIALOG_ABOUT(), and DIALOG_ABOUT_BASE::DIALOG_ABOUT_BASE().

◆ m_titleName

wxString DIALOG_ABOUT::m_titleName
private

Definition at line 53 of file dialog_about.h.

Referenced by createNotebooks(), DIALOG_ABOUT(), and onCopyVersionInfo().


The documentation for this class was generated from the following files: