Power System Platform  2026w10a-beta
Loading...
Searching...
No Matches
MainFrame.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef MAINFRAME_H
19#define MAINFRAME_H
20
21#include <wx/menu.h>
22#include <wx/msgdlg.h>
23#include <wx/filedlg.h>
24#include <wx/msgout.h>
25//#include <wx/glcanvas.h>
26
27#include "MainFrameBase.h"
28
29class MainFrameBase;
30class wxRibbonMetroArtProvider;
31class Workspace;
32class FileHanding;
35class PropertiesData;
36class ChartView;
37class DataReport;
38class AboutForm;
39class ImportForm;
41
42enum {
43 ID_ADDMENU_BUS = 20000,
44 ID_ADDMENU_LINE,
45 ID_ADDMENU_TRANSFORMER,
46 ID_ADDMENU_GENERATOR,
47 ID_ADDMENU_LOAD,
48 ID_ADDMENU_CAPACITOR,
49 ID_ADDMENU_INDUCTOR,
50 ID_ADDMENU_INDMOTOR,
51 ID_ADDMENU_SYNCCOMP,
52 ID_ADDMENU_HARMCURRENT,
53 ID_ADDMENU_EMTELEMENT,
54 ID_ADDMENU_TEXT,
55
56 ID_STABMENU_LIST,
57
58 ID_SNAPSHOTMENU_LIST
59};
60
69{
70 public:
75 MainFrame();
82 MainFrame(wxWindow* parent, wxLocale* locale, PropertiesData* initProperties, wxString openPath = "");
83
87 ~MainFrame();
88
89 int RunPSPTest();
90
91 protected:
92 virtual void OnLabelMngrClick(wxRibbonButtonBarEvent& event);
93 virtual void OnSnapshotDropdown(wxRibbonButtonBarEvent& event);
94 virtual void OnProjectSettingsClick(wxRibbonButtonBarEvent& event);
95 virtual void OnNotebookPageChanged(wxAuiNotebookEvent& event);
96 virtual void OnHeatmapClick(wxRibbonButtonBarEvent& event);
97 virtual void OnClose(wxCloseEvent& event);
98 virtual void OnStabilityDropdown(wxRibbonButtonBarEvent& event);
99 virtual void OnFreqResponseClick(wxRibbonButtonBarEvent& event);
100 virtual void OnHarmDistortionsClick(wxRibbonButtonBarEvent& event);
101 virtual void OnGeneralSettingsClick(wxRibbonButtonBarEvent& event);
102 virtual void OnSimulationSettingsClick(wxRibbonButtonBarEvent& event);
103 virtual void OnRotClockClick(wxRibbonButtonBarEvent& event);
104 virtual void OnRotCounterClockClick(wxRibbonButtonBarEvent& event);
105 virtual void NotebookPageClosed(wxAuiNotebookEvent& event);
106 virtual void NotebookPageClosing(wxAuiNotebookEvent& event);
107 virtual void OnAboutClick(wxRibbonButtonBarEvent& event);
108 virtual void OnAddElementDropdown(wxRibbonButtonBarEvent& event);
109 virtual void OnChartsClick(wxRibbonButtonBarEvent& event);
110 virtual void OnCloseClick(wxRibbonButtonBarEvent& event);
111 virtual void OnCopyClick(wxRibbonButtonBarEvent& event);
112 virtual void OnDataReportClick(wxRibbonButtonBarEvent& event);
113 virtual void OnDeleteClick(wxRibbonButtonBarEvent& event);
114 virtual void OnDisableSolutionClick(wxRibbonButtonBarEvent& event);
115 virtual void OnDragClick(wxRibbonButtonBarEvent& event);
116 virtual void OnEnableSolutionClick(wxRibbonButtonBarEvent& event);
117 virtual void OnExitClick(wxRibbonButtonBarEvent& event) { this->Close(); };
118 //virtual void OnExpImpClick(wxRibbonButtonBarEvent& event);
119 virtual void OnFaultClick(wxRibbonButtonBarEvent& event);
120 virtual void OnFitClick(wxRibbonButtonBarEvent& event);
121 virtual void OnMoveClick(wxRibbonButtonBarEvent& event);
122 virtual void OnOpenClick(wxRibbonButtonBarEvent& event);
123 virtual void OnPSPGuideClick(wxRibbonButtonBarEvent& event);
124 virtual void OnPasteClick(wxRibbonButtonBarEvent& event);
125 virtual void OnPowerFlowClick(wxRibbonButtonBarEvent& event);
126 virtual void OnRedoClick(wxRibbonButtonBarEvent& event);
127 virtual void OnResetVoltagesClick(wxRibbonButtonBarEvent& event);
128 virtual void OnRunStabilityClick(wxRibbonButtonBarEvent& event);
129 virtual void OnSCPowerClick(wxRibbonButtonBarEvent& event);
130 virtual void OnSaveAsClick(wxRibbonButtonBarEvent& event);
131 virtual void OnSaveClick(wxRibbonButtonBarEvent& event);
132 virtual void OnSnapshotClick(wxRibbonButtonBarEvent& event);
133 virtual void OnUndoClick(wxRibbonButtonBarEvent& event);
134 virtual void OnNewClick(wxRibbonButtonBarEvent& event);
135 virtual void OnImportClick(wxRibbonButtonBarEvent& event);
136
137 std::vector<Workspace*> m_workspaceList;
138 int m_projectNumber = 1;
139
140 wxRibbonMetroArtProvider* m_artMetro = nullptr;
141 wxMenu* m_addElementsMenu = nullptr;
142 wxMenu* m_stabilityMenu = nullptr;
143 wxMenu* m_snapshotMenu = nullptr;
144 wxLocale* m_locale = nullptr;
145 PropertiesData* m_generalProperties = nullptr;
146 //wxGLContext* m_sharedGLContext = nullptr;
147
148 void Init();
149 void EnableCurrentProjectRibbon(bool enable = true);
150 void CreateDropdownMenus();
151
152 void OnAddElementsClick(wxCommandEvent& event);
153 void OnStabilityMenuClick(wxCommandEvent& event);
154 void OnSnapshotMenuClick(wxCommandEvent& event);
155};
156
157#endif // MAINFRAME_H
Form to show some informations.
Definition AboutForm.h:33
This class is responsible to manage the charts generated in the transient electromechanical studies.
Definition ChartView.h:49
Form that shows the results of power flow and fault calculations.
Definition DataReport.h:34
Save and opens the projects created on disk.
Definition FileHanding.h:43
Form to edit the software's general data.
Form to import other programs files to PSP.
Definition ImportForm.h:53
Main frame of the program. This class manage the ribbon menu and the notebook behavior.
Definition MainFrame.h:69
~MainFrame()
Default destructor.
Definition MainFrame.cpp:82
MainFrame()
Default constructor.
Definition MainFrame.cpp:49
General and simulation data manager.
Form to edit the simulation data.
This class manages the graphical and power elements. It is responsible for handling the user's intera...
Definition Workspace.h:103