diff options
-rw-r--r-- | .codelite/.tern-port | 2 | ||||
-rw-r--r-- | .codelite/PSP.session | 52 | ||||
-rw-r--r-- | .codelite/PSP.tags | bin | 82866176 -> 82896896 bytes | |||
-rw-r--r-- | .codelite/compilation.db | bin | 51200 -> 51200 bytes | |||
-rw-r--r-- | .codelite/compile_commands.json | 8 | ||||
-rw-r--r-- | .codelite/refactoring.db | bin | 1560576 -> 1619968 bytes | |||
-rw-r--r-- | Project/ElementForm.cpp | 169 | ||||
-rw-r--r-- | Project/ElementForm.h | 45 | ||||
-rw-r--r-- | Project/ElementForm.wxcp | 1589 | ||||
-rw-r--r-- | Project/GeneratorStabForm.cpp | 30 | ||||
-rw-r--r-- | Project/Load.h | 19 | ||||
-rw-r--r-- | Project/LoadForm.cpp | 43 | ||||
-rw-r--r-- | Project/LoadForm.h | 21 | ||||
-rw-r--r-- | Project/Project.mk | 2 | ||||
-rw-r--r-- | Project/Project.project | 2 | ||||
-rw-r--r-- | Project/Release/GeneratorStabForm.cpp.o | bin | 103764 -> 103823 bytes | |||
-rw-r--r-- | Project/Release/GeneratorStabForm.cpp.o.d | 8 | ||||
-rw-r--r-- | Project/Release/PSP-UFU.exe | bin | 3874012 -> 3874012 bytes |
18 files changed, 1927 insertions, 63 deletions
diff --git a/.codelite/.tern-port b/.codelite/.tern-port index f742d98..9e4ed3a 100644 --- a/.codelite/.tern-port +++ b/.codelite/.tern-port @@ -1 +1 @@ -57978
\ No newline at end of file +61283
\ No newline at end of file diff --git a/.codelite/PSP.session b/.codelite/PSP.session index bc383b3..42a6daa 100644 --- a/.codelite/PSP.session +++ b/.codelite/PSP.session @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Session Name="C:\Users\Thales\Documents\GitHub\PSP\PSP.workspace"> - <int Value="6" Name="m_selectedTab"/> + <int Value="8" Name="m_selectedTab"/> <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\PSP.workspace" Name="m_workspaceName"/> <TabInfoArray Name="TabInfoArray"> <TabInfo> @@ -32,65 +32,37 @@ <IntVector Name="CollapsedFolds"/> </TabInfo> <TabInfo> - <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\LineForm.cpp" Name="FileName"/> - <int Value="183" Name="FirstVisibleLine"/> - <int Value="158" Name="CurrentLine"/> + <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\MainFrame.cpp" Name="FileName"/> + <int Value="273" Name="FirstVisibleLine"/> + <int Value="235" Name="CurrentLine"/> <wxArrayString Name="Bookmarks"/> <IntVector Name="CollapsedFolds"/> </TabInfo> <TabInfo> - <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\LineForm.h" Name="FileName"/> + <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Load.h" Name="FileName"/> <int Value="0" Name="FirstVisibleLine"/> - <int Value="0" Name="CurrentLine"/> + <int Value="15" Name="CurrentLine"/> <wxArrayString Name="Bookmarks"/> <IntVector Name="CollapsedFolds"/> </TabInfo> <TabInfo> - <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\MainFrame.cpp" Name="FileName"/> - <int Value="213" Name="FirstVisibleLine"/> - <int Value="236" Name="CurrentLine"/> - <wxArrayString Name="Bookmarks"/> - <IntVector Name="CollapsedFolds"/> - </TabInfo> - <TabInfo> - <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\TransformerForm.cpp" Name="FileName"/> - <int Value="106" Name="FirstVisibleLine"/> + <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Line.h" Name="FileName"/> + <int Value="0" Name="FirstVisibleLine"/> <int Value="0" Name="CurrentLine"/> <wxArrayString Name="Bookmarks"/> <IntVector Name="CollapsedFolds"/> </TabInfo> <TabInfo> - <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\TransformerForm.h" Name="FileName"/> + <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\LoadForm.h" Name="FileName"/> <int Value="0" Name="FirstVisibleLine"/> - <int Value="21" Name="CurrentLine"/> - <wxArrayString Name="Bookmarks"/> - <IntVector Name="CollapsedFolds"/> - </TabInfo> - <TabInfo> - <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Transformer.h" Name="FileName"/> - <int Value="45" Name="FirstVisibleLine"/> - <int Value="53" Name="CurrentLine"/> + <int Value="17" Name="CurrentLine"/> <wxArrayString Name="Bookmarks"/> <IntVector Name="CollapsedFolds"/> </TabInfo> <TabInfo> - <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Transformer.cpp" Name="FileName"/> + <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\LoadForm.cpp" Name="FileName"/> <int Value="0" Name="FirstVisibleLine"/> - <int Value="5" Name="CurrentLine"/> - <wxArrayString Name="Bookmarks"/> - <IntVector Name="CollapsedFolds"/> - </TabInfo> - <TabInfo> - <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Line.h" Name="FileName"/> - <int Value="33" Name="FirstVisibleLine"/> - <int Value="56" Name="CurrentLine"/> - <wxArrayString Name="Bookmarks"/> - <IntVector Name="CollapsedFolds"/> - </TabInfo> - <TabInfo> - <wxString Value="C:\Users\Thales\Documents\GitHub\PSP\Project\Line.cpp" Name="FileName"/> - <int Value="304" Name="FirstVisibleLine"/> - <int Value="329" Name="CurrentLine"/> + <int Value="14" Name="CurrentLine"/> <wxArrayString Name="Bookmarks"/> <IntVector Name="CollapsedFolds"/> </TabInfo> diff --git a/.codelite/PSP.tags b/.codelite/PSP.tags Binary files differindex 67ea337..b369a8c 100644 --- a/.codelite/PSP.tags +++ b/.codelite/PSP.tags diff --git a/.codelite/compilation.db b/.codelite/compilation.db Binary files differindex e97ed34..dfd67c4 100644 --- a/.codelite/compilation.db +++ b/.codelite/compilation.db diff --git a/.codelite/compile_commands.json b/.codelite/compile_commands.json index ba59d01..6844a5f 100644 --- a/.codelite/compile_commands.json +++ b/.codelite/compile_commands.json @@ -1,9 +1,9 @@ [{ "directory": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project", - "command": "C:/TDM-GCC-64/bin/g++.exe -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.1.0/lib/gcc_dll/mswu -IC:/wxWidgets-3.1.0/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -std=c++11 -DNDEBUG -DUNICODE -I. -I. -MG -MP -MT./Release/MainFrame.cpp.o -MF./Release/MainFrame.cpp.o.d -MM MainFrame.cpp", - "file": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project\\MainFrame.cpp" + "command": "C:/TDM-GCC-64/bin/g++.exe -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.1.0/lib/gcc_dll/mswu -IC:/wxWidgets-3.1.0/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -std=c++11 -DNDEBUG -DUNICODE -I. -I. -MG -MP -MT./Release/GeneratorStabForm.cpp.o -MF./Release/GeneratorStabForm.cpp.o.d -MM GeneratorStabForm.cpp", + "file": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project\\GeneratorStabForm.cpp" }, { "directory": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project", - "command": "C:/TDM-GCC-64/bin/g++.exe -c C:/Users/Thales/Documents/GitHub/PSP/Project/MainFrame.cpp -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.1.0/lib/gcc_dll/mswu -IC:/wxWidgets-3.1.0/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -std=c++11 -DNDEBUG -DUNICODE -o ./Release/MainFrame.cpp.o -I. -I.", - "file": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project\\MainFrame.cpp" + "command": "C:/TDM-GCC-64/bin/g++.exe -c C:/Users/Thales/Documents/GitHub/PSP/Project/GeneratorStabForm.cpp -O2 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:/wxWidgets-3.1.0/lib/gcc_dll/mswu -IC:/wxWidgets-3.1.0/include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -std=c++11 -DNDEBUG -DUNICODE -o ./Release/GeneratorStabForm.cpp.o -I. -I.", + "file": "C:\\Users\\Thales\\Documents\\GitHub\\PSP\\Project\\GeneratorStabForm.cpp" }]
\ No newline at end of file diff --git a/.codelite/refactoring.db b/.codelite/refactoring.db Binary files differindex db76a0b..d04020c 100644 --- a/.codelite/refactoring.db +++ b/.codelite/refactoring.db diff --git a/Project/ElementForm.cpp b/Project/ElementForm.cpp index 7605d52..ca633f0 100644 --- a/Project/ElementForm.cpp +++ b/Project/ElementForm.cpp @@ -2121,3 +2121,172 @@ SwitchingFormBase::~SwitchingFormBase() m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnCancelButtonClick), NULL, this); } + +LoadFormBase::LoadFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) + : wxDialog(parent, id, title, pos, size, style) +{ + if ( !bBitmapLoaded ) { + // We need to initialise the default bitmap handler + wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); + wxC9EE9InitBitmapResources(); + bBitmapLoaded = true; + } + + wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL); + this->SetSizer(boxSizerLvl1_1); + + m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT); + m_notebook->SetName(wxT("m_notebook")); + + boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5)); + + m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL); + m_notebook->AddPage(m_panelGeneral, _("General"), false); + + wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL); + m_panelGeneral->SetSizer(boxSizerLvl2_1); + + m_staticTextName = new wxStaticText(m_panelGeneral, wxID_ANY, _("Name"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl2_1->Add(m_staticTextName, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_textCtrlName = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlName->SetHint(wxT("")); + #endif + + 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_staticTextActivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Active power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl4_1->Add(m_staticTextActivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlActivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlActivePower->SetHint(wxT("")); + #endif + + boxSizerLvl5_1->Add(m_textCtrlActivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxArrayString m_choiceActivePowerArr; + m_choiceActivePowerArr.Add(wxT("p.u.")); + m_choiceActivePowerArr.Add(wxT("W")); + m_choiceActivePowerArr.Add(wxT("kW")); + m_choiceActivePowerArr.Add(wxT("MW")); + m_choiceActivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceActivePowerArr, 0); + m_choiceActivePower->SetSelection(3); + + boxSizerLvl5_1->Add(m_choiceActivePower, 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_staticTextReactivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Reactive power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl4_2->Add(m_staticTextReactivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl4_2->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlReactivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlReactivePower->SetHint(wxT("")); + #endif + + boxSizerLvl5_2->Add(m_textCtrlReactivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxArrayString m_choiceReactivePowerArr; + m_choiceReactivePowerArr.Add(wxT("p.u.")); + m_choiceReactivePowerArr.Add(wxT("VAr")); + m_choiceReactivePowerArr.Add(wxT("kVAr")); + m_choiceReactivePowerArr.Add(wxT("MVAr")); + m_choiceReactivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceReactivePowerArr, 0); + m_choiceReactivePower->SetSelection(3); + + boxSizerLvl5_2->Add(m_choiceReactivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5)); + + m_staticTextType = new wxStaticText(m_panelGeneral, wxID_ANY, _("Load type"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl2_1->Add(m_staticTextType, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxArrayString m_choiceTypeArr; + m_choiceTypeArr.Add(wxT("Constant power")); + m_choiceTypeArr.Add(wxT("Constant impedance")); + m_choiceType = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceTypeArr, 0); + m_choiceType->SetSelection(0); + + boxSizerLvl2_1->Add(m_choiceType, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5)); + + m_buttonStabButton = new wxButton(this, wxID_ANY, _("Stability"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0); + + boxSizerBottomButtons->Add(m_buttonStabButton, 0, wxALL|wxALIGN_LEFT, WXC_FROM_DIP(5)); + + boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5)); + + m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0); + + boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); + + m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0); + + boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); + + + #if wxVERSION_NUMBER >= 2900 + if(!wxPersistenceManager::Get().Find(m_notebook)){ + wxPersistenceManager::Get().RegisterAndRestore(m_notebook); + } else { + wxPersistenceManager::Get().Restore(m_notebook); + } + #endif + + SetName(wxT("LoadFormBase")); + SetSize(-1,-1); + if (GetSizer()) { + GetSizer()->Fit(this); + } + if(GetParent()) { + CentreOnParent(wxBOTH); + } else { + CentreOnScreen(wxBOTH); + } +#if wxVERSION_NUMBER >= 2900 + if(!wxPersistenceManager::Get().Find(this)) { + wxPersistenceManager::Get().RegisterAndRestore(this); + } else { + wxPersistenceManager::Get().Restore(this); + } +#endif + // Connect events + m_buttonStabButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnStabilityButtonClick), NULL, this); + m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnOnButtonClick), NULL, this); + m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnCancelButtonClick), NULL, this); + +} + +LoadFormBase::~LoadFormBase() +{ + m_buttonStabButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnStabilityButtonClick), NULL, this); + m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnOnButtonClick), NULL, this); + m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnCancelButtonClick), NULL, this); + +} diff --git a/Project/ElementForm.h b/Project/ElementForm.h index bbbffd3..8e53507 100644 --- a/Project/ElementForm.h +++ b/Project/ElementForm.h @@ -589,4 +589,49 @@ public: virtual ~SwitchingFormBase(); }; + +class LoadFormBase : public wxDialog +{ +protected: + wxNotebook* m_notebook; + wxPanel* m_panelGeneral; + wxStaticText* m_staticTextName; + wxTextCtrl* m_textCtrlName; + wxStaticText* m_staticTextActivePower; + wxTextCtrl* m_textCtrlActivePower; + wxChoice* m_choiceActivePower; + wxStaticText* m_staticTextReactivePower; + wxTextCtrl* m_textCtrlReactivePower; + wxChoice* m_choiceReactivePower; + wxStaticText* m_staticTextType; + wxChoice* m_choiceType; + wxButton* m_buttonStabButton; + wxButton* m_buttonOK; + wxButton* m_ButtonCancel; + +protected: + virtual void OnStabilityButtonClick(wxCommandEvent& event) { event.Skip(); } + virtual void OnOnButtonClick(wxCommandEvent& event) { event.Skip(); } + virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); } + +public: + wxStaticText* GetStaticTextName() { return m_staticTextName; } + wxTextCtrl* GetTextCtrlName() { return m_textCtrlName; } + wxStaticText* GetStaticTextActivePower() { return m_staticTextActivePower; } + wxTextCtrl* GetTextCtrlActivePower() { return m_textCtrlActivePower; } + wxChoice* GetChoiceActivePower() { return m_choiceActivePower; } + wxStaticText* GetStaticTextReactivePower() { return m_staticTextReactivePower; } + wxTextCtrl* GetTextCtrlReactivePower() { return m_textCtrlReactivePower; } + wxChoice* GetChoiceReactivePower() { return m_choiceReactivePower; } + wxStaticText* GetStaticTextType() { return m_staticTextType; } + wxChoice* GetChoiceType() { return m_choiceType; } + wxPanel* GetPanelGeneral() { return m_panelGeneral; } + wxNotebook* GetNotebook() { return m_notebook; } + wxButton* GetButtonStabButton() { return m_buttonStabButton; } + wxButton* GetButtonOK() { return m_buttonOK; } + wxButton* GetButtonCancel() { return m_ButtonCancel; } + LoadFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Load"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE); + virtual ~LoadFormBase(); +}; + #endif diff --git a/Project/ElementForm.wxcp b/Project/ElementForm.wxcp index 37c1447..8c10b27 100644 --- a/Project/ElementForm.wxcp +++ b/Project/ElementForm.wxcp @@ -1,7 +1,7 @@ { "metadata": { "m_generatedFilesDir": ".", - "m_objCounter": 1121, + "m_objCounter": 1268, "m_includeFiles": [], "m_bitmapFunction": "wxC9EE9InitBitmapResources", "m_bitmapsFile": "ElementFormBitmaps.cpp", @@ -23084,5 +23084,1592 @@ }] }] }] + }, { + "m_type": 4421, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxDEFAULT_DIALOG_STYLE"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "LoadFormBase" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Enable Window Persistency:", + "m_value": true + }, { + "type": "string", + "m_label": "Title:", + "m_value": "Load" + }, { + "type": "virtualFolderPicker", + "m_label": "Virtual Folder:", + "m_path": "Project:wxcrafter" + }, { + "type": "choice", + "m_label": "Centre:", + "m_selection": 1, + "m_options": ["", "wxBOTH", "wxVERTICAL", "wxHORIZONTAL"] + }, { + "type": "string", + "m_label": "Inherited Class", + "m_value": "LoadForm" + }, { + "type": "string", + "m_label": "File:", + "m_value": "LoadForm" + }, { + "type": "string", + "m_label": "Class Decorator", + "m_value": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (16x16) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (32x32) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (64x64) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (128x128):", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (256x256):", + "m_path": "" + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl1_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4442, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxBK_DEFAULT"], + "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_notebook" + }, { + "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": "" + }], + "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_panelGeneral" + }, { + "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": "General" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "bool", + "m_label": "Selected", + "m_value": false + }, { + "type": "bool", + "m_label": "Null Page", + "m_value": false + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl2_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextName" + }, { + "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": "Name" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4406, + "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": "300,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlName" + }, { + "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": 4452, + "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": "gridSizerLvl3_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "# Columns:", + "m_value": "2" + }, { + "type": "string", + "m_label": "# Rows:", + "m_value": "0" + }, { + "type": "string", + "m_label": "Horizontal gap:", + "m_value": "0" + }, { + "type": "string", + "m_label": "Vertical gap:", + "m_value": "0" + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextActivePower" + }, { + "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": "Active power" + }, { + "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_textCtrlActivePower" + }, { + "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_choiceActivePower" + }, { + "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.;W;kW;MW" + }, { + "type": "string", + "m_label": "Selection:", + "m_value": "3" + }], + "m_events": [], + "m_children": [] + }] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_2" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 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_staticTextReactivePower" + }, { + "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": "Reactive power" + }, { + "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_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_textCtrlReactivePower" + }, { + "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_choiceReactivePower" + }, { + "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.;VAr;kVAr;MVAr" + }, { + "type": "string", + "m_label": "Selection:", + "m_value": "3" + }], + "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_staticTextType" + }, { + "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": "Load 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"], + "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_choiceType" + }, { + "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": "Constant power;Constant impedance" + }, { + "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": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerBottomButtons" + }, { + "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": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_LEFT"], + "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_buttonStabButton" + }, { + "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": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnStabilityButtonClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }, { + "m_type": 4454, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "string", + "m_label": "Name:", + "m_value": "Spacer_1" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "0,0" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_buttonOK" + }, { + "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": "OK" + }, { + "type": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnOnButtonClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }, { + "m_type": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_ButtonCancel" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Cancel" + }, { + "type": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnCancelButtonClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }] + }] + }] }] }
\ No newline at end of file diff --git a/Project/GeneratorStabForm.cpp b/Project/GeneratorStabForm.cpp index 2b0f226..a5f2098 100644 --- a/Project/GeneratorStabForm.cpp +++ b/Project/GeneratorStabForm.cpp @@ -11,8 +11,8 @@ GeneratorStabForm::GeneratorStabForm(wxWindow* parent, SyncGenerator* syncGenera m_checkBoxPlotSyncMachine->SetValue(data.plotSyncMachine); - m_textCtrlInertia->SetValue(wxString::FromDouble(data.inertia)); - m_textCtrlDamping->SetValue(wxString::FromDouble(data.damping)); + m_textCtrlInertia->SetValue(SyncGenerator::StringFromDouble(data.inertia)); + m_textCtrlDamping->SetValue(SyncGenerator::StringFromDouble(data.damping)); m_checkBoxUseAVR->SetValue(data.useAVR); m_buttonEditAVR->Enable(data.useAVR); @@ -20,22 +20,22 @@ GeneratorStabForm::GeneratorStabForm(wxWindow* parent, SyncGenerator* syncGenera m_checkBoxUseSG->SetValue(data.useSpeedGovernor); m_buttonEditSG->Enable(data.useSpeedGovernor); - m_textCtrlRa->SetValue(wxString::FromDouble(data.armResistance)); - m_textCtrlXp->SetValue(wxString::FromDouble(data.potierReactance)); - m_textCtrlSat->SetValue(wxString::FromDouble(data.satFactor)); + m_textCtrlRa->SetValue(SyncGenerator::StringFromDouble(data.armResistance)); + m_textCtrlXp->SetValue(SyncGenerator::StringFromDouble(data.potierReactance)); + m_textCtrlSat->SetValue(SyncGenerator::StringFromDouble(data.satFactor)); - m_textCtrlSyncXd->SetValue(wxString::FromDouble(data.syncXd)); - m_textCtrlSyncXq->SetValue(wxString::FromDouble(data.syncXq)); + m_textCtrlSyncXd->SetValue(SyncGenerator::StringFromDouble(data.syncXd)); + m_textCtrlSyncXq->SetValue(SyncGenerator::StringFromDouble(data.syncXq)); - m_textCtrlTranXd->SetValue(wxString::FromDouble(data.transXd)); - m_textCtrlTranXq->SetValue(wxString::FromDouble(data.transXq)); - m_textCtrlTranTd0->SetValue(wxString::FromDouble(data.transTd0)); - m_textCtrlTranTq0->SetValue(wxString::FromDouble(data.transTq0)); + m_textCtrlTranXd->SetValue(SyncGenerator::StringFromDouble(data.transXd)); + m_textCtrlTranXq->SetValue(SyncGenerator::StringFromDouble(data.transXq)); + m_textCtrlTranTd0->SetValue(SyncGenerator::StringFromDouble(data.transTd0)); + m_textCtrlTranTq0->SetValue(SyncGenerator::StringFromDouble(data.transTq0)); - m_textCtrlSubXd->SetValue(wxString::FromDouble(data.subXd)); - m_textCtrlSubXq->SetValue(wxString::FromDouble(data.subXq)); - m_textCtrlSubTd0->SetValue(wxString::FromDouble(data.subTd0)); - m_textCtrlSubTq0->SetValue(wxString::FromDouble(data.subTq0)); + m_textCtrlSubXd->SetValue(SyncGenerator::StringFromDouble(data.subXd)); + m_textCtrlSubXq->SetValue(SyncGenerator::StringFromDouble(data.subXq)); + m_textCtrlSubTd0->SetValue(SyncGenerator::StringFromDouble(data.subTd0)); + m_textCtrlSubTq0->SetValue(SyncGenerator::StringFromDouble(data.subTq0)); } GeneratorStabForm::~GeneratorStabForm() {} diff --git a/Project/Load.h b/Project/Load.h index fcdaa6b..d1c0e04 100644 --- a/Project/Load.h +++ b/Project/Load.h @@ -3,6 +3,22 @@ #include "Shunt.h" +enum LoadType +{ + CONST_POWER = 0, + CONST_IMPEDANCE +}; + +struct LoadElectricalData +{ + wxString name; + double activePower = 100.0; + ElectricalUnit activePowerUnit = UNIT_MW; + double reactivePower = 0.0; + ElectricalUnit reactivePower = UNIT_MVAr; + LoadType loadType = CONST_POWER; +}; + class Load : public Shunt { public: @@ -13,9 +29,12 @@ class Load : public Shunt virtual void Draw(wxPoint2DDouble translation, double scale) const; virtual void Rotate(bool clockwise = true); virtual bool GetContextMenu(wxMenu& menu); + LoadElectricalData GetElectricalData() { return m_electricalData } + void SetElectricalData(LoadElectricalData electricalData) { m_electricalData = electricalData; } private: std::vector<wxPoint2DDouble> m_triangPts; + LoadElectricalData m_electricalData; }; #endif // LOAD_H diff --git a/Project/LoadForm.cpp b/Project/LoadForm.cpp new file mode 100644 index 0000000..3b7a926 --- /dev/null +++ b/Project/LoadForm.cpp @@ -0,0 +1,43 @@ +#include "LoadForm.h" +#include "Load.h" + +LoadForm::LoadForm(wxWindow* parent, Load* load) + : LoadFormBase(parent) +{ + LoadElectricalData data = load->GetElectricalData(); + + m_textCtrlName->SetValue(data.name); + + m_textCtrlActivePower->SetValue(Load::StringFromDouble(data.activePower)); + switch(data.activePowerUnit) { + case UNIT_PU: { + m_choiceActivePower->SetSelection(0); + } + case UNIT_W: { + m_choiceActivePower->SetSelection(1); + } + case UNIT_kW: { + m_choiceActivePower->SetSelection(2); + } + case UNIT_MW: { + m_choiceActivePower->SetSelection(3); + } + } + + m_parent = parent; + m_load = load; +} + +LoadForm::~LoadForm() +{ +} + +void LoadForm::OnCancelButtonClick(wxCommandEvent& event) +{ +} +void LoadForm::OnOnButtonClick(wxCommandEvent& event) +{ +} +void LoadForm::OnStabilityButtonClick(wxCommandEvent& event) +{ +} diff --git a/Project/LoadForm.h b/Project/LoadForm.h new file mode 100644 index 0000000..ae3f92f --- /dev/null +++ b/Project/LoadForm.h @@ -0,0 +1,21 @@ +#ifndef LOADFORM_H +#define LOADFORM_H +#include "ElementForm.h" + +class Load; + +class LoadForm : public LoadFormBase +{ +public: + LoadForm(wxWindow* parent, Load* load); + virtual ~LoadForm(); + +protected: + virtual void OnCancelButtonClick(wxCommandEvent& event); + virtual void OnOnButtonClick(wxCommandEvent& event); + virtual void OnStabilityButtonClick(wxCommandEvent& event); + + wxWindow* m_parent; + Load* m_load; +}; +#endif // LOADFORM_H diff --git a/Project/Project.mk b/Project/Project.mk index 7d2eaa2..4f32566 100644 --- a/Project/Project.mk +++ b/Project/Project.mk @@ -13,7 +13,7 @@ CurrentFileName := CurrentFilePath := CurrentFileFullPath := User :=Thales -Date :=18/10/2016 +Date :=20/10/2016 CodeLitePath :="C:/Program Files/CodeLite" LinkerName :=C:/TDM-GCC-64/bin/g++.exe SharedObjectLinkerName :=C:/TDM-GCC-64/bin/g++.exe -shared -fPIC diff --git a/Project/Project.project b/Project/Project.project index 3d1a3e1..d6a5b66 100644 --- a/Project/Project.project +++ b/Project/Project.project @@ -38,6 +38,7 @@ <File Name="LineForm.cpp"/> <File Name="SwitchingForm.cpp"/> <File Name="TransformerForm.cpp"/> + <File Name="LoadForm.cpp"/> </VirtualDirectory> </VirtualDirectory> <File Name="main.cpp"/> @@ -73,6 +74,7 @@ <File Name="LineForm.h"/> <File Name="SwitchingForm.h"/> <File Name="TransformerForm.h"/> + <File Name="LoadForm.h"/> </VirtualDirectory> </VirtualDirectory> </VirtualDirectory> diff --git a/Project/Release/GeneratorStabForm.cpp.o b/Project/Release/GeneratorStabForm.cpp.o Binary files differindex ecbe212..5dd2b53 100644 --- a/Project/Release/GeneratorStabForm.cpp.o +++ b/Project/Release/GeneratorStabForm.cpp.o diff --git a/Project/Release/GeneratorStabForm.cpp.o.d b/Project/Release/GeneratorStabForm.cpp.o.d index f05eeac..ea12500 100644 --- a/Project/Release/GeneratorStabForm.cpp.o.d +++ b/Project/Release/GeneratorStabForm.cpp.o.d @@ -225,7 +225,9 @@ Release/GeneratorStabForm.cpp.o: GeneratorStabForm.cpp \ 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 + C:/wxWidgets-3.1.0/include/wx/msw/menu.h \ + C:/wxWidgets-3.1.0/include/wx/log.h \ + C:/wxWidgets-3.1.0/include/wx/generic/logg.h GeneratorStabForm.h: @@ -694,3 +696,7 @@ 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/log.h: + +C:/wxWidgets-3.1.0/include/wx/generic/logg.h: diff --git a/Project/Release/PSP-UFU.exe b/Project/Release/PSP-UFU.exe Binary files differindex 417014e..b032882 100644 --- a/Project/Release/PSP-UFU.exe +++ b/Project/Release/PSP-UFU.exe |