summaryrefslogtreecommitdiffstats
path: root/Project/Text.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-12-01 16:57:41 -0200
committerThales1330 <thaleslima.ufu@gmail.com>2016-12-01 16:57:41 -0200
commite266f5811403beea13c9cc5399c55db4a34fdd3c (patch)
tree517e01b8685248f04548513091e7040a1b36ec0b /Project/Text.cpp
parent186e9d36f23ebb4c260885215d216d4df0b3b2ec (diff)
downloadPSP.git-e266f5811403beea13c9cc5399c55db4a34fdd3c.tar.gz
PSP.git-e266f5811403beea13c9cc5399c55db4a34fdd3c.tar.xz
PSP.git-e266f5811403beea13c9cc5399c55db4a34fdd3c.zip
Text Form under implementation [3]
Diffstat (limited to 'Project/Text.cpp')
-rw-r--r--Project/Text.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/Project/Text.cpp b/Project/Text.cpp
index 839e6f8..2d8e85c 100644
--- a/Project/Text.cpp
+++ b/Project/Text.cpp
@@ -2,6 +2,15 @@
#include "Text.h"
#include "ElectricCalculation.h"
+#include "Bus.h"
+#include "Line.h"
+#include "Transformer.h"
+#include "SyncGenerator.h"
+#include "IndMotor.h"
+#include "SyncMotor.h"
+#include "Load.h"
+#include "Inductor.h"
+#include "Capacitor.h"
Text::Text() : Element() { SetText(m_text); }
Text::Text(wxPoint2DDouble position) : Element()
@@ -88,3 +97,44 @@ bool Text::ShowForm(wxWindow* parent, std::vector<Element*> elementList)
textForm->Destroy();
return false;
}
+
+void Text::UpdateText(double systemPowerBase)
+{
+ switch(m_elementType) {
+ case TYPE_BUS: {
+ Bus* bus = (Bus*)m_element;
+ if(bus) {
+ switch(m_dataType) {
+ case DATA_NAME: {
+ SetText(bus->GetEletricalData().name);
+ wxLogMessage(m_text);
+ } break;
+ }
+ }
+ } break;
+ case TYPE_SYNC_GENERATOR: {
+
+ } break;
+ case TYPE_LINE: {
+
+ } break;
+ case TYPE_TRANSFORMER: {
+
+ } break;
+ case TYPE_LOAD: {
+
+ } break;
+ case TYPE_SYNC_MOTOR: {
+
+ } break;
+ case TYPE_IND_MOTOR: {
+
+ } break;
+ case TYPE_CAPACITOR: {
+
+ } break;
+ case TYPE_INDUCTOR: {
+
+ } break;
+ }
+}