summaryrefslogtreecommitdiffstats
path: root/Project
diff options
context:
space:
mode:
Diffstat (limited to 'Project')
-rw-r--r--Project/Bus.cpp9
-rw-r--r--Project/Bus.h1
-rw-r--r--Project/BusForm.cpp4
-rw-r--r--Project/ElementForm.wxcp188
-rw-r--r--Project/ElementFormBase.cpp13
-rw-r--r--Project/ElementFormBase.h4
-rw-r--r--Project/FileHanding.cpp4
-rw-r--r--Project/FrequencyResponseForm.cpp64
-rw-r--r--Project/FrequencyResponseForm.h36
-rw-r--r--Project/PowerQuality.cpp17
-rw-r--r--Project/PowerQuality.h1
-rw-r--r--Project/Project.project2
-rw-r--r--Project/PropertiesData.h16
-rw-r--r--Project/PropertiesForm.wxcp1475
-rw-r--r--Project/PropertiesFormBase.cpp161
-rw-r--r--Project/PropertiesFormBase.h44
-rw-r--r--Project/Workspace.cpp51
-rw-r--r--Project/Workspace.h1
18 files changed, 2063 insertions, 28 deletions
diff --git a/Project/Bus.cpp b/Project/Bus.cpp
index 37eac3e..5c8c190 100644
--- a/Project/Bus.cpp
+++ b/Project/Bus.cpp
@@ -259,7 +259,7 @@ bool Bus::GetPlotData(ElementPlotData& plotData, PlotStudy study)
plotData.AddData(absVoltage, _("Voltage"));
plotData.AddData(argVoltage, _("Angle"));
} else if(FREQRESPONSE) {
- //if(!m_electricalData.plotBus) return false;
+ if(!m_electricalData.plotPQData) return false;
plotData.SetName(m_electricalData.name);
plotData.SetCurveType(ElementPlotData::CT_BUS);
plotData.AddData(m_electricalData.absImpedanceVector, _("Impedance"));
@@ -316,6 +316,10 @@ rapidxml::xml_node<>* Bus::SaveElement(rapidxml::xml_document<>& doc, rapidxml::
auto stabFaultReactance = XMLParser::AppendNode(doc, stability, "FaultReactance");
XMLParser::SetNodeValue(doc, stabFaultReactance, m_electricalData.stabFaultReactance);
+ auto powerQuality = XMLParser::AppendNode(doc, electricalProp, "PowerQuality");
+ auto plotPQData = XMLParser::AppendNode(doc, powerQuality, "Plot");
+ XMLParser::SetNodeValue(doc, plotPQData, m_electricalData.plotPQData);
+
return elementNode;
}
@@ -349,6 +353,9 @@ bool Bus::OpenElement(rapidxml::xml_node<>* elementNode)
m_electricalData.stabFaultResistance = XMLParser::GetNodeValueDouble(stability, "FaultResistance");
m_electricalData.stabFaultReactance = XMLParser::GetNodeValueDouble(stability, "FaultReactance");
+ auto powerQuality = electricalProp->first_node("PowerQuality");
+ if(powerQuality) m_electricalData.plotPQData = XMLParser::GetNodeValueInt(powerQuality, "Plot");
+
if(m_electricalData.stabHasFault) SetDynamicEvent(true);
return true;
}
diff --git a/Project/Bus.h b/Project/Bus.h
index e2947ac..b01a315 100644
--- a/Project/Bus.h
+++ b/Project/Bus.h
@@ -59,6 +59,7 @@ struct BusElectricalData {
std::vector<std::complex<double> > stabVoltageVector;
// Power Quality
+ bool plotPQData = false;
std::vector<int> harmonicOrder;
std::vector< std::complex<double> > harmonicVoltage;
double thd = 0.0;
diff --git a/Project/BusForm.cpp b/Project/BusForm.cpp
index ca083e7..9f942f3 100644
--- a/Project/BusForm.cpp
+++ b/Project/BusForm.cpp
@@ -86,6 +86,8 @@ BusForm::BusForm(wxWindow* parent, Bus* bus) : BusFormBase(parent)
EnableCtrlVoltageFields(bus->GetElectricalData().isVoltageControlled);
EnableFaultFields(bus->GetElectricalData().hasFault);
EnableStabFaultFields(bus->GetElectricalData().stabHasFault);
+
+ m_checkBoxPlotPQData->SetValue(bus->GetElectricalData().plotPQData);
}
BusForm::~BusForm() {}
@@ -161,6 +163,8 @@ void BusForm::OnButtonOKClick(wxCommandEvent& event)
if(!m_bus->DoubleFromString(m_parent, m_textCtrlStabFaultReactance->GetValue(), data.stabFaultReactance,
_("Value entered incorrectly in the field \"Fault reactance (stability)\".")))
return;
+
+ data.plotPQData = m_checkBoxPlotPQData->GetValue();
m_bus->SetElectricalData(data);
diff --git a/Project/ElementForm.wxcp b/Project/ElementForm.wxcp
index 3c5d096..a488317 100644
--- a/Project/ElementForm.wxcp
+++ b/Project/ElementForm.wxcp
@@ -1,7 +1,7 @@
{
"metadata": {
"m_generatedFilesDir": ".",
- "m_objCounter": 2020,
+ "m_objCounter": 2045,
"m_includeFiles": [],
"m_bitmapFunction": "wxC9EE9InitBitmapResources",
"m_bitmapsFile": "ElementFormBitmaps.cpp",
@@ -3864,6 +3864,192 @@
}]
}]
}]
+ }, {
+ "m_type": 4441,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxTAB_TRAVERSAL"],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_panelPowerQuality"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Power Quality"
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "bool",
+ "m_label": "Selected",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Null Page",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4401,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerLvl2_4"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 0,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4415,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_checkBoxPlotPQData"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Plot harmonic bus impedance"
+ }, {
+ "type": "bool",
+ "m_label": "Value:",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }]
}]
}, {
"m_type": 4401,
diff --git a/Project/ElementFormBase.cpp b/Project/ElementFormBase.cpp
index 0d69851..1174572 100644
--- a/Project/ElementFormBase.cpp
+++ b/Project/ElementFormBase.cpp
@@ -379,6 +379,19 @@ BusFormBase::BusFormBase(wxWindow* parent,
boxSizerLvl5_8->Add(m_staticTextPU_4, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+ m_panelPowerQuality =
+ new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1, -1)), wxTAB_TRAVERSAL);
+ m_notebook->AddPage(m_panelPowerQuality, _("Power Quality"), false);
+
+ wxBoxSizer* boxSizerLvl2_4 = new wxBoxSizer(wxVERTICAL);
+ m_panelPowerQuality->SetSizer(boxSizerLvl2_4);
+
+ m_checkBoxPlotPQData = new wxCheckBox(m_panelPowerQuality, wxID_ANY, _("Plot harmonic bus impedance"),
+ wxDefaultPosition, wxDLG_UNIT(m_panelPowerQuality, wxSize(-1, -1)), 0);
+ m_checkBoxPlotPQData->SetValue(false);
+
+ boxSizerLvl2_4->Add(m_checkBoxPlotPQData, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
wxBoxSizer* boxSizerOkCancel = new wxBoxSizer(wxHORIZONTAL);
boxSizerLvl1_1->Add(boxSizerOkCancel, 0, wxALL | wxALIGN_RIGHT, WXC_FROM_DIP(5));
diff --git a/Project/ElementFormBase.h b/Project/ElementFormBase.h
index 284e2de..09d7cbc 100644
--- a/Project/ElementFormBase.h
+++ b/Project/ElementFormBase.h
@@ -87,6 +87,8 @@ class BusFormBase : public wxDialog
wxStaticText* m_staticTextStabFaultReactance;
wxTextCtrl* m_textCtrlStabFaultReactance;
wxStaticText* m_staticTextPU_4;
+ wxPanel* m_panelPowerQuality;
+ wxCheckBox* m_checkBoxPlotPQData;
wxButton* m_buttonOK;
wxButton* m_ButtonCancel;
@@ -137,6 +139,8 @@ class BusFormBase : public wxDialog
wxTextCtrl* GetTextCtrlStabFaultReactance() { return m_textCtrlStabFaultReactance; }
wxStaticText* GetStaticTextPU_4() { return m_staticTextPU_4; }
wxPanel* GetPanelStability() { return m_panelStability; }
+ wxCheckBox* GetCheckBoxPlotPQData() { return m_checkBoxPlotPQData; }
+ wxPanel* GetPanelPowerQuality() { return m_panelPowerQuality; }
wxNotebook* GetNotebook() { return m_notebook; }
wxButton* GetButtonOK() { return m_buttonOK; }
wxButton* GetButtonCancel() { return m_ButtonCancel; }
diff --git a/Project/FileHanding.cpp b/Project/FileHanding.cpp
index f5facbf..ed747a8 100644
--- a/Project/FileHanding.cpp
+++ b/Project/FileHanding.cpp
@@ -60,6 +60,8 @@ void FileHanding::SaveProject(wxFileName path)
XMLParser::SetNodeValue(doc, contCalcFault, simulationData.faultAfterPowerFlow);
auto contCalcSCPower = XMLParser::AppendNode(doc, contCalc, "SCPower");
XMLParser::SetNodeValue(doc, contCalcSCPower, simulationData.scPowerAfterPowerFlow);
+ auto contCalcTHD = XMLParser::AppendNode(doc, contCalc, "HarmonicDistortion");
+ XMLParser::SetNodeValue(doc, contCalcTHD, simulationData.harmDistortionAfterPowerFlow);
auto powerFlowPropNode = XMLParser::AppendNode(doc, simulationPropNode, "PowerFlow");
auto solutionMethod = XMLParser::AppendNode(doc, powerFlowPropNode, "SolutionMethod");
@@ -289,6 +291,8 @@ bool FileHanding::OpenProject(wxFileName path)
auto contCalc = general->first_node("ContinuousCalculation");
simData.faultAfterPowerFlow = XMLParser::GetNodeValueInt(contCalc, "Fault");
simData.scPowerAfterPowerFlow = XMLParser::GetNodeValueInt(contCalc, "SCPower");
+ int harmDistortionAfterPowerFlow = XMLParser::GetNodeValueInt(contCalc, "HarmonicDistortion");
+ simData.harmDistortionAfterPowerFlow = harmDistortionAfterPowerFlow != -1 ? harmDistortionAfterPowerFlow : false;
// Power flow
auto powerFlow = simPropertiesNode->first_node("PowerFlow");
diff --git a/Project/FrequencyResponseForm.cpp b/Project/FrequencyResponseForm.cpp
new file mode 100644
index 0000000..9672c0e
--- /dev/null
+++ b/Project/FrequencyResponseForm.cpp
@@ -0,0 +1,64 @@
+#include "Bus.h"
+#include "FrequencyResponseForm.h"
+
+FrequencyResponseForm::FrequencyResponseForm(wxWindow* parent) : FrequencyResponseFormBase(parent)
+{
+ m_parent = parent;
+}
+
+FrequencyResponseForm::FrequencyResponseForm(wxWindow* parent,
+ std::vector<Bus*> busList,
+ int injCurrentBus,
+ double initFreq,
+ double endFreq,
+ double stepFreq)
+ : FrequencyResponseFormBase(parent)
+{
+ m_parent = parent;
+ m_busList = busList;
+
+ // Set buses numbers and fill the choicebox
+ int busNumber = 0;
+ for(auto itb = m_busList.begin(); itb != m_busList.end(); itb++) {
+ Bus* bus = *itb;
+ BusElectricalData data = bus->GetElectricalData();
+ data.number = busNumber;
+ bus->SetElectricalData(data);
+
+ m_choiceBus->Append(data.name);
+
+ busNumber++;
+ }
+
+ Bus dummyBus;
+
+ m_textCtrlInitFreq->SetValue(dummyBus.StringFromDouble(initFreq));
+ m_textCtrlFinalFreq->SetValue(dummyBus.StringFromDouble(endFreq));
+ m_textCtrlStepFreq->SetValue(dummyBus.StringFromDouble(stepFreq));
+ m_choiceBus->SetSelection(injCurrentBus);
+}
+
+FrequencyResponseForm::~FrequencyResponseForm() {}
+
+void FrequencyResponseForm::OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
+void FrequencyResponseForm::OnRunButtonClick(wxCommandEvent& event)
+{
+ Bus dummyBus;
+ if(!dummyBus.DoubleFromString(m_parent, m_textCtrlInitFreq->GetValue(), m_initFreq,
+ _("Value entered incorrectly in the field \"Initial frequency\".")))
+ return;
+ if(!dummyBus.DoubleFromString(m_parent, m_textCtrlFinalFreq->GetValue(), m_endFreq,
+ _("Value entered incorrectly in the field \"Final frequency\".")))
+ return;
+ if(!dummyBus.DoubleFromString(m_parent, m_textCtrlStepFreq->GetValue(), m_stepFreq,
+ _("Value entered incorrectly in the field \"Frequency step\".")))
+ return;
+ if(m_choiceBus->GetSelection() == -1) {
+ wxMessageDialog msgDialog(m_parent, _("Injected current not selected"), _("Error"),
+ wxOK | wxCENTRE | wxICON_ERROR);
+ msgDialog.ShowModal();
+ return;
+ }
+ m_injBusNumber = m_choiceBus->GetSelection();
+ EndModal(wxID_OK);
+}
diff --git a/Project/FrequencyResponseForm.h b/Project/FrequencyResponseForm.h
new file mode 100644
index 0000000..0a192a7
--- /dev/null
+++ b/Project/FrequencyResponseForm.h
@@ -0,0 +1,36 @@
+#ifndef FREQUENCYRESPONSEFORM_H
+#define FREQUENCYRESPONSEFORM_H
+#include "PropertiesFormBase.h"
+
+class Bus;
+
+class FrequencyResponseForm : public FrequencyResponseFormBase
+{
+ public:
+ FrequencyResponseForm(wxWindow* parent);
+ FrequencyResponseForm(wxWindow* parent,
+ std::vector<Bus*> busList,
+ int injCurrentBus,
+ double initFreq,
+ double endFreq,
+ double stepFreq);
+ virtual ~FrequencyResponseForm();
+
+ double GetEndFreq() const { return m_endFreq; }
+ double GetInitFreq() const { return m_initFreq; }
+ double GetStepFreq() const { return m_stepFreq; }
+ int GetInjBusNumber() { return m_injBusNumber; }
+
+ protected:
+ virtual void OnCancelButtonClick(wxCommandEvent& event);
+ virtual void OnRunButtonClick(wxCommandEvent& event);
+
+ std::vector<Bus*> m_busList;
+ wxWindow* m_parent;
+ int m_injBusNumber = 0;
+
+ double m_initFreq = 0.0;
+ double m_endFreq = 1500.0;
+ double m_stepFreq = 1.0;
+};
+#endif // FREQUENCYRESPONSEFORM_H
diff --git a/Project/PowerQuality.cpp b/Project/PowerQuality.cpp
index 30969d9..c8fcd91 100644
--- a/Project/PowerQuality.cpp
+++ b/Project/PowerQuality.cpp
@@ -256,6 +256,7 @@ bool PowerQuality::CalculateFrequencyResponse(double systemFreq,
double initFreq,
double endFreq,
double stepFreq,
+ int injBusNumber,
double systemPowerBase)
{
// Clear all previous data
@@ -273,9 +274,10 @@ bool PowerQuality::CalculateFrequencyResponse(double systemFreq,
for(unsigned int j = 0; j < m_busList.size(); j++) { line.push_back(std::complex<double>(0.0, 0.0)); }
yBus.push_back(line);
}
- // Create and fill with zoros the injected current vector
+ // Create and fill with zeros the injected current vector
std::vector<std::complex<double> > iInj;
- for(unsigned int i = 0; i < m_busList.size(); i++) { iInj.push_back(std::complex<double>(10.0, 0.0)); }
+ for(unsigned int i = 0; i < m_busList.size(); i++) { iInj.push_back(std::complex<double>(0.0, 0.0)); }
+ iInj[injBusNumber] = std::complex<double>(1.0, 0.0);
if(initFreq < 1e-6) initFreq = stepFreq;
double currentFreq = initFreq;
@@ -293,13 +295,12 @@ bool PowerQuality::CalculateFrequencyResponse(double systemFreq,
for(unsigned int i = 0; i < m_busList.size(); i++) {
auto data = m_busList[i]->GetElectricalData();
- iInj[data.number] = std::complex<double>(1.0, 0.0);
+ if(data.plotPQData) {
+ auto zh = GaussianElimination(yBus, iInj);
- auto zh = GaussianElimination(yBus, iInj);
-
- data.absImpedanceVector.push_back(std::abs(zh[data.number]));
- m_busList[i]->SetElectricalData(data);
- iInj[data.number] = std::complex<double>(0.0, 0.0);
+ data.absImpedanceVector.push_back(std::abs(zh[data.number]));
+ m_busList[i]->SetElectricalData(data);
+ }
}
currentFreq += stepFreq;
diff --git a/Project/PowerQuality.h b/Project/PowerQuality.h
index 6c443e3..47d2260 100644
--- a/Project/PowerQuality.h
+++ b/Project/PowerQuality.h
@@ -35,6 +35,7 @@ class PowerQuality : public ElectricCalculation
double initFreq = 0.0,
double endFreq = 1500.0,
double stepFreq = 1.0,
+ int injBusNumber = 0,
double systemPowerBase = 100e6);
virtual std::vector<double> GetHarmonicOrdersList();
virtual std::vector<double> GetFrequencies() { return m_frequencyList; }
diff --git a/Project/Project.project b/Project/Project.project
index 7940693..0f1f2d7 100644
--- a/Project/Project.project
+++ b/Project/Project.project
@@ -83,6 +83,7 @@
<VirtualDirectory Name="controller">
<VirtualDirectory Name="forms">
<VirtualDirectory Name="properties">
+ <File Name="FrequencyResponseForm.cpp"/>
<File Name="ImportForm.cpp"/>
<File Name="GeneralPropertiesForm.cpp"/>
<File Name="SimulationsSettingsForm.cpp"/>
@@ -241,6 +242,7 @@
<File Name="TransformerForm.h"/>
</VirtualDirectory>
<VirtualDirectory Name="properties">
+ <File Name="FrequencyResponseForm.h"/>
<File Name="ImportForm.h"/>
<File Name="GeneralPropertiesForm.h"/>
<File Name="SimulationsSettingsForm.h"/>
diff --git a/Project/PropertiesData.h b/Project/PropertiesData.h
index 926b90b..4a6e8d0 100644
--- a/Project/PropertiesData.h
+++ b/Project/PropertiesData.h
@@ -18,9 +18,9 @@
#ifndef PROPERTIESDATA_H
#define PROPERTIESDATA_H
-#include "wx/language.h"
#include "Element.h"
#include "PowerElement.h"
+#include "wx/language.h"
enum PowerFlowMethod { GAUSS_SEIDEL = 0, NEWTON_RAPHSON };
enum GUITheme { THEME_LIGHT = 0, THEME_DARK };
@@ -49,7 +49,7 @@ struct SimulationData {
int controlTimeStepRatio = 10;
double plotTime = 1e-2;
bool useCOI = true;
-
+
// ZIP load
bool useCompLoads = false;
double constImpedanceActive = 100.0;
@@ -67,6 +67,13 @@ struct GeneralData {
GUITheme theme = THEME_LIGHT;
};
+struct FreqResponseData {
+ double initFreq = 0.0;
+ double finalFreq = 1500.0;
+ double stepFreq = 1.0;
+ int injBusNumber = -1;
+};
+
/**
* @class PropertiesData
* @author Thales Lima Oliveira <thales@ufu.br>
@@ -84,9 +91,14 @@ class PropertiesData
void SetSimulationPropertiesData(SimulationData simulationData) { m_simulData = simulationData; }
GeneralData GetGeneralPropertiesData() const { return m_genData; }
void SetGeneralPropertiesData(GeneralData generalData) { m_genData = generalData; }
+
+ void SetFreqRespData(const FreqResponseData& freqRespData) { this->m_freqRespData = freqRespData; }
+ const FreqResponseData& GetFreqRespData() const { return m_freqRespData; }
+
protected:
SimulationData m_simulData;
GeneralData m_genData;
+ FreqResponseData m_freqRespData;
};
#endif // PROPERTIESDATA_H
diff --git a/Project/PropertiesForm.wxcp b/Project/PropertiesForm.wxcp
index f4f531a..4879a1f 100644
--- a/Project/PropertiesForm.wxcp
+++ b/Project/PropertiesForm.wxcp
@@ -1,7 +1,7 @@
{
"metadata": {
"m_generatedFilesDir": ".",
- "m_objCounter": 816,
+ "m_objCounter": 954,
"m_includeFiles": [],
"m_bitmapFunction": "wxCDAD0InitBitmapResources",
"m_bitmapsFile": "PropertiesFormBitmaps.cpp",
@@ -11050,5 +11050,1478 @@
}]
}]
}]
+ }, {
+ "m_type": 4421,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": ["wxDEFAULT_DIALOG_STYLE"],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "FrequencyResponseFormBase"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Enable Window Persistency:",
+ "m_value": true
+ }, {
+ "type": "string",
+ "m_label": "Title:",
+ "m_value": "Frequency response"
+ }, {
+ "type": "virtualFolderPicker",
+ "m_label": "Virtual Folder:",
+ "m_path": "Project:wxcrafter"
+ }, {
+ "type": "choice",
+ "m_label": "Centre:",
+ "m_selection": 1,
+ "m_options": ["", "wxBOTH", "wxVERTICAL", "wxHORIZONTAL"]
+ }, {
+ "type": "string",
+ "m_label": "Inherited Class",
+ "m_value": "FrequencyResponseForm"
+ }, {
+ "type": "string",
+ "m_label": "File:",
+ "m_value": "FrequencyResponseForm"
+ }, {
+ "type": "string",
+ "m_label": "Class Decorator",
+ "m_value": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (16x16) :",
+ "m_path": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (32x32) :",
+ "m_path": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (64x64) :",
+ "m_path": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (128x128):",
+ "m_path": ""
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File (256x256):",
+ "m_path": ""
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4401,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerMain"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 0,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4452,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "gridSizer"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "# Columns:",
+ "m_value": "2"
+ }, {
+ "type": "string",
+ "m_label": "# Rows:",
+ "m_value": "0"
+ }, {
+ "type": "string",
+ "m_label": "Horizontal gap:",
+ "m_value": "0"
+ }, {
+ "type": "string",
+ "m_label": "Vertical gap:",
+ "m_value": "0"
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4401,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerLvl3_1"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 0,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4405,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_staticTextInitFreq"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Label:",
+ "m_value": "Initial frequency"
+ }, {
+ "type": "string",
+ "m_label": "Wrap:",
+ "m_value": "-1"
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4401,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerLvl4_1"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 1,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4406,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_textCtrlInitFreq"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Value:",
+ "m_value": "0,0"
+ }, {
+ "type": "string",
+ "m_label": "Text Hint",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Max Length:",
+ "m_value": "0"
+ }, {
+ "type": "bool",
+ "m_label": "Auto Complete Directories:",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Auto Complete Files:",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4405,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_staticTextFreqUnit78"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Label:",
+ "m_value": "Hz"
+ }, {
+ "type": "string",
+ "m_label": "Wrap:",
+ "m_value": "-1"
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }]
+ }, {
+ "m_type": 4401,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerLvl3_2"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 0,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4405,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_staticTextFinalFreq"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Label:",
+ "m_value": "Final frequency"
+ }, {
+ "type": "string",
+ "m_label": "Wrap:",
+ "m_value": "-1"
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4401,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerLvl4_2"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 1,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4406,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_textCtrlFinalFreq"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Value:",
+ "m_value": "1500"
+ }, {
+ "type": "string",
+ "m_label": "Text Hint",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Max Length:",
+ "m_value": "0"
+ }, {
+ "type": "bool",
+ "m_label": "Auto Complete Directories:",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Auto Complete Files:",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4405,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_staticTextFreqUnit2"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Label:",
+ "m_value": "Hz"
+ }, {
+ "type": "string",
+ "m_label": "Wrap:",
+ "m_value": "-1"
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }]
+ }, {
+ "m_type": 4401,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerLvl3_3"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 0,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4405,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_staticTextStep"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Label:",
+ "m_value": "Frequency step"
+ }, {
+ "type": "string",
+ "m_label": "Wrap:",
+ "m_value": "-1"
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4401,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerLvl4_3"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 1,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4406,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_textCtrlStepFreq"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Value:",
+ "m_value": "1"
+ }, {
+ "type": "string",
+ "m_label": "Text Hint",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Max Length:",
+ "m_value": "0"
+ }, {
+ "type": "bool",
+ "m_label": "Auto Complete Directories:",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Auto Complete Files:",
+ "m_value": false
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4405,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_staticTextFreqUnit3"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Label:",
+ "m_value": "Hz"
+ }, {
+ "type": "string",
+ "m_label": "Wrap:",
+ "m_value": "-1"
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }]
+ }, {
+ "m_type": 4401,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizerLvl3_4"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 0,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4405,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_staticTextInjCurrent"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Label:",
+ "m_value": "Injected current"
+ }, {
+ "type": "string",
+ "m_label": "Wrap:",
+ "m_value": "-1"
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4411,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_choiceBus"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "multi-string",
+ "m_label": "Choices:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Selection:",
+ "m_value": ""
+ }],
+ "m_events": [],
+ "m_children": []
+ }]
+ }]
+ }, {
+ "m_type": 4401,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "boxSizer_bottonButtons"
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "choice",
+ "m_label": "Orientation:",
+ "m_selection": 1,
+ "m_options": ["wxVERTICAL", "wxHORIZONTAL"]
+ }],
+ "m_events": [],
+ "m_children": [{
+ "m_type": 4454,
+ "proportion": 1,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
+ "m_properties": [{
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "Spacer_1"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "0,0"
+ }],
+ "m_events": [],
+ "m_children": []
+ }, {
+ "m_type": 4400,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_buttonRun"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Run"
+ }, {
+ "type": "bool",
+ "m_label": "Default Button",
+ "m_value": false
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Direction",
+ "m_selection": 0,
+ "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"]
+ }, {
+ "type": "string",
+ "m_label": "Margins:",
+ "m_value": "2,2"
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED",
+ "m_eventClass": "wxCommandEvent",
+ "m_eventHandler": "wxCommandEventHandler",
+ "m_functionNameAndSignature": "OnRunButtonClick(wxCommandEvent& event)",
+ "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }, {
+ "m_type": 4400,
+ "proportion": 0,
+ "border": 5,
+ "gbSpan": "1,1",
+ "gbPosition": "0,0",
+ "m_styles": [],
+ "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"],
+ "m_properties": [{
+ "type": "winid",
+ "m_label": "ID:",
+ "m_winid": "wxID_ANY"
+ }, {
+ "type": "string",
+ "m_label": "Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Minimum Size:",
+ "m_value": "-1,-1"
+ }, {
+ "type": "string",
+ "m_label": "Name:",
+ "m_value": "m_buttonCancel"
+ }, {
+ "type": "multi-string",
+ "m_label": "Tooltip:",
+ "m_value": ""
+ }, {
+ "type": "colour",
+ "m_label": "Bg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "colour",
+ "m_label": "Fg Colour:",
+ "colour": "<Default>"
+ }, {
+ "type": "font",
+ "m_label": "Font:",
+ "m_value": ""
+ }, {
+ "type": "bool",
+ "m_label": "Hidden",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Disabled",
+ "m_value": false
+ }, {
+ "type": "bool",
+ "m_label": "Focused",
+ "m_value": false
+ }, {
+ "type": "string",
+ "m_label": "Class Name:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Include File:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Style:",
+ "m_value": ""
+ }, {
+ "type": "string",
+ "m_label": "Label:",
+ "m_value": "Cancel"
+ }, {
+ "type": "bool",
+ "m_label": "Default Button",
+ "m_value": false
+ }, {
+ "type": "bitmapPicker",
+ "m_label": "Bitmap File:",
+ "m_path": ""
+ }, {
+ "type": "choice",
+ "m_label": "Direction",
+ "m_selection": 0,
+ "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"]
+ }, {
+ "type": "string",
+ "m_label": "Margins:",
+ "m_value": "2,2"
+ }],
+ "m_events": [{
+ "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED",
+ "m_eventClass": "wxCommandEvent",
+ "m_eventHandler": "wxCommandEventHandler",
+ "m_functionNameAndSignature": "OnCancelButtonClick(wxCommandEvent& event)",
+ "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.",
+ "m_noBody": false
+ }],
+ "m_children": []
+ }]
+ }]
+ }]
}]
} \ No newline at end of file
diff --git a/Project/PropertiesFormBase.cpp b/Project/PropertiesFormBase.cpp
index e76b211..a498e3b 100644
--- a/Project/PropertiesFormBase.cpp
+++ b/Project/PropertiesFormBase.cpp
@@ -1172,3 +1172,164 @@ ImportFormBase::~ImportFormBase()
m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ImportFormBase::OnButtonCancelClick),
NULL, this);
}
+
+FrequencyResponseFormBase::FrequencyResponseFormBase(wxWindow* parent,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style)
+ : wxDialog(parent, id, title, pos, size, style)
+{
+ if(!bBitmapLoaded) {
+ // We need to initialise the default bitmap handler
+ wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
+ wxCDAD0InitBitmapResources();
+ bBitmapLoaded = true;
+ }
+
+ wxBoxSizer* boxSizerMain = new wxBoxSizer(wxVERTICAL);
+ this->SetSizer(boxSizerMain);
+
+ wxGridSizer* gridSizer = new wxGridSizer(0, 2, 0, 0);
+
+ boxSizerMain->Add(gridSizer, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerLvl3_1 = new wxBoxSizer(wxVERTICAL);
+
+ gridSizer->Add(boxSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_staticTextInitFreq = new wxStaticText(this, wxID_ANY, _("Initial frequency"), wxDefaultPosition,
+ wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+
+ boxSizerLvl3_1->Add(m_staticTextInitFreq, 0, wxLEFT | wxRIGHT | wxTOP | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxHORIZONTAL);
+
+ boxSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_textCtrlInitFreq =
+ new wxTextCtrl(this, wxID_ANY, wxT("0,0"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+#if wxVERSION_NUMBER >= 3000
+ m_textCtrlInitFreq->SetHint(wxT(""));
+#endif
+
+ boxSizerLvl4_1->Add(m_textCtrlInitFreq, 1, wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_staticTextFreqUnit78 =
+ new wxStaticText(this, wxID_ANY, _("Hz"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+
+ boxSizerLvl4_1->Add(m_staticTextFreqUnit78, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL,
+ WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerLvl3_2 = new wxBoxSizer(wxVERTICAL);
+
+ gridSizer->Add(boxSizerLvl3_2, 0, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_staticTextFinalFreq =
+ new wxStaticText(this, wxID_ANY, _("Final frequency"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+
+ boxSizerLvl3_2->Add(m_staticTextFinalFreq, 0, wxLEFT | wxRIGHT | wxTOP | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxHORIZONTAL);
+
+ boxSizerLvl3_2->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_textCtrlFinalFreq =
+ new wxTextCtrl(this, wxID_ANY, wxT("1500"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+#if wxVERSION_NUMBER >= 3000
+ m_textCtrlFinalFreq->SetHint(wxT(""));
+#endif
+
+ boxSizerLvl4_2->Add(m_textCtrlFinalFreq, 1, wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_staticTextFreqUnit2 =
+ new wxStaticText(this, wxID_ANY, _("Hz"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+
+ boxSizerLvl4_2->Add(m_staticTextFreqUnit2, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL,
+ WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerLvl3_3 = new wxBoxSizer(wxVERTICAL);
+
+ gridSizer->Add(boxSizerLvl3_3, 0, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_staticTextStep =
+ new wxStaticText(this, wxID_ANY, _("Frequency step"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+
+ boxSizerLvl3_3->Add(m_staticTextStep, 0, wxLEFT | wxRIGHT | wxTOP | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxHORIZONTAL);
+
+ boxSizerLvl3_3->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_textCtrlStepFreq =
+ new wxTextCtrl(this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+#if wxVERSION_NUMBER >= 3000
+ m_textCtrlStepFreq->SetHint(wxT(""));
+#endif
+
+ boxSizerLvl4_3->Add(m_textCtrlStepFreq, 1, wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ m_staticTextFreqUnit3 =
+ new wxStaticText(this, wxID_ANY, _("Hz"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+
+ boxSizerLvl4_3->Add(m_staticTextFreqUnit3, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL,
+ WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizerLvl3_4 = new wxBoxSizer(wxVERTICAL);
+
+ gridSizer->Add(boxSizerLvl3_4, 0, wxEXPAND, WXC_FROM_DIP(5));
+
+ m_staticTextInjCurrent =
+ new wxStaticText(this, wxID_ANY, _("Injected current"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+
+ boxSizerLvl3_4->Add(m_staticTextInjCurrent, 0, wxLEFT | wxRIGHT | wxTOP | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
+
+ wxArrayString m_choiceBusArr;
+ m_choiceBus = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceBusArr, 0);
+
+ boxSizerLvl3_4->Add(m_choiceBus, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, WXC_FROM_DIP(5));
+
+ wxBoxSizer* boxSizer_bottonButtons = new wxBoxSizer(wxHORIZONTAL);
+
+ boxSizerMain->Add(boxSizer_bottonButtons, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));
+
+ boxSizer_bottonButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
+
+ m_buttonRun = new wxButton(this, wxID_ANY, _("Run"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+
+ boxSizer_bottonButtons->Add(m_buttonRun, 0, wxALL | wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+ m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
+
+ boxSizer_bottonButtons->Add(m_buttonCancel, 0, wxALL | wxALIGN_RIGHT, WXC_FROM_DIP(5));
+
+ SetName(wxT("FrequencyResponseFormBase"));
+ SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
+ if(GetSizer()) { GetSizer()->Fit(this); }
+ if(GetParent()) {
+ CentreOnParent(wxBOTH);
+ } else {
+ CentreOnScreen(wxBOTH);
+ }
+#if wxVERSION_NUMBER >= 2900
+ if(!wxPersistenceManager::Get().Find(this)) {
+ wxPersistenceManager::Get().RegisterAndRestore(this);
+ } else {
+ wxPersistenceManager::Get().Restore(this);
+ }
+#endif
+ // Connect events
+ m_buttonRun->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+ wxCommandEventHandler(FrequencyResponseFormBase::OnRunButtonClick), NULL, this);
+ m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+ wxCommandEventHandler(FrequencyResponseFormBase::OnCancelButtonClick), NULL, this);
+}
+
+FrequencyResponseFormBase::~FrequencyResponseFormBase()
+{
+ m_buttonRun->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
+ wxCommandEventHandler(FrequencyResponseFormBase::OnRunButtonClick), NULL, this);
+ m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
+ wxCommandEventHandler(FrequencyResponseFormBase::OnCancelButtonClick), NULL, this);
+}
diff --git a/Project/PropertiesFormBase.h b/Project/PropertiesFormBase.h
index d7d4dce..a7c3872 100644
--- a/Project/PropertiesFormBase.h
+++ b/Project/PropertiesFormBase.h
@@ -330,4 +330,48 @@ class ImportFormBase : public wxDialog
virtual ~ImportFormBase();
};
+class FrequencyResponseFormBase : public wxDialog
+{
+ protected:
+ wxStaticText* m_staticTextInitFreq;
+ wxTextCtrl* m_textCtrlInitFreq;
+ wxStaticText* m_staticTextFreqUnit78;
+ wxStaticText* m_staticTextFinalFreq;
+ wxTextCtrl* m_textCtrlFinalFreq;
+ wxStaticText* m_staticTextFreqUnit2;
+ wxStaticText* m_staticTextStep;
+ wxTextCtrl* m_textCtrlStepFreq;
+ wxStaticText* m_staticTextFreqUnit3;
+ wxStaticText* m_staticTextInjCurrent;
+ wxChoice* m_choiceBus;
+ wxButton* m_buttonRun;
+ wxButton* m_buttonCancel;
+
+ protected:
+ virtual void OnRunButtonClick(wxCommandEvent& event) { event.Skip(); }
+ virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
+
+ public:
+ wxStaticText* GetStaticTextInitFreq() { return m_staticTextInitFreq; }
+ wxTextCtrl* GetTextCtrlInitFreq() { return m_textCtrlInitFreq; }
+ wxStaticText* GetStaticTextFreqUnit78() { return m_staticTextFreqUnit78; }
+ wxStaticText* GetStaticTextFinalFreq() { return m_staticTextFinalFreq; }
+ wxTextCtrl* GetTextCtrlFinalFreq() { return m_textCtrlFinalFreq; }
+ wxStaticText* GetStaticTextFreqUnit2() { return m_staticTextFreqUnit2; }
+ wxStaticText* GetStaticTextStep() { return m_staticTextStep; }
+ wxTextCtrl* GetTextCtrlStepFreq() { return m_textCtrlStepFreq; }
+ wxStaticText* GetStaticTextFreqUnit3() { return m_staticTextFreqUnit3; }
+ wxStaticText* GetStaticTextInjCurrent() { return m_staticTextInjCurrent; }
+ wxChoice* GetChoiceBus() { return m_choiceBus; }
+ wxButton* GetButtonRun() { return m_buttonRun; }
+ wxButton* GetButtonCancel() { return m_buttonCancel; }
+ FrequencyResponseFormBase(wxWindow* parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& title = _("Frequency response"),
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxSize(-1, -1),
+ long style = wxDEFAULT_DIALOG_STYLE);
+ virtual ~FrequencyResponseFormBase();
+};
+
#endif
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp
index 6b8d197..0bd53fa 100644
--- a/Project/Workspace.cpp
+++ b/Project/Workspace.cpp
@@ -21,6 +21,7 @@
//#include "Bus.h"
#include "Capacitor.h"
#include "ElementDataObject.h"
+#include "HarmCurrent.h"
#include "IndMotor.h"
#include "Inductor.h"
#include "Line.h"
@@ -28,7 +29,6 @@
#include "SyncGenerator.h"
#include "SyncMotor.h"
#include "Transformer.h"
-#include "HarmCurrent.h"
#include "Text.h"
@@ -42,6 +42,8 @@
#include "PropertiesData.h"
+#include "FrequencyResponseForm.h"
+
// Workspace
Workspace::Workspace() : WorkspaceBase(NULL) {}
Workspace::Workspace(wxWindow* parent, wxString name, wxStatusBar* statusBar, wxGLContext* sharedGLContext)
@@ -156,7 +158,7 @@ void Workspace::OnLeftClickDown(wxMouseEvent& event)
Element* newElement = NULL;
bool showNewElementForm = false;
bool clickOnSwitch = false;
-
+
if(m_mode == MODE_INSERT_TEXT || m_mode == MODE_PASTE || m_mode == MODE_DRAG_PASTE) {
m_mode = MODE_EDIT;
} else if(m_mode == MODE_INSERT || m_mode == MODE_DRAG_INSERT || m_mode == MODE_DRAG_INSERT_TEXT) {
@@ -805,12 +807,13 @@ void Workspace::OnKeyDown(wxKeyEvent& event)
case 'H': {
if(!insertingElement) {
if(event.GetModifiers() == wxMOD_SHIFT) { // Insert an harmonic current source.
- HarmCurrent* newHarmCurrent =
- new HarmCurrent(wxString::Format(_("Harmonic Current %d"), GetElementNumber(ID_HARMCURRENT)));
+ HarmCurrent* newHarmCurrent = new HarmCurrent(
+ wxString::Format(_("Harmonic Current %d"), GetElementNumber(ID_HARMCURRENT)));
IncrementElementNumber(ID_HARMCURRENT);
m_elementList.push_back(newHarmCurrent);
m_mode = MODE_INSERT;
- m_statusBar->SetStatusText(_("Insert Harmonic Current Source: Click on a buses, ESC to cancel."));
+ m_statusBar->SetStatusText(
+ _("Insert Harmonic Current Source: Click on a buses, ESC to cancel."));
}
Redraw();
}
@@ -1507,7 +1510,7 @@ bool Workspace::RunStaticStudies()
} else {
scStatus = true;
}
-
+
if(m_properties->GetSimulationPropertiesData().harmDistortionAfterPowerFlow) {
if(pfStatus) harmStatus = RunHarmonicDistortion();
} else {
@@ -1529,16 +1532,35 @@ bool Workspace::RunHarmonicDistortion()
basePower *= 1e3;
if(!RunPowerFlow()) return false;
PowerQuality pq(GetElementList());
- bool result = pq.CalculateDistortions(basePower);
-
+ bool result = pq.CalculateDistortions(basePower);
+
UpdateTextElements();
Redraw();
-
+
return result;
}
bool Workspace::RunFrequencyResponse()
{
+ // Get bus list
+ std::vector<Bus*> busList;
+ for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
+ if(Bus* bus = dynamic_cast<Bus*>(*it)) { busList.push_back(bus); }
+ }
+
+ auto data = m_properties->GetFreqRespData();
+
+ FrequencyResponseForm frForm(this, busList, data.injBusNumber, data.initFreq, data.finalFreq, data.stepFreq);
+
+ if(frForm.ShowModal() == wxID_OK) {
+ data.initFreq = frForm.GetInitFreq();
+ data.finalFreq = frForm.GetEndFreq();
+ data.stepFreq = frForm.GetStepFreq();
+ data.injBusNumber = frForm.GetInjBusNumber();
+ m_properties->SetFreqRespData(data);
+ } else
+ return false;
+
auto simProp = m_properties->GetSimulationPropertiesData();
double basePower = simProp.basePower;
if(simProp.basePowerUnit == UNIT_MVA)
@@ -1546,11 +1568,10 @@ bool Workspace::RunFrequencyResponse()
else if(simProp.basePowerUnit == UNIT_kVA)
basePower *= 1e3;
PowerQuality pq(GetElementList());
- bool result = pq.CalculateFrequencyResponse(simProp.stabilityFrequency, 0.0, 1500.0, 1.0, basePower);
-
+ bool result = pq.CalculateFrequencyResponse(simProp.stabilityFrequency, data.initFreq , data.finalFreq, data.stepFreq, data.injBusNumber, basePower);
+
wxMessageDialog msgDialog(
- this,
- wxString::Format(_("Calculations done.\nDo you wish to open the frequency response graphics?")),
+ this, wxString::Format(_("Calculations done.\nDo you wish to open the frequency response graphics?")),
_("Question"), wxYES_NO | wxCENTRE | wxICON_QUESTION);
if(msgDialog.ShowModal() == wxID_YES) {
std::vector<ElementPlotData> plotDataList;
@@ -1563,9 +1584,9 @@ bool Workspace::RunFrequencyResponse()
ChartView* cView = new ChartView(this, plotDataList, pq.GetFrequencies());
cView->Show();
}
-
+
UpdateTextElements();
Redraw();
-
+
return result;
}
diff --git a/Project/Workspace.h b/Project/Workspace.h
index afcb1b3..a48ad4e 100644
--- a/Project/Workspace.h
+++ b/Project/Workspace.h
@@ -55,6 +55,7 @@ class PowerQuality;
class ElementPlotData;
class ChartView;
+class FrequencyResponseForm;
class PropertiesData;