KiCad PCB EDA Suite
panel_cable_size.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_CABLE_SIZE_H
21#define PANEL_CABLE_SIZE_H
22
24#include <vector>
25
27
29{
30public:
31 CABLE_SIZE_ENTRY( wxString aName, double aRadius_meter );
32
33 wxString m_Name;
34 double m_Radius; // stored in meters
35};
36
38{
39public:
40 PANEL_CABLE_SIZE( wxWindow* parent, wxWindowID id = wxID_ANY,
41 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
42 long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
44
45 // Methods from CALCULATOR_PANEL that must be overridden
46 void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
47 void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
48 void ThemeChanged() override{};
49
50 void OnCableSizeChange( wxCommandEvent& aEvent ) override;
51 void OnConductorResistivityChange( wxCommandEvent& aEvent ) override;
52 void OnConductorResistivity_Button( wxCommandEvent& aEvent ) override;
53 void OnConductorThermCoefChange( wxCommandEvent& aEvent ) override;
54 void OnConductorThermCoefChange_Button( wxCommandEvent& aEvent ) override;
55 void OnUpdateUnit( wxCommandEvent& aEvent ) override;
56 void OnDiameterChange( wxCommandEvent& aEvent ) override;
57 void OnAreaChange( wxCommandEvent& aEvent ) override;
58 void OnLinResistanceChange( wxCommandEvent& aEvent ) override;
59 void OnFrequencyChange( wxCommandEvent& aEvent ) override;
60 void OnAmpacityChange( wxCommandEvent& aEvent ) override;
61 void OnConductorTempChange( wxCommandEvent& aEvent ) override;
62 void OnCurrentChange( wxCommandEvent& aEvent ) override;
63 void OnLengthChange( wxCommandEvent& aEvent ) override;
64 void OnResistanceDcChange( wxCommandEvent& aEvent ) override;
65 void OnVDropChange( wxCommandEvent& aEvent ) override;
66 void OnPowerChange( wxCommandEvent& aEvent ) override;
67
68private:
69 void updateAll( double aRadius );
70 void updateApplication();
71 void printAll();
72
73private:
74 std::vector<CABLE_SIZE_ENTRY> m_entries;
75
88
90
91 // Stored in normalized units
95 double m_diameter;
97 double m_current;
98 double m_length;
99 double m_area;
106};
107
108#endif
const char * name
Definition: DXF_plotter.cpp:56
double m_Radius
CABLE_SIZE_ENTRY(wxString aName, double aRadius_meter)
wxString m_Name
Class PANEL_CABLE_SIZE_BASE.
void updateAll(double aRadius)
void OnCurrentChange(wxCommandEvent &aEvent) override
double m_conductorMaterialThermalCoef
void OnFrequencyChange(wxCommandEvent &aEvent) override
void OnResistanceDcChange(wxCommandEvent &aEvent) override
bool m_updatingConductorMaterialResitivity
void OnCableSizeChange(wxCommandEvent &aEvent) override
void OnUpdateUnit(wxCommandEvent &aEvent) override
void OnConductorResistivity_Button(wxCommandEvent &aEvent) override
void LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
void OnVDropChange(wxCommandEvent &aEvent) override
void OnConductorThermCoefChange(wxCommandEvent &aEvent) override
double m_conductorMaterialResitivity
void OnAreaChange(wxCommandEvent &aEvent) override
void OnPowerChange(wxCommandEvent &aEvent) override
void ThemeChanged() override
Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appr...
double m_conductorMaterialResitivityRef
void OnDiameterChange(wxCommandEvent &aEvent) override
void OnConductorResistivityChange(wxCommandEvent &aEvent) override
void OnConductorThermCoefChange_Button(wxCommandEvent &aEvent) override
void OnLinResistanceChange(wxCommandEvent &aEvent) override
void OnAmpacityChange(wxCommandEvent &aEvent) override
double m_conductorTemperature
void OnConductorTempChange(wxCommandEvent &aEvent) override
std::vector< CABLE_SIZE_ENTRY > m_entries
void SaveSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Save the settings from the panel.
void OnLengthChange(wxCommandEvent &aEvent) override
PANEL_CABLE_SIZE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)