KiCad PCB EDA Suite
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-2021 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 
23 #include "panel_transline_base.h"
24 #include <transline/transline.h>
25 #include "transline_ident.h"
26 
28 
29 
31 {
32 public:
33  PANEL_TRANSLINE( wxWindow* parent, wxWindowID id = wxID_ANY,
34  const wxPoint& pos = wxDefaultPosition,
35  const wxSize& size = wxDefaultSize,
36  long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
38 
39  // Methods from CALCULATOR_PANEL that must be overriden
40  void LoadSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
41  void SaveSettings( PCB_CALCULATOR_SETTINGS* aCfg ) override;
42  void ThemeChanged() override;
43 
44  // Accessors:
45  wxRadioBox* GetTranslineSelector() { return m_TranslineSelection; }
47 
54  void SetPrmValue( enum PRMS_ID aPrmId, double aValue );
55 
62  void SetResult( int aLineNumber, const wxString& aText );
63 
70  void SetPrmBgColor( enum PRMS_ID aPrmId, const KIGFX::COLOR4D* aCol );
71 
78  double GetPrmValue( enum PRMS_ID aPrmId ) const;
79 
83  bool IsPrmSelected( enum PRMS_ID aPrmId ) const;
84 
88  void OnTranslineSelection( wxCommandEvent& event ) override;
89 
93  void OnTransLineResetButtonClick( wxCommandEvent& event ) override;
94 
99  void OnTranslineAnalyse( wxCommandEvent& event ) override;
100 
105  void OnTranslineSynthetize( wxCommandEvent& event ) override;
106 
111  void OnTranslineEpsilonR_Button( wxCommandEvent& event ) override;
112 
117  void OnTranslineTanD_Button( wxCommandEvent& event ) override;
118 
123  void OnTranslineRho_Button( wxCommandEvent& event ) override;
124 
133  void TranslineTypeSelection( enum TRANSLINE_TYPE_ID aType );
134 
140 
141 private:
143  std::vector<TRANSLINE_IDENT*> m_transline_list;
144 
146 };
147 
148 #endif
void OnTranslineEpsilonR_Button(wxCommandEvent &event) override
Shows a list of current relative dielectric constant(Er) and set the selected value in main dialog fr...
TRANSLINE * m_currTransLine
enum TRANSLINE_TYPE_ID m_currTransLineType
void SetPrmValue(enum PRMS_ID aPrmId, double aValue)
Read/write params values and results.
double GetPrmValue(enum PRMS_ID aPrmId) const
Return a param value.
wxRadioBox * m_TranslineSelection
void OnTranslineAnalyse(wxCommandEvent &event) override
Run a new analyze for the current transline with current parameters and displays the electrical param...
void OnTranslineSynthetize(wxCommandEvent &event) override
Run a new synthesis for the current transline with current parameters and displays the geometrical pa...
void TransfDlgDataToTranslineParams()
Read values entered in dialog frame, and transfer these values in current transline parameters,...
void OnTranslineTanD_Button(wxCommandEvent &event) override
Show a list of current dielectric loss factor (tangent delta) and set the selected value in main dial...
PRMS_ID
Definition: transline.h:36
void SetPrmBgColor(enum PRMS_ID aPrmId, const KIGFX::COLOR4D *aCol)
Set the background color of a parameter.
Class PANEL_TRANSLINE_BASE.
void TranslineTypeSelection(enum TRANSLINE_TYPE_ID aType)
Must be called after selection of a new transline.
TRANSLINE_TYPE_ID
void OnTranslineSelection(wxCommandEvent &event) override
Called on new transmission line selection.
const char * name
Definition: DXF_plotter.cpp:56
void LoadSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Load the settings into the panel.
TRANSLINE_TYPE_ID GetCurrTransLineType()
wxRadioBox * GetTranslineSelector()
void SetResult(int aLineNumber, const wxString &aText)
Put the text into the given result line.
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 OnTranslineRho_Button(wxCommandEvent &event) override
Show a list of current Specific resistance list (rho) and set the selected value in main dialog frame...
void OnTransLineResetButtonClick(wxCommandEvent &event) override
Called when the user clicks the reset button; sets the parameters to their default values.
void SaveSettings(PCB_CALCULATOR_SETTINGS *aCfg) override
Save the settings from the panel.
void ThemeChanged() override
Update UI elements of the panel when the theme changes to ensure the images and fonts/colors are appr...
std::vector< TRANSLINE_IDENT * > m_transline_list
bool IsPrmSelected(enum PRMS_ID aPrmId) const
Function IsPrmSelected.
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103