Power System Platform  2026w34a-beta
Loading...
Searching...
No Matches
BusForm.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 BUSFORM_H
19#define BUSFORM_H
20
21#include <wx/popupwin.h>
22#include <wx/statbmp.h>
23
24#include "ElementFormBase.h"
25struct ArcFlashData;
26class Bus;
27
28
29class BitmapPopup : public wxPopupWindow
30{
31public:
32 BitmapPopup(wxWindow* parent);
33
34 void SetBitmap(const wxBitmap& bitmap);
35
36private:
37 wxStaticBitmap* m_bitmap;
38};
39
47class BusForm : public BusFormBase
48{
49 public:
50 BusForm(wxWindow* parent, Bus* bus, wxWindow* workspace);
51 virtual ~BusForm();
52
53 protected:
54 void OnCBArcFlashConfigSelected(wxCommandEvent& event) override;
55 void OnnConfigProtectionButtonClick(wxCommandEvent& event) override;
56 void OnMouseMotionElectrodeConfig(wxMouseEvent& event) override;
57 void OnMouseEnterElectrodeConfig(wxMouseEvent& event) override;
58 void OnMouseLeaveElectrodeConfig(wxMouseEvent& event) override;
59 virtual void OnFaultTypeChoice(wxCommandEvent& event);
60 virtual void OnControlledVoltageClick(wxCommandEvent& event);
61 virtual void OnInsertFaultClick(wxCommandEvent& event);
62 virtual void OnInsertStabFaultClick(wxCommandEvent& event);
63 virtual void OnNominalVoltageChoice(wxCommandEvent& event);
64 virtual void OnButtonCancelClick(wxCommandEvent& event);
65 virtual void OnButtonOKClick(wxCommandEvent& event);
66 virtual void EnableCtrlVoltageFields(bool enable = true);
67 virtual void EnableFaultFields(bool enable = true);
68 virtual void EnableStabFaultFields(bool enable = true);
69 virtual void UpdateChoiceBoxes();
70 bool ValidateAndGetArcFlashData(ArcFlashData& data);
71 void LoadArcFlashData(const ArcFlashData& data);
72 void UpdateArcFlashEnclosureFields();
73
74 Bus* m_bus = nullptr;
75 wxWindow* m_parent = nullptr;
76 wxWindow* m_workspace = nullptr;
77 BitmapPopup* m_electrodePreview;
78};
79#endif // BUSFORM_H
Node for power elements. All others power elements are connected through this.
Definition Bus.h:135