25 changed files with 3576 additions and 268 deletions
-
6common/base_units.cpp
-
14common/pcb.keywords
-
2pcbnew/CMakeLists.txt
-
87pcbnew/board_stackup_manager/class_board_stackup.cpp
-
31pcbnew/board_stackup_manager/class_board_stackup.h
-
1082pcbnew/board_stackup_manager/panel_board_stackup.cpp
-
197pcbnew/board_stackup_manager/panel_board_stackup.h
-
192pcbnew/board_stackup_manager/panel_board_stackup_base.cpp
-
1587pcbnew/board_stackup_manager/panel_board_stackup_base.fbp
-
80pcbnew/board_stackup_manager/panel_board_stackup_base.h
-
24pcbnew/board_stackup_manager/stackup_predefined_prms.cpp
-
16pcbnew/board_stackup_manager/stackup_predefined_prms.h
-
39pcbnew/dialogs/dialog_board_setup.cpp
-
9pcbnew/dialogs/dialog_board_setup.h
-
29pcbnew/dialogs/panel_setup_layers.cpp
-
9pcbnew/dialogs/panel_setup_layers.h
-
11pcbnew/dialogs/panel_setup_layers_base.cpp
-
186pcbnew/dialogs/panel_setup_layers_base.fbp
-
5pcbnew/dialogs/panel_setup_layers_base.h
-
2pcbnew/exporters/gerber_jobfile_writer.cpp
-
11pcbnew/kicad_plugin.cpp
-
3pcbnew/kicad_plugin.h
-
210pcbnew/pcb_parser.cpp
-
9pcbnew/pcb_parser.h
-
3pcbnew/pcb_plot_params.cpp
1082
pcbnew/board_stackup_manager/panel_board_stackup.cpp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,197 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr |
|||
* Copyright (C) 2009-2019 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 2 |
|||
* 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, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
|||
* or you may search the http://www.gnu.org website for the version 2 license, |
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
#ifndef PANEL_SETUP_BOARD_STACKUP_H |
|||
#define PANEL_SETUP_BOARD_STACKUP_H |
|||
|
|||
|
|||
#include <fctsys.h> |
|||
#include <pcbnew.h> |
|||
#include <class_board.h> |
|||
#include <widgets/unit_binder.h> |
|||
|
|||
#include "panel_board_stackup_base.h" |
|||
#include "class_board_stackup.h" |
|||
|
|||
class wxBitmapComboBox; |
|||
class PANEL_SETUP_LAYERS; |
|||
|
|||
#if 0 |
|||
// Indexes of columns of the grid to show a layer setup |
|||
enum LAYER_COLUMN_INDEX |
|||
{ |
|||
LCOL_IDX_BITMAP, // The column displaying the material color |
|||
LCOL_IDX_BRD_LAYERNAME, // The column displaying the layer name from the board editor |
|||
LCOL_IDX_LAYERTYPENAME, // The column displaying the layer type name |
|||
LCOL_IDX_LAYER_MATERIAL, // The column displaying the name of the material |
|||
LCOL_IDX_LAYER_THICKNESS, |
|||
LCOL_IDX_LAYER_THICKNESS_LOCK, |
|||
LCOL_IDX_LAYER_COLOR, |
|||
LCOL_IDX_LAYER_EPSILON_R, |
|||
LCOL_IDX_LAYER_DIELECTRIC_LOSS, |
|||
LCOL_COUNT_MAX // Sentinel |
|||
}; |
|||
#endif |
|||
|
|||
// A helper class to handle UI items managed by m_fgGridSizer |
|||
// in PANEL_SETUP_BOARD_STACKUP |
|||
// these items are shown or not in m_fgGridSizer, depending on |
|||
// the enabled layers in the current board. |
|||
// So we need to store the list of these UI items int m_fgGridSizer |
|||
// row by row |
|||
struct BOARD_STACKUP_ROW_UI_ITEM |
|||
{ |
|||
bool m_isEnabled; // True if the row is in board |
|||
// false if not (this row is not shown on the panel) |
|||
wxStaticBitmap* m_Icon; // Color icon in first column (column 1) |
|||
wxStaticText* m_LayerName; // string shown in column 2 |
|||
wxControl* m_LayerTypeCtrl; // control shown in column 3 |
|||
wxControl* m_MaterialCtrl; // control shown in column 4 |
|||
wxControl* m_ThicknessCtrl; // control shown in column 5 |
|||
wxControl* m_ThicknessLockCtrl;// control shown in column 6 |
|||
wxControl* m_ColorCtrl; // control shown in column 7 |
|||
wxControl* m_EpsilonCtrl; // control shown in column 8 |
|||
wxControl* m_LossTgCtrl; // control shown in column 9 |
|||
|
|||
BOARD_STACKUP_ROW_UI_ITEM() : |
|||
m_isEnabled( true ), m_Icon( nullptr ), m_LayerName( nullptr ), |
|||
m_LayerTypeCtrl( nullptr ), m_MaterialCtrl( nullptr ), |
|||
m_ThicknessCtrl( nullptr ), m_ThicknessLockCtrl( nullptr ), |
|||
m_EpsilonCtrl( nullptr ), m_LossTgCtrl( nullptr ) |
|||
{} |
|||
}; |
|||
|
|||
|
|||
class PANEL_SETUP_BOARD_STACKUP : public PANEL_SETUP_BOARD_STACKUP_BASE |
|||
{ |
|||
public: |
|||
PANEL_SETUP_BOARD_STACKUP( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame, PANEL_SETUP_LAYERS* aPanelLayers ); |
|||
~PANEL_SETUP_BOARD_STACKUP(); |
|||
|
|||
void ImportSettingsFrom( BOARD* aBoard ); |
|||
|
|||
// Must be called if the copper layers count has changed |
|||
// or solder mask, solder paste or silkscreen layers are |
|||
// enabled or disabled |
|||
// Rebuild the Layer Stack Panel if the new layer set differs |
|||
// from the current layet set |
|||
void OnLayersOptionsChanged( LSET aNewLayerSet ); |
|||
|
|||
BOARD_STACKUP_ITEM* GetStackupItem( int aIndex ); |
|||
|
|||
/// Return the color currently selected for the row aRow |
|||
wxColor GetSelectedColor( int aRow ) const; |
|||
|
|||
BOARD_STACKUP& GetStackup() { return m_stackup; } |
|||
int GetPcbTickness(); |
|||
bool TransferDataFromWindow() override; |
|||
|
|||
std::vector<wxColor> m_UserColors; // the list of user colors for each grid row |
|||
// other colors are defined colors, and are not stored |
|||
private: |
|||
/** Populate m_fgGridSizer with items to handle stackup parameters |
|||
* This is a full list: |
|||
* all copper layers and all tech layers that are supported by the stackup |
|||
* items not in the current board stackup will be not shown, but they are |
|||
* existing in list |
|||
*/ |
|||
void buildLayerStackPanel(); |
|||
|
|||
/** Show or do not show items in m_fgGridSizer according to the stackup of the |
|||
* current board and optionally update the stackup params (thickness, color ... ) |
|||
* @param aFullSync = true to update stackup params, false to only update the list |
|||
* of shown items |
|||
*/ |
|||
void synchronizeWithBoard( bool aFullSync ); |
|||
|
|||
/** Populate m_fgGridSizer with items to handle stackup parameters |
|||
* If previous items are in list, remove old items |
|||
*/ |
|||
void RebuildLayerStackPanel(); |
|||
|
|||
void onUpdateThicknessValue( wxUpdateUIEvent& event ) override; |
|||
void onCalculateDielectricThickness( wxCommandEvent& event ) override; |
|||
|
|||
void onColorSelected( wxCommandEvent& event ); |
|||
void onMaterialChange( wxCommandEvent& event ); |
|||
void onThicknessChange( wxCommandEvent& event ); |
|||
|
|||
/** Update the icons color (swatches in first grid column) |
|||
* @param aRow is the row (index in m_rowUiItemsList) that manages the icon to update. |
|||
* if -1 all icons will be updated |
|||
*/ |
|||
void updateIconColor( int aRow = -1 ); |
|||
|
|||
/** @return the color of the BOARD_STACKUP_ITEM at row aRow, |
|||
* to draw a bitmap color according to the selected color |
|||
* or the best default color (for dielectric or copper item) |
|||
* @param aRow is the row index to find the color. |
|||
*/ |
|||
wxColor getColorIconItem( int aRow ); |
|||
|
|||
/** creates a bitmap combobox to select a layer color |
|||
* @return the created wxBitmapComboBox |
|||
* @param aStackupItem = the BOARD_STACKUP_ITEM realted to the bitmap combobox |
|||
* (to set the user color, if any) |
|||
* can be nullptr |
|||
* @param aRow = the row index in the wxFlexGridSizer (used to build a wxWidget unique id) |
|||
*/ |
|||
wxBitmapComboBox* createBmComboBox( BOARD_STACKUP_ITEM* aStackupItem, int aRow ); |
|||
|
|||
/** |
|||
* disconnect event handlers connected to wxControl items |
|||
* found in list m_controlItemsList |
|||
*/ |
|||
void disconnectEvents(); |
|||
|
|||
BOARD_STACKUP m_stackup; |
|||
PANEL_SETUP_LAYERS* m_panelLayers; // The associated PANEL_SETUP_LAYERS, to know |
|||
// enabled layers and copper layer names |
|||
LSET m_enabledLayers; // the current enabled layers in this panel |
|||
// restricted to allowed layers in stackup. |
|||
// when do not match the enabled layers |
|||
// in PANEL_SETUP_LAYERS the stackup is not up to date |
|||
std::vector<BOARD_STACKUP_ROW_UI_ITEM> m_rowUiItemsList; // List of items in m_fgGridSizer |
|||
BOARD* m_board; |
|||
BOARD_DESIGN_SETTINGS* m_brdSettings; |
|||
EDA_UNITS_T m_units; |
|||
PCB_EDIT_FRAME* m_frame; |
|||
wxSize m_numericTextCtrlSize; // Best size to enter values with units in wxTextCtrl |
|||
wxSize m_numericFieldsSize; // Best size to enter double values in wxTextCtrl |
|||
wxArrayString m_core_prepreg_choice; // Used to display the option list in dialog |
|||
wxSize m_colorSwatchesSize; // the size of color swatches in the wxBitmapComboBox. |
|||
// this is the size of the "XX" string to give |
|||
// a reasonable size to color swatches |
|||
|
|||
wxSize m_colorIconsSize; // the size of color swatches in grid, left column. |
|||
// this is the size of the "XXXXXX" string to give |
|||
// a reasonable size to color swatches (icons) |
|||
|
|||
// The list of controls (wxChoice, wxBitmapComboBox, wxTextCtrl) added to the panel |
|||
// when building the BOARD_STACKUP_ITEM list editor and connected to command events |
|||
// Used to disconnect event handlers |
|||
std::vector<wxControl*> m_controlItemsList; |
|||
}; |
|||
|
|||
#endif // #ifndef PANEL_SETUP_BOARD_STACKUP_H |
@ -0,0 +1,192 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version Jul 10 2019)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO *NOT* EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "panel_board_stackup_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
PANEL_SETUP_BOARD_STACKUP_BASE::PANEL_SETUP_BOARD_STACKUP_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 ); |
|||
|
|||
wxBoxSizer* bSizerBrdThickness; |
|||
bSizerBrdThickness = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Board thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_thicknessLabel->Wrap( -1 ); |
|||
bSizerBrdThickness->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); |
|||
|
|||
m_thicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerBrdThickness->Add( m_thicknessCtrl, 0, wxALL, 5 ); |
|||
|
|||
|
|||
bSizerBrdThickness->Add( 20, 0, 0, 0, 5 ); |
|||
|
|||
m_staticTextCT = new wxStaticText( this, wxID_ANY, _("Current thickness from stackup:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticTextCT->Wrap( -1 ); |
|||
bSizerBrdThickness->Add( m_staticTextCT, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); |
|||
|
|||
m_tcCTValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); |
|||
bSizerBrdThickness->Add( m_tcCTValue, 0, wxALL, 5 ); |
|||
|
|||
|
|||
bSizerBrdThickness->Add( 5, 0, 0, 0, 5 ); |
|||
|
|||
m_buttonSetDielectricThickness = new wxButton( this, wxID_ANY, _("Set Dielectric Thickness"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_buttonSetDielectricThickness->SetToolTip( _("Set thickness of all not locked dielectric layers.\nThe thickness will be the same for all not locked dielectric layers.") ); |
|||
|
|||
bSizerBrdThickness->Add( m_buttonSetDielectricThickness, 0, wxALL, 5 ); |
|||
|
|||
|
|||
bMainSizer->Add( bSizerBrdThickness, 0, wxEXPAND, 5 ); |
|||
|
|||
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bMainSizer->Add( m_staticline, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* bSizerStackup; |
|||
bSizerStackup = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
wxBoxSizer* bSizer5; |
|||
bSizer5 = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_scGridWin = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); |
|||
m_scGridWin->SetScrollRate( 5, 5 ); |
|||
m_fgGridSizer = new wxFlexGridSizer( 0, 9, 0, 0 ); |
|||
m_fgGridSizer->SetFlexibleDirection( wxBOTH ); |
|||
m_fgGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); |
|||
|
|||
m_staticText7 = new wxStaticText( m_scGridWin, wxID_ANY, _("Layer"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText7->Wrap( -1 ); |
|||
m_staticText7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
|
|||
m_fgGridSizer->Add( m_staticText7, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_staticText8 = new wxStaticText( m_scGridWin, wxID_ANY, _("Name"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText8->Wrap( -1 ); |
|||
m_staticText8->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
|
|||
m_fgGridSizer->Add( m_staticText8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_staticText9 = new wxStaticText( m_scGridWin, wxID_ANY, _("Type"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText9->Wrap( -1 ); |
|||
m_staticText9->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
|
|||
m_fgGridSizer->Add( m_staticText9, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_staticText10 = new wxStaticText( m_scGridWin, wxID_ANY, _("Material"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText10->Wrap( -1 ); |
|||
m_staticText10->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
|
|||
m_fgGridSizer->Add( m_staticText10, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_staticText101 = new wxStaticText( m_scGridWin, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText101->Wrap( -1 ); |
|||
m_staticText101->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
|
|||
m_fgGridSizer->Add( m_staticText101, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_staticTextLock = new wxStaticText( m_scGridWin, wxID_ANY, _("Lock"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticTextLock->Wrap( -1 ); |
|||
m_staticTextLock->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
m_staticTextLock->SetToolTip( _("If lock is enabled, the dielectric thickness calculation will not change the thickness") ); |
|||
|
|||
m_fgGridSizer->Add( m_staticTextLock, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_staticText102 = new wxStaticText( m_scGridWin, wxID_ANY, _("Color"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText102->Wrap( -1 ); |
|||
m_staticText102->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
|
|||
m_fgGridSizer->Add( m_staticText102, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_staticText103 = new wxStaticText( m_scGridWin, wxID_ANY, _("Epsilon R"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText103->Wrap( -1 ); |
|||
m_staticText103->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
|
|||
m_fgGridSizer->Add( m_staticText103, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
m_staticText104 = new wxStaticText( m_scGridWin, wxID_ANY, _("Loss tg"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText104->Wrap( -1 ); |
|||
m_staticText104->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); |
|||
|
|||
m_fgGridSizer->Add( m_staticText104, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); |
|||
|
|||
|
|||
m_scGridWin->SetSizer( m_fgGridSizer ); |
|||
m_scGridWin->Layout(); |
|||
m_fgGridSizer->Fit( m_scGridWin ); |
|||
bSizer5->Add( m_scGridWin, 1, wxEXPAND | wxALL, 5 ); |
|||
|
|||
|
|||
bSizerStackup->Add( bSizer5, 1, wxEXPAND, 5 ); |
|||
|
|||
wxBoxSizer* bSizerRight; |
|||
bSizerRight = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxString m_rbDielectricConstraintChoices[] = { _("No constraint"), _("Impedance controlled") }; |
|||
int m_rbDielectricConstraintNChoices = sizeof( m_rbDielectricConstraintChoices ) / sizeof( wxString ); |
|||
m_rbDielectricConstraint = new wxRadioBox( this, wxID_ANY, _("Impedance Control"), wxDefaultPosition, wxDefaultSize, m_rbDielectricConstraintNChoices, m_rbDielectricConstraintChoices, 1, wxRA_SPECIFY_COLS ); |
|||
m_rbDielectricConstraint->SetSelection( 0 ); |
|||
m_rbDielectricConstraint->SetToolTip( _("If Impedance Controlled option is set,\nLoss tangent and EpsilonR will be added to constraints.") ); |
|||
|
|||
bSizerRight->Add( m_rbDielectricConstraint, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); |
|||
|
|||
wxStaticBoxSizer* sbSizerBrdOptions; |
|||
sbSizerBrdOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Board Finish") ), wxVERTICAL ); |
|||
|
|||
m_cbCastellatedPads = new wxCheckBox( sbSizerBrdOptions->GetStaticBox(), wxID_ANY, _("Has castellated pads"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
sbSizerBrdOptions->Add( m_cbCastellatedPads, 0, wxALL, 5 ); |
|||
|
|||
m_cbEgdesPlated = new wxCheckBox( sbSizerBrdOptions->GetStaticBox(), wxID_ANY, _("Plated board edge"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
sbSizerBrdOptions->Add( m_cbEgdesPlated, 0, wxALL, 5 ); |
|||
|
|||
m_staticTextFinish = new wxStaticText( sbSizerBrdOptions->GetStaticBox(), wxID_ANY, _("Copper finish:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticTextFinish->Wrap( -1 ); |
|||
sbSizerBrdOptions->Add( m_staticTextFinish, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
wxArrayString m_choiceFinishChoices; |
|||
m_choiceFinish = new wxChoice( sbSizerBrdOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceFinishChoices, 0 ); |
|||
m_choiceFinish->SetSelection( 0 ); |
|||
sbSizerBrdOptions->Add( m_choiceFinish, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); |
|||
|
|||
m_staticTextEdgeConn = new wxStaticText( sbSizerBrdOptions->GetStaticBox(), wxID_ANY, _("Edge card connectors:"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticTextEdgeConn->Wrap( -1 ); |
|||
sbSizerBrdOptions->Add( m_staticTextEdgeConn, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
wxString m_choiceEdgeConnChoices[] = { _("None"), _("Yes"), _("Yes, bevelled") }; |
|||
int m_choiceEdgeConnNChoices = sizeof( m_choiceEdgeConnChoices ) / sizeof( wxString ); |
|||
m_choiceEdgeConn = new wxChoice( sbSizerBrdOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceEdgeConnNChoices, m_choiceEdgeConnChoices, 0 ); |
|||
m_choiceEdgeConn->SetSelection( 0 ); |
|||
m_choiceEdgeConn->SetToolTip( _("Options for edge card connectors.") ); |
|||
|
|||
sbSizerBrdOptions->Add( m_choiceEdgeConn, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); |
|||
|
|||
|
|||
bSizerRight->Add( sbSizerBrdOptions, 0, wxEXPAND, 5 ); |
|||
|
|||
|
|||
bSizerStackup->Add( bSizerRight, 0, wxEXPAND, 5 ); |
|||
|
|||
|
|||
bMainSizer->Add( bSizerStackup, 1, wxEXPAND, 5 ); |
|||
|
|||
|
|||
this->SetSizer( bMainSizer ); |
|||
this->Layout(); |
|||
|
|||
// Connect Events
|
|||
m_thicknessCtrl->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onUpdateThicknessValue ), NULL, this ); |
|||
m_buttonSetDielectricThickness->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onCalculateDielectricThickness ), NULL, this ); |
|||
} |
|||
|
|||
PANEL_SETUP_BOARD_STACKUP_BASE::~PANEL_SETUP_BOARD_STACKUP_BASE() |
|||
{ |
|||
// Disconnect Events
|
|||
m_thicknessCtrl->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onUpdateThicknessValue ), NULL, this ); |
|||
m_buttonSetDielectricThickness->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BOARD_STACKUP_BASE::onCalculateDielectricThickness ), NULL, this ); |
|||
|
|||
} |
1587
pcbnew/board_stackup_manager/panel_board_stackup_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,80 @@ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version Jul 10 2019) |
|||
// 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> |
|||
#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/textctrl.h> |
|||
#include <wx/bitmap.h> |
|||
#include <wx/image.h> |
|||
#include <wx/icon.h> |
|||
#include <wx/button.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/statline.h> |
|||
#include <wx/scrolwin.h> |
|||
#include <wx/radiobox.h> |
|||
#include <wx/checkbox.h> |
|||
#include <wx/choice.h> |
|||
#include <wx/statbox.h> |
|||
#include <wx/panel.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class PANEL_SETUP_BOARD_STACKUP_BASE |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class PANEL_SETUP_BOARD_STACKUP_BASE : public wxPanel |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
wxStaticText* m_thicknessLabel; |
|||
wxTextCtrl* m_thicknessCtrl; |
|||
wxStaticText* m_staticTextCT; |
|||
wxTextCtrl* m_tcCTValue; |
|||
wxButton* m_buttonSetDielectricThickness; |
|||
wxStaticLine* m_staticline; |
|||
wxScrolledWindow* m_scGridWin; |
|||
wxFlexGridSizer* m_fgGridSizer; |
|||
wxStaticText* m_staticText7; |
|||
wxStaticText* m_staticText8; |
|||
wxStaticText* m_staticText9; |
|||
wxStaticText* m_staticText10; |
|||
wxStaticText* m_staticText101; |
|||
wxStaticText* m_staticTextLock; |
|||
wxStaticText* m_staticText102; |
|||
wxStaticText* m_staticText103; |
|||
wxStaticText* m_staticText104; |
|||
wxRadioBox* m_rbDielectricConstraint; |
|||
wxCheckBox* m_cbCastellatedPads; |
|||
wxCheckBox* m_cbEgdesPlated; |
|||
wxStaticText* m_staticTextFinish; |
|||
wxChoice* m_choiceFinish; |
|||
wxStaticText* m_staticTextEdgeConn; |
|||
wxChoice* m_choiceEdgeConn; |
|||
|
|||
// Virtual event handlers, overide them in your derived class |
|||
virtual void onUpdateThicknessValue( wxUpdateUIEvent& event ) { event.Skip(); } |
|||
virtual void onCalculateDielectricThickness( wxCommandEvent& event ) { event.Skip(); } |
|||
|
|||
|
|||
public: |
|||
|
|||
PANEL_SETUP_BOARD_STACKUP_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 673,317 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); |
|||
~PANEL_SETUP_BOARD_STACKUP_BASE(); |
|||
|
|||
}; |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue