KiCad PCB EDA Suite
panel_attenuators.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_ATTENUATORS_H
21 #define PANEL_ATTENUATORS_H
22 
23 #include "panel_attenuators_base.h"
24 
25 #include <vector>
26 
27 class ATTENUATOR;
29 
31 {
32 public:
33  PANEL_ATTENUATORS( wxWindow* parent, wxWindowID id = wxID_ANY,
34  const wxPoint& pos = wxDefaultPosition,
35  const wxSize& size = wxDefaultSize,
36  long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
38 
40 
41  // Methods from CALCULATOR_PANEL that must be overriden
42  void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
43  void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
44  void ThemeChanged() override;
45 
46  void UpdateUI(); // Update bitmaps
47 
48  void OnAttenuatorSelection( wxCommandEvent& event ) override;
49  void SetAttenuator( unsigned aIdx );
50  void OnCalculateAttenuator( wxCommandEvent& event ) override;
54 
55 public:
57  std::vector<ATTENUATOR*> m_AttenuatorList;
58 
59 };
60 
61 #endif
void SetAttenuator(unsigned aIdx)
PANEL_ATTENUATORS(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void ThemeChanged() override
Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appr...
std::vector< ATTENUATOR * > m_AttenuatorList
void OnCalculateAttenuator(wxCommandEvent &event) override
void OnAttenuatorSelection(wxCommandEvent &event) override
Class PANEL_ATTENUATORS_BASE.
void LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
void SaveSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Save the settings from the panel.
const char * name
Definition: DXF_plotter.cpp:56
ATTENUATOR * m_CurrAttenuator
wxRadioBox * GetAttenuatorsSelector()