summaryrefslogtreecommitdiffstats
path: root/Project/WorkspaceBase.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2020-07-07 23:12:04 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2020-07-07 23:12:04 -0300
commitab30228b1a57053323363674fa7f137c0329a180 (patch)
tree50849a3680d61a2428665cc1035f1f4215870acb /Project/WorkspaceBase.cpp
parent6c0e98a2727d07e1fbb38b78c27d68e98ad09465 (diff)
downloadPSP.git-ab30228b1a57053323363674fa7f137c0329a180.tar.gz
PSP.git-ab30228b1a57053323363674fa7f137c0329a180.tar.xz
PSP.git-ab30228b1a57053323363674fa7f137c0329a180.zip
Voltage heat map implemented
Voltage heat map implemented using modern OpenGL =) New external library required: -GLEW -GLFW -GLM (incorporeted at the source) Old memory leaks fixed =)
Diffstat (limited to 'Project/WorkspaceBase.cpp')
-rw-r--r--Project/WorkspaceBase.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Project/WorkspaceBase.cpp b/Project/WorkspaceBase.cpp
index ae718fb..e395a83 100644
--- a/Project/WorkspaceBase.cpp
+++ b/Project/WorkspaceBase.cpp
@@ -40,6 +40,9 @@ WorkspaceBase::WorkspaceBase(wxWindow* parent, wxWindowID id, const wxPoint& pos
m_timer = new wxTimer;
m_timer->Start(1500, false);
+ m_timerHeatMap = new wxTimer;
+ m_timerHeatMap->Start(500, false);
+
SetName(wxT("WorkspaceBase"));
SetSize(wxDLG_UNIT(this, wxSize(500,300)));
if (GetSizer()) {
@@ -58,7 +61,9 @@ WorkspaceBase::WorkspaceBase(wxWindow* parent, wxWindowID id, const wxPoint& pos
m_glCanvas->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(WorkspaceBase::OnLeftDoubleClick), NULL, this);
m_glCanvas->Connect(wxEVT_IDLE, wxIdleEventHandler(WorkspaceBase::OnIdle), NULL, this);
m_glCanvas->Connect(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(WorkspaceBase::OnMiddleDoubleClick), NULL, this);
+ m_glCanvas->Connect(wxEVT_SIZE, wxSizeEventHandler(WorkspaceBase::OnResize), NULL, this);
m_timer->Connect(wxEVT_TIMER, wxTimerEventHandler(WorkspaceBase::OnTimer), NULL, this);
+ m_timerHeatMap->Connect(wxEVT_TIMER, wxTimerEventHandler(WorkspaceBase::OnHeatMapTime), NULL, this);
}
@@ -76,9 +81,14 @@ WorkspaceBase::~WorkspaceBase()
m_glCanvas->Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(WorkspaceBase::OnLeftDoubleClick), NULL, this);
m_glCanvas->Disconnect(wxEVT_IDLE, wxIdleEventHandler(WorkspaceBase::OnIdle), NULL, this);
m_glCanvas->Disconnect(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(WorkspaceBase::OnMiddleDoubleClick), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_SIZE, wxSizeEventHandler(WorkspaceBase::OnResize), NULL, this);
m_timer->Disconnect(wxEVT_TIMER, wxTimerEventHandler(WorkspaceBase::OnTimer), NULL, this);
+ m_timerHeatMap->Disconnect(wxEVT_TIMER, wxTimerEventHandler(WorkspaceBase::OnHeatMapTime), NULL, this);
m_timer->Stop();
wxDELETE( m_timer );
+ m_timerHeatMap->Stop();
+ wxDELETE( m_timerHeatMap );
+
}