KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_transline.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 The 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_TRANSLINE_H
21#define PANEL_TRANSLINE_H
22
24#include <transline/transline.h>
25#include "transline_ident.h"
26
28
29
31{
32public:
33 PANEL_TRANSLINE( wxWindow* parent, wxWindowID id = wxID_ANY,
34 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
35 long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
37
38 // Methods from CALCULATOR_PANEL that must be overridden
39 void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
40 void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
41 void ThemeChanged() override;
42
43 // Accessors:
46
53 void SetPrmValue( enum PRMS_ID aPrmId, double aValue );
54
61 void SetResult( int aLineNumber, const wxString& aText );
62
69 void SetPrmBgColor( enum PRMS_ID aPrmId, const KIGFX::COLOR4D* aCol );
70
77 double GetPrmValue( enum PRMS_ID aPrmId ) const;
78
82 bool IsPrmSelected( enum PRMS_ID aPrmId ) const;
83
87 void OnTranslineSelection( wxCommandEvent& event ) override;
88
90 void OnDielectricModelChanged( wxCommandEvent& event ) override;
91
97 void OnSoldermaskChanged( wxCommandEvent& event ) override;
98
102 void OnTransLineResetButtonClick( wxCommandEvent& event ) override;
103
108 void OnTranslineAnalyse( wxCommandEvent& event ) override;
109
114 void OnTranslineSynthetize( wxCommandEvent& event ) override;
115
120 void OnTranslineEpsilonR_Button( wxCommandEvent& event ) override;
121
126 void OnTranslineTanD_Button( wxCommandEvent& event ) override;
127
132 void OnTranslineRho_Button( wxCommandEvent& event ) override;
133
142 void TranslineTypeSelection( enum TRANSLINE_TYPE_ID aType );
143
149
152
153private:
160
162 std::vector<TRANSLINE_IDENT*> m_transline_list;
163
165};
166
167#endif
const char * name
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:105
PANEL_TRANSLINE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void OnTranslineSynthetize(wxCommandEvent &event) override
Run a new synthesis for the current transline with current parameters and displays the geometrical pa...
TRANSLINE * m_currTransLine
void OnTranslineTanD_Button(wxCommandEvent &event) override
Show a list of current dielectric loss factor (tangent delta) and set the selected value in main dial...
void TranslineTypeSelection(enum TRANSLINE_TYPE_ID aType)
Must be called after selection of a new transline.
void OnDielectricModelChanged(wxCommandEvent &event) override
Called when the user picks a different dielectric-dispersion model.
void SetResult(int aLineNumber, const wxString &aText)
Put the text into the given result line.
void OnTranslineEpsilonR_Button(wxCommandEvent &event) override
Shows a list of current relative dielectric constant(Er) and set the selected value in main dialog fr...
void SetPrmBgColor(enum PRMS_ID aPrmId, const KIGFX::COLOR4D *aCol)
Set the background color of a parameter.
void updateSoldermaskEnables()
Apply the enabled state for the soldermask row based on the present checkbox and the current calculat...
void TransfDlgDataToTranslineParams()
Read values entered in dialog frame, and transfer these values in current transline parameters,...
wxRadioBox * GetTranslineSelector()
void OnTranslineSelection(wxCommandEvent &event) override
Called on new transmission line selection.
TRANSLINE_TYPE_ID GetCurrTransLineType()
std::vector< TRANSLINE_IDENT * > m_transline_list
void OnTransLineResetButtonClick(wxCommandEvent &event) override
Called when the user clicks the reset button; sets the parameters to their default values.
void SetPrmValue(enum PRMS_ID aPrmId, double aValue)
Read/write params values and results.
void ThemeChanged() override
Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appr...
void SaveSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Save the settings from the panel.
PANEL_TRANSLINE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void UpdateSpecFrequencyEnable()
Enables the Spec frequency controls only when Djordjevic-Sarkar is selected.
void OnTranslineRho_Button(wxCommandEvent &event) override
Show a list of current Specific resistance list (rho) and set the selected value in main dialog frame...
enum TRANSLINE_TYPE_ID m_currTransLineType
void OnTranslineAnalyse(wxCommandEvent &event) override
Run a new analyze for the current transline with current parameters and displays the electrical param...
bool IsPrmSelected(enum PRMS_ID aPrmId) const
Function IsPrmSelected.
double GetPrmValue(enum PRMS_ID aPrmId) const
Return a param value.
void OnSoldermaskChanged(wxCommandEvent &event) override
Called when the user toggles the soldermask checkboxes.
void LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
PRMS_ID
Definition transline.h:39
TRANSLINE_TYPE_ID