summaryrefslogtreecommitdiffstats
path: root/Project/MainFrame.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-09-09 19:13:03 -0300
committerGitHub <noreply@github.com>2017-09-09 19:13:03 -0300
commitdcb1934ec64c928efdfa561519d2e46a3c3cb0db (patch)
treec1bf65c2bd297d44e258067155292d9798f4c8c9 /Project/MainFrame.cpp
parent926af7f34aaf5aebdbac0cbc550ed75647874258 (diff)
parent91b9c3f9909955443e74dedb248fc48fa984709b (diff)
downloadPSP.git-dcb1934ec64c928efdfa561519d2e46a3c3cb0db.tar.gz
PSP.git-dcb1934ec64c928efdfa561519d2e46a3c3cb0db.tar.xz
PSP.git-dcb1934ec64c928efdfa561519d2e46a3c3cb0db.zip
Merge pull request #34 from Thales1330/wip-datareport
Wip datareport
Diffstat (limited to 'Project/MainFrame.cpp')
-rw-r--r--Project/MainFrame.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp
index 6604722..d113385 100644
--- a/Project/MainFrame.cpp
+++ b/Project/MainFrame.cpp
@@ -15,6 +15,7 @@
#include "SimulationsSettingsForm.h"
#include "PropertiesData.h"
#include "ChartView.h"
+#include "DataReport.h"
MainFrame::MainFrame() : MainFrameBase(NULL) {}
MainFrame::MainFrame(wxWindow* parent, wxLocale* locale, PropertiesData* initProperties) : MainFrameBase(parent)
@@ -156,7 +157,14 @@ void MainFrame::OnChartsClick(wxRibbonButtonBarEvent& event)
void MainFrame::OnCloseClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnCopyClick(wxRibbonButtonBarEvent& event) {}
-void MainFrame::OnDataReportClick(wxRibbonButtonBarEvent& event) {}
+
+void MainFrame::OnDataReportClick(wxRibbonButtonBarEvent& event)
+{
+ if(Workspace* workspace = dynamic_cast<Workspace*>(m_auiNotebook->GetCurrentPage())) {
+ DataReport* dataReport = new DataReport(workspace, workspace);
+ dataReport->Show();
+ }
+}
void MainFrame::OnDeleteClick(wxRibbonButtonBarEvent& event)
{
Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
@@ -166,6 +174,9 @@ void MainFrame::OnDeleteClick(wxRibbonButtonBarEvent& event)
}
void MainFrame::OnDisableSolutionClick(wxRibbonButtonBarEvent& event)
{
+ if(Workspace* workspace = dynamic_cast<Workspace*>(m_auiNotebook->GetCurrentPage())) {
+ workspace->SetContinuousCalculationActive(false);
+ }
m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true);
m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false);
}
@@ -173,6 +184,10 @@ void MainFrame::OnDisableSolutionClick(wxRibbonButtonBarEvent& event)
void MainFrame::OnDragClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnEnableSolutionClick(wxRibbonButtonBarEvent& event)
{
+ if(Workspace* workspace = dynamic_cast<Workspace*>(m_auiNotebook->GetCurrentPage())) {
+ workspace->SetContinuousCalculationActive(true);
+ workspace->RunStaticStudies();
+ }
m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, true);
m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, false);
}