KiCad PCB EDA Suite
dialog_regulator_form.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-2011 jean-pierre.charras
5  * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef DIALOG_REGULATOR_FORM_H
26 #define DIALOG_REGULATOR_FORM_H
27 
29 
31 class REGULATOR_DATA;
32 
33 
40 {
41 public:
42  DIALOG_REGULATOR_FORM( PCB_CALCULATOR_FRAME* parent, const wxString& aRegName )
43  : DIALOG_REGULATOR_FORM_BASE( parent )
44  {
45  m_textCtrlName->SetValue( aRegName );
46  m_textCtrlName->Enable( aRegName.IsEmpty() );
47  UpdateDialog();
48 
49  m_sdbSizerOK->SetDefault();
50 
51  // Now all widgets have the size fixed, call FinishDialogSettings
53  }
54 
56 
60  bool TransferDataFromWindow() override;
61 
68 
75 
79  void UpdateDialog();
80 
84  void OnRegTypeSelection( wxCommandEvent& event ) override
85  {
86  UpdateDialog();
87  }
88 };
89 
90 #endif // DIALOG_REGULATOR_FORM_H
PCB calculator the main frame.
REGULATOR_DATA * BuildRegulatorFromData()
Create a new REGULATOR_DATA from dialog data.
DIALOG_REGULATOR_FORM(PCB_CALCULATOR_FRAME *parent, const wxString &aRegName)
void UpdateDialog()
Enable/disable Iadj related widgets, according to the regulator type.
Subclass of DIALOG_REGULATOR_FORM_BASE, which is generated by wxFormBuilder.
void OnRegTypeSelection(wxCommandEvent &event) override
Called when the current regulator type is changed.
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
Class DIALOG_REGULATOR_FORM_BASE.
void CopyRegulatorDataToDialog(REGULATOR_DATA *aItem)
Transfer data from dialog to aItem.
bool TransferDataFromWindow() override