From 0e3a45462bf8ce31be988679fd380baeecfb1b95 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Tue, 25 Oct 2016 17:09:19 -0200 Subject: Capacitor and Inductor forms implemented --- Project/Inductor.h | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'Project/Inductor.h') diff --git a/Project/Inductor.h b/Project/Inductor.h index 721d58a..21134c5 100644 --- a/Project/Inductor.h +++ b/Project/Inductor.h @@ -3,18 +3,32 @@ #include "Shunt.h" +class ReactiveShuntElementForm; + +struct InductorElectricalData { + wxString name; + double reactivePower = 100.0; + ElectricalUnit reactivePowerUnit = UNIT_MVAr; +}; + class Inductor : public Shunt { -public: - Inductor(); - ~Inductor(); - - virtual bool AddParent(Element* parent, wxPoint2DDouble position); + public: + Inductor(); + Inductor(wxString name); + ~Inductor(); + + virtual bool AddParent(Element* parent, wxPoint2DDouble position); virtual void Draw(wxPoint2DDouble translation, double scale) const; - virtual bool Contains(wxPoint2DDouble position) const; - virtual bool Intersects(wxRect2DDouble rect) const; + virtual bool Contains(wxPoint2DDouble position) const; + virtual bool Intersects(wxRect2DDouble rect) const; virtual void Rotate(bool clockwise = true); virtual bool GetContextMenu(wxMenu& menu); + virtual bool ShowForm(wxWindow* parent, Element* element); + virtual InductorElectricalData GetElectricalData() { return m_electricalData; } + virtual void SetElectricalData(InductorElectricalData electricalData) { m_electricalData = electricalData; } + protected: + InductorElectricalData m_electricalData; }; -#endif // INDUCTOR_H +#endif // INDUCTOR_H -- cgit