KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_mask_and_paste.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) 2019-2023 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 2
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
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24
25#include <pcb_edit_frame.h>
29
30
32 PCB_EDIT_FRAME* aFrame ) :
33 PANEL_SETUP_MASK_AND_PASTE_BASE( aParentWindow ),
34 m_maskExpansion( aFrame, m_maskMarginLabel, m_maskMarginCtrl, m_maskMarginUnits ),
35 m_maskMinWidth( aFrame, m_maskMinWidthLabel, m_maskMinWidthCtrl, m_maskMinWidthUnits ),
36 m_maskToCopperClearance( aFrame, m_maskToCopperClearanceLabel, m_maskToCopperClearanceCtrl,
37 m_maskToCopperClearanceUnits ),
38 m_pasteMargin( aFrame, m_pasteMarginLabel, m_pasteMarginCtrl, m_pasteMarginUnits ),
39 m_pasteMarginRatio( aFrame, m_pasteMarginRatioLabel, m_pasteMarginRatioCtrl,
40 m_pasteMarginRatioUnits )
41{
42 m_Frame = aFrame;
44
45 m_staticTextInfoPaste->SetFont( KIUI::GetInfoFont( this ).Italic() );
46
48
49 m_pasteMarginRatio.SetUnits( EDA_UNITS::PERCENT );
51}
52
53
55{
59 m_tentVias->SetValue( m_Frame->GetBoard()->GetTentVias() );
60
63
65
66 return true;
67}
68
69
71{
72 // These are all stored in project file, not board, so no need for OnModify()
76 m_Frame->GetBoard()->SetTentVias( m_tentVias->GetValue() );
77
80
82
83 return true;
84}
85
86
88{
89 BOARD_DESIGN_SETTINGS* savedSettings = m_BrdSettings;
90
93
94 m_BrdSettings = savedSettings;
95}
Container for design settings for a BOARD object.
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:276
void SetTentVias(bool aFlag)
Definition: board.h:661
bool GetTentVias() const
Definition: board.h:660
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition: board.cpp:808
Class PANEL_SETUP_MASK_AND_PASTE_BASE.
PANEL_SETUP_MASK_AND_PASTE(wxWindow *aParentWindow, PCB_EDIT_FRAME *aFrame)
BOARD_DESIGN_SETTINGS * m_BrdSettings
BOARD * GetBoard() const
The main frame for Pcbnew.
virtual long long int GetValue()
Return the current value in Internal Units.
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 SetNegativeZero()
Definition: unit_binder.h:71
virtual double GetDoubleValue()
Return the current value in Internal Units.
virtual void SetDoubleValue(double aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
Definition: ui_common.cpp:151