diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-11-29 18:27:32 -0200 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2016-11-29 18:27:32 -0200 |
commit | 6b9054f1bb28b4ac1b0a7b682204baa0e2643220 (patch) | |
tree | 395cf7dfc8789fbf1cb6df91d8d3aa0b2dd68608 /Project/Text.h | |
parent | 22f71caae9771b8279dcfdbd3842b45c4520b782 (diff) | |
download | PSP.git-6b9054f1bb28b4ac1b0a7b682204baa0e2643220.tar.gz PSP.git-6b9054f1bb28b4ac1b0a7b682204baa0e2643220.tar.xz PSP.git-6b9054f1bb28b4ac1b0a7b682204baa0e2643220.zip |
Text form under implementation
Diffstat (limited to 'Project/Text.h')
-rw-r--r-- | Project/Text.h | 66 |
1 files changed, 53 insertions, 13 deletions
diff --git a/Project/Text.h b/Project/Text.h index d54d927..24f9228 100644 --- a/Project/Text.h +++ b/Project/Text.h @@ -4,16 +4,34 @@ #include "Element.h" #include "wxGLString.h" -class wxGLString; -class Bus; -class Line; -class Transformer; -class SyncGenerator; -class IndMotor; -class SyncMotor; -class Load; -class Inductor; -class Capacitor; +class TextForm; + +enum ElementType { + TYPE_BUS, + TYPE_CAPACITOR, + TYPE_IND_MOTOR, + TYPE_INDUCTOR, + TYPE_LINE, + TYPE_LOAD, + TYPE_SYNC_GENERATOR, + TYPE_SYNC_MOTOR, + TYPE_TRANSFORMER +}; + +enum DataType { + DATA_NAME, + DATA_VOLTAGE, + DATA_ANGLE, + DATA_SC_CURRENT, + DATA_SC_VOLTAGE, + DATA_SC_POWER, + DATA_ACTIVE_POWER, + DATA_REACTIVE_POWER, + DATA_PF_ACTIVE, + DATA_PF_REACTIVE, + DATA_PF_LOSSES, + DATA_PF_CURRENT +}; class Text : public Element { @@ -27,13 +45,35 @@ class Text : public Element virtual void Draw(wxPoint2DDouble translation, double scale); virtual bool Intersects(wxRect2DDouble rect) const; virtual void Rotate(bool clockwise = true); + virtual bool ShowForm(wxWindow* parent, std::vector<Element*> elementList); virtual wxString GetText() const { return m_text; } virtual void SetText(wxString text); - -protected: - wxString m_text = _("Barra 1"); + void SetDataType(const DataType& dataType) { m_dataType = dataType; } + void SetDirection(int direction) { m_direction = direction; } + void SetElement(Element* element) { m_element = element; } + void SetElementNumber(int elementNumber) { m_elementNumber = elementNumber; } + void SetElementType(const ElementType elementType) { m_elementType = elementType; } + void SetFontSize(int fontSize) { m_fontSize = fontSize; } + void SetUnit(const ElectricalUnit unit) { m_unit = unit; } + const DataType GetDataType() const { return m_dataType; } + int GetDirection() const { return m_direction; } + Element* GetElement() { return m_element; } + int GetElementNumber() const { return m_elementNumber; } + const ElementType GetElementType() const { return m_elementType; } + int GetFontSize() const { return m_fontSize; } + const ElectricalUnit GetUnit() const { return m_unit; } + + protected: + wxString m_text = _("Text"); int m_fontSize = 10; + + Element* m_element; + ElementType m_elementType; + int m_elementNumber; + DataType m_dataType; + ElectricalUnit m_unit; + int m_direction; }; #endif // TEXT_H |