Browse Source
Separate meander settings from target length/skew.
Separate meander settings from target length/skew.
Settings move to Board Setup, while target length is sourced from the custom rules (or a text-entry dialog if no rules are active for the track). Target skew is sourced from the coupled-trace-length minus the trace-to-be-tuned length. Fixes https://gitlab.com/kicad/code/kicad/-/issues/12075 Fixes https://gitlab.com/kicad/code/kicad/-/issues/15826newinvert
24 changed files with 6239 additions and 83 deletions
-
3common/dialogs/dialog_unit_entry.cpp
-
5include/board_design_settings.h
-
2include/dialogs/dialog_unit_entry.h
-
8pcbnew/CMakeLists.txt
-
68pcbnew/board_design_settings.cpp
-
20pcbnew/dialogs/dialog_board_setup.cpp
-
1pcbnew/dialogs/dialog_board_setup.h
-
90pcbnew/dialogs/dialog_meander_properties.cpp
-
54pcbnew/dialogs/dialog_meander_properties.h
-
157pcbnew/dialogs/dialog_meander_properties_base.cpp
-
1227pcbnew/dialogs/dialog_meander_properties_base.fbp
-
71pcbnew/dialogs/dialog_meander_properties_base.h
-
110pcbnew/dialogs/panel_setup_meanders.cpp
-
66pcbnew/dialogs/panel_setup_meanders.h
-
408pcbnew/dialogs/panel_setup_meanders_base.cpp
-
3782pcbnew/dialogs/panel_setup_meanders_base.fbp
-
104pcbnew/dialogs/panel_setup_meanders_base.h
-
110pcbnew/router/length_tuner_tool.cpp
-
4pcbnew/router/length_tuner_tool.h
-
8pcbnew/router/pns_meander_skew_placer.cpp
-
1pcbnew/router/pns_meander_skew_placer.h
-
12pcbnew/toolbars_pcb_editor.cpp
-
10pcbnew/tools/pcb_actions.cpp
-
1pcbnew/tools/pcb_actions.h
@ -0,0 +1,90 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
#include "dialog_meander_properties.h"
|
|||
#include <router/pns_meander_placer.h>
|
|||
#include <widgets/text_ctrl_eval.h>
|
|||
#include <bitmaps.h>
|
|||
#include <eda_draw_frame.h>
|
|||
|
|||
DIALOG_MEANDER_PROPERTIES::DIALOG_MEANDER_PROPERTIES( EDA_DRAW_FRAME* aFrame, |
|||
PNS::MEANDER_SETTINGS& aSettings, |
|||
PNS::ROUTER_MODE aMeanderType ) : |
|||
DIALOG_MEANDER_PROPERTIES_BASE( aFrame ), |
|||
m_minA( aFrame, m_track_minALabel, m_minACtrl, m_minAUnits ), |
|||
m_maxA( aFrame, m_maxALabel, m_maxACtrl, m_maxAUnits ), |
|||
m_spacing( aFrame, m_spacingLabel, m_spacingCtrl, m_spacingUnits ), |
|||
m_r( aFrame, m_rLabel, m_rCtrl, m_rUnits ), |
|||
m_settings( aSettings ) |
|||
{ |
|||
m_r.SetUnits( EDA_UNITS::PERCENT ); |
|||
|
|||
switch( aMeanderType ) |
|||
{ |
|||
case PNS::PNS_MODE_TUNE_SINGLE: |
|||
m_legend->SetBitmap( KiBitmap( BITMAPS::tune_single_track_length_legend ) ); |
|||
break; |
|||
|
|||
case PNS::PNS_MODE_TUNE_DIFF_PAIR: |
|||
m_legend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_length_legend ) ); |
|||
m_r.Enable( false ); |
|||
break; |
|||
|
|||
case PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW: |
|||
m_legend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_skew_legend ) ); |
|||
break; |
|||
|
|||
default: |
|||
break; |
|||
} |
|||
|
|||
// Bitmap has a new size, so recalculate sizes
|
|||
GetSizer()->SetSizeHints(this); |
|||
SetupStandardButtons(); |
|||
|
|||
GetSizer()->SetSizeHints(this); |
|||
Centre(); |
|||
} |
|||
|
|||
|
|||
bool DIALOG_MEANDER_PROPERTIES::TransferDataToWindow() |
|||
{ |
|||
m_minA.SetValue( m_settings.m_minAmplitude ); |
|||
m_maxA.SetValue( m_settings.m_maxAmplitude ); |
|||
m_spacing.SetValue( m_settings.m_spacing ); |
|||
m_cornerCtrl->SetSelection( m_settings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 ); |
|||
m_r.SetValue( m_settings.m_cornerRadiusPercentage ); |
|||
m_singleSided->SetValue( m_settings.m_singleSided ); |
|||
|
|||
return true; |
|||
} |
|||
|
|||
|
|||
bool DIALOG_MEANDER_PROPERTIES::TransferDataFromWindow() |
|||
{ |
|||
m_settings.m_minAmplitude = m_minA.GetIntValue(); |
|||
m_settings.m_maxAmplitude = m_maxA.GetIntValue(); |
|||
m_settings.m_spacing = m_spacing.GetIntValue(); |
|||
m_settings.m_cornerStyle = m_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND |
|||
: PNS::MEANDER_STYLE_CHAMFER; |
|||
m_settings.m_cornerRadiusPercentage = m_r.GetValue(); |
|||
m_settings.m_singleSided = m_singleSided->GetValue(); |
|||
|
|||
return true; |
|||
} |
@ -0,0 +1,54 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.or/licenses/>. |
|||
*/ |
|||
|
|||
#ifndef DIALOG_MEANDER_PROPERTIES_H |
|||
#define DIALOG_MEANDER_PROPERTIES_H |
|||
|
|||
#include "dialog_meander_properties_base.h" |
|||
|
|||
#include <widgets/unit_binder.h> |
|||
|
|||
#include <router/pns_router.h> |
|||
|
|||
namespace PNS { |
|||
|
|||
class MEANDER_SETTINGS; |
|||
|
|||
} |
|||
|
|||
class DIALOG_MEANDER_PROPERTIES : public DIALOG_MEANDER_PROPERTIES_BASE |
|||
{ |
|||
public: |
|||
DIALOG_MEANDER_PROPERTIES( EDA_DRAW_FRAME* aParent, PNS::MEANDER_SETTINGS& aSettings, |
|||
PNS::ROUTER_MODE aMeanderType ); |
|||
|
|||
private: |
|||
bool TransferDataToWindow() override; |
|||
bool TransferDataFromWindow() override; |
|||
|
|||
private: |
|||
UNIT_BINDER m_minA; |
|||
UNIT_BINDER m_maxA; |
|||
UNIT_BINDER m_spacing; |
|||
UNIT_BINDER m_r; |
|||
|
|||
PNS::MEANDER_SETTINGS& m_settings; |
|||
}; |
|||
|
|||
#endif // DIALOG_MEANDER_PROPERTIES_H |
@ -0,0 +1,157 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO *NOT* EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "widgets/text_ctrl_eval.h"
|
|||
|
|||
#include "dialog_meander_properties_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
DIALOG_MEANDER_PROPERTIES_BASE::DIALOG_MEANDER_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) |
|||
{ |
|||
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize ); |
|||
|
|||
wxBoxSizer* bMainSizer; |
|||
bMainSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxBoxSizer* singleTrackSizer; |
|||
singleTrackSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_legend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
singleTrackSizer->Add( m_legend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 ); |
|||
|
|||
wxFlexGridSizer* fgSizer31; |
|||
fgSizer31 = new wxFlexGridSizer( 0, 5, 5, 5 ); |
|||
fgSizer31->AddGrowableCol( 1 ); |
|||
fgSizer31->SetFlexibleDirection( wxBOTH ); |
|||
fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); |
|||
|
|||
m_track_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_minALabel->Wrap( -1 ); |
|||
fgSizer31->Add( m_track_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxBoxSizer* bSizer8; |
|||
bSizer8 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizer8->Add( m_minACtrl, 1, 0, 5 ); |
|||
|
|||
m_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_minAUnits->Wrap( -1 ); |
|||
bSizer8->Add( m_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( bSizer8, 1, wxEXPAND, 5 ); |
|||
|
|||
m_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_maxALabel->Wrap( -1 ); |
|||
fgSizer31->Add( m_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); |
|||
|
|||
m_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer31->Add( m_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_maxAUnits->Wrap( -1 ); |
|||
fgSizer31->Add( m_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_spacingLabel->Wrap( -1 ); |
|||
fgSizer31->Add( m_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxBoxSizer* bSizer9; |
|||
bSizer9 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") ); |
|||
|
|||
bSizer9->Add( m_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_spacingUnits->Wrap( -1 ); |
|||
bSizer9->Add( m_spacingUnits, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( bSizer9, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 5, 1, wxEXPAND, 5 ); |
|||
|
|||
m_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_cornerLabel->Wrap( -1 ); |
|||
fgSizer31->Add( m_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxString m_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") }; |
|||
int m_cornerCtrlNChoices = sizeof( m_cornerCtrlChoices ) / sizeof( wxString ); |
|||
m_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cornerCtrlNChoices, m_cornerCtrlChoices, 0 ); |
|||
m_cornerCtrl->SetSelection( 0 ); |
|||
fgSizer31->Add( m_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_rLabel->Wrap( -1 ); |
|||
fgSizer31->Add( m_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); |
|||
|
|||
m_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer31->Add( m_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_rUnits->Wrap( -1 ); |
|||
fgSizer31->Add( m_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
m_singleSided = new wxCheckBox( this, wxID_ANY, _("Single-sided"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer31->Add( m_singleSided, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
singleTrackSizer->Add( fgSizer31, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
|
|||
bMainSizer->Add( singleTrackSizer, 1, wxEXPAND|wxTOP, 5 ); |
|||
|
|||
m_stdButtons = new wxStdDialogButtonSizer(); |
|||
m_stdButtonsOK = new wxButton( this, wxID_OK ); |
|||
m_stdButtons->AddButton( m_stdButtonsOK ); |
|||
m_stdButtonsCancel = new wxButton( this, wxID_CANCEL ); |
|||
m_stdButtons->AddButton( m_stdButtonsCancel ); |
|||
m_stdButtons->Realize(); |
|||
|
|||
bMainSizer->Add( m_stdButtons, 0, wxEXPAND|wxALL, 5 ); |
|||
|
|||
|
|||
this->SetSizer( bMainSizer ); |
|||
this->Layout(); |
|||
bMainSizer->Fit( this ); |
|||
} |
|||
|
|||
DIALOG_MEANDER_PROPERTIES_BASE::~DIALOG_MEANDER_PROPERTIES_BASE() |
|||
{ |
|||
} |
1227
pcbnew/dialogs/dialog_meander_properties_base.fbp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,71 @@ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO *NOT* EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#pragma once |
|||
|
|||
#include <wx/artprov.h> |
|||
#include <wx/xrc/xmlres.h> |
|||
#include <wx/intl.h> |
|||
class TEXT_CTRL_EVAL; |
|||
|
|||
#include "dialog_shim.h" |
|||
#include <wx/bitmap.h> |
|||
#include <wx/image.h> |
|||
#include <wx/icon.h> |
|||
#include <wx/statbmp.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/string.h> |
|||
#include <wx/stattext.h> |
|||
#include <wx/textctrl.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/choice.h> |
|||
#include <wx/checkbox.h> |
|||
#include <wx/button.h> |
|||
#include <wx/dialog.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class DIALOG_MEANDER_PROPERTIES_BASE |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class DIALOG_MEANDER_PROPERTIES_BASE : public DIALOG_SHIM |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
wxStaticBitmap* m_legend; |
|||
wxStaticText* m_track_minALabel; |
|||
wxTextCtrl* m_minACtrl; |
|||
wxStaticText* m_minAUnits; |
|||
wxStaticText* m_maxALabel; |
|||
wxTextCtrl* m_maxACtrl; |
|||
wxStaticText* m_maxAUnits; |
|||
wxStaticText* m_spacingLabel; |
|||
wxTextCtrl* m_spacingCtrl; |
|||
wxStaticText* m_spacingUnits; |
|||
wxStaticText* m_cornerLabel; |
|||
wxChoice* m_cornerCtrl; |
|||
wxStaticText* m_rLabel; |
|||
TEXT_CTRL_EVAL* m_rCtrl; |
|||
wxStaticText* m_rUnits; |
|||
wxCheckBox* m_singleSided; |
|||
wxStdDialogButtonSizer* m_stdButtons; |
|||
wxButton* m_stdButtonsOK; |
|||
wxButton* m_stdButtonsCancel; |
|||
|
|||
public: |
|||
|
|||
DIALOG_MEANDER_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Meander Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); |
|||
|
|||
~DIALOG_MEANDER_PROPERTIES_BASE(); |
|||
|
|||
}; |
|||
|
@ -0,0 +1,110 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
#include <panel_setup_meanders.h>
|
|||
#include <router/pns_meander_placer.h>
|
|||
#include <widgets/text_ctrl_eval.h>
|
|||
#include <bitmaps.h>
|
|||
#include <eda_draw_frame.h>
|
|||
|
|||
PANEL_SETUP_MEANDERS::PANEL_SETUP_MEANDERS( wxWindow* aParent, EDA_DRAW_FRAME* aFrame, |
|||
PNS::MEANDER_SETTINGS& aTrackSettings, |
|||
PNS::MEANDER_SETTINGS& aDiffPairSettings, |
|||
PNS::MEANDER_SETTINGS& aSkewSettings ) : |
|||
PANEL_SETUP_MEANDERS_BASE( aParent ), |
|||
m_track_minA( aFrame, m_track_minALabel, m_track_minACtrl, m_track_minAUnits ), |
|||
m_track_maxA( aFrame, m_track_maxALabel, m_track_maxACtrl, m_track_maxAUnits ), |
|||
m_track_spacing( aFrame, m_track_spacingLabel, m_track_spacingCtrl, m_track_spacingUnits ), |
|||
m_track_r( aFrame, m_track_rLabel, m_track_rCtrl, m_track_rUnits ), |
|||
m_dp_minA( aFrame, m_dp_minALabel, m_dp_minACtrl, m_dp_minAUnits ), |
|||
m_dp_maxA( aFrame, m_dp_maxALabel, m_dp_maxACtrl, m_dp_maxAUnits ), |
|||
m_dp_spacing( aFrame, m_dp_spacingLabel, m_dp_spacingCtrl, m_dp_spacingUnits ), |
|||
m_dp_r( aFrame, m_dp_rLabel, m_dp_rCtrl, m_dp_rUnits ), |
|||
m_skew_minA( aFrame, m_skew_minALabel, m_skew_minACtrl, m_skew_minAUnits ), |
|||
m_skew_maxA( aFrame, m_skew_maxALabel, m_skew_maxACtrl, m_skew_maxAUnits ), |
|||
m_skew_spacing( aFrame, m_skew_spacingLabel, m_skew_spacingCtrl, m_skew_spacingUnits ), |
|||
m_skew_r( aFrame, m_skew_rLabel, m_skew_rCtrl, m_skew_rUnits ), |
|||
m_trackSettings( aTrackSettings ), |
|||
m_dpSettings( aDiffPairSettings ), |
|||
m_skewSettings( aSkewSettings ) |
|||
{ |
|||
m_singleTrackLegend->SetBitmap( KiBitmap( BITMAPS::tune_single_track_length_legend ) ); |
|||
m_diffPairLegend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_length_legend ) ); |
|||
m_skewLegend->SetBitmap( KiBitmap( BITMAPS::tune_diff_pair_skew_legend ) ); |
|||
|
|||
m_track_r.SetUnits( EDA_UNITS::PERCENT ); |
|||
m_dp_r.SetUnits( EDA_UNITS::PERCENT ); |
|||
m_skew_r.SetUnits( EDA_UNITS::PERCENT ); |
|||
} |
|||
|
|||
|
|||
bool PANEL_SETUP_MEANDERS::TransferDataToWindow() |
|||
{ |
|||
m_track_minA.SetValue( m_trackSettings.m_minAmplitude ); |
|||
m_track_maxA.SetValue( m_trackSettings.m_maxAmplitude ); |
|||
m_track_spacing.SetValue( m_trackSettings.m_spacing ); |
|||
m_track_cornerCtrl->SetSelection( m_trackSettings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 ); |
|||
m_track_r.SetValue( m_trackSettings.m_cornerRadiusPercentage ); |
|||
m_track_singleSided->SetValue( m_trackSettings.m_singleSided ); |
|||
|
|||
m_dp_minA.SetValue( m_dpSettings.m_minAmplitude ); |
|||
m_dp_maxA.SetValue( m_dpSettings.m_maxAmplitude ); |
|||
m_dp_spacing.SetValue( m_dpSettings.m_spacing ); |
|||
m_dp_cornerCtrl->SetSelection( m_dpSettings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 ); |
|||
m_dp_r.SetValue( 100 ); |
|||
m_dp_singleSided->SetValue( m_dpSettings.m_singleSided ); |
|||
|
|||
m_skew_minA.SetValue( m_skewSettings.m_minAmplitude ); |
|||
m_skew_maxA.SetValue( m_skewSettings.m_maxAmplitude ); |
|||
m_skew_spacing.SetValue( m_skewSettings.m_spacing ); |
|||
m_skew_cornerCtrl->SetSelection( m_skewSettings.m_cornerStyle == PNS::MEANDER_STYLE_ROUND ? 1 : 0 ); |
|||
m_skew_r.SetValue( m_skewSettings.m_cornerRadiusPercentage ); |
|||
|
|||
return true; |
|||
} |
|||
|
|||
|
|||
bool PANEL_SETUP_MEANDERS::TransferDataFromWindow() |
|||
{ |
|||
m_trackSettings.m_minAmplitude = m_track_minA.GetIntValue(); |
|||
m_trackSettings.m_maxAmplitude = m_track_maxA.GetIntValue(); |
|||
m_trackSettings.m_spacing = m_track_spacing.GetIntValue(); |
|||
m_trackSettings.m_cornerStyle = m_track_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND |
|||
: PNS::MEANDER_STYLE_CHAMFER; |
|||
m_trackSettings.m_cornerRadiusPercentage = m_track_r.GetValue(); |
|||
m_trackSettings.m_singleSided = m_track_singleSided->GetValue(); |
|||
|
|||
m_dpSettings.m_minAmplitude = m_dp_minA.GetIntValue(); |
|||
m_dpSettings.m_maxAmplitude = m_dp_maxA.GetIntValue(); |
|||
m_dpSettings.m_spacing = m_dp_spacing.GetIntValue(); |
|||
m_dpSettings.m_cornerStyle = m_dp_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND |
|||
: PNS::MEANDER_STYLE_CHAMFER; |
|||
// TODO: fix diff-pair meandering so we can use non-100% radii
|
|||
m_dpSettings.m_cornerRadiusPercentage = 100; |
|||
m_dpSettings.m_singleSided = m_dp_singleSided->GetValue(); |
|||
|
|||
m_skewSettings.m_minAmplitude = m_skew_minA.GetIntValue(); |
|||
m_skewSettings.m_maxAmplitude = m_skew_maxA.GetIntValue(); |
|||
m_skewSettings.m_spacing = m_skew_spacing.GetIntValue(); |
|||
m_skewSettings.m_cornerStyle = m_skew_cornerCtrl->GetSelection() ? PNS::MEANDER_STYLE_ROUND |
|||
: PNS::MEANDER_STYLE_CHAMFER; |
|||
m_skewSettings.m_cornerRadiusPercentage = m_skew_r.GetValue(); |
|||
|
|||
return true; |
|||
} |
@ -0,0 +1,66 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.or/licenses/>. |
|||
*/ |
|||
|
|||
#ifndef PANEL_SETUP_MEANDERS_H |
|||
#define PANEL_SETUP_MEANDERS_H |
|||
|
|||
#include <panel_setup_meanders_base.h> |
|||
#include <widgets/unit_binder.h> |
|||
|
|||
|
|||
namespace PNS { |
|||
|
|||
class MEANDER_SETTINGS; |
|||
|
|||
} |
|||
|
|||
class PANEL_SETUP_MEANDERS : public PANEL_SETUP_MEANDERS_BASE |
|||
{ |
|||
public: |
|||
PANEL_SETUP_MEANDERS( wxWindow* aParent, EDA_DRAW_FRAME* aFrame, |
|||
PNS::MEANDER_SETTINGS& aTrackSettings, |
|||
PNS::MEANDER_SETTINGS& aDiffPairSettings, |
|||
PNS::MEANDER_SETTINGS& aSkewSettings ); |
|||
|
|||
private: |
|||
bool TransferDataToWindow() override; |
|||
bool TransferDataFromWindow() override; |
|||
|
|||
private: |
|||
UNIT_BINDER m_track_minA; |
|||
UNIT_BINDER m_track_maxA; |
|||
UNIT_BINDER m_track_spacing; |
|||
UNIT_BINDER m_track_r; |
|||
|
|||
UNIT_BINDER m_dp_minA; |
|||
UNIT_BINDER m_dp_maxA; |
|||
UNIT_BINDER m_dp_spacing; |
|||
UNIT_BINDER m_dp_r; |
|||
|
|||
UNIT_BINDER m_skew_minA; |
|||
UNIT_BINDER m_skew_maxA; |
|||
UNIT_BINDER m_skew_spacing; |
|||
UNIT_BINDER m_skew_r; |
|||
|
|||
PNS::MEANDER_SETTINGS& m_trackSettings; |
|||
PNS::MEANDER_SETTINGS& m_dpSettings; |
|||
PNS::MEANDER_SETTINGS& m_skewSettings; |
|||
}; |
|||
|
|||
#endif // PANEL_SETUP_MEANDERS_H |
@ -0,0 +1,408 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO *NOT* EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "widgets/text_ctrl_eval.h"
|
|||
|
|||
#include "panel_setup_meanders_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
PANEL_SETUP_MEANDERS_BASE::PANEL_SETUP_MEANDERS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name ) |
|||
{ |
|||
wxBoxSizer* bMainSizer; |
|||
bMainSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_singleTrackLabel = new wxStaticText( this, wxID_ANY, _("Default properties for single-track meanders:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_singleTrackLabel->Wrap( -1 ); |
|||
bMainSizer->Add( m_singleTrackLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 ); |
|||
|
|||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 10 ); |
|||
|
|||
wxBoxSizer* singleTrackSizer; |
|||
singleTrackSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_singleTrackLegend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
singleTrackSizer->Add( m_singleTrackLegend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 ); |
|||
|
|||
wxFlexGridSizer* fgSizer3; |
|||
fgSizer3 = new wxFlexGridSizer( 0, 5, 5, 5 ); |
|||
fgSizer3->AddGrowableCol( 1 ); |
|||
fgSizer3->SetFlexibleDirection( wxBOTH ); |
|||
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); |
|||
|
|||
m_track_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_minALabel->Wrap( -1 ); |
|||
fgSizer3->Add( m_track_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxBoxSizer* bSizer8; |
|||
bSizer8 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_track_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizer8->Add( m_track_minACtrl, 1, 0, 5 ); |
|||
|
|||
m_track_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_minAUnits->Wrap( -1 ); |
|||
bSizer8->Add( m_track_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( bSizer8, 1, wxEXPAND, 5 ); |
|||
|
|||
m_track_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_maxALabel->Wrap( -1 ); |
|||
fgSizer3->Add( m_track_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); |
|||
|
|||
m_track_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer3->Add( m_track_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_track_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_maxAUnits->Wrap( -1 ); |
|||
fgSizer3->Add( m_track_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_track_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_spacingLabel->Wrap( -1 ); |
|||
fgSizer3->Add( m_track_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxBoxSizer* bSizer9; |
|||
bSizer9 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_track_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") ); |
|||
|
|||
bSizer9->Add( m_track_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_track_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_spacingUnits->Wrap( -1 ); |
|||
bSizer9->Add( m_track_spacingUnits, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( bSizer9, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( 0, 5, 1, wxEXPAND, 5 ); |
|||
|
|||
m_track_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_cornerLabel->Wrap( -1 ); |
|||
fgSizer3->Add( m_track_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxString m_track_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") }; |
|||
int m_track_cornerCtrlNChoices = sizeof( m_track_cornerCtrlChoices ) / sizeof( wxString ); |
|||
m_track_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_track_cornerCtrlNChoices, m_track_cornerCtrlChoices, 0 ); |
|||
m_track_cornerCtrl->SetSelection( 0 ); |
|||
fgSizer3->Add( m_track_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_track_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_rLabel->Wrap( -1 ); |
|||
fgSizer3->Add( m_track_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); |
|||
|
|||
m_track_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer3->Add( m_track_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_track_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_track_rUnits->Wrap( -1 ); |
|||
fgSizer3->Add( m_track_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
m_track_singleSided = new wxCheckBox( this, wxID_ANY, _("Single-sided"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer3->Add( m_track_singleSided, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
singleTrackSizer->Add( fgSizer3, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
|
|||
bMainSizer->Add( singleTrackSizer, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
|
|||
bMainSizer->Add( 0, 10, 0, wxEXPAND, 5 ); |
|||
|
|||
m_diffPairsLabel = new wxStaticText( this, wxID_ANY, _("Default properties for differential-pair meanders:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_diffPairsLabel->Wrap( -1 ); |
|||
bMainSizer->Add( m_diffPairsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 8 ); |
|||
|
|||
m_staticline11 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bMainSizer->Add( m_staticline11, 0, wxEXPAND|wxBOTTOM, 10 ); |
|||
|
|||
wxBoxSizer* diffPairSizer; |
|||
diffPairSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_diffPairLegend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
diffPairSizer->Add( m_diffPairLegend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 ); |
|||
|
|||
wxFlexGridSizer* fgSizer32; |
|||
fgSizer32 = new wxFlexGridSizer( 0, 5, 5, 5 ); |
|||
fgSizer32->AddGrowableCol( 1 ); |
|||
fgSizer32->SetFlexibleDirection( wxBOTH ); |
|||
fgSizer32->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); |
|||
|
|||
m_dp_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_minALabel->Wrap( -1 ); |
|||
fgSizer32->Add( m_dp_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxBoxSizer* bSizer81; |
|||
bSizer81 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_dp_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizer81->Add( m_dp_minACtrl, 1, 0, 5 ); |
|||
|
|||
m_dp_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_minAUnits->Wrap( -1 ); |
|||
bSizer81->Add( m_dp_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( bSizer81, 1, wxEXPAND, 5 ); |
|||
|
|||
m_dp_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_maxALabel->Wrap( -1 ); |
|||
fgSizer32->Add( m_dp_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); |
|||
|
|||
m_dp_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer32->Add( m_dp_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_dp_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_maxAUnits->Wrap( -1 ); |
|||
fgSizer32->Add( m_dp_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_dp_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_spacingLabel->Wrap( -1 ); |
|||
fgSizer32->Add( m_dp_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxBoxSizer* bSizer91; |
|||
bSizer91 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_dp_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") ); |
|||
|
|||
bSizer91->Add( m_dp_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_dp_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_spacingUnits->Wrap( -1 ); |
|||
bSizer91->Add( m_dp_spacingUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( bSizer91, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( 0, 5, 1, wxEXPAND, 5 ); |
|||
|
|||
m_dp_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_cornerLabel->Wrap( -1 ); |
|||
fgSizer32->Add( m_dp_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxString m_dp_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") }; |
|||
int m_dp_cornerCtrlNChoices = sizeof( m_dp_cornerCtrlChoices ) / sizeof( wxString ); |
|||
m_dp_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dp_cornerCtrlNChoices, m_dp_cornerCtrlChoices, 0 ); |
|||
m_dp_cornerCtrl->SetSelection( 0 ); |
|||
fgSizer32->Add( m_dp_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_dp_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_rLabel->Wrap( -1 ); |
|||
m_dp_rLabel->Enable( false ); |
|||
|
|||
fgSizer32->Add( m_dp_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); |
|||
|
|||
m_dp_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_rCtrl->Enable( false ); |
|||
|
|||
fgSizer32->Add( m_dp_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_dp_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_dp_rUnits->Wrap( -1 ); |
|||
m_dp_rUnits->Enable( false ); |
|||
|
|||
fgSizer32->Add( m_dp_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
m_dp_singleSided = new wxCheckBox( this, wxID_ANY, _("Single-sided"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer32->Add( m_dp_singleSided, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
fgSizer32->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
diffPairSizer->Add( fgSizer32, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
|
|||
bMainSizer->Add( diffPairSizer, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
|
|||
bMainSizer->Add( 0, 10, 0, wxEXPAND, 5 ); |
|||
|
|||
m_diffPairsLabel1 = new wxStaticText( this, wxID_ANY, _("Default properties for differential-pair skews:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_diffPairsLabel1->Wrap( -1 ); |
|||
bMainSizer->Add( m_diffPairsLabel1, 0, wxTOP|wxRIGHT|wxLEFT, 8 ); |
|||
|
|||
m_staticline111 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bMainSizer->Add( m_staticline111, 0, wxEXPAND|wxBOTTOM, 10 ); |
|||
|
|||
wxBoxSizer* skewSizer; |
|||
skewSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_skewLegend = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
skewSizer->Add( m_skewLegend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 ); |
|||
|
|||
wxFlexGridSizer* fgSizer31; |
|||
fgSizer31 = new wxFlexGridSizer( 0, 5, 5, 5 ); |
|||
fgSizer31->AddGrowableCol( 1 ); |
|||
fgSizer31->SetFlexibleDirection( wxBOTH ); |
|||
fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); |
|||
|
|||
m_skew_minALabel = new wxStaticText( this, wxID_ANY, _("Amplitude (A) min:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_skew_minALabel->Wrap( -1 ); |
|||
fgSizer31->Add( m_skew_minALabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxBoxSizer* bSizer82; |
|||
bSizer82 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_skew_minACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizer82->Add( m_skew_minACtrl, 1, 0, 5 ); |
|||
|
|||
m_skew_minAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_skew_minAUnits->Wrap( -1 ); |
|||
bSizer82->Add( m_skew_minAUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( bSizer82, 1, wxEXPAND, 5 ); |
|||
|
|||
m_skew_maxALabel = new wxStaticText( this, wxID_ANY, _("Max:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_skew_maxALabel->Wrap( -1 ); |
|||
fgSizer31->Add( m_skew_maxALabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); |
|||
|
|||
m_skew_maxACtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer31->Add( m_skew_maxACtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_skew_maxAUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_skew_maxAUnits->Wrap( -1 ); |
|||
fgSizer31->Add( m_skew_maxAUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_skew_spacingLabel = new wxStaticText( this, wxID_ANY, _("Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_skew_spacingLabel->Wrap( -1 ); |
|||
fgSizer31->Add( m_skew_spacingLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxBoxSizer* bSizer92; |
|||
bSizer92 = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_skew_spacingCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_skew_spacingCtrl->SetToolTip( _("Minimum spacing between adjacent meander segments. The resulting spacing may be greater based on design rules.") ); |
|||
|
|||
bSizer92->Add( m_skew_spacingCtrl, 1, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_skew_spacingUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_skew_spacingUnits->Wrap( -1 ); |
|||
bSizer92->Add( m_skew_spacingUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( bSizer92, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
fgSizer31->Add( 0, 5, 1, wxEXPAND, 5 ); |
|||
|
|||
m_skew_cornerLabel = new wxStaticText( this, wxID_ANY, _("Corner style:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_skew_cornerLabel->Wrap( -1 ); |
|||
fgSizer31->Add( m_skew_cornerLabel, 1, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
wxString m_skew_cornerCtrlChoices[] = { _("Chamfer"), _("Fillet") }; |
|||
int m_skew_cornerCtrlNChoices = sizeof( m_skew_cornerCtrlChoices ) / sizeof( wxString ); |
|||
m_skew_cornerCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_skew_cornerCtrlNChoices, m_skew_cornerCtrlChoices, 0 ); |
|||
m_skew_cornerCtrl->SetSelection( 0 ); |
|||
fgSizer31->Add( m_skew_cornerCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_skew_rLabel = new wxStaticText( this, wxID_ANY, _("Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_skew_rLabel->Wrap( -1 ); |
|||
fgSizer31->Add( m_skew_rLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); |
|||
|
|||
m_skew_rCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
fgSizer31->Add( m_skew_rCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
m_skew_rUnits = new wxStaticText( this, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_skew_rUnits->Wrap( -1 ); |
|||
fgSizer31->Add( m_skew_rUnits, 0, wxALIGN_CENTER_VERTICAL, 5 ); |
|||
|
|||
|
|||
skewSizer->Add( fgSizer31, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
|
|||
bMainSizer->Add( skewSizer, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
|
|||
this->SetSizer( bMainSizer ); |
|||
this->Layout(); |
|||
bMainSizer->Fit( this ); |
|||
} |
|||
|
|||
PANEL_SETUP_MEANDERS_BASE::~PANEL_SETUP_MEANDERS_BASE() |
|||
{ |
|||
} |
3782
pcbnew/dialogs/panel_setup_meanders_base.fbp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,104 @@ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO *NOT* EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#pragma once |
|||
|
|||
#include <wx/artprov.h> |
|||
#include <wx/xrc/xmlres.h> |
|||
#include <wx/intl.h> |
|||
class TEXT_CTRL_EVAL; |
|||
|
|||
#include <wx/string.h> |
|||
#include <wx/stattext.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/statline.h> |
|||
#include <wx/bitmap.h> |
|||
#include <wx/image.h> |
|||
#include <wx/icon.h> |
|||
#include <wx/statbmp.h> |
|||
#include <wx/textctrl.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/choice.h> |
|||
#include <wx/checkbox.h> |
|||
#include <wx/panel.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class PANEL_SETUP_MEANDERS_BASE |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class PANEL_SETUP_MEANDERS_BASE : public wxPanel |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
wxStaticText* m_singleTrackLabel; |
|||
wxStaticLine* m_staticline1; |
|||
wxStaticBitmap* m_singleTrackLegend; |
|||
wxStaticText* m_track_minALabel; |
|||
wxTextCtrl* m_track_minACtrl; |
|||
wxStaticText* m_track_minAUnits; |
|||
wxStaticText* m_track_maxALabel; |
|||
wxTextCtrl* m_track_maxACtrl; |
|||
wxStaticText* m_track_maxAUnits; |
|||
wxStaticText* m_track_spacingLabel; |
|||
wxTextCtrl* m_track_spacingCtrl; |
|||
wxStaticText* m_track_spacingUnits; |
|||
wxStaticText* m_track_cornerLabel; |
|||
wxChoice* m_track_cornerCtrl; |
|||
wxStaticText* m_track_rLabel; |
|||
TEXT_CTRL_EVAL* m_track_rCtrl; |
|||
wxStaticText* m_track_rUnits; |
|||
wxCheckBox* m_track_singleSided; |
|||
wxStaticText* m_diffPairsLabel; |
|||
wxStaticLine* m_staticline11; |
|||
wxStaticBitmap* m_diffPairLegend; |
|||
wxStaticText* m_dp_minALabel; |
|||
wxTextCtrl* m_dp_minACtrl; |
|||
wxStaticText* m_dp_minAUnits; |
|||
wxStaticText* m_dp_maxALabel; |
|||
wxTextCtrl* m_dp_maxACtrl; |
|||
wxStaticText* m_dp_maxAUnits; |
|||
wxStaticText* m_dp_spacingLabel; |
|||
wxTextCtrl* m_dp_spacingCtrl; |
|||
wxStaticText* m_dp_spacingUnits; |
|||
wxStaticText* m_dp_cornerLabel; |
|||
wxChoice* m_dp_cornerCtrl; |
|||
wxStaticText* m_dp_rLabel; |
|||
TEXT_CTRL_EVAL* m_dp_rCtrl; |
|||
wxStaticText* m_dp_rUnits; |
|||
wxCheckBox* m_dp_singleSided; |
|||
wxStaticText* m_diffPairsLabel1; |
|||
wxStaticLine* m_staticline111; |
|||
wxStaticBitmap* m_skewLegend; |
|||
wxStaticText* m_skew_minALabel; |
|||
wxTextCtrl* m_skew_minACtrl; |
|||
wxStaticText* m_skew_minAUnits; |
|||
wxStaticText* m_skew_maxALabel; |
|||
wxTextCtrl* m_skew_maxACtrl; |
|||
wxStaticText* m_skew_maxAUnits; |
|||
wxStaticText* m_skew_spacingLabel; |
|||
wxTextCtrl* m_skew_spacingCtrl; |
|||
wxStaticText* m_skew_spacingUnits; |
|||
wxStaticText* m_skew_cornerLabel; |
|||
wxChoice* m_skew_cornerCtrl; |
|||
wxStaticText* m_skew_rLabel; |
|||
TEXT_CTRL_EVAL* m_skew_rCtrl; |
|||
wxStaticText* m_skew_rUnits; |
|||
|
|||
public: |
|||
|
|||
PANEL_SETUP_MEANDERS_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 ); |
|||
|
|||
~PANEL_SETUP_MEANDERS_BASE(); |
|||
|
|||
}; |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue