Power System Platform  2026w11a-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 21 of file AboutForm.cpp.

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

◆ ~AboutForm()

AboutForm::~AboutForm ( )
virtual

Definition at line 22 of file AboutForm.cpp.

22{}

Member Function Documentation

◆ Init()

void AboutForm::Init ( )
virtual

Definition at line 23 of file AboutForm.cpp.

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

◆ 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: