diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-10-27 17:26:24 -0200 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2016-10-27 17:26:24 -0200 |
commit | 02c5a1d22a078c132aca40ea14b95800dd8257e9 (patch) | |
tree | 39f576cc3c66931c3448b85833a5f048a40b7802 /Project/SyncMotor.cpp | |
parent | 0e3a45462bf8ce31be988679fd380baeecfb1b95 (diff) | |
download | PSP.git-02c5a1d22a078c132aca40ea14b95800dd8257e9.tar.gz PSP.git-02c5a1d22a078c132aca40ea14b95800dd8257e9.tar.xz PSP.git-02c5a1d22a078c132aca40ea14b95800dd8257e9.zip |
All elements forms implemented
Diffstat (limited to 'Project/SyncMotor.cpp')
-rw-r--r-- | Project/SyncMotor.cpp | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/Project/SyncMotor.cpp b/Project/SyncMotor.cpp index b6d9e9a..fba2ee5 100644 --- a/Project/SyncMotor.cpp +++ b/Project/SyncMotor.cpp @@ -1,22 +1,27 @@ +#include "SyncMachineForm.h" #include "SyncMotor.h" -SyncMotor::SyncMotor() : Machines() +SyncMotor::SyncMotor() : Machines() {} +SyncMotor::SyncMotor(wxString name) : Machines() { m_electricalData.name = name; } +SyncMotor::~SyncMotor() {} +void SyncMotor::DrawSymbol() const { DrawArc(m_position, 12, 30, 330, 10, GL_LINE_STRIP); } +bool SyncMotor::GetContextMenu(wxMenu& menu) { -} + menu.Append(ID_EDIT_SYNCMOTOR, _("Edit Synchronous Condenser")); + GeneralMenuItens(menu); -SyncMotor::~SyncMotor() -{ + return true; } -void SyncMotor::DrawSymbol() const +bool SyncMotor::ShowForm(wxWindow* parent, Element* element) { - DrawArc(m_position, 12, 30, 330, 10, GL_LINE_STRIP); -} + SyncMachineForm* syncMotorForm = new SyncMachineForm(parent, this); + syncMotorForm->SetTitle(_("Synchronous Condenser")); + if(syncMotorForm->ShowModal() == wxID_OK) { + syncMotorForm->Destroy(); + return true; + } -bool SyncMotor::GetContextMenu(wxMenu& menu) -{ - menu.Append(ID_EDIT_SYNCMOTOR, _("Edit Synchronous Condenser")); - GeneralMenuItens(menu); - - return true; + syncMotorForm->Destroy(); + return false; } |