Power System Platform  2026w10a-beta
Loading...
Searching...
No Matches
AboutForm Class Reference

Form to show some informations. More...

#include <AboutForm.h>

Inheritance diagram for AboutForm:
Collaboration diagram for AboutForm:

Public Member Functions

 AboutForm (wxWindow *parent)
 
virtual void Init ()
 

Protected Member Functions

virtual void OnOKButtonClick (wxCommandEvent &event)
 

Detailed Description

Form to show some informations.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
05/10/2017

Definition at line 32 of file AboutForm.h.

Constructor & Destructor Documentation

◆ AboutForm()

AboutForm::AboutForm ( wxWindow *  parent)

Definition at line 20 of file AboutForm.cpp.

20: AboutFormBase(parent) { Init(); }

◆ ~AboutForm()

AboutForm::~AboutForm ( )
virtual

Definition at line 21 of file AboutForm.cpp.

21{}

Member Function Documentation

◆ Init()

void AboutForm::Init ( )
virtual

Definition at line 22 of file AboutForm.cpp.

23{
24 // Set program version. Format: (Alpha/Beta/Release) (YEAR)w(WEEK)(a/b/c/...)
25 m_staticTextVersion->SetLabel("2026w11a-beta");
26
27 // Create developers table
28 m_gridCredits->EnableGridLines(false);
29 wxFont headerFont = m_gridCredits->GetDefaultCellFont();
30 headerFont.SetWeight(wxFONTWEIGHT_BOLD);
31 headerFont.SetPointSize(headerFont.GetPointSize() + 1);
32 wxColour headerColour(200, 200, 200);
33 wxColour hyperlinkColour(6, 69, 173);
34
35 m_gridCredits->AppendCols(3);
36 m_gridCredits->AppendRows(6);
37 m_gridCredits->HideColLabels();
38 m_gridCredits->HideRowLabels();
39 m_gridCredits->SetCellSize(0, 0, 1, 3);
40 m_gridCredits->SetCellSize(3, 0, 1, 3);
41
42 m_gridCredits->SetCellValue(0, 0, _("Developers"));
43 m_gridCredits->SetCellAlignment(0, 0, wxALIGN_CENTRE, wxALIGN_CENTRE);
44 m_gridCredits->SetCellBackgroundColour(0, 0, headerColour);
45 m_gridCredits->SetCellFont(0, 0, headerFont);
46 m_gridCredits->SetCellValue(1, 0, wxT("Thales Lima Oliveira"));
47 m_gridCredits->SetCellValue(1, 1, _("Main developer and project admin"));
48 m_gridCredits->SetCellValue(1, 2, wxT("thales@ufu.br"));
49
50 m_gridCredits->SetRowMinimalHeight(2, 30);
51
52 m_gridCredits->SetCellValue(3, 0, _("Contributors / Special Thanks"));
53 m_gridCredits->SetCellAlignment(3, 0, wxALIGN_CENTRE, wxALIGN_CENTRE);
54 m_gridCredits->SetCellBackgroundColour(3, 0, headerColour);
55 m_gridCredits->SetCellFont(3, 0, headerFont);
56 // Caixeta
57 m_gridCredits->SetCellValue(4, 0, wxT("Geraldo Caixeta Guimar") + static_cast<wxString>(L'\u00E3') + wxT("es"));
58 m_gridCredits->SetCellValue(4, 1, _("Chief advisor"));
59 m_gridCredits->SetCellValue(4, 2, wxT("gcaixeta@ufu.br"));
60 // Marcio Tamashiro
61 m_gridCredits->SetCellValue(5, 0, wxT("M") + static_cast<wxString>(L'\u00E1') + wxT("rcio Augusto Tamashiro"));
62 m_gridCredits->SetCellValue(5, 1, "");
63 m_gridCredits->SetCellValue(5, 2, wxT("tamashiro@ifto.edu.br"));
64
65 for(int i = 0; i < m_gridCredits->GetNumberRows(); ++i) {
66 m_gridCredits->SetCellTextColour(i, 2, hyperlinkColour);
67 }
68
69 m_gridCredits->AutoSize();
70
71 // Last col size
72 int lastColSize = m_notebook->GetPage(1)->GetSize().GetWidth();
73 int lastColNumber = m_gridCredits->GetNumberCols() - 1;
74 for(int i = 0; i < lastColNumber; ++i) {
75 lastColSize -= m_gridCredits->GetColSize(i);
76 }
77 m_gridCredits->SetColSize(lastColNumber, lastColSize);
78 m_gridCredits->SetSize(m_notebook->GetPage(1)->GetSize());
79
80 // Load license file
81 wxString licenseStr = "";
82 wxTextFile file;
83 wxFileName fn(wxStandardPaths::Get().GetExecutablePath());
84 wxString licensePath = fn.GetPath() + wxFileName::DirName("\\..\\data\\LICENSE", wxPATH_WIN).GetPath();
85 if(!file.Open(licensePath)) {
86 // Error message
87 } else {
88 licenseStr += file.GetFirstLine() + "\n";
89 while(!file.Eof()) {
90 licenseStr += file.GetNextLine() + "\n";
91 }
92 }
93 wxFont font = m_richTextCtrlLicense->GetFont();
94 font.SetFamily(wxFONTFAMILY_TELETYPE);
95 m_richTextCtrlLicense->SetFont(font);
96 m_richTextCtrlLicense->SetEditable(false);
97 m_richTextCtrlLicense->AppendText(licenseStr);
98}

◆ OnOKButtonClick()

virtual void AboutForm::OnOKButtonClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Definition at line 40 of file AboutForm.h.

40{ EndModal(wxID_OK); };

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