From a54f50d0bf86c7c4d400e8b4d30cbc6091cfd9df Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Fri, 24 Feb 2017 12:25:41 -0300 Subject: Connection line implementation start --- Project/ConnectionLine.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Project/ConnectionLine.h (limited to 'Project/ConnectionLine.h') diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h new file mode 100644 index 0000000..8249df8 --- /dev/null +++ b/Project/ConnectionLine.h @@ -0,0 +1,17 @@ +#ifndef CONNECTIONLINE_H +#define CONNECTIONLINE_H + +#include "ControlElement.h" + +class ConnectionLine : public ControlElement +{ +public: + ConnectionLine(); + ~ConnectionLine(); + + virtual void Draw(wxPoint2DDouble translation, double scale) const; + virtual bool Contains(wxPoint2DDouble position) const; + virtual bool Intersects(wxRect2DDouble rect) const; +}; + +#endif // CONNECTIONLINE_H -- cgit From 4ddc7be64451db873e49169e951532ce8893e359 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Fri, 3 Mar 2017 18:50:40 -0300 Subject: More connection line methods implemented --- Project/ConnectionLine.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Project/ConnectionLine.h') diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h index 8249df8..cc7b51e 100644 --- a/Project/ConnectionLine.h +++ b/Project/ConnectionLine.h @@ -6,12 +6,23 @@ class ConnectionLine : public ControlElement { public: - ConnectionLine(); + ConnectionLine(Node* firstNode); ~ConnectionLine(); virtual void Draw(wxPoint2DDouble translation, double scale) const; virtual bool Contains(wxPoint2DDouble position) const; virtual bool Intersects(wxRect2DDouble rect) const; + virtual void StartMove(wxPoint2DDouble position); + virtual void Move(wxPoint2DDouble position); + virtual bool AppendNode(Node* node, ControlElement* parent); + virtual void UpdatePoints(); + virtual void SetTemporarySecondPoint(wxPoint2DDouble point) { m_tmpSndPt = point; }; + +protected: + double m_lineOffset = 0.0; + double m_moveStartPtY = 0.0; + double m_moveStartOffset = 0.0; + wxPoint2DDouble m_tmpSndPt; }; #endif // CONNECTIONLINE_H -- cgit From d11da00a993f1eeae6a1be50839ac72740e4e27b Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Sat, 4 Mar 2017 17:14:52 -0300 Subject: Delete element implemented --- Project/ConnectionLine.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Project/ConnectionLine.h') diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h index cc7b51e..b39fe15 100644 --- a/Project/ConnectionLine.h +++ b/Project/ConnectionLine.h @@ -6,6 +6,10 @@ class ConnectionLine : public ControlElement { public: + enum ConnectionLineType { + ELEMENT_ELEMENT = 0, + ELEMENT_LINE + }; ConnectionLine(Node* firstNode); ~ConnectionLine(); @@ -16,13 +20,23 @@ public: virtual void Move(wxPoint2DDouble position); virtual bool AppendNode(Node* node, ControlElement* parent); virtual void UpdatePoints(); - virtual void SetTemporarySecondPoint(wxPoint2DDouble point) { m_tmpSndPt = point; }; + virtual void SetTemporarySecondPoint(wxPoint2DDouble point) { m_tmpSndPt = point; } + virtual wxPoint2DDouble GetMidPoint() const; + + virtual ConnectionLineType GetType() const { return m_type; } + virtual void SetType(ConnectionLineType newType) { m_type = newType; } + + virtual ConnectionLine* GetParentLine() const { return m_parentLine; } + virtual void SetParentLine(ConnectionLine* parent); protected: double m_lineOffset = 0.0; double m_moveStartPtY = 0.0; double m_moveStartOffset = 0.0; wxPoint2DDouble m_tmpSndPt; + + ConnectionLineType m_type = ELEMENT_ELEMENT; + ConnectionLine* m_parentLine = NULL; }; #endif // CONNECTIONLINE_H -- cgit From b3be8e8ef6338bce2106d9c161bf3c7f7f7f9244 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Mon, 6 Mar 2017 18:59:37 -0300 Subject: Connection line fully implemented Bug on delete a chid line and update points --- Project/ConnectionLine.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Project/ConnectionLine.h') diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h index b39fe15..350c5d9 100644 --- a/Project/ConnectionLine.h +++ b/Project/ConnectionLine.h @@ -27,7 +27,9 @@ public: virtual void SetType(ConnectionLineType newType) { m_type = newType; } virtual ConnectionLine* GetParentLine() const { return m_parentLine; } - virtual void SetParentLine(ConnectionLine* parent); + virtual bool SetParentLine(ConnectionLine* parent); + + virtual std::vector GetLineChildList() const; protected: double m_lineOffset = 0.0; -- cgit From 21ebf63bb59357000f9bb44acde176d4ff169c01 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Thu, 9 Mar 2017 15:09:43 -0300 Subject: Sum implemented --- Project/ConnectionLine.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Project/ConnectionLine.h') diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h index 350c5d9..bb2dbcd 100644 --- a/Project/ConnectionLine.h +++ b/Project/ConnectionLine.h @@ -16,6 +16,7 @@ public: virtual void Draw(wxPoint2DDouble translation, double scale) const; virtual bool Contains(wxPoint2DDouble position) const; virtual bool Intersects(wxRect2DDouble rect) const; + virtual void RemoveParent(Element* parent); virtual void StartMove(wxPoint2DDouble position); virtual void Move(wxPoint2DDouble position); virtual bool AppendNode(Node* node, ControlElement* parent); -- cgit From f19803bc64885bcfaef15cfd7a8139c28d3dd506 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sat, 8 Apr 2017 16:31:25 -0300 Subject: Control editor export under implementation File handling --- Project/ConnectionLine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Project/ConnectionLine.h') diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h index bb2dbcd..a0df142 100644 --- a/Project/ConnectionLine.h +++ b/Project/ConnectionLine.h @@ -10,7 +10,7 @@ public: ELEMENT_ELEMENT = 0, ELEMENT_LINE }; - ConnectionLine(Node* firstNode); + ConnectionLine(Node* firstNode, int id); ~ConnectionLine(); virtual void Draw(wxPoint2DDouble translation, double scale) const; -- cgit From d2aa79321df798c297334dbcf4e56320b84400ba Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Mon, 10 Apr 2017 19:31:17 -0300 Subject: Control import implementation start --- Project/ConnectionLine.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'Project/ConnectionLine.h') diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h index a0df142..30e0d6a 100644 --- a/Project/ConnectionLine.h +++ b/Project/ConnectionLine.h @@ -5,14 +5,11 @@ class ConnectionLine : public ControlElement { -public: - enum ConnectionLineType { - ELEMENT_ELEMENT = 0, - ELEMENT_LINE - }; + public: + enum ConnectionLineType { ELEMENT_ELEMENT = 0, ELEMENT_LINE }; ConnectionLine(Node* firstNode, int id); ~ConnectionLine(); - + virtual void Draw(wxPoint2DDouble translation, double scale) const; virtual bool Contains(wxPoint2DDouble position) const; virtual bool Intersects(wxRect2DDouble rect) const; @@ -23,23 +20,22 @@ public: virtual void UpdatePoints(); virtual void SetTemporarySecondPoint(wxPoint2DDouble point) { m_tmpSndPt = point; } virtual wxPoint2DDouble GetMidPoint() const; - + virtual double GetOffset() const { return m_lineOffset; } virtual ConnectionLineType GetType() const { return m_type; } virtual void SetType(ConnectionLineType newType) { m_type = newType; } - virtual ConnectionLine* GetParentLine() const { return m_parentLine; } virtual bool SetParentLine(ConnectionLine* parent); - + virtual std::vector GetLineChildList() const; - -protected: + + protected: double m_lineOffset = 0.0; double m_moveStartPtY = 0.0; double m_moveStartOffset = 0.0; wxPoint2DDouble m_tmpSndPt; - + ConnectionLineType m_type = ELEMENT_ELEMENT; ConnectionLine* m_parentLine = NULL; }; -#endif // CONNECTIONLINE_H +#endif // CONNECTIONLINE_H -- cgit From 0ec05e0cb396a9ef153d29f605d4a0bbeb0dc7c1 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Mon, 17 Apr 2017 20:25:10 -0300 Subject: Connection line import under implementation Parent line not implemented yet --- Project/ConnectionLine.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Project/ConnectionLine.h') diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h index 30e0d6a..e9d238a 100644 --- a/Project/ConnectionLine.h +++ b/Project/ConnectionLine.h @@ -7,6 +7,7 @@ class ConnectionLine : public ControlElement { public: enum ConnectionLineType { ELEMENT_ELEMENT = 0, ELEMENT_LINE }; + ConnectionLine(); ConnectionLine(Node* firstNode, int id); ~ConnectionLine(); @@ -21,6 +22,7 @@ class ConnectionLine : public ControlElement virtual void SetTemporarySecondPoint(wxPoint2DDouble point) { m_tmpSndPt = point; } virtual wxPoint2DDouble GetMidPoint() const; virtual double GetOffset() const { return m_lineOffset; } + virtual void SetOffset(double offset) { m_lineOffset = offset; } virtual ConnectionLineType GetType() const { return m_type; } virtual void SetType(ConnectionLineType newType) { m_type = newType; } virtual ConnectionLine* GetParentLine() const { return m_parentLine; } -- cgit