KiCad PCB EDA Suite
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, jean-pierre.charras@ujf-grenoble.fr
5  * Copyright (C) 2009 Dick Hollenbeck, dick@softplc.com
6  * Copyright (C) 2004-2020 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 <fctsys.h>
32 #include <pcbnew.h>
33 #include <drc/drc.h>
34 #include <rc_item.h>
35 #include <class_marker_pcb.h>
36 #include <class_board.h>
37 #include <dialog_drc_base.h>
38 #include <widgets/unit_binder.h>
39 
40 
42 
43 
44 #define DIALOG_DRC_WINDOW_NAME "DialogDrcWindowName"
45 
46 class
48 {
49 public:
51  DIALOG_DRC( DRC* aTester, PCB_EDIT_FRAME* aEditorFrame, wxWindow* aParent );
52  ~DIALOG_DRC();
53 
54  void SetMarkersProvider( RC_ITEMS_PROVIDER* aProvider );
55  void SetUnconnectedProvider( RC_ITEMS_PROVIDER* aProvider );
56  void SetFootprintsProvider( RC_ITEMS_PROVIDER* aProvider );
57 
58 private:
66  bool writeReport( const wxString& aFullFileName );
67 
68  void initValues();
69  void displayDRCValues();
70  void setDRCParameters();
71  void syncCheckboxes();
72  void updateDisplayedCounts();
73 
74  void OnDRCItemSelected( wxDataViewEvent& aEvent ) override;
75  void OnDRCItemDClick( wxDataViewEvent& aEvent ) override;
76  void OnDRCItemRClick( wxDataViewEvent& aEvent ) override;
77 
78  void OnSeverity( wxCommandEvent& aEvent ) override;
79  void OnSaveReport( wxCommandEvent& aEvent ) override;
80 
81  void OnDeleteOneClick( wxCommandEvent& aEvent ) override;
82  void OnDeleteAllClick( wxCommandEvent& aEvent ) override;
83  void OnRunDRCClick( wxCommandEvent& aEvent ) override;
84  void OnCancelClick( wxCommandEvent& aEvent ) override;
85 
88  void OnActivateDlg( wxActivateEvent& aEvent ) override;
89 
90  void OnChangingNotebookPage( wxNotebookEvent& aEvent ) override;
91 
92  void deleteAllMarkers();
93  void refreshBoardEditor();
94 
95  BOARD_DESIGN_SETTINGS& bds() { return m_currentBoard->GetDesignSettings(); }
96 
97  BOARD* m_currentBoard; // the board currently on test
100 
104 
108 
111 
114 
117 
119 };
120 
121 #endif // _DIALOG_DRC_H_
122 
UNIT_BINDER m_trackMinWidth
Definition: dialog_drc.h:105
BOARD_DESIGN_SETTINGS & bds()
Definition: dialog_drc.h:95
RC_TREE_MODEL * m_markerTreeModel
Definition: dialog_drc.h:110
Class DIALOG_DRC_BASE.
PCB_EDIT_FRAME * m_brdEditor
Definition: dialog_drc.h:99
wxString m_footprintsTitleTemplate
Definition: dialog_drc.h:103
UNIT_BINDER m_viaMinSize
Definition: dialog_drc.h:106
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:109
BOARD * m_currentBoard
Definition: dialog_drc.h:97
Provide an abstract interface of a RC_ITEM* list manager.
Definition: rc_item.h:42
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:112
DRC * m_tester
Definition: dialog_drc.h:98
wxString m_markersTitleTemplate
Definition: dialog_drc.h:101
Markers used to show a drc problem on boards.
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:115
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:116
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:113
UNIT_BINDER m_uviaMinSize
Definition: dialog_drc.h:107
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:180
Design Rule Checker object that performs all the DRC tests.
Definition: drc.h:105
PCB_EDIT_FRAME is the main frame for Pcbnew.
int m_severities
Definition: dialog_drc.h:118
wxString m_unconnectedTitleTemplate
Definition: dialog_drc.h:102
BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.