KiCad PCB EDA Suite
PANEL_SETUP_MASK_AND_PASTE Class Reference

#include <panel_setup_mask_and_paste.h>

Inheritance diagram for PANEL_SETUP_MASK_AND_PASTE:
PANEL_SETUP_MASK_AND_PASTE_BASE

Public Member Functions

 PANEL_SETUP_MASK_AND_PASTE (PAGED_DIALOG *aParent, PCB_EDIT_FRAME *aFrame)
 
 ~PANEL_SETUP_MASK_AND_PASTE ()
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
void ImportSettingsFrom (BOARD *aBoard)
 

Protected Attributes

wxStaticText * m_staticTextInfoValPos
 
wxStaticText * m_staticTextInfoValNeg
 
wxStaticBitmap * m_bitmapWarning
 
wxStaticText * m_staticTextInfoMaskMinWidth
 
wxStaticText * m_MaskMarginLabel
 
wxTextCtrl * m_MaskMarginCtrl
 
wxStaticText * m_MaskMarginUnits
 
wxStaticText * m_MaskMinWidthLabel
 
wxTextCtrl * m_MaskMinWidthCtrl
 
wxStaticText * m_MaskMinWidthUnits
 
wxStaticText * m_PasteMarginLabel
 
wxTextCtrl * m_PasteMarginCtrl
 
wxStaticText * m_PasteMarginUnits
 
wxStaticText * m_staticTextRatio
 
wxTextCtrl * m_SolderPasteMarginRatioCtrl
 
wxStaticText * m_SolderPasteRatioMarginUnits
 
wxStaticText * m_staticTextInfoCopper
 
wxStaticText * m_staticTextInfoPaste
 

Private Attributes

PCB_EDIT_FRAMEm_Frame
 
BOARD_DESIGN_SETTINGSm_BrdSettings
 
UNIT_BINDER m_maskMargin
 
UNIT_BINDER m_maskMinWidth
 
UNIT_BINDER m_pasteMargin
 

Detailed Description

Definition at line 38 of file panel_setup_mask_and_paste.h.

Constructor & Destructor Documentation

◆ PANEL_SETUP_MASK_AND_PASTE()

PANEL_SETUP_MASK_AND_PASTE::PANEL_SETUP_MASK_AND_PASTE ( PAGED_DIALOG aParent,
PCB_EDIT_FRAME aFrame 
)

Definition at line 33 of file panel_setup_mask_and_paste.cpp.

34  :
39 {
40  m_Frame = aFrame;
42 }
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:553
BOARD_DESIGN_SETTINGS * m_BrdSettings
PANEL_SETUP_MASK_AND_PASTE_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)
PAGED_TREEBOOK * GetTreebook()
Definition: paged_dialog.h:61
BOARD * GetBoard() const

References PCB_BASE_FRAME::GetBoard(), BOARD::GetDesignSettings(), m_BrdSettings, and m_Frame.

◆ ~PANEL_SETUP_MASK_AND_PASTE()

PANEL_SETUP_MASK_AND_PASTE::~PANEL_SETUP_MASK_AND_PASTE ( )
inline

Definition at line 50 of file panel_setup_mask_and_paste.h.

50 { };

Member Function Documentation

◆ ImportSettingsFrom()

void PANEL_SETUP_MASK_AND_PASTE::ImportSettingsFrom ( BOARD aBoard)

Definition at line 94 of file panel_setup_mask_and_paste.cpp.

95 {
96  BOARD_DESIGN_SETTINGS* savedSettings = m_BrdSettings;
97 
98  m_BrdSettings = &aBoard->GetDesignSettings();
100 
101  m_BrdSettings = savedSettings;
102 }
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:553
BOARD_DESIGN_SETTINGS * m_BrdSettings
BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.

References BOARD::GetDesignSettings(), m_BrdSettings, and TransferDataToWindow().

Referenced by DIALOG_BOARD_SETUP::OnAuxiliaryAction().

◆ TransferDataFromWindow()

bool PANEL_SETUP_MASK_AND_PASTE::TransferDataFromWindow ( )
override

Definition at line 70 of file panel_setup_mask_and_paste.cpp.

71 {
74 
76 
77  double dtmp = 0.0;
78  wxString msg = m_SolderPasteMarginRatioCtrl->GetValue();
79  msg.ToDouble( &dtmp );
80 
81  // A margin ratio de -50% means no paste on a pad, the ratio must be >= 50 %
82  if( dtmp < -50 )
83  dtmp = -50;
84 
85  if( dtmp > +100 )
86  dtmp = +100;
87 
89 
90  return true;
91 }
int m_SolderMaskMargin
Solder mask margin.
int m_SolderPasteMargin
Solder paste margin absolute value.
BOARD_DESIGN_SETTINGS * m_BrdSettings
virtual long long int GetValue()
Function GetValue Returns the current value in Internal Units.
double m_SolderPasteMarginRatio
Solder pask margin ratio value of pad size The final margin is the sum of these 2 values.
int m_SolderMaskMinWidth
Solder mask min width.

References UNIT_BINDER::GetValue(), m_BrdSettings, m_maskMargin, m_maskMinWidth, m_pasteMargin, BOARD_DESIGN_SETTINGS::m_SolderMaskMargin, BOARD_DESIGN_SETTINGS::m_SolderMaskMinWidth, BOARD_DESIGN_SETTINGS::m_SolderPasteMargin, BOARD_DESIGN_SETTINGS::m_SolderPasteMarginRatio, and PANEL_SETUP_MASK_AND_PASTE_BASE::m_SolderPasteMarginRatioCtrl.

◆ TransferDataToWindow()

bool PANEL_SETUP_MASK_AND_PASTE::TransferDataToWindow ( )
override

Definition at line 45 of file panel_setup_mask_and_paste.cpp.

46 {
50 
51  // Prefer "-0" to "0" for normally negative values
53  m_PasteMarginCtrl->SetValue( wxT( "-" ) + m_PasteMarginCtrl->GetValue() );
54 
55  // Add solder paste margin ratio in percent
56  // for the usual default value 0.0, display -0.0 (or -0,0 in some countries)
57  wxString msg;
58  msg.Printf( wxT( "%f" ), m_BrdSettings->m_SolderPasteMarginRatio * 100.0 );
59 
60  // Sometimes Printf adds a sign if the value is small
61  if( m_BrdSettings->m_SolderPasteMarginRatio == 0.0 && msg[0] == '0' )
62  m_SolderPasteMarginRatioCtrl->SetValue( wxT( "-" ) + msg );
63  else
64  m_SolderPasteMarginRatioCtrl->SetValue( msg );
65 
66  return true;
67 }
int m_SolderMaskMargin
Solder mask margin.
int m_SolderPasteMargin
Solder paste margin absolute value.
BOARD_DESIGN_SETTINGS * m_BrdSettings
virtual void SetValue(int aValue)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...
double m_SolderPasteMarginRatio
Solder pask margin ratio value of pad size The final margin is the sum of these 2 values.
int m_SolderMaskMinWidth
Solder mask min width.

References m_BrdSettings, m_maskMargin, m_maskMinWidth, m_pasteMargin, PANEL_SETUP_MASK_AND_PASTE_BASE::m_PasteMarginCtrl, BOARD_DESIGN_SETTINGS::m_SolderMaskMargin, BOARD_DESIGN_SETTINGS::m_SolderMaskMinWidth, BOARD_DESIGN_SETTINGS::m_SolderPasteMargin, BOARD_DESIGN_SETTINGS::m_SolderPasteMarginRatio, PANEL_SETUP_MASK_AND_PASTE_BASE::m_SolderPasteMarginRatioCtrl, and UNIT_BINDER::SetValue().

Referenced by ImportSettingsFrom().

Member Data Documentation

◆ m_bitmapWarning

wxStaticBitmap* PANEL_SETUP_MASK_AND_PASTE_BASE::m_bitmapWarning
protectedinherited

◆ m_BrdSettings

BOARD_DESIGN_SETTINGS* PANEL_SETUP_MASK_AND_PASTE::m_BrdSettings
private

◆ m_Frame

PCB_EDIT_FRAME* PANEL_SETUP_MASK_AND_PASTE::m_Frame
private

Definition at line 41 of file panel_setup_mask_and_paste.h.

Referenced by PANEL_SETUP_MASK_AND_PASTE().

◆ m_maskMargin

UNIT_BINDER PANEL_SETUP_MASK_AND_PASTE::m_maskMargin
private

Definition at line 44 of file panel_setup_mask_and_paste.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_MaskMarginCtrl

wxTextCtrl* PANEL_SETUP_MASK_AND_PASTE_BASE::m_MaskMarginCtrl
protectedinherited

◆ m_MaskMarginLabel

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_MaskMarginLabel
protectedinherited

◆ m_MaskMarginUnits

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_MaskMarginUnits
protectedinherited

◆ m_maskMinWidth

UNIT_BINDER PANEL_SETUP_MASK_AND_PASTE::m_maskMinWidth
private

Definition at line 45 of file panel_setup_mask_and_paste.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_MaskMinWidthCtrl

wxTextCtrl* PANEL_SETUP_MASK_AND_PASTE_BASE::m_MaskMinWidthCtrl
protectedinherited

◆ m_MaskMinWidthLabel

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_MaskMinWidthLabel
protectedinherited

◆ m_MaskMinWidthUnits

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_MaskMinWidthUnits
protectedinherited

◆ m_pasteMargin

UNIT_BINDER PANEL_SETUP_MASK_AND_PASTE::m_pasteMargin
private

Definition at line 46 of file panel_setup_mask_and_paste.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_PasteMarginCtrl

wxTextCtrl* PANEL_SETUP_MASK_AND_PASTE_BASE::m_PasteMarginCtrl
protectedinherited

◆ m_PasteMarginLabel

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_PasteMarginLabel
protectedinherited

◆ m_PasteMarginUnits

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_PasteMarginUnits
protectedinherited

◆ m_SolderPasteMarginRatioCtrl

wxTextCtrl* PANEL_SETUP_MASK_AND_PASTE_BASE::m_SolderPasteMarginRatioCtrl
protectedinherited

◆ m_SolderPasteRatioMarginUnits

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_SolderPasteRatioMarginUnits
protectedinherited

◆ m_staticTextInfoCopper

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_staticTextInfoCopper
protectedinherited

◆ m_staticTextInfoMaskMinWidth

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_staticTextInfoMaskMinWidth
protectedinherited

◆ m_staticTextInfoPaste

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_staticTextInfoPaste
protectedinherited

◆ m_staticTextInfoValNeg

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_staticTextInfoValNeg
protectedinherited

◆ m_staticTextInfoValPos

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_staticTextInfoValPos
protectedinherited

◆ m_staticTextRatio

wxStaticText* PANEL_SETUP_MASK_AND_PASTE_BASE::m_staticTextRatio
protectedinherited

The documentation for this class was generated from the following files: