2021-10-04 08:22:34 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 1992-2021 Kicad Developers, see AUTHORS.txt for contributors.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 3
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PANEL_ATTENUATORS_H
|
|
|
|
#define PANEL_ATTENUATORS_H
|
2021-10-08 14:44:44 +00:00
|
|
|
|
2021-10-04 08:22:34 +00:00
|
|
|
#include "panel_attenuators_base.h"
|
|
|
|
|
2021-10-08 14:44:44 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2021-10-10 15:03:24 +00:00
|
|
|
class ATTENUATOR;
|
2021-10-08 14:44:44 +00:00
|
|
|
class PCB_CALCULATOR_SETTINGS;
|
2021-10-04 08:22:34 +00:00
|
|
|
|
|
|
|
class PANEL_ATTENUATORS : public PANEL_ATTENUATORS_BASE
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PANEL_ATTENUATORS( wxWindow* parent, wxWindowID id = wxID_ANY,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
|
|
|
~PANEL_ATTENUATORS();
|
|
|
|
|
2021-10-10 15:03:24 +00:00
|
|
|
wxRadioBox* GetAttenuatorsSelector() { return m_AttenuatorsSelection; }
|
2021-10-08 16:30:36 +00:00
|
|
|
|
Fix various typos
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-07-03 04:20:05 +00:00
|
|
|
// Methods from CALCULATOR_PANEL that must be overridden
|
2021-10-08 16:30:36 +00:00
|
|
|
void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
|
|
|
|
void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
|
|
|
|
void ThemeChanged() override;
|
|
|
|
|
2021-10-04 08:22:34 +00:00
|
|
|
void UpdateUI(); // Update bitmaps
|
|
|
|
|
|
|
|
void OnAttenuatorSelection( wxCommandEvent& event ) override;
|
|
|
|
void SetAttenuator( unsigned aIdx );
|
|
|
|
void OnCalculateAttenuator( wxCommandEvent& event ) override;
|
|
|
|
void TransfPanelDataToAttenuator();
|
|
|
|
void TransfAttenuatorDataToPanel();
|
|
|
|
void TransfAttenuatorResultsToPanel();
|
|
|
|
|
|
|
|
public:
|
2021-10-10 15:03:24 +00:00
|
|
|
ATTENUATOR* m_CurrAttenuator;
|
|
|
|
std::vector<ATTENUATOR*> m_AttenuatorList;
|
2021-10-04 08:22:34 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2021-10-08 14:44:44 +00:00
|
|
|
#endif
|