summaryrefslogtreecommitdiffstats
path: root/Project/Workspace.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2016-09-03 01:10:18 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2016-09-03 01:10:18 -0300
commit077270f0294d236c6047d850703c5d011cb4b711 (patch)
treec655594e525222104c49564f097734537ccc322b /Project/Workspace.cpp
parentbd3f70a62f8c2868e20f094a0ad7dd8c977ab853 (diff)
downloadPSP.git-077270f0294d236c6047d850703c5d011cb4b711.tar.gz
PSP.git-077270f0294d236c6047d850703c5d011cb4b711.tar.xz
PSP.git-077270f0294d236c6047d850703c5d011cb4b711.zip
Motor implementation done, elements classes reorganized
Diffstat (limited to 'Project/Workspace.cpp')
-rw-r--r--Project/Workspace.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp
index d515683..519d6b3 100644
--- a/Project/Workspace.cpp
+++ b/Project/Workspace.cpp
@@ -4,7 +4,8 @@
#include "Bus.h"
#include "Line.h"
#include "Transformer.h"
-#include "Generator.h"
+#include "SyncGenerator.h"
+#include "IndMotor.h"
// Camera
Camera::Camera()
@@ -594,7 +595,7 @@ void Workspace::OnKeyDown(wxKeyEvent& event)
case 'G': // Insert a generator.
{
if(m_mode != MODE_INSERT) {
- Generator* newGenerator = new Generator();
+ SyncGenerator* newGenerator = new SyncGenerator();
m_elementList.push_back(newGenerator);
m_mode = MODE_INSERT;
m_statusBar->SetStatusText(_("Insert Generator: Click on a buses, ESC to cancel."));
@@ -602,6 +603,17 @@ void Workspace::OnKeyDown(wxKeyEvent& event)
}
}
break;
+ case 'I': // Insert an induction motor.
+ {
+ if(m_mode != MODE_INSERT) {
+ IndMotor* newIndMotor = new IndMotor();
+ m_elementList.push_back(newIndMotor);
+ m_mode = MODE_INSERT;
+ m_statusBar->SetStatusText(_("Insert Induction Motor: Click on a buses, ESC to cancel."));
+ Redraw();
+ }
+ }
+ break;
default:
break;
}