diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2019-10-16 22:10:25 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2019-10-16 22:10:25 -0300 |
commit | 21fd453ed9c2052e8b35755ae20e2f4f9a028b20 (patch) | |
tree | 2091e2050f635f078ceb871659198c3f71a6c6f9 /Project/MainFrame.cpp | |
parent | 8869bd97ec059ecebc89529b10b736f8fab9c001 (diff) | |
download | PSP.git-21fd453ed9c2052e8b35755ae20e2f4f9a028b20.tar.gz PSP.git-21fd453ed9c2052e8b35755ae20e2f4f9a028b20.tar.xz PSP.git-21fd453ed9c2052e8b35755ae20e2f4f9a028b20.zip |
PSP-UFU automated test
Diffstat (limited to 'Project/MainFrame.cpp')
-rw-r--r-- | Project/MainFrame.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp index 249a612..3447ed5 100644 --- a/Project/MainFrame.cpp +++ b/Project/MainFrame.cpp @@ -31,10 +31,10 @@ #include "MainFrame.h" #include "PropertiesData.h" #include "SimulationsSettingsForm.h" +#include "StabilityEventList.h" #include "SyncGenerator.h" #include "SyncMotor.h" #include "Transformer.h" -#include "StabilityEventList.h" #include "Workspace.h" #include "artProvider/ArtMetro.h" @@ -600,3 +600,27 @@ void MainFrame::OnStabilityMenuClick(wxCommandEvent& event) } } } + +int MainFrame::RunPSPTest() +{ + wxMessageOutput::Get()->Printf("Main frame setup OK!\n"); + + // Emulate new project creation + EnableCurrentProjectRibbon(); + + Workspace* newWorkspace = new Workspace(this, wxString::Format(_("New project %d"), m_projectNumber), + this->GetStatusBar(), m_sharedGLContext); + if(!m_sharedGLContext) m_sharedGLContext = newWorkspace->GetOpenGLContext(); + m_workspaceList.push_back(newWorkspace); + + m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true); + m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false); + + m_auiNotebook->AddPage(newWorkspace, newWorkspace->GetName(), true); + newWorkspace->Redraw(); + + wxMessageOutput::Get()->Printf("Project creation OK!\n"); + wxMessageOutput::Get()->Printf("Test done!\n"); + + return 0; +} |