diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-09-03 17:09:24 -0300 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2016-09-03 17:09:24 -0300 |
commit | 726686c9b378f3a727ded52226b13a760cba1e6c (patch) | |
tree | 941150985ee1823041024ce50bc812303d30868e /Project/Workspace.cpp | |
parent | 077270f0294d236c6047d850703c5d011cb4b711 (diff) | |
download | PSP.git-726686c9b378f3a727ded52226b13a760cba1e6c.tar.gz PSP.git-726686c9b378f3a727ded52226b13a760cba1e6c.tar.xz PSP.git-726686c9b378f3a727ded52226b13a760cba1e6c.zip |
Inductor under implementation
Ind motor, sync condenser and load implemented
Diffstat (limited to 'Project/Workspace.cpp')
-rw-r--r-- | Project/Workspace.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp index 519d6b3..e5b9e3f 100644 --- a/Project/Workspace.cpp +++ b/Project/Workspace.cpp @@ -6,6 +6,8 @@ #include "Transformer.h" #include "SyncGenerator.h" #include "IndMotor.h" +#include "SyncMotor.h" +#include "Load.h" // Camera Camera::Camera() @@ -614,6 +616,28 @@ void Workspace::OnKeyDown(wxKeyEvent& event) } } break; + case 'K': // Insert a synchronous condenser. + { + if(m_mode != MODE_INSERT) { + SyncMotor* newSyncCondenser = new SyncMotor(); + m_elementList.push_back(newSyncCondenser); + m_mode = MODE_INSERT; + m_statusBar->SetStatusText(_("Insert Synchronous Condenser: Click on a buses, ESC to cancel.")); + Redraw(); + } + } + break; + case 'C': // Insert a load. + { + if(m_mode != MODE_INSERT) { + Load* newLoad = new Load(); + m_elementList.push_back(newLoad); + m_mode = MODE_INSERT; + m_statusBar->SetStatusText(_("Insert Load: Click on a buses, ESC to cancel.")); + Redraw(); + } + } + break; default: break; } |