KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_board_setup.h
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 modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * 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, see <https://www.gnu.org/licenses/>.
18 */
19
20
21#pragma once
22
23#include <memory>
26
27class BOARD;
29class PCB_EDIT_FRAME;
45
46
48{
49public:
50 DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame, wxWindow* aWindow = nullptr );
52
53protected:
54 // event handlers
55 void onPageChanged( wxBookCtrlEvent& aEvent ) override;
56 void onAuxiliaryAction( wxCommandEvent& aEvent ) override;
57 void onCancelButton( wxCommandEvent& aEvent );
58 void onCloseWindow( wxCloseEvent& aEvent );
59
60 void refreshRulePage( size_t aPage );
61
63 void refreshStagedPages( const wxString& aGroup );
64 void forEachOpenRulePage( const std::function<void( PANEL_SETUP_CONSTRAINT_RULES* )>& aAction );
65
66 bool TransferDataFromWindow() override;
67
75
76private:
77 bool canDiscardChanges();
78
79 size_t m_currentPage; // the current page index
98
99 std::unique_ptr<DRC_RULE_DOCUMENT> m_ruleDocument;
100
103 std::unique_ptr<BOARD_DESIGN_SETTINGS> m_stagedSettings;
104};
Container for design settings for a BOARD object.
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:411
DIALOG_BOARD_SETUP(PCB_EDIT_FRAME *aFrame, wxWindow *aWindow=nullptr)
void forEachOpenRulePage(const std::function< void(PANEL_SETUP_CONSTRAINT_RULES *)> &aAction)
std::unique_ptr< DRC_RULE_DOCUMENT > m_ruleDocument
PCB_EDIT_FRAME * m_frame
void onCancelButton(wxCommandEvent &aEvent)
PANEL_SETUP_TUNING_PROFILES * m_tuningProfiles
std::unique_ptr< BOARD_DESIGN_SETTINGS > m_stagedSettings
The constraint, mask and rule pages edit one value from several pages, so they share this copy,...
void onAuxiliaryAction(wxCommandEvent &aEvent) override
PANEL_SETUP_BOARD_STACKUP * m_physicalStackup
PANEL_SETUP_ZONES * m_zones
void refreshStagedPages(const wxString &aGroup)
Reads the staged settings back into the open pages of one Import Settings group.
PANEL_SETUP_BOARD_FINISH * m_boardFinish
PANEL_SETUP_LAYERS * m_layers
bool TransferDataFromWindow() override
void onPageChanged(wxBookCtrlEvent &aEvent) override
PANEL_SETUP_NETCLASSES * m_netClasses
void onCloseWindow(wxCloseEvent &aEvent)
void refreshRulePage(size_t aPage)
The custom rules of one board, held in memory while Board Setup is open.
PAGED_DIALOG(wxWindow *aParent, const wxString &aTitle, bool aShowReset, bool aShowOpenFolder, const wxString &aAuxiliaryAction=wxEmptyString, const wxSize &aInitialSize=wxDefaultSize)
The main frame for Pcbnew.