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/IndMotor.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/IndMotor.cpp')
-rw-r--r-- | Project/IndMotor.cpp | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/Project/IndMotor.cpp b/Project/IndMotor.cpp index b84e585..26d19e9 100644 --- a/Project/IndMotor.cpp +++ b/Project/IndMotor.cpp @@ -1,27 +1,34 @@ +#include "IndMotorForm.h" #include "IndMotor.h" -IndMotor::IndMotor() : Machines() -{ -} - -IndMotor::~IndMotor() -{ -} - +IndMotor::IndMotor() : Machines() {} +IndMotor::IndMotor(wxString name) : Machines() { m_electricalData.name = name; } +IndMotor::~IndMotor() {} void IndMotor::DrawSymbol() const { - std::vector<wxPoint2DDouble> mPts; - mPts.push_back(wxPoint2DDouble(-10, 13) + m_position); - mPts.push_back(wxPoint2DDouble(-10, -13) + m_position); - mPts.push_back(wxPoint2DDouble(0, 2) + m_position); - mPts.push_back(wxPoint2DDouble(10, -13) + m_position); - mPts.push_back(wxPoint2DDouble(10, 13) + m_position); - DrawLine(mPts); + std::vector<wxPoint2DDouble> mPts; + mPts.push_back(wxPoint2DDouble(-10, 13) + m_position); + mPts.push_back(wxPoint2DDouble(-10, -13) + m_position); + mPts.push_back(wxPoint2DDouble(0, 2) + m_position); + mPts.push_back(wxPoint2DDouble(10, -13) + m_position); + mPts.push_back(wxPoint2DDouble(10, 13) + m_position); + DrawLine(mPts); } bool IndMotor::GetContextMenu(wxMenu& menu) { - menu.Append(ID_EDIT_INDMOTOR, _("Edit induction motor")); + menu.Append(ID_EDIT_INDMOTOR, _("Edit induction motor")); GeneralMenuItens(menu); return true; } + +bool IndMotor::ShowForm(wxWindow* parent, Element* element) +{ + IndMotorForm* indMotorForm = new IndMotorForm(parent, this); + if(indMotorForm->ShowModal() == wxID_OK) { + indMotorForm->Destroy(); + return true; + } + indMotorForm->Destroy(); + return false; +} |