KiCad PCB EDA Suite
panel_regulator.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KICAD, a free EDA CAD application.
3 *
4 * Copyright (C) 1992-2021 Kicad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef PANEL_REGULATOR_H
21#define PANEL_REGULATOR_H
24
26
28{
29public:
30 PANEL_REGULATOR( wxWindow* parent, wxWindowID id = wxID_ANY,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize,
33 long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
35
36
37public:
38 void OnRegulatorCalcButtonClick( wxCommandEvent& event ) override;
39 void OnRegulatorResetButtonClick( wxCommandEvent& event ) override;
40 void OnRegulTypeSelection( wxCommandEvent& event ) override;
41 void OnRegulatorSelection( wxCommandEvent& event ) override;
42 void OnDataFileSelection( wxCommandEvent& event ) override;
43 void OnAddRegulator( wxCommandEvent& event ) override;
44 void OnEditRegulator( wxCommandEvent& event ) override;
45 void OnRemoveRegulator( wxCommandEvent& event ) override;
46
47 // Methods from CALCULATOR_PANEL that must be overridden
48 void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
49 void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
50 void ThemeChanged() override;
51
58
63
64 void RegulatorsSolve();
65
72
76 const wxString GetDataFilename();
77
84 void SetDataFilename( const wxString& aFilename );
85
86 // R/W data files:
87 bool ReadDataFile();
88 bool WriteDataFile();
89
90public:
91 REGULATOR_LIST m_RegulatorList; // the list of known regulators
93 bool m_RegulatorListChanged; // Set when m_RegulatorList is modified
94 // and the corresponding file must be rewritten
95
96};
97
98#endif
const char * name
Definition: DXF_plotter.cpp:56
Class PANEL_REGULATOR_BASE.
void OnEditRegulator(wxCommandEvent &event) override
void OnRegulatorSelection(wxCommandEvent &event) override
void OnRegulatorResetButtonClick(wxCommandEvent &event) override
REGULATOR_LIST m_RegulatorList
void ThemeChanged() override
Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appr...
void Regulators_WriteConfig(PCB_CALCULATOR_SETTINGS *aCfg)
Write regulators parameters in configuration.
const wxString GetDataFilename()
void OnRegulatorCalcButtonClick(wxCommandEvent &event) override
void OnDataFileSelection(wxCommandEvent &event) override
void SetDataFilename(const wxString &aFilename)
Initialize the full filename of the selected pcb_calculator data file force the standard extension of...
void SelectLastSelectedRegulator()
If m_lastSelectedRegulatorName is empty, just calls RegulatorPageUpdate()
void OnRegulTypeSelection(wxCommandEvent &event) override
void SaveSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Save the settings from the panel.
void OnRemoveRegulator(wxCommandEvent &event) override
wxString m_lastSelectedRegulatorName
void OnAddRegulator(wxCommandEvent &event) override
PANEL_REGULATOR(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
void RegulatorPageUpdate()
Update the regulator page dialog display.
Contains structures for storage of regulator data.