From 02c5a1d22a078c132aca40ea14b95800dd8257e9 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Thu, 27 Oct 2016 17:26:24 -0200 Subject: All elements forms implemented --- Project/SyncMotor.cpp | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'Project/SyncMotor.cpp') 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; } -- cgit