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 The 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
52
53
55{
56 m_maskExpansion.SetValue( m_BrdSettings->m_SolderMaskExpansion );
57 m_maskMinWidth.SetValue( m_BrdSettings->m_SolderMaskMinWidth );
58 m_maskToCopperClearance.SetValue( m_BrdSettings->m_SolderMaskToCopperClearance );
59 m_tentViasFront->SetValue( m_BrdSettings->m_TentViasFront );
60 m_tentViasBack->SetValue( m_BrdSettings->m_TentViasBack );
61
62 m_pasteMargin.SetValue( m_BrdSettings->m_SolderPasteMargin );
63 m_pasteMarginRatio.SetDoubleValue( m_BrdSettings->m_SolderPasteMarginRatio * 100.0 );
64
65 m_allowBridges->SetValue( m_BrdSettings->m_AllowSoldermaskBridgesInFPs );
66
67 return true;
68}
69
70
72{
73 // These are all stored in project file, not board, so no need for OnModify()
74 m_BrdSettings->m_SolderMaskExpansion = m_maskExpansion.GetValue();
75 m_BrdSettings->m_SolderMaskMinWidth = m_maskMinWidth.GetValue();
76 m_BrdSettings->m_SolderMaskToCopperClearance = m_maskToCopperClearance.GetValue();
77 m_BrdSettings->m_TentViasFront = m_tentViasFront->GetValue();
78 m_BrdSettings->m_TentViasBack = m_tentViasBack->GetValue();
79
80 m_BrdSettings->m_SolderPasteMargin = m_pasteMargin.GetValue();
81 m_BrdSettings->m_SolderPasteMarginRatio = m_pasteMarginRatio.GetDoubleValue() / 100.0;
82
83 m_BrdSettings->m_AllowSoldermaskBridgesInFPs = m_allowBridges->GetValue();
84
85 return true;
86}
87
88
90{
91 BOARD_DESIGN_SETTINGS* savedSettings = m_BrdSettings;
92
95
96 m_BrdSettings = savedSettings;
97}
Container for design settings for a BOARD object.
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:317
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Definition board.cpp:1040
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)
PANEL_SETUP_MASK_AND_PASTE(wxWindow *aParentWindow, PCB_EDIT_FRAME *aFrame)
BOARD_DESIGN_SETTINGS * m_BrdSettings
The main frame for Pcbnew.
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)