diff options
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; } |