KiCad PCB EDA Suite
panel_wavelength.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-2022 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_WAVELENGTH_H
21#define PANEL_WAVELENGTH_H
22
24
26
28{
29public:
30 PANEL_WAVELENGTH( wxWindow* parent, wxWindowID id = wxID_ANY,
31 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
32 long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
34
35 // Methods from CALCULATOR_PANEL that must be overriden
36 void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
37 void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
38 void ThemeChanged() override{};
39
40 void OnFrequencyChange( wxCommandEvent& event ) override;
41 void OnPeriodChange( wxCommandEvent& event ) override;
42 void OnWavelengthVacuumChange( wxCommandEvent& event ) override;
43 void OnWavelengthMediumChange( wxCommandEvent& event ) override;
44 void OnPermittivityChange( wxCommandEvent& event ) override;
45 void OnPermeabilityChange( wxCommandEvent& event ) override;
46 void OnButtonPermittivity( wxCommandEvent& event ) override;
47
48private:
49 void update( double aFrequency );
50 void updateUnits( wxCommandEvent& aEvent ) override;
51
52 double m_permittivity = 1;
53 double m_permeability = 1;
54 double m_frequency = 1;
55
56 bool m_updatingFrequency = false;
57 bool m_updatingPeriod = false;
60 bool m_updatingSpeed = false;
61
62 bool m_updatingUI = false;
63};
64
65#endif
const char * name
Definition: DXF_plotter.cpp:56
Class PANEL_WAVELENGTH_BASE.
void LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
void OnPermittivityChange(wxCommandEvent &event) override
void updateUnits(wxCommandEvent &aEvent) override
void OnFrequencyChange(wxCommandEvent &event) override
void OnButtonPermittivity(wxCommandEvent &event) override
void OnPeriodChange(wxCommandEvent &event) override
void OnPermeabilityChange(wxCommandEvent &event) override
void OnWavelengthVacuumChange(wxCommandEvent &event) override
void OnWavelengthMediumChange(wxCommandEvent &event) override
void ThemeChanged() override
Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appr...
PANEL_WAVELENGTH(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void SaveSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Save the settings from the panel.
void update(double aFrequency)