diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-09-12 18:49:00 -0300 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2016-09-12 18:49:00 -0300 |
commit | 1088617b8f1c31af3ad6a87f9934f7a55240b3a2 (patch) | |
tree | 922d0e070c7ef3351dc166340b77485dd5b814f3 /Project/Bus.cpp | |
parent | d5c3a7c9c375f683f5b66a19caf28299af89ef65 (diff) | |
download | PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.tar.gz PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.tar.xz PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.zip |
Bus form under implementation [2]
Diffstat (limited to 'Project/Bus.cpp')
-rw-r--r-- | Project/Bus.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/Project/Bus.cpp b/Project/Bus.cpp index d85b6e0..a684ed4 100644 --- a/Project/Bus.cpp +++ b/Project/Bus.cpp @@ -8,6 +8,15 @@ Bus::Bus(wxPoint2DDouble position) : Element() SetPosition(position); } +Bus::Bus(wxPoint2DDouble position, wxString name) +{ + m_width = 100.0; + m_height = 5.0; + SetPosition(position); + + m_electricalData.name = name; +} + Bus::~Bus() {} void Bus::Draw(wxPoint2DDouble translation, double scale) const { @@ -166,15 +175,14 @@ bool Bus::GetContextMenu(wxMenu& menu) return true; } -bool Bus::ShowForm(wxWindow* parent) +bool Bus::ShowForm(wxWindow* parent, Element* element) { - BusForm* busForm = new BusForm(parent); - if(busForm->ShowModal() == wxID_OK){ - - busForm->Destroy(); - return true; + BusForm* busForm = new BusForm(parent, this); + if(busForm->ShowModal() == wxID_OK) { + busForm->Destroy(); + return true; } - - busForm->Destroy(); + + busForm->Destroy(); return false; } |