summaryrefslogtreecommitdiffstats
path: root/Project/Text.cpp
diff options
context:
space:
mode:
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;
+ }
+}