diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2016-09-12 18:49:00 -0300 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2016-09-12 18:49:00 -0300 |
commit | 1088617b8f1c31af3ad6a87f9934f7a55240b3a2 (patch) | |
tree | 922d0e070c7ef3351dc166340b77485dd5b814f3 /Project | |
parent | d5c3a7c9c375f683f5b66a19caf28299af89ef65 (diff) | |
download | PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.tar.gz PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.tar.xz PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.zip |
Bus form under implementation [2]
Diffstat (limited to 'Project')
35 files changed, 3481 insertions, 1096 deletions
diff --git a/Project/Bus.cpp b/Project/Bus.cpp index d85b6e0..a684ed4 100644 --- a/Project/Bus.cpp +++ b/Project/Bus.cpp @@ -8,6 +8,15 @@ Bus::Bus(wxPoint2DDouble position) : Element() SetPosition(position); } +Bus::Bus(wxPoint2DDouble position, wxString name) +{ + m_width = 100.0; + m_height = 5.0; + SetPosition(position); + + m_electricalData.name = name; +} + Bus::~Bus() {} void Bus::Draw(wxPoint2DDouble translation, double scale) const { @@ -166,15 +175,14 @@ bool Bus::GetContextMenu(wxMenu& menu) return true; } -bool Bus::ShowForm(wxWindow* parent) +bool Bus::ShowForm(wxWindow* parent, Element* element) { - BusForm* busForm = new BusForm(parent); - if(busForm->ShowModal() == wxID_OK){ - - busForm->Destroy(); - return true; + BusForm* busForm = new BusForm(parent, this); + if(busForm->ShowModal() == wxID_OK) { + busForm->Destroy(); + return true; } - - busForm->Destroy(); + + busForm->Destroy(); return false; } diff --git a/Project/Bus.h b/Project/Bus.h index ec18e93..50bfa1a 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -4,11 +4,34 @@ #include "BusForm.h" #include "Element.h" +struct BusElectricalData +{ + wxString name = ""; + double nominalVoltage = 138.0; + ElectricalUnit nominalVoltageUnit = UNIT_kV; + bool isVoltageControlled = false; + double controlledVoltage = 1.0; + int controlledVoltageUnitChoice = 0; // 0 = p.u., 1 = same as nominalVoltageUnit (UNIT_V or UNIT_kV). + bool slackBus = false; + bool hasFault = false; + FaultData faultType = FAULT_THREEPHASE; + FaultData faultLocation = FAULT_LINE_A; + double faultResistance = 0.0; + double faultReactance = 0.0; + bool plotBus = false; + bool stabHasFault = false; + double stabFaultTime = 0.0; + double stabFaultLength = 0.0; + double stabFaultResistance = 0.0; + double stabFaultReactance = 0.0; +}; + class Bus : public Element { public: Bus(); Bus(wxPoint2DDouble position); + Bus(wxPoint2DDouble position, wxString name); ~Bus(); virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return true; } virtual bool Contains(wxPoint2DDouble position) const; @@ -19,7 +42,12 @@ class Bus : public Element virtual void MovePickbox(wxPoint2DDouble position); virtual bool PickboxContains(wxPoint2DDouble position); virtual bool GetContextMenu(wxMenu& menu); - virtual bool ShowForm(wxWindow* parent); + virtual BusElectricalData GetEletricalData() const { return m_electricalData; } + virtual void SetElectricalData(BusElectricalData electricalData) { m_electricalData = electricalData; } + virtual bool ShowForm(wxWindow* parent, Element* element); + + private: + BusElectricalData m_electricalData; }; #endif // BUS_H diff --git a/Project/BusForm.cpp b/Project/BusForm.cpp index bbdee73..02497eb 100644 --- a/Project/BusForm.cpp +++ b/Project/BusForm.cpp @@ -1,18 +1,193 @@ #include "BusForm.h" +#include "Bus.h" -BusForm::BusForm(wxWindow* parent) - : BusFormBase(parent) +BusForm::BusForm(wxWindow* parent, Bus* bus) : BusFormBase(parent) { - SetSize(GetBestSize()); + SetSize(GetBestSize()); + + m_parent = parent; + m_bus = bus; + + m_textCtrlName->SetValue(bus->GetEletricalData().name); + m_textCtrlNomVoltage->SetValue(wxString::FromDouble(bus->GetEletricalData().nominalVoltage)); + + if(bus->GetEletricalData().nominalVoltageUnit == UNIT_V) + m_choiceNomVoltage->SetSelection(0); + else + m_choiceNomVoltage->SetSelection(1); + + m_checkBoxCtrlVoltage->SetValue(bus->GetEletricalData().isVoltageControlled); + m_textCtrlCtrlVoltage->SetValue(wxString::FromDouble(bus->GetEletricalData().controlledVoltage)); + m_choiceCtrlVoltage->SetSelection(bus->GetEletricalData().controlledVoltageUnitChoice); + m_checkBoxSlackBus->SetValue(bus->GetEletricalData().slackBus); + + m_checkBoxFault->SetValue(bus->GetEletricalData().hasFault); + switch(bus->GetEletricalData().faultType) + { + case FAULT_THREEPHASE: + { + m_choiceFaultType->SetSelection(0); + } + break; + case FAULT_2LINE: + { + m_choiceFaultType->SetSelection(1); + } + break; + case FAULT_2LINE_GROUND: + { + m_choiceFaultType->SetSelection(2); + } + break; + case FAULT_LINE_GROUND: + { + m_choiceFaultType->SetSelection(3); + } + break; + default: + break; + } + switch(bus->GetEletricalData().faultLocation) + { + case FAULT_LINE_A: + { + m_choiceFaultPlace->SetSelection(0); + } + break; + case FAULT_LINE_B: + { + m_choiceFaultPlace->SetSelection(1); + } + break; + case FAULT_LINE_C: + { + m_choiceFaultPlace->SetSelection(2); + } + break; + default: + break; + } + m_textCtrlFaultResistance->SetValue(wxString::FromDouble(bus->GetEletricalData().faultResistance)); + m_textCtrlFaultReactance->SetValue(wxString::FromDouble(bus->GetEletricalData().faultReactance)); + + m_checkBoxPlotData->SetValue(bus->GetEletricalData().plotBus); + m_checkBoxStabFault->SetValue(bus->GetEletricalData().stabHasFault); + m_textCtrlStabFaultTime->SetValue(wxString::FromDouble(bus->GetEletricalData().stabFaultTime)); + m_textCtrlStabFaultLength->SetValue(wxString::FromDouble(bus->GetEletricalData().stabFaultLength)); + m_textCtrlStabFaultResistance->SetValue(wxString::FromDouble(bus->GetEletricalData().stabFaultResistance)); + m_textCtrlStabFaultReactance->SetValue(wxString::FromDouble(bus->GetEletricalData().stabFaultReactance)); + + EnableCtrlVoltageFields(bus->GetEletricalData().isVoltageControlled); + EnableFaultFields(bus->GetEletricalData().hasFault); + EnableStabFaultFields(bus->GetEletricalData().stabHasFault); } -BusForm::~BusForm() +BusForm::~BusForm() {} +void BusForm::OnButtonCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); } +void BusForm::OnButtonOKClick(wxCommandEvent& event) { + BusElectricalData data = m_bus->GetEletricalData(); + data.name = m_textCtrlName->GetValue(); + if(!m_bus->DoubleFromString(m_parent, m_textCtrlNomVoltage->GetValue(), data.nominalVoltage, + _("Value entered incorrectly in the field \"Nominal voltage\"."))) + return; + data.nominalVoltageUnit = m_choiceNomVoltage->GetSelection() == 0 ? UNIT_V : UNIT_kV; + data.isVoltageControlled = m_checkBoxCtrlVoltage->GetValue(); + if(data.isVoltageControlled) { + if(!m_bus->DoubleFromString(m_parent, m_textCtrlCtrlVoltage->GetValue(), data.controlledVoltage, + _("Value entered incorrectly in the field \"Controlled voltage\"."))) + return; + data.controlledVoltageUnitChoice = m_choiceCtrlVoltage->GetSelection(); + } + data.slackBus = m_checkBoxSlackBus->GetValue(); + + m_bus->SetElectricalData(data); + + EndModal(wxID_OK); } -void BusForm::OnButtonCancelClick(wxCommandEvent& event) +void BusForm::OnNominalVoltageChoice(wxCommandEvent& event) { UpdateChoiceBoxes(); } +void BusForm::OnFaultTypeChoice(wxCommandEvent& event) { UpdateChoiceBoxes(); } +void BusForm::OnControlledVoltageClick(wxCommandEvent& event) { + EnableCtrlVoltageFields(m_checkBoxCtrlVoltage->GetValue()); } -void BusForm::OnButtonOKClick(wxCommandEvent& event) +void BusForm::OnInsertFaultClick(wxCommandEvent& event) { EnableFaultFields(m_checkBoxFault->GetValue()); } +void BusForm::OnInsertStabFaultClick(wxCommandEvent& event) { EnableStabFaultFields(m_checkBoxStabFault->GetValue()); } +void BusForm::EnableCtrlVoltageFields(bool enable) +{ + m_textCtrlCtrlVoltage->Enable(enable); + m_choiceCtrlVoltage->Enable(enable); + + UpdateChoiceBoxes(); +} + +void BusForm::EnableFaultFields(bool enable) +{ + m_choiceFaultType->Enable(enable); + m_choiceFaultPlace->Enable(enable); + m_textCtrlFaultReactance->Enable(enable); + m_textCtrlFaultResistance->Enable(enable); + m_staticTextPU_1->Enable(enable); + m_staticTextPU_2->Enable(enable); + + UpdateChoiceBoxes(); +} + +void BusForm::EnableStabFaultFields(bool enable) +{ + m_textCtrlStabFaultTime->Enable(enable); + m_textCtrlStabFaultLength->Enable(enable); + m_staticTextS_1->Enable(enable); + m_staticTextS_2->Enable(enable); + m_textCtrlStabFaultReactance->Enable(enable); + m_textCtrlStabFaultResistance->Enable(enable); + m_staticTextPU_3->Enable(enable); + m_staticTextPU_4->Enable(enable); +} + +void BusForm::UpdateChoiceBoxes() { + switch(m_choiceFaultType->GetSelection()) + { + case 0: // three-phase + { + m_choiceFaultPlace->Enable(false); + } + break; + case 1: // line-to-line + case 2: // double line-to-line + { + if(m_checkBoxFault->GetValue()) m_choiceFaultPlace->Enable(true); + m_choiceFaultPlace->SetString(0, _("Lines AB")); + m_choiceFaultPlace->SetString(1, _("Lines BC")); + m_choiceFaultPlace->SetString(2, _("Lines CA")); + } + break; + case 3: // line-to-ground + { + if(m_checkBoxFault->GetValue()) m_choiceFaultPlace->Enable(true); + m_choiceFaultPlace->SetString(0, _("Line A")); + m_choiceFaultPlace->SetString(1, _("Line B")); + m_choiceFaultPlace->SetString(2, _("Line C")); + } + break; + default: + break; + } + switch(m_choiceNomVoltage->GetSelection()) + { + case 0: + { + m_choiceCtrlVoltage->SetString(1, _("V")); + } + break; + case 1: + { + m_choiceCtrlVoltage->SetString(1, _("kV")); + } + break; + default: + break; + } } diff --git a/Project/BusForm.h b/Project/BusForm.h index 39ab009..33b8caf 100644 --- a/Project/BusForm.h +++ b/Project/BusForm.h @@ -1,14 +1,28 @@ #ifndef BUSFORM_H #define BUSFORM_H + #include "ElementForm.h" +class Bus; class BusForm : public BusFormBase { public: - BusForm(wxWindow* parent); + BusForm(wxWindow* parent, Bus* bus); virtual ~BusForm(); protected: + virtual void OnFaultTypeChoice(wxCommandEvent& event); + virtual void OnControlledVoltageClick(wxCommandEvent& event); + virtual void OnInsertFaultClick(wxCommandEvent& event); + virtual void OnInsertStabFaultClick(wxCommandEvent& event); + virtual void OnNominalVoltageChoice(wxCommandEvent& event); virtual void OnButtonCancelClick(wxCommandEvent& event); virtual void OnButtonOKClick(wxCommandEvent& event); + virtual void EnableCtrlVoltageFields(bool enable = true); + virtual void EnableFaultFields(bool enable = true); + virtual void EnableStabFaultFields(bool enable = true); + virtual void UpdateChoiceBoxes(); + + Bus* m_bus; + wxWindow* m_parent; }; #endif // BUSFORM_H diff --git a/Project/Element.cpp b/Project/Element.cpp index 170be4a..2efc482 100644 --- a/Project/Element.cpp +++ b/Project/Element.cpp @@ -336,3 +336,31 @@ void Element::CalculateBoundaries(wxPoint2DDouble& leftUp, wxPoint2DDouble& righ if(m_pointList[i].m_y > rightBottom.m_y) rightBottom.m_y = m_pointList[i].m_y; } } + +bool Element::DoubleFromString(wxWindow* parent, wxString strValue, double& value, wxString errorMsg) +{ + double dValue = 0.0; + + if(!strValue.ToDouble(&dValue)) { + wxMessageDialog msgDialog(parent, errorMsg, _("Error"), wxOK|wxCENTRE|wxICON_ERROR); + msgDialog.ShowModal(); + return false; + } + + value = dValue; + return true; +} + +bool Element::IntFromString(wxWindow* parent, wxString strValue, int& value, wxString errorMsg) +{ + long int iValue = 0; + + if(!strValue.ToLong(&iValue)) { + wxMessageDialog msgDialog(parent, errorMsg, _("Error"), wxOK|wxCENTRE|wxICON_ERROR); + msgDialog.ShowModal(); + return false; + } + + value = iValue; + return true; +} diff --git a/Project/Element.h b/Project/Element.h index 94d5cd7..899fb01 100644 --- a/Project/Element.h +++ b/Project/Element.h @@ -1,6 +1,7 @@ #ifndef ELEMENT_H #define ELEMENT_H +#include <wx/msgdlg.h> #include <wx/geometry.h> #include <wx/cursor.h> #include <wx/menu.h> @@ -37,6 +38,35 @@ enum ContextMenuID ID_DELETE }; +enum ElectricalUnit +{ + UNIT_PU = 0, + UNIT_V, + UNIT_kV, + UNIT_A, + UNIT_kA, + UNIT_W, + UNIT_kW, + UNIT_MW, + UNIT_VA, + UNIT_kVA, + UNIT_MVA, + UNIT_VAr, + UNIT_kVAr, + UNIT_MVAr +}; + +enum FaultData +{ + FAULT_THREEPHASE = 0, + FAULT_2LINE, + FAULT_2LINE_GROUND, + FAULT_LINE_GROUND, + FAULT_LINE_A, + FAULT_LINE_B, + FAULT_LINE_C +}; + class Element { public: @@ -130,7 +160,11 @@ class Element virtual void GeneralMenuItens(wxMenu& menu); - virtual bool ShowForm(wxWindow* parent) { return false; } + virtual bool ShowForm(wxWindow* parent, Element* element) { return false; } + + bool DoubleFromString(wxWindow* parent, wxString strValue, double& value, wxString errorMsg); + bool IntFromString(wxWindow* parent, wxString strValue, int& value, wxString errorMsg); + protected: std::vector<Element*> m_parentList; diff --git a/Project/ElementForm.cpp b/Project/ElementForm.cpp index 1083a31..1e39405 100644 --- a/Project/ElementForm.cpp +++ b/Project/ElementForm.cpp @@ -50,21 +50,29 @@ BusFormBase::BusFormBase(wxWindow* parent, wxWindowID id, const wxString& title, boxSizerLvl2_1->Add(m_textCtrlName, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); m_textCtrlName->SetMinSize(wxSize(300,-1)); + wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0); + + boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5)); + m_staticTextNomVoltage = new wxStaticText(m_panelGeneral, wxID_ANY, _("Nominal voltage"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); m_staticTextNomVoltage->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); - boxSizerLvl2_1->Add(m_staticTextNomVoltage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl4_1->Add(m_staticTextNomVoltage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); - wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL); - boxSizerLvl2_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5)); + boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5)); m_textCtrlNomVoltage = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); #if wxVERSION_NUMBER >= 3000 m_textCtrlNomVoltage->SetHint(wxT("")); #endif - boxSizerLvl4_1->Add(m_textCtrlNomVoltage, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl5_1->Add(m_textCtrlNomVoltage, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); wxArrayString m_choiceNomVoltageArr; m_choiceNomVoltageArr.Add(wxT("V")); @@ -72,23 +80,28 @@ BusFormBase::BusFormBase(wxWindow* parent, wxWindowID id, const wxString& title, m_choiceNomVoltage = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceNomVoltageArr, 0); m_choiceNomVoltage->SetSelection(1); - boxSizerLvl4_1->Add(m_choiceNomVoltage, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5)); + boxSizerLvl5_1->Add(m_choiceNomVoltage, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5)); m_checkBoxCtrlVoltage = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Controlled voltage"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); m_checkBoxCtrlVoltage->SetValue(false); + m_checkBoxCtrlVoltage->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); - boxSizerLvl2_1->Add(m_checkBoxCtrlVoltage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl4_2->Add(m_checkBoxCtrlVoltage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); - wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL); - boxSizerLvl2_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5)); + boxSizerLvl4_2->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5)); m_textCtrlCtrlVoltage = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); #if wxVERSION_NUMBER >= 3000 m_textCtrlCtrlVoltage->SetHint(wxT("")); #endif - boxSizerLvl4_2->Add(m_textCtrlCtrlVoltage, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl5_2->Add(m_textCtrlCtrlVoltage, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); wxArrayString m_choiceCtrlVoltageArr; m_choiceCtrlVoltageArr.Add(wxT("p.u.")); @@ -96,7 +109,7 @@ BusFormBase::BusFormBase(wxWindow* parent, wxWindowID id, const wxString& title, m_choiceCtrlVoltage = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceCtrlVoltageArr, 0); m_choiceCtrlVoltage->SetSelection(0); - boxSizerLvl4_2->Add(m_choiceCtrlVoltage, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5)); + boxSizerLvl5_2->Add(m_choiceCtrlVoltage, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5)); m_checkBoxSlackBus = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Slack Bus"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); m_checkBoxSlackBus->SetValue(false); @@ -114,10 +127,18 @@ BusFormBase::BusFormBase(wxWindow* parent, wxWindowID id, const wxString& title, boxSizerLvl2_2->Add(m_checkBoxFault, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + wxGridSizer* gridSizerLvl3_2 = new wxGridSizer(0, 2, 0, 0); + + boxSizerLvl2_2->Add(gridSizerLvl3_2, 0, wxEXPAND, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_2->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5)); + m_staticTextFaultType = new wxStaticText(m_panelFault, wxID_ANY, _("Fault type"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0); m_staticTextFaultType->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); - boxSizerLvl2_2->Add(m_staticTextFaultType, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl4_3->Add(m_staticTextFaultType, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); wxArrayString m_choiceFaultTypeArr; m_choiceFaultTypeArr.Add(wxT("Three-phase")); @@ -127,12 +148,16 @@ BusFormBase::BusFormBase(wxWindow* parent, wxWindowID id, const wxString& title, m_choiceFaultType = new wxChoice(m_panelFault, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), m_choiceFaultTypeArr, 0); m_choiceFaultType->SetSelection(0); - boxSizerLvl2_2->Add(m_choiceFaultType, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl4_3->Add(m_choiceFaultType, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_2->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5)); m_staticTextFaultPlace = new wxStaticText(m_panelFault, wxID_ANY, _("Fault place"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0); m_staticTextFaultPlace->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); - boxSizerLvl2_2->Add(m_staticTextFaultPlace, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl4_4->Add(m_staticTextFaultPlace, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); wxArrayString m_choiceFaultPlaceArr; m_choiceFaultPlaceArr.Add(wxT("Line A")); @@ -141,47 +166,171 @@ BusFormBase::BusFormBase(wxWindow* parent, wxWindowID id, const wxString& title, m_choiceFaultPlace = new wxChoice(m_panelFault, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), m_choiceFaultPlaceArr, 0); m_choiceFaultPlace->SetSelection(0); - boxSizerLvl2_2->Add(m_choiceFaultPlace, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl4_4->Add(m_choiceFaultPlace, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_5 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_2->Add(boxSizerLvl4_5, 0, wxEXPAND, WXC_FROM_DIP(5)); m_staticTextFaultResistance = new wxStaticText(m_panelFault, wxID_ANY, _("Fault resistance (R)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0); m_staticTextFaultResistance->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); - boxSizerLvl2_2->Add(m_staticTextFaultResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl4_5->Add(m_staticTextFaultResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); - wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer* boxSizerLvl5_3 = new wxBoxSizer(wxHORIZONTAL); - boxSizerLvl2_2->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5)); + boxSizerLvl4_5->Add(boxSizerLvl5_3, 0, wxEXPAND, WXC_FROM_DIP(5)); m_textCtrlFaultResistance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0); #if wxVERSION_NUMBER >= 3000 m_textCtrlFaultResistance->SetHint(wxT("")); #endif - boxSizerLvl4_3->Add(m_textCtrlFaultResistance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl5_3->Add(m_textCtrlFaultResistance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); m_staticTextPU_1 = new wxStaticText(m_panelFault, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0); - boxSizerLvl4_3->Add(m_staticTextPU_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl5_3->Add(m_staticTextPU_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_6 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_2->Add(boxSizerLvl4_6, 0, wxEXPAND, WXC_FROM_DIP(5)); m_staticTextReactance = new wxStaticText(m_panelFault, wxID_ANY, _("Fault reactance (Xl)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0); m_staticTextReactance->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); - boxSizerLvl2_2->Add(m_staticTextReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl4_6->Add(m_staticTextReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); - wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer* boxSizerLvl5_4 = new wxBoxSizer(wxHORIZONTAL); - boxSizerLvl2_2->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5)); + boxSizerLvl4_6->Add(boxSizerLvl5_4, 0, wxEXPAND, WXC_FROM_DIP(5)); m_textCtrlFaultReactance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0); #if wxVERSION_NUMBER >= 3000 m_textCtrlFaultReactance->SetHint(wxT("")); #endif - boxSizerLvl4_4->Add(m_textCtrlFaultReactance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl5_4->Add(m_textCtrlFaultReactance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); m_staticTextPU_2 = new wxStaticText(m_panelFault, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0); - boxSizerLvl4_4->Add(m_staticTextPU_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + boxSizerLvl5_4->Add(m_staticTextPU_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_panelStability = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL); + m_notebook->AddPage(m_panelStability, _("Stability"), false); + + wxBoxSizer* boxSizerLvl2_3 = new wxBoxSizer(wxVERTICAL); + m_panelStability->SetSizer(boxSizerLvl2_3); + + m_checkBoxPlotData = new wxCheckBox(m_panelStability, wxID_ANY, _("Plot bus data"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + m_checkBoxPlotData->SetValue(false); + + boxSizerLvl2_3->Add(m_checkBoxPlotData, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_checkBoxStabFault = new wxCheckBox(m_panelStability, wxID_ANY, _("Insert fault in the bus"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + m_checkBoxStabFault->SetValue(false); + + boxSizerLvl2_3->Add(m_checkBoxStabFault, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxGridSizer* gridSizerLvl3_3 = new wxGridSizer(0, 2, 0, 0); + + boxSizerLvl2_3->Add(gridSizerLvl3_3, 0, wxEXPAND, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_7 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_3->Add(boxSizerLvl4_7, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextStabFaultTime = new wxStaticText(m_panelStability, wxID_ANY, _("Time"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + m_staticTextStabFaultTime->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + + boxSizerLvl4_7->Add(m_staticTextStabFaultTime, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl5_5 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl4_7->Add(boxSizerLvl5_5, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlStabFaultTime = new wxTextCtrl(m_panelStability, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlStabFaultTime->SetHint(wxT("")); + #endif + + boxSizerLvl5_5->Add(m_textCtrlStabFaultTime, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_staticTextS_1 = new wxStaticText(m_panelStability, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl5_5->Add(m_staticTextS_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_8 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_3->Add(boxSizerLvl4_8, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextStabFaultLength = new wxStaticText(m_panelStability, wxID_ANY, _("Fault length"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + m_staticTextStabFaultLength->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + + boxSizerLvl4_8->Add(m_staticTextStabFaultLength, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl5_6 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl4_8->Add(boxSizerLvl5_6, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlStabFaultLength = new wxTextCtrl(m_panelStability, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlStabFaultLength->SetHint(wxT("")); + #endif + + boxSizerLvl5_6->Add(m_textCtrlStabFaultLength, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_staticTextS_2 = new wxStaticText(m_panelStability, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl5_6->Add(m_staticTextS_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_9 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_3->Add(boxSizerLvl4_9, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextStabFaultResistance = new wxStaticText(m_panelStability, wxID_ANY, _("Fault resistance (R)"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + m_staticTextStabFaultResistance->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + + boxSizerLvl4_9->Add(m_staticTextStabFaultResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl5_7 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl4_9->Add(boxSizerLvl5_7, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlStabFaultResistance = new wxTextCtrl(m_panelStability, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlStabFaultResistance->SetHint(wxT("")); + #endif + + boxSizerLvl5_7->Add(m_textCtrlStabFaultResistance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_staticTextPU_3 = new wxStaticText(m_panelStability, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl5_7->Add(m_staticTextPU_3, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_10 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_3->Add(boxSizerLvl4_10, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextStabFaultReactance = new wxStaticText(m_panelStability, wxID_ANY, _("Fault reactance (Xl)"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + m_staticTextStabFaultReactance->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT)); + + boxSizerLvl4_10->Add(m_staticTextStabFaultReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl5_8 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl4_10->Add(boxSizerLvl5_8, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlStabFaultReactance = new wxTextCtrl(m_panelStability, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlStabFaultReactance->SetHint(wxT("")); + #endif + + boxSizerLvl5_8->Add(m_textCtrlStabFaultReactance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_staticTextPU_4 = new wxStaticText(m_panelStability, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl5_8->Add(m_staticTextPU_4, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); wxBoxSizer* boxSizerOkCancel = new wxBoxSizer(wxHORIZONTAL); @@ -222,6 +371,11 @@ BusFormBase::BusFormBase(wxWindow* parent, wxWindowID id, const wxString& title, } #endif // Connect events + m_choiceNomVoltage->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(BusFormBase::OnNominalVoltageChoice), NULL, this); + m_checkBoxCtrlVoltage->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnControlledVoltageClick), NULL, this); + m_checkBoxFault->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnInsertFaultClick), NULL, this); + m_choiceFaultType->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(BusFormBase::OnFaultTypeChoice), NULL, this); + m_checkBoxStabFault->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnInsertStabFaultClick), NULL, this); m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BusFormBase::OnButtonOKClick), NULL, this); m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BusFormBase::OnButtonCancelClick), NULL, this); @@ -229,6 +383,11 @@ BusFormBase::BusFormBase(wxWindow* parent, wxWindowID id, const wxString& title, BusFormBase::~BusFormBase() { + m_choiceNomVoltage->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(BusFormBase::OnNominalVoltageChoice), NULL, this); + m_checkBoxCtrlVoltage->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnControlledVoltageClick), NULL, this); + m_checkBoxFault->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnInsertFaultClick), NULL, this); + m_choiceFaultType->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(BusFormBase::OnFaultTypeChoice), NULL, this); + m_checkBoxStabFault->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnInsertStabFaultClick), NULL, this); m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BusFormBase::OnButtonOKClick), NULL, this); m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BusFormBase::OnButtonCancelClick), NULL, this); diff --git a/Project/ElementForm.h b/Project/ElementForm.h index b84ccfc..88a34c9 100644 --- a/Project/ElementForm.h +++ b/Project/ElementForm.h @@ -66,10 +66,30 @@ protected: wxStaticText* m_staticTextReactance; wxTextCtrl* m_textCtrlFaultReactance; wxStaticText* m_staticTextPU_2; + wxPanel* m_panelStability; + wxCheckBox* m_checkBoxPlotData; + wxCheckBox* m_checkBoxStabFault; + wxStaticText* m_staticTextStabFaultTime; + wxTextCtrl* m_textCtrlStabFaultTime; + wxStaticText* m_staticTextS_1; + wxStaticText* m_staticTextStabFaultLength; + wxTextCtrl* m_textCtrlStabFaultLength; + wxStaticText* m_staticTextS_2; + wxStaticText* m_staticTextStabFaultResistance; + wxTextCtrl* m_textCtrlStabFaultResistance; + wxStaticText* m_staticTextPU_3; + wxStaticText* m_staticTextStabFaultReactance; + wxTextCtrl* m_textCtrlStabFaultReactance; + wxStaticText* m_staticTextPU_4; wxButton* m_buttonOK; wxButton* m_ButtonCancel; protected: + virtual void OnNominalVoltageChoice(wxCommandEvent& event) { event.Skip(); } + virtual void OnControlledVoltageClick(wxCommandEvent& event) { event.Skip(); } + virtual void OnInsertFaultClick(wxCommandEvent& event) { event.Skip(); } + virtual void OnFaultTypeChoice(wxCommandEvent& event) { event.Skip(); } + virtual void OnInsertStabFaultClick(wxCommandEvent& event) { event.Skip(); } virtual void OnButtonOKClick(wxCommandEvent& event) { event.Skip(); } virtual void OnButtonCancelClick(wxCommandEvent& event) { event.Skip(); } @@ -96,6 +116,21 @@ public: wxTextCtrl* GetTextCtrlFaultReactance() { return m_textCtrlFaultReactance; } wxStaticText* GetStaticTextPU_2() { return m_staticTextPU_2; } wxPanel* GetPanelFault() { return m_panelFault; } + wxCheckBox* GetCheckBoxPlotData() { return m_checkBoxPlotData; } + wxCheckBox* GetCheckBoxStabFault() { return m_checkBoxStabFault; } + wxStaticText* GetStaticTextStabFaultTime() { return m_staticTextStabFaultTime; } + wxTextCtrl* GetTextCtrlStabFaultTime() { return m_textCtrlStabFaultTime; } + wxStaticText* GetStaticTextS_1() { return m_staticTextS_1; } + wxStaticText* GetStaticTextStabFaultLength() { return m_staticTextStabFaultLength; } + wxTextCtrl* GetTextCtrlStabFaultLength() { return m_textCtrlStabFaultLength; } + wxStaticText* GetStaticTextS_2() { return m_staticTextS_2; } + wxStaticText* GetStaticTextStabFaultResistance() { return m_staticTextStabFaultResistance; } + wxTextCtrl* GetTextCtrlStabFaultResistance() { return m_textCtrlStabFaultResistance; } + wxStaticText* GetStaticTextPU_3() { return m_staticTextPU_3; } + wxStaticText* GetStaticTextStabFaultReactance() { return m_staticTextStabFaultReactance; } + wxTextCtrl* GetTextCtrlStabFaultReactance() { return m_textCtrlStabFaultReactance; } + wxStaticText* GetStaticTextPU_4() { return m_staticTextPU_4; } + wxPanel* GetPanelStability() { return m_panelStability; } wxNotebook* GetNotebook() { return m_notebook; } wxButton* GetButtonOK() { return m_buttonOK; } wxButton* GetButtonCancel() { return m_ButtonCancel; } diff --git a/Project/ElementForm.wxcp b/Project/ElementForm.wxcp index 56abde1..858f338 100644 --- a/Project/ElementForm.wxcp +++ b/Project/ElementForm.wxcp @@ -1,7 +1,7 @@ { "metadata": { "m_generatedFilesDir": ".", - "m_objCounter": 84, + "m_objCounter": 147, "m_includeFiles": [], "m_bitmapFunction": "wxC9EE9InitBitmapResources", "m_bitmapsFile": "ElementFormBitmaps.cpp", @@ -489,82 +489,7 @@ "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_staticTextNomVoltage" - }, { - "type": "multi-string", - "m_label": "Tooltip:", - "m_value": "" - }, { - "type": "colour", - "m_label": "Bg Colour:", - "colour": "<Default>" - }, { - "type": "colour", - "m_label": "Fg Colour:", - "colour": "GrayText" - }, { - "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": "Nominal voltage" - }, { - "type": "string", - "m_label": "Wrap:", - "m_value": "-1" - }], - "m_events": [], - "m_children": [] - }, { - "m_type": 4401, + "m_type": 4452, "proportion": 0, "border": 5, "gbSpan": "1,1", @@ -578,445 +503,629 @@ }, { "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_textCtrlNomVoltage" - }, { - "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": "" - }, { - "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": 4411, - "proportion": 0, - "border": 5, - "gbSpan": "1,1", - "gbPosition": "0,0", - "m_styles": [], - "m_sizerFlags": ["wxLEFT", "wxRIGHT", "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_choiceNomVoltage" - }, { - "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": "V;kV" - }, { - "type": "string", - "m_label": "Selection:", - "m_value": "1" - }], - "m_events": [], - "m_children": [] - }] - }, { - "m_type": 4415, - "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_checkBoxCtrlVoltage" - }, { - "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": "" + "m_value": "gridSizerLvl3_1" }, { "type": "string", "m_label": "Style:", "m_value": "" }, { "type": "string", - "m_label": "Label:", - "m_value": "Controlled voltage" + "m_label": "# Columns:", + "m_value": "2" }, { - "type": "bool", - "m_label": "Value:", - "m_value": false - }], - "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" + "m_label": "# Rows:", + "m_value": "0" }, { "type": "string", - "m_label": "Name:", - "m_value": "boxSizerLvl4_2" + "m_label": "Horizontal gap:", + "m_value": "0" }, { "type": "string", - "m_label": "Style:", - "m_value": "" - }, { - "type": "choice", - "m_label": "Orientation:", - "m_selection": 1, - "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + "m_label": "Vertical gap:", + "m_value": "0" }], "m_events": [], "m_children": [{ - "m_type": 4406, - "proportion": 1, + "m_type": 4401, + "proportion": 0, "border": 5, "gbSpan": "1,1", "gbPosition": "0,0", "m_styles": [], - "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_sizerFlags": ["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_textCtrlCtrlVoltage" - }, { - "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": "" + "m_value": "boxSizerLvl4_1" }, { "type": "string", "m_label": "Style:", "m_value": "" }, { - "type": "string", - "m_label": "Value:", - "m_value": "" - }, { - "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 + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] }], "m_events": [], - "m_children": [] - }, { - "m_type": 4411, + "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_staticTextNomVoltage" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "GrayText" + }, { + "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": "Nominal voltage" + }, { + "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": "boxSizerLvl5_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_textCtrlNomVoltage" + }, { + "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": "" + }, { + "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": 4411, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "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_choiceNomVoltage" + }, { + "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": "V;kV" + }, { + "type": "string", + "m_label": "Selection:", + "m_value": "1" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_CHOICE_SELECTED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnNominalVoltageChoice(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_CHOICE_SELECTED event, when an item on the list is selected.", + "m_noBody": false + }], + "m_children": [] + }] + }] + }, { + "m_type": 4401, "proportion": 0, "border": 5, "gbSpan": "1,1", "gbPosition": "0,0", "m_styles": [], - "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM"], + "m_sizerFlags": ["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_choiceCtrlVoltage" - }, { - "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": "" + "m_value": "boxSizerLvl4_2" }, { "type": "string", "m_label": "Style:", "m_value": "" }, { - "type": "multi-string", - "m_label": "Choices:", - "m_value": "p.u.;kV" - }, { - "type": "string", - "m_label": "Selection:", - "m_value": "0" + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] }], "m_events": [], - "m_children": [] + "m_children": [{ + "m_type": 4415, + "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_checkBoxCtrlVoltage" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "GrayText" + }, { + "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": "Controlled voltage" + }, { + "type": "bool", + "m_label": "Value:", + "m_value": false + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_CHECKBOX_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnControlledVoltageClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox is clicked.", + "m_noBody": false + }], + "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": "boxSizerLvl5_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_textCtrlCtrlVoltage" + }, { + "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": "" + }, { + "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": 4411, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "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_choiceCtrlVoltage" + }, { + "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": "p.u.;kV" + }, { + "type": "string", + "m_label": "Selection:", + "m_value": "0" + }], + "m_events": [], + "m_children": [] + }] + }] }] }, { "m_type": 4415, @@ -1277,166 +1386,1122 @@ "m_label": "Value:", "m_value": false }], - "m_events": [], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_CHECKBOX_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnInsertFaultClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox is clicked.", + "m_noBody": false + }], "m_children": [] }, { - "m_type": 4405, + "m_type": 4452, "proportion": 0, "border": 5, "gbSpan": "1,1", "gbPosition": "0,0", "m_styles": [], - "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_sizerFlags": ["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_staticTextFaultType" - }, { - "type": "multi-string", - "m_label": "Tooltip:", - "m_value": "" - }, { - "type": "colour", - "m_label": "Bg Colour:", - "colour": "<Default>" - }, { - "type": "colour", - "m_label": "Fg Colour:", - "colour": "GrayText" - }, { - "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": "" + "m_value": "gridSizerLvl3_2" }, { "type": "string", "m_label": "Style:", "m_value": "" }, { - "type": "multi-string", - "m_label": "Label:", - "m_value": "Fault type" - }, { "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", "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" + "m_label": "# Columns:", + "m_value": "2" }, { "type": "string", - "m_label": "Name:", - "m_value": "m_choiceFaultType" - }, { - "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": "" + "m_label": "# Rows:", + "m_value": "0" }, { "type": "string", - "m_label": "Style:", - "m_value": "" - }, { - "type": "multi-string", - "m_label": "Choices:", - "m_value": "Three-phase;Line-to-line;Double line-to-ground;Line-to-ground" + "m_label": "Horizontal gap:", + "m_value": "0" }, { "type": "string", - "m_label": "Selection:", + "m_label": "Vertical gap:", "m_value": "0" }], "m_events": [], - "m_children": [] + "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": 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_staticTextFaultType" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "GrayText" + }, { + "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": "Fault type" + }, { + "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", "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_choiceFaultType" + }, { + "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": "Three-phase;Line-to-line;Double line-to-ground;Line-to-ground" + }, { + "type": "string", + "m_label": "Selection:", + "m_value": "0" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_CHOICE_SELECTED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnFaultTypeChoice(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_CHOICE_SELECTED event, when an item on the list is selected.", + "m_noBody": false + }], + "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_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_staticTextFaultPlace" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "GrayText" + }, { + "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": "Fault place" + }, { + "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", "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_choiceFaultPlace" + }, { + "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": "Line A;Line B;Line C" + }, { + "type": "string", + "m_label": "Selection:", + "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": "boxSizerLvl4_5" + }, { + "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_staticTextFaultResistance" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "GrayText" + }, { + "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": "Fault resistance (R)" + }, { + "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": "boxSizerLvl5_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_textCtrlFaultResistance" + }, { + "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": "" + }, { + "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_staticTextPU_1" + }, { + "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": "p.u." + }, { + "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_6" + }, { + "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_staticTextReactance" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "GrayText" + }, { + "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": "Fault reactance (Xl)" + }, { + "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": "boxSizerLvl5_4" + }, { + "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_textCtrlFaultReactance" + }, { + "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": "" + }, { + "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_staticTextPU_2" + }, { + "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": "p.u." + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }] + }] + }] + }] + }] + }, { + "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_panelStability" + }, { + "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": "Stability" + }, { + "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" }, { - "m_type": 4405, + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl2_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": 4415, "proportion": 0, "border": 5, "gbSpan": "1,1", "gbPosition": "0,0", "m_styles": [], - "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], "m_properties": [{ "type": "winid", "m_label": "ID:", @@ -1452,7 +2517,7 @@ }, { "type": "string", "m_label": "Name:", - "m_value": "m_staticTextFaultPlace" + "m_value": "m_checkBoxPlotData" }, { "type": "multi-string", "m_label": "Tooltip:", @@ -1464,7 +2529,7 @@ }, { "type": "colour", "m_label": "Fg Colour:", - "colour": "GrayText" + "colour": "<Default>" }, { "type": "font", "m_label": "Font:", @@ -1494,24 +2559,24 @@ "m_label": "Style:", "m_value": "" }, { - "type": "multi-string", + "type": "string", "m_label": "Label:", - "m_value": "Fault place" + "m_value": "Plot bus data" }, { - "type": "string", - "m_label": "Wrap:", - "m_value": "-1" + "type": "bool", + "m_label": "Value:", + "m_value": false }], "m_events": [], "m_children": [] }, { - "m_type": 4411, + "m_type": 4415, "proportion": 0, "border": 5, "gbSpan": "1,1", "gbPosition": "0,0", "m_styles": [], - "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND", "wxALIGN_CENTER_VERTICAL"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], "m_properties": [{ "type": "winid", "m_label": "ID:", @@ -1527,7 +2592,7 @@ }, { "type": "string", "m_label": "Name:", - "m_value": "m_choiceFaultPlace" + "m_value": "m_checkBoxStabFault" }, { "type": "multi-string", "m_label": "Tooltip:", @@ -1569,545 +2634,1233 @@ "m_label": "Style:", "m_value": "" }, { - "type": "multi-string", - "m_label": "Choices:", - "m_value": "Line A;Line B;Line C" - }, { "type": "string", - "m_label": "Selection:", - "m_value": "0" + "m_label": "Label:", + "m_value": "Insert fault in the bus" + }, { + "type": "bool", + "m_label": "Value:", + "m_value": false + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_CHECKBOX_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnInsertStabFaultClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox is clicked.", + "m_noBody": false }], - "m_events": [], "m_children": [] }, { - "m_type": 4405, + "m_type": 4452, "proportion": 0, "border": 5, "gbSpan": "1,1", "gbPosition": "0,0", "m_styles": [], - "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_sizerFlags": ["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_staticTextFaultResistance" - }, { - "type": "multi-string", - "m_label": "Tooltip:", - "m_value": "" - }, { - "type": "colour", - "m_label": "Bg Colour:", - "colour": "<Default>" - }, { - "type": "colour", - "m_label": "Fg Colour:", - "colour": "GrayText" - }, { - "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": "" + "m_value": "gridSizerLvl3_3" }, { "type": "string", "m_label": "Style:", "m_value": "" }, { - "type": "multi-string", - "m_label": "Label:", - "m_value": "Fault resistance (R)" - }, { "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" + "m_label": "# Columns:", + "m_value": "2" }, { "type": "string", - "m_label": "Name:", - "m_value": "boxSizerLvl4_3" + "m_label": "# Rows:", + "m_value": "0" }, { "type": "string", - "m_label": "Style:", - "m_value": "" + "m_label": "Horizontal gap:", + "m_value": "0" }, { - "type": "choice", - "m_label": "Orientation:", - "m_selection": 1, - "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + "type": "string", + "m_label": "Vertical gap:", + "m_value": "0" }], "m_events": [], "m_children": [{ - "m_type": 4406, - "proportion": 1, + "m_type": 4401, + "proportion": 0, "border": 5, "gbSpan": "1,1", "gbPosition": "0,0", "m_styles": [], - "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_sizerFlags": ["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_textCtrlFaultResistance" - }, { - "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": "" + "m_value": "boxSizerLvl4_7" }, { "type": "string", "m_label": "Style:", "m_value": "" }, { - "type": "string", - "m_label": "Value:", - "m_value": "" - }, { - "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 + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] }], "m_events": [], - "m_children": [] - }, { - "m_type": 4405, + "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_staticTextStabFaultTime" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "GrayText" + }, { + "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": "Time" + }, { + "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": "boxSizerLvl5_5" + }, { + "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_textCtrlStabFaultTime" + }, { + "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": "" + }, { + "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_staticTextS_1" + }, { + "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": "s" + }, { + "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": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_sizerFlags": ["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_staticTextPU_1" - }, { - "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": "" + "m_value": "boxSizerLvl4_8" }, { "type": "string", "m_label": "Style:", "m_value": "" }, { - "type": "multi-string", - "m_label": "Label:", - "m_value": "p.u." - }, { - "type": "string", - "m_label": "Wrap:", - "m_value": "-1" + "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_staticTextReactance" - }, { - "type": "multi-string", - "m_label": "Tooltip:", - "m_value": "" - }, { - "type": "colour", - "m_label": "Bg Colour:", - "colour": "<Default>" - }, { - "type": "colour", - "m_label": "Fg Colour:", - "colour": "GrayText" - }, { - "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": "Fault reactance (Xl)" - }, { - "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_4" - }, { - "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, + "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_staticTextStabFaultLength" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "GrayText" + }, { + "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": "Fault length" + }, { + "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": "boxSizerLvl5_6" + }, { + "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_textCtrlStabFaultLength" + }, { + "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": "" + }, { + "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_staticTextS_2" + }, { + "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": "s" + }, { + "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": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_sizerFlags": ["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_textCtrlFaultReactance" - }, { - "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": "" + "m_value": "boxSizerLvl4_9" }, { "type": "string", "m_label": "Style:", "m_value": "" }, { - "type": "string", - "m_label": "Value:", - "m_value": "" - }, { - "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 + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] }], "m_events": [], - "m_children": [] - }, { - "m_type": 4405, + "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_staticTextStabFaultResistance" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "GrayText" + }, { + "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": "Fault resistance (R)" + }, { + "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": "boxSizerLvl5_7" + }, { + "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_textCtrlStabFaultResistance" + }, { + "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": "" + }, { + "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_staticTextPU_3" + }, { + "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": "p.u." + }, { + "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": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_sizerFlags": ["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_staticTextPU_2" - }, { - "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": "" + "m_value": "boxSizerLvl4_10" }, { "type": "string", "m_label": "Style:", "m_value": "" }, { - "type": "multi-string", - "m_label": "Label:", - "m_value": "p.u." - }, { - "type": "string", - "m_label": "Wrap:", - "m_value": "-1" + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] }], "m_events": [], - "m_children": [] + "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_staticTextStabFaultReactance" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "GrayText" + }, { + "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": "Fault reactance (Xl)" + }, { + "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": "boxSizerLvl5_8" + }, { + "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_textCtrlStabFaultReactance" + }, { + "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": "" + }, { + "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_staticTextPU_4" + }, { + "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": "p.u." + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }] + }] }] }] }] diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp index b02869f..cfb24cf 100644 --- a/Project/MainFrame.cpp +++ b/Project/MainFrame.cpp @@ -136,9 +136,9 @@ void MainFrame::OnCopyClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnDataReportClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnDeleteClick(wxRibbonButtonBarEvent& event) { - Workspace* workspace = (Workspace*)m_auiNotebook->GetCurrentPage(); + Workspace* workspace = (Workspace*)m_auiNotebook->GetCurrentPage(); if(workspace) { - workspace->DeleteSelectedElements(); + workspace->DeleteSelectedElements(); } } void MainFrame::OnDisableSolutionClick(wxRibbonButtonBarEvent& event) @@ -158,9 +158,9 @@ void MainFrame::OnExpImpClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnFaultClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnFitClick(wxRibbonButtonBarEvent& event) { - Workspace* workspace = (Workspace*)m_auiNotebook->GetCurrentPage(); + Workspace* workspace = (Workspace*)m_auiNotebook->GetCurrentPage(); if(workspace) { - workspace->Fit(); + workspace->Fit(); } } void MainFrame::OnMoveClick(wxRibbonButtonBarEvent& event) @@ -218,7 +218,10 @@ void MainFrame::OnAddElementsClick(wxCommandEvent& event) { case ID_ADDMENU_BUS: { - Bus* newBus = new Bus(wxPoint2DDouble(0, 0)); + Bus* newBus = + new Bus(wxPoint2DDouble(0, 0), + wxString::Format(_("Bus %d"), workspace->GetElementNumber(ID_BUS))); + workspace->IncrementElementNumber(ID_BUS); elementList.push_back(newBus); statusBarText = _("Insert Bus: Click to insert, ESC to cancel."); newElement = true; diff --git a/Project/Project.mk b/Project/Project.mk index 7a23ec4..138bf97 100644 --- a/Project/Project.mk +++ b/Project/Project.mk @@ -13,8 +13,8 @@ CurrentFileName := CurrentFilePath := CurrentFileFullPath := User :=Thales -Date :=11/09/2016 -CodeLitePath :="C:/Program Files (x86)/CodeLite" +Date :=12/09/2016 +CodeLitePath :="C:/Program Files/CodeLite" LinkerName :=C:/TDM-GCC-64/bin/g++.exe SharedObjectLinkerName :=C:/TDM-GCC-64/bin/g++.exe -shared -fPIC ObjectSuffix :=.o @@ -61,8 +61,7 @@ AS := C:/TDM-GCC-64/bin/as.exe ## ## User defined environment variables ## -CodeLiteDir:=C:\Program Files (x86)\CodeLite -UNIT_TEST_PP_SRC_DIR:=C:\UnitTest++-1.3 +CodeLiteDir:=C:\Program Files\CodeLite WXWIN:=C:\wxWidgets-3.1.0 WXCFG:=gcc_dll\mswu Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementFormBitmaps.cpp$(ObjectSuffix) \ diff --git a/Project/Release/Branch.cpp.o b/Project/Release/Branch.cpp.o Binary files differindex ebfd736..212064f 100644 --- a/Project/Release/Branch.cpp.o +++ b/Project/Release/Branch.cpp.o diff --git a/Project/Release/Bus.cpp.o b/Project/Release/Bus.cpp.o Binary files differindex 1b49584..55139fe 100644 --- a/Project/Release/Bus.cpp.o +++ b/Project/Release/Bus.cpp.o diff --git a/Project/Release/Bus.cpp.o.d b/Project/Release/Bus.cpp.o.d index 5ad230b..12a9b28 100644 --- a/Project/Release/Bus.cpp.o.d +++ b/Project/Release/Bus.cpp.o.d @@ -148,6 +148,9 @@ Release/Bus.cpp.o: Bus.cpp Bus.h BusForm.h ElementForm.h \ C:/wxWidgets-3.1.0/include/wx/ctrlsub.h \ C:/wxWidgets-3.1.0/include/wx/msw/ctrlsub.h \ C:/wxWidgets-3.1.0/include/wx/msw/choice.h \ + C:/wxWidgets-3.1.0/include/wx/checkbox.h \ + C:/wxWidgets-3.1.0/include/wx/msw/checkbox.h \ + C:/wxWidgets-3.1.0/include/wx/msw/ownerdrawnbutton.h \ C:/wxWidgets-3.1.0/include/wx/button.h \ C:/wxWidgets-3.1.0/include/wx/anybutton.h \ C:/wxWidgets-3.1.0/include/wx/msw/anybutton.h \ @@ -481,6 +484,12 @@ C:/wxWidgets-3.1.0/include/wx/msw/ctrlsub.h: C:/wxWidgets-3.1.0/include/wx/msw/choice.h: +C:/wxWidgets-3.1.0/include/wx/checkbox.h: + +C:/wxWidgets-3.1.0/include/wx/msw/checkbox.h: + +C:/wxWidgets-3.1.0/include/wx/msw/ownerdrawnbutton.h: + C:/wxWidgets-3.1.0/include/wx/button.h: C:/wxWidgets-3.1.0/include/wx/anybutton.h: diff --git a/Project/Release/BusForm.cpp.o b/Project/Release/BusForm.cpp.o Binary files differindex 696ba7d..a3606f7 100644 --- a/Project/Release/BusForm.cpp.o +++ b/Project/Release/BusForm.cpp.o diff --git a/Project/Release/BusForm.cpp.o.d b/Project/Release/BusForm.cpp.o.d index 197150c..9437c67 100644 --- a/Project/Release/BusForm.cpp.o.d +++ b/Project/Release/BusForm.cpp.o.d @@ -169,7 +169,18 @@ Release/BusForm.cpp.o: BusForm.cpp BusForm.h ElementForm.h \ C:/wxWidgets-3.1.0/include/wx/treebase.h \ C:/wxWidgets-3.1.0/include/wx/itemid.h \ C:/wxWidgets-3.1.0/include/wx/systhemectrl.h \ - C:/wxWidgets-3.1.0/include/wx/msw/treectrl.h + C:/wxWidgets-3.1.0/include/wx/msw/treectrl.h Bus.h Element.h \ + C:/wxWidgets-3.1.0/include/wx/msgdlg.h \ + C:/wxWidgets-3.1.0/include/wx/stockitem.h \ + C:/wxWidgets-3.1.0/include/wx/generic/msgdlgg.h \ + C:/wxWidgets-3.1.0/include/wx/msw/msgdlg.h \ + C:/wxWidgets-3.1.0/include/wx/geometry.h \ + C:/wxWidgets-3.1.0/include/wx/menu.h \ + C:/wxWidgets-3.1.0/include/wx/menuitem.h \ + C:/wxWidgets-3.1.0/include/wx/msw/menuitem.h \ + C:/wxWidgets-3.1.0/include/wx/ownerdrw.h \ + C:/wxWidgets-3.1.0/include/wx/msw/ownerdrw.h \ + C:/wxWidgets-3.1.0/include/wx/msw/menu.h BusForm.h: @@ -518,3 +529,29 @@ C:/wxWidgets-3.1.0/include/wx/itemid.h: C:/wxWidgets-3.1.0/include/wx/systhemectrl.h: C:/wxWidgets-3.1.0/include/wx/msw/treectrl.h: + +Bus.h: + +Element.h: + +C:/wxWidgets-3.1.0/include/wx/msgdlg.h: + +C:/wxWidgets-3.1.0/include/wx/stockitem.h: + +C:/wxWidgets-3.1.0/include/wx/generic/msgdlgg.h: + +C:/wxWidgets-3.1.0/include/wx/msw/msgdlg.h: + +C:/wxWidgets-3.1.0/include/wx/geometry.h: + +C:/wxWidgets-3.1.0/include/wx/menu.h: + +C:/wxWidgets-3.1.0/include/wx/menuitem.h: + +C:/wxWidgets-3.1.0/include/wx/msw/menuitem.h: + +C:/wxWidgets-3.1.0/include/wx/ownerdrw.h: + +C:/wxWidgets-3.1.0/include/wx/msw/ownerdrw.h: + +C:/wxWidgets-3.1.0/include/wx/msw/menu.h: diff --git a/Project/Release/Capacitor.cpp.o b/Project/Release/Capacitor.cpp.o Binary files differindex 8da2f63..b12d0cc 100644 --- a/Project/Release/Capacitor.cpp.o +++ b/Project/Release/Capacitor.cpp.o diff --git a/Project/Release/Element.cpp.o b/Project/Release/Element.cpp.o Binary files differindex 5365c8b..473f91d 100644 --- a/Project/Release/Element.cpp.o +++ b/Project/Release/Element.cpp.o diff --git a/Project/Release/Element.cpp.o.d b/Project/Release/Element.cpp.o.d index 2651cbe..e66b8f7 100644 --- a/Project/Release/Element.cpp.o.d +++ b/Project/Release/Element.cpp.o.d @@ -108,7 +108,29 @@ Release/Element.cpp.o: Element.cpp Element.h \ C:/wxWidgets-3.1.0/include/wx/msw/bitmap.h \ C:/wxWidgets-3.1.0/include/wx/ownerdrw.h \ C:/wxWidgets-3.1.0/include/wx/msw/ownerdrw.h \ - C:/wxWidgets-3.1.0/include/wx/msw/menu.h + C:/wxWidgets-3.1.0/include/wx/msw/menu.h \ + C:/wxWidgets-3.1.0/include/wx/msgdlg.h \ + C:/wxWidgets-3.1.0/include/wx/dialog.h \ + C:/wxWidgets-3.1.0/include/wx/toplevel.h \ + C:/wxWidgets-3.1.0/include/wx/nonownedwnd.h \ + C:/wxWidgets-3.1.0/include/wx/msw/nonownedwnd.h \ + C:/wxWidgets-3.1.0/include/wx/iconbndl.h \ + C:/wxWidgets-3.1.0/include/wx/icon.h \ + C:/wxWidgets-3.1.0/include/wx/iconloc.h \ + C:/wxWidgets-3.1.0/include/wx/msw/icon.h \ + C:/wxWidgets-3.1.0/include/wx/weakref.h \ + C:/wxWidgets-3.1.0/include/wx/meta/int2type.h \ + C:/wxWidgets-3.1.0/include/wx/msw/toplevel.h \ + C:/wxWidgets-3.1.0/include/wx/containr.h \ + C:/wxWidgets-3.1.0/include/wx/sharedptr.h \ + C:/wxWidgets-3.1.0/include/wx/atomic.h \ + C:/wxWidgets-3.1.0/include/wx/msw/wrapwin.h \ + C:/wxWidgets-3.1.0/include/wx/msw/dialog.h \ + C:/wxWidgets-3.1.0/include/wx/panel.h \ + C:/wxWidgets-3.1.0/include/wx/msw/panel.h \ + C:/wxWidgets-3.1.0/include/wx/stockitem.h \ + C:/wxWidgets-3.1.0/include/wx/generic/msgdlgg.h \ + C:/wxWidgets-3.1.0/include/wx/msw/msgdlg.h Element.h: @@ -333,3 +355,47 @@ C:/wxWidgets-3.1.0/include/wx/ownerdrw.h: C:/wxWidgets-3.1.0/include/wx/msw/ownerdrw.h: C:/wxWidgets-3.1.0/include/wx/msw/menu.h: + +C:/wxWidgets-3.1.0/include/wx/msgdlg.h: + +C:/wxWidgets-3.1.0/include/wx/dialog.h: + +C:/wxWidgets-3.1.0/include/wx/toplevel.h: + +C:/wxWidgets-3.1.0/include/wx/nonownedwnd.h: + +C:/wxWidgets-3.1.0/include/wx/msw/nonownedwnd.h: + +C:/wxWidgets-3.1.0/include/wx/iconbndl.h: + +C:/wxWidgets-3.1.0/include/wx/icon.h: + +C:/wxWidgets-3.1.0/include/wx/iconloc.h: + +C:/wxWidgets-3.1.0/include/wx/msw/icon.h: + +C:/wxWidgets-3.1.0/include/wx/weakref.h: + +C:/wxWidgets-3.1.0/include/wx/meta/int2type.h: + +C:/wxWidgets-3.1.0/include/wx/msw/toplevel.h: + +C:/wxWidgets-3.1.0/include/wx/containr.h: + +C:/wxWidgets-3.1.0/include/wx/sharedptr.h: + +C:/wxWidgets-3.1.0/include/wx/atomic.h: + +C:/wxWidgets-3.1.0/include/wx/msw/wrapwin.h: + +C:/wxWidgets-3.1.0/include/wx/msw/dialog.h: + +C:/wxWidgets-3.1.0/include/wx/panel.h: + +C:/wxWidgets-3.1.0/include/wx/msw/panel.h: + +C:/wxWidgets-3.1.0/include/wx/stockitem.h: + +C:/wxWidgets-3.1.0/include/wx/generic/msgdlgg.h: + +C:/wxWidgets-3.1.0/include/wx/msw/msgdlg.h: diff --git a/Project/Release/ElementForm.cpp.o b/Project/Release/ElementForm.cpp.o Binary files differindex 6c600d6..0871aae 100644 --- a/Project/Release/ElementForm.cpp.o +++ b/Project/Release/ElementForm.cpp.o diff --git a/Project/Release/IndMotor.cpp.o b/Project/Release/IndMotor.cpp.o Binary files differindex daf7224..a756600 100644 --- a/Project/Release/IndMotor.cpp.o +++ b/Project/Release/IndMotor.cpp.o diff --git a/Project/Release/Inductor.cpp.o b/Project/Release/Inductor.cpp.o Binary files differindex 59cf194..970e078 100644 --- a/Project/Release/Inductor.cpp.o +++ b/Project/Release/Inductor.cpp.o diff --git a/Project/Release/Line.cpp.o b/Project/Release/Line.cpp.o Binary files differindex 94ee956..046d8da 100644 --- a/Project/Release/Line.cpp.o +++ b/Project/Release/Line.cpp.o diff --git a/Project/Release/Load.cpp.o b/Project/Release/Load.cpp.o Binary files differindex 2772831..b3562b1 100644 --- a/Project/Release/Load.cpp.o +++ b/Project/Release/Load.cpp.o diff --git a/Project/Release/Machines.cpp.o b/Project/Release/Machines.cpp.o Binary files differindex a81d98f..89ad069 100644 --- a/Project/Release/Machines.cpp.o +++ b/Project/Release/Machines.cpp.o diff --git a/Project/Release/MainFrame.cpp.o b/Project/Release/MainFrame.cpp.o Binary files differindex 8293d99..80f7fc8 100644 --- a/Project/Release/MainFrame.cpp.o +++ b/Project/Release/MainFrame.cpp.o diff --git a/Project/Release/PSP-UFU.exe b/Project/Release/PSP-UFU.exe Binary files differindex e154221..8a0aff9 100644 --- a/Project/Release/PSP-UFU.exe +++ b/Project/Release/PSP-UFU.exe diff --git a/Project/Release/Shunt.cpp.o b/Project/Release/Shunt.cpp.o Binary files differindex 4342ca7..a249dff 100644 --- a/Project/Release/Shunt.cpp.o +++ b/Project/Release/Shunt.cpp.o diff --git a/Project/Release/SyncGenerator.cpp.o b/Project/Release/SyncGenerator.cpp.o Binary files differindex 5a8d08a..985d225 100644 --- a/Project/Release/SyncGenerator.cpp.o +++ b/Project/Release/SyncGenerator.cpp.o diff --git a/Project/Release/SyncMotor.cpp.o b/Project/Release/SyncMotor.cpp.o Binary files differindex 52cafbe..11ad41c 100644 --- a/Project/Release/SyncMotor.cpp.o +++ b/Project/Release/SyncMotor.cpp.o diff --git a/Project/Release/Transformer.cpp.o b/Project/Release/Transformer.cpp.o Binary files differindex 3fe3cf9..81f065f 100644 --- a/Project/Release/Transformer.cpp.o +++ b/Project/Release/Transformer.cpp.o diff --git a/Project/Release/Workspace.cpp.o b/Project/Release/Workspace.cpp.o Binary files differindex d36e35c..566d18a 100644 --- a/Project/Release/Workspace.cpp.o +++ b/Project/Release/Workspace.cpp.o diff --git a/Project/Release/Workspace.cpp.o.d b/Project/Release/Workspace.cpp.o.d index 9f8cd0a..6d765ad 100644 --- a/Project/Release/Workspace.cpp.o.d +++ b/Project/Release/Workspace.cpp.o.d @@ -191,6 +191,9 @@ Release/Workspace.cpp.o: Workspace.cpp Workspace.h \ C:/wxWidgets-3.1.0/include/wx/ctrlsub.h \ C:/wxWidgets-3.1.0/include/wx/msw/ctrlsub.h \ C:/wxWidgets-3.1.0/include/wx/msw/choice.h \ + C:/wxWidgets-3.1.0/include/wx/checkbox.h \ + C:/wxWidgets-3.1.0/include/wx/msw/checkbox.h \ + C:/wxWidgets-3.1.0/include/wx/msw/ownerdrawnbutton.h \ C:/wxWidgets-3.1.0/include/wx/button.h \ C:/wxWidgets-3.1.0/include/wx/anybutton.h \ C:/wxWidgets-3.1.0/include/wx/msw/anybutton.h \ @@ -600,6 +603,12 @@ C:/wxWidgets-3.1.0/include/wx/msw/ctrlsub.h: C:/wxWidgets-3.1.0/include/wx/msw/choice.h: +C:/wxWidgets-3.1.0/include/wx/checkbox.h: + +C:/wxWidgets-3.1.0/include/wx/msw/checkbox.h: + +C:/wxWidgets-3.1.0/include/wx/msw/ownerdrawnbutton.h: + C:/wxWidgets-3.1.0/include/wx/button.h: C:/wxWidgets-3.1.0/include/wx/anybutton.h: diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp index b0dc8bf..7492319 100644 --- a/Project/Workspace.cpp +++ b/Project/Workspace.cpp @@ -59,6 +59,10 @@ Workspace::Workspace(wxWindow* parent, wxString name, wxStatusBar* statusBar) : m_camera = new Camera(); m_selectionRect = wxRect2DDouble(0, 0, 0, 0); + for(int i = 0; i < NUM_ELEMENTS; ++i) { + m_elementNumber[i] = 1; + } + const int widths[4] = {-3, -1, 100, 100}; m_statusBar->SetStatusWidths(4, widths); } @@ -231,7 +235,7 @@ void Workspace::OnLeftDoubleClick(wxMouseEvent& event) // Click in an element. if(element->Contains(m_camera->ScreenToWorld(event.GetPosition()))) { - element->ShowForm(this); + element->ShowForm(this, element); } // Click in a switch. @@ -381,7 +385,7 @@ void Workspace::OnMouseMotion(wxMouseEvent& event) break; case MODE_DRAG: - case MODE_DRAG_INSERT: + case MODE_DRAG_INSERT: { m_camera->SetTranslation(event.GetPosition()); redraw = true; @@ -506,15 +510,15 @@ void Workspace::OnMouseMotion(wxMouseEvent& event) void Workspace::OnMiddleDown(wxMouseEvent& event) { - // Set to drag mode. + // Set to drag mode. if(m_mode != MODE_INSERT && m_mode != MODE_DRAG_INSERT) { m_mode = MODE_DRAG; } - else + else { - m_mode = MODE_DRAG_INSERT; + m_mode = MODE_DRAG_INSERT; } - m_camera->StartTranslation(m_camera->ScreenToWorld(event.GetPosition())); + m_camera->StartTranslation(m_camera->ScreenToWorld(event.GetPosition())); UpdateStatusBar(); } void Workspace::OnMiddleUp(wxMouseEvent& event) @@ -523,8 +527,9 @@ void Workspace::OnMiddleUp(wxMouseEvent& event) // Set to edit mode back. m_mode = MODE_EDIT; } - else if(m_mode == MODE_DRAG_INSERT) { - m_mode = MODE_INSERT; + else if(m_mode == MODE_DRAG_INSERT) + { + m_mode = MODE_INSERT; } UpdateStatusBar(); } @@ -574,7 +579,9 @@ void Workspace::OnKeyDown(wxKeyEvent& event) case 'B': // Insert a bus. { if(m_mode != MODE_INSERT) { - Bus* newBus = new Bus(m_camera->ScreenToWorld(event.GetPosition())); + Bus* newBus = new Bus(m_camera->ScreenToWorld(event.GetPosition()), + wxString::Format(_("Bus %d"), GetElementNumber(ID_BUS))); + IncrementElementNumber(ID_BUS); m_elementList.push_back(newBus); m_mode = MODE_INSERT; m_statusBar->SetStatusText(_("Insert Bus: Click to insert, ESC to cancel.")); @@ -695,7 +702,7 @@ void Workspace::UpdateStatusBar() break; case MODE_INSERT: - case MODE_DRAG_INSERT: + case MODE_DRAG_INSERT: { m_statusBar->SetStatusText(_("MODE: INSERT"), 1); } diff --git a/Project/Workspace.h b/Project/Workspace.h index 60001b9..c5c0547 100644 --- a/Project/Workspace.h +++ b/Project/Workspace.h @@ -34,6 +34,22 @@ enum WorkspaceMode MODE_SELECTION_RECT }; +enum ElementID +{ + ID_BUS = 0, + ID_LINE, + ID_TRANSFORMER, + ID_SYNCGENERATOR, + ID_INDMOTOR, + ID_SYNCMOTOR, + ID_LOAD, + ID_CAPACITOR, + ID_INDUCTOR, + ID_TEXT, + + NUM_ELEMENTS +}; + class Workspace : public WorkspaceBase { public: @@ -55,6 +71,9 @@ class Workspace : public WorkspaceBase void RotateSelectedElements(bool clockwise = true); void DeleteSelectedElements(); void Fit(); + + int GetElementNumber(ElementID elementID) { return m_elementNumber[elementID]; } + void IncrementElementNumber(ElementID elementID) { m_elementNumber[elementID]++; } protected: virtual void OnLeftDoubleClick(wxMouseEvent& event); @@ -79,6 +98,8 @@ class Workspace : public WorkspaceBase WorkspaceMode m_mode = MODE_EDIT; std::vector<Element*> m_elementList; + //int m_numElements = NUM_ELEMENTS; + int m_elementNumber[NUM_ELEMENTS]; void UpdateStatusBar(); |