From 077270f0294d236c6047d850703c5d011cb4b711 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sat, 3 Sep 2016 01:10:18 -0300 Subject: Motor implementation done, elements classes reorganized --- Project/Branch.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Project/Branch.h (limited to 'Project/Branch.h') diff --git a/Project/Branch.h b/Project/Branch.h new file mode 100644 index 0000000..309419a --- /dev/null +++ b/Project/Branch.h @@ -0,0 +1,38 @@ +#ifndef BRANCH_H +#define BRANCH_H + +#include "Element.h" + +class Branch : public Element +{ +public: + Branch(); + ~Branch(); + + virtual bool Contains(wxPoint2DDouble position) const { return false; } + virtual void Draw(wxPoint2DDouble translation, double scale) const {} + virtual void Move(wxPoint2DDouble position) {} + virtual void StartMove(wxPoint2DDouble position) {} + virtual void MoveNode(Element* parent, wxPoint2DDouble position) {} + virtual bool NodeContains(wxPoint2DDouble position); + virtual bool SetNodeParent(Element* parent); + virtual void RemoveParent(Element* parent); + virtual void UpdateNodes(); + virtual wxCursor GetBestPickboxCursor() const { return wxCURSOR_ARROW; } + virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return false; } + virtual bool Intersects(wxRect2DDouble rect) const { return false; } + virtual void MovePickbox(wxPoint2DDouble position) {} + virtual bool PickboxContains(wxPoint2DDouble position) { return false; } + virtual void Rotate() {} + virtual void RotateNode(Element* parent); + virtual void AddPoint(wxPoint2DDouble point) {}; + virtual bool GetContextMenu(wxMenu& menu) { return false; } + virtual void UpdateSwitchesPosition(); + + protected: + bool m_inserted = false; + std::vector m_pointList; + std::vector m_movePts; +}; + +#endif // BRANCH_H -- cgit From d93ef357da510f2515556ff2cb51688a4e068805 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Mon, 5 Sep 2016 18:43:50 -0300 Subject: All elements implemented, switches implemented --- Project/Branch.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Project/Branch.h') diff --git a/Project/Branch.h b/Project/Branch.h index 309419a..5032f1f 100644 --- a/Project/Branch.h +++ b/Project/Branch.h @@ -28,11 +28,10 @@ public: virtual void AddPoint(wxPoint2DDouble point) {}; virtual bool GetContextMenu(wxMenu& menu) { return false; } virtual void UpdateSwitchesPosition(); + virtual void UpdateSwitches(); protected: bool m_inserted = false; - std::vector m_pointList; - std::vector m_movePts; }; #endif // BRANCH_H -- cgit From 697baaa3cc92e945d2301238dc9bcabffdb465ef Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Tue, 6 Sep 2016 18:32:47 -0300 Subject: Counter clockwise rotation implemented --- Project/Branch.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Project/Branch.h') diff --git a/Project/Branch.h b/Project/Branch.h index 5032f1f..a39cef6 100644 --- a/Project/Branch.h +++ b/Project/Branch.h @@ -23,8 +23,7 @@ public: virtual bool Intersects(wxRect2DDouble rect) const { return false; } virtual void MovePickbox(wxPoint2DDouble position) {} virtual bool PickboxContains(wxPoint2DDouble position) { return false; } - virtual void Rotate() {} - virtual void RotateNode(Element* parent); + virtual void RotateNode(Element* parent, bool clockwise = true); virtual void AddPoint(wxPoint2DDouble point) {}; virtual bool GetContextMenu(wxMenu& menu) { return false; } virtual void UpdateSwitchesPosition(); -- cgit From f6718ac24553ac99bf90f99a33543d6d6b96999b Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Fri, 30 Sep 2016 16:58:37 -0300 Subject: Line form implemented, voltages corrections under implementation --- Project/Branch.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Project/Branch.h') diff --git a/Project/Branch.h b/Project/Branch.h index a39cef6..ba7108a 100644 --- a/Project/Branch.h +++ b/Project/Branch.h @@ -2,6 +2,7 @@ #define BRANCH_H #include "Element.h" +#include "Bus.h" class Branch : public Element { -- cgit