KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_drc.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 (C) 2011 Jean-Pierre Charras, [email protected]
5 * Copyright (C) 2009 Dick Hollenbeck, [email protected]
6 * Copyright (C) 2004-2022 KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26
27#ifndef _DIALOG_DRC_H_
28#define _DIALOG_DRC_H_
29
30#include <wx/htmllbox.h>
31#include <rc_item.h>
32#include <pcb_marker.h>
33#include <board.h>
34#include <dialog_drc_base.h>
36
37
39
40
41#define DIALOG_DRC_WINDOW_NAME wxT( "DialogDrcWindowName" )
42
43class
45{
46public:
48 DIALOG_DRC( PCB_EDIT_FRAME* aEditorFrame, wxWindow* aParent );
50
55 void SetDrcRun() { m_drcRun = true; }
56
61 void SetFootprintTestsRun() { m_footprintTestsRun = true; }
62
66 void UpdateData();
67
68 void PrevMarker();
69 void NextMarker();
70 void SelectMarker( const PCB_MARKER* aMarker );
71
72 void ExcludeMarker();
73
74private:
75 void syncCheckboxes();
76 void updateDisplayedCounts();
77
78 void OnDRCItemSelected( wxDataViewEvent& aEvent ) override;
79 void OnDRCItemDClick( wxDataViewEvent& aEvent ) override;
80 void OnDRCItemRClick( wxDataViewEvent& aEvent ) override;
81 void OnEditViolationSeverities( wxHyperlinkEvent& aEvent ) override;
82
83 void OnSeverity( wxCommandEvent& aEvent ) override;
84 void OnSaveReport( wxCommandEvent& aEvent ) override;
85
86 void OnDeleteOneClick( wxCommandEvent& aEvent ) override;
87 void OnDeleteAllClick( wxCommandEvent& aEvent ) override;
88 void OnRunDRCClick( wxCommandEvent& aEvent ) override;
89
90 void OnErrorLinkClicked( wxHtmlLinkEvent& event ) override;
91
92 // These require special handling while the DRC tests are running.
93 void OnCancelClick( wxCommandEvent& aEvent ) override;
94 void OnClose( wxCloseEvent& event ) override;
95
96 // Updates data which can be modified outside the dialog.
97 void OnActivateDlg( wxActivateEvent& aEvent ) override;
98
99 void OnChangingNotebookPage( wxNotebookEvent& aEvent ) override;
100
101 void centerMarkerIdleHandler( wxIdleEvent& aEvent );
102
103 void deleteAllMarkers( bool aIncludeExclusions );
104 void refreshEditor();
105
106 // PROGRESS_REPORTER calls
107 bool updateUI() override;
108 void AdvancePhase( const wxString& aMessage ) override;
109
110 BOARD_DESIGN_SETTINGS& bds() { return m_currentBoard->GetDesignSettings(); }
111
112 BOARD* m_currentBoard; // the board currently on test
117
122
123 std::shared_ptr<RC_ITEMS_PROVIDER> m_markersProvider;
124 std::shared_ptr<RC_ITEMS_PROVIDER> m_ratsnestProvider;
125 std::shared_ptr<RC_ITEMS_PROVIDER> m_fpWarningsProvider;
126
127 RC_TREE_MODEL* m_markersTreeModel; // wx reference-counted ptr
128 RC_TREE_MODEL* m_unconnectedTreeModel; // wx reference-counted ptr
129 RC_TREE_MODEL* m_fpWarningsTreeModel; // wx reference-counted ptr
130
132
133 int m_severities; // A mask of SEVERITY flags
134};
135
136#endif // _DIALOG_DRC_H_
137
Container for design settings for a BOARD object.
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:276
Class DIALOG_DRC_BASE.
wxString m_footprintsTitleTemplate
Definition: dialog_drc.h:120
void SetFootprintTestsRun()
Called after running Footprint Tests.
Definition: dialog_drc.h:61
const PCB_MARKER * m_centerMarkerOnIdle
Definition: dialog_drc.h:131
std::shared_ptr< RC_ITEMS_PROVIDER > m_ratsnestProvider
Definition: dialog_drc.h:124
wxString m_markersTitleTemplate
Definition: dialog_drc.h:118
int m_severities
Definition: dialog_drc.h:133
bool m_footprintTestsRun
Definition: dialog_drc.h:116
RC_TREE_MODEL * m_fpWarningsTreeModel
Definition: dialog_drc.h:129
bool m_running
Definition: dialog_drc.h:114
void SetDrcRun()
Called after running DRC.
Definition: dialog_drc.h:55
BOARD_DESIGN_SETTINGS & bds()
Definition: dialog_drc.h:110
BOARD * m_currentBoard
Definition: dialog_drc.h:112
wxString m_ignoredTitleTemplate
Definition: dialog_drc.h:121
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:128
wxString m_unconnectedTitleTemplate
Definition: dialog_drc.h:119
std::shared_ptr< RC_ITEMS_PROVIDER > m_fpWarningsProvider
Definition: dialog_drc.h:125
std::shared_ptr< RC_ITEMS_PROVIDER > m_markersProvider
Definition: dialog_drc.h:123
PCB_EDIT_FRAME * m_frame
Definition: dialog_drc.h:113
bool m_drcRun
Definition: dialog_drc.h:115
RC_TREE_MODEL * m_markersTreeModel
Definition: dialog_drc.h:127
The main frame for Pcbnew.
This implements all the tricky bits for thread safety, but the GUI is left to derived classes.