KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_tuning_patterns.cpp
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) 2023 KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * 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
23#include <bitmaps.h>
24#include <eda_draw_frame.h>
25#include <board.h>
27
29 PNS::MEANDER_SETTINGS& aTrackSettings,
30 PNS::MEANDER_SETTINGS& aDiffPairSettings,
31 PNS::MEANDER_SETTINGS& aSkewSettings ) :
33 m_track_minA( aFrame, m_track_minALabel, m_track_minACtrl, m_track_minAUnits ),
34 m_track_maxA( aFrame, m_track_maxALabel, m_track_maxACtrl, m_track_maxAUnits ),
35 m_track_spacing( aFrame, m_track_spacingLabel, m_track_spacingCtrl, m_track_spacingUnits ),
36 m_track_r( aFrame, m_track_rLabel, m_track_rCtrl, m_track_rUnits ),
37 m_dp_minA( aFrame, m_dp_minALabel, m_dp_minACtrl, m_dp_minAUnits ),
38 m_dp_maxA( aFrame, m_dp_maxALabel, m_dp_maxACtrl, m_dp_maxAUnits ),
39 m_dp_spacing( aFrame, m_dp_spacingLabel, m_dp_spacingCtrl, m_dp_spacingUnits ),
40 m_dp_r( aFrame, m_dp_rLabel, m_dp_rCtrl, m_dp_rUnits ),
41 m_skew_minA( aFrame, m_skew_minALabel, m_skew_minACtrl, m_skew_minAUnits ),
42 m_skew_maxA( aFrame, m_skew_maxALabel, m_skew_maxACtrl, m_skew_maxAUnits ),
43 m_skew_spacing( aFrame, m_skew_spacingLabel, m_skew_spacingCtrl, m_skew_spacingUnits ),
44 m_skew_r( aFrame, m_skew_rLabel, m_skew_rCtrl, m_skew_rUnits ),
45 m_trackSettings( aTrackSettings ),
46 m_dpSettings( aDiffPairSettings ),
47 m_skewSettings( aSkewSettings )
48{
49 m_singleTrackLegend->SetBitmap( KiBitmapBundle( BITMAPS::tune_single_track_length_legend ) );
50 m_diffPairLegend->SetBitmap( KiBitmapBundle( BITMAPS::tune_diff_pair_length_legend ) );
51 m_skewLegend->SetBitmap( KiBitmapBundle( BITMAPS::tune_diff_pair_skew_legend ) );
52
53 m_track_r.SetUnits( EDA_UNITS::PERCENT );
54 m_dp_r.SetUnits( EDA_UNITS::PERCENT );
55 m_skew_r.SetUnits( EDA_UNITS::PERCENT );
56}
57
58
60{
67
74
80
81 return true;
82}
83
84
86{
94
102
109
110 return true;
111}
112
113
115{
116 PNS::MEANDER_SETTINGS savedTrackSettings = m_trackSettings;
117 PNS::MEANDER_SETTINGS savedDPSettings = m_dpSettings;
118 PNS::MEANDER_SETTINGS savedSkewSettings = m_skewSettings;
119
124
125 m_trackSettings = std::move( savedTrackSettings );
126 m_dpSettings = std::move( savedDPSettings );
127 m_skewSettings = std::move( savedSkewSettings );
128}
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
Definition: bitmap.cpp:110
PNS::MEANDER_SETTINGS m_DiffPairMeanderSettings
PNS::MEANDER_SETTINGS m_SingleTrackMeanderSettings
PNS::MEANDER_SETTINGS m_SkewMeanderSettings
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:282
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:797
The base class for create windows for drawing purpose.
Class PANEL_SETUP_TUNING_PATTERNS_BASE.
PNS::MEANDER_SETTINGS & m_skewSettings
PANEL_SETUP_TUNING_PATTERNS(wxWindow *aParent, EDA_DRAW_FRAME *aFrame, PNS::MEANDER_SETTINGS &aTrackSettings, PNS::MEANDER_SETTINGS &aDiffPairSettings, PNS::MEANDER_SETTINGS &aSkewSettings)
PNS::MEANDER_SETTINGS & m_trackSettings
Dimensions for the meandering algorithm.
Definition: pns_meander.h:68
int m_minAmplitude
Maximum meandering amplitude.
Definition: pns_meander.h:82
int m_cornerRadiusPercentage
Place meanders on one side.
Definition: pns_meander.h:108
bool m_singleSided
Initial side when placing meanders at segment.
Definition: pns_meander.h:111
MEANDER_STYLE m_cornerStyle
Rounding percentage (0 - 100).
Definition: pns_meander.h:105
int m_maxAmplitude
Meandering period/spacing (see dialog picture for explanation).
Definition: pns_meander.h:85
int m_spacing
Amplitude/spacing adjustment step.
Definition: pns_meander.h:88
int GetIntValue()
Definition: unit_binder.h:127
virtual void SetUnits(EDA_UNITS aUnits)
Normally not needed (as the UNIT_BINDER inherits from the parent frame), but can be used to set to DE...
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
@ MEANDER_STYLE_ROUND
Definition: pns_meander.h:52
@ MEANDER_STYLE_CHAMFER
Definition: pns_meander.h:53