From 41b81949a92aad043caa28b0e1144348d06921f8 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Wed, 6 Sep 2017 20:11:37 -0300 Subject: Data report implementation start --- Project/DataReport.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Project/DataReport.h (limited to 'Project/DataReport.h') diff --git a/Project/DataReport.h b/Project/DataReport.h new file mode 100644 index 0000000..61d8e15 --- /dev/null +++ b/Project/DataReport.h @@ -0,0 +1,46 @@ +#ifndef DATAREPORT_H +#define DATAREPORT_H + +#include "DataReportBase.h" + +class Workspace; +class ElectricCalculation; + +class DataReport : public DataReportBase +{ +public: + enum GridSelection { + GRID_ALL = 0, + GRID_PF, + GRID_PFBUSES, + GRID_PFBRANCHES, + GRID_FAULT, + GRID_FAULTBUSES, + GRID_FAULTBRANCHES, + GRID_FAULTGENERATORS, + }; + + DataReport(wxWindow* parent, Workspace* workspace); + virtual ~DataReport(); + + virtual void SetHeaders(); + virtual void CreateGrids(); + virtual void FillValues(GridSelection gridToFill = GRID_ALL); + + protected: + virtual void OnFaulrGridChanged(wxGridEvent& event); + virtual void OnFaultBranchesGridChanged(wxGridEvent& event); + virtual void OnFaultBusesGridChanged(wxGridEvent& event); + virtual void OnFaultGeneratorsGridChanged(wxGridEvent& event); + virtual void OnPFBranchesGridChanged(wxGridEvent& event); + virtual void OnPowerFlowGridChanged(wxGridEvent& event); + virtual void OnPFBusGridChanged(wxGridEvent& event); + Workspace* m_workspace = NULL; + bool m_changingValues = false; + + // Headers choices + wxArrayString m_voltageChoices; + wxArrayString m_activePowerChoices; + wxArrayString m_reactivePowerChoices; +}; +#endif // DATAREPORT_H -- cgit From 93c3c0af32d08bbc22b43a03d81fad37fd8feb19 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Fri, 8 Sep 2017 00:21:04 -0300 Subject: Some grid improvement --- Project/DataReport.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Project/DataReport.h') diff --git a/Project/DataReport.h b/Project/DataReport.h index 61d8e15..0a23e91 100644 --- a/Project/DataReport.h +++ b/Project/DataReport.h @@ -42,5 +42,8 @@ public: wxArrayString m_voltageChoices; wxArrayString m_activePowerChoices; wxArrayString m_reactivePowerChoices; + wxArrayString m_resistanceChoices; + wxArrayString m_indReactanceChoices; + wxArrayString m_capSusceptanceChoices; }; #endif // DATAREPORT_H -- cgit From 9e1f6849c929506a17fa12185c5c0185d5287177 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Fri, 8 Sep 2017 22:02:09 -0300 Subject: More grid data implemented Some fault bugfixes --- Project/DataReport.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Project/DataReport.h') diff --git a/Project/DataReport.h b/Project/DataReport.h index 0a23e91..61a7ccf 100644 --- a/Project/DataReport.h +++ b/Project/DataReport.h @@ -45,5 +45,6 @@ public: wxArrayString m_resistanceChoices; wxArrayString m_indReactanceChoices; wxArrayString m_capSusceptanceChoices; + wxArrayString m_currentChoices; }; #endif // DATAREPORT_H -- cgit From 91b9c3f9909955443e74dedb248fc48fa984709b Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sat, 9 Sep 2017 19:11:41 -0300 Subject: Data report fully implemented --- Project/DataReport.h | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'Project/DataReport.h') diff --git a/Project/DataReport.h b/Project/DataReport.h index 61a7ccf..f262cb9 100644 --- a/Project/DataReport.h +++ b/Project/DataReport.h @@ -8,24 +8,25 @@ class ElectricCalculation; class DataReport : public DataReportBase { -public: - enum GridSelection { - GRID_ALL = 0, - GRID_PF, - GRID_PFBUSES, - GRID_PFBRANCHES, - GRID_FAULT, - GRID_FAULTBUSES, - GRID_FAULTBRANCHES, - GRID_FAULTGENERATORS, - }; - + public: + enum GridSelection { + GRID_ALL = 0, + GRID_PF, + GRID_PFBUSES, + GRID_PFBRANCHES, + GRID_FAULT, + GRID_FAULTBUSES, + GRID_FAULTBRANCHES, + GRID_FAULTGENERATORS, + }; + DataReport(wxWindow* parent, Workspace* workspace); virtual ~DataReport(); virtual void SetHeaders(); virtual void CreateGrids(); virtual void FillValues(GridSelection gridToFill = GRID_ALL); + virtual void SetRowsColours(wxGrid* grid, int rowStart = 1); protected: virtual void OnFaulrGridChanged(wxGridEvent& event); @@ -37,7 +38,7 @@ public: virtual void OnPFBusGridChanged(wxGridEvent& event); Workspace* m_workspace = NULL; bool m_changingValues = false; - + // Headers choices wxArrayString m_voltageChoices; wxArrayString m_activePowerChoices; @@ -46,5 +47,11 @@ public: wxArrayString m_indReactanceChoices; wxArrayString m_capSusceptanceChoices; wxArrayString m_currentChoices; + + // Colors + wxColour m_headerColour; + wxColour m_offlineColour; + wxColour m_oddRowColour; + wxColour m_evenRowColour; }; #endif // DATAREPORT_H -- cgit