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 (C) 1992-2023 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
92 void OnTransLineResetButtonClick( wxCommandEvent& event ) override;
93
98 void OnTranslineAnalyse( wxCommandEvent& event ) override;
99
104 void OnTranslineSynthetize( wxCommandEvent& event ) override;
105
110 void OnTranslineEpsilonR_Button( wxCommandEvent& event ) override;
111
116 void OnTranslineTanD_Button( wxCommandEvent& event ) override;
117
122 void OnTranslineRho_Button( wxCommandEvent& event ) override;
123
132 void TranslineTypeSelection( enum TRANSLINE_TYPE_ID aType );
133
139
140private:
142 std::vector<TRANSLINE_IDENT*> m_transline_list;
143
145};
146
147#endif
const char * name
Definition: DXF_plotter.cpp:57
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Class PANEL_TRANSLINE_BASE.
wxRadioBox * m_TranslineSelection
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 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 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.
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 LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
PRMS_ID
Definition: transline.h:37
TRANSLINE_TYPE_ID