KiCad PCB EDA Suite
dialog_erc.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) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef _DIALOG_ERC_H_
26 #define _DIALOG_ERC_H_
27 
28 #include <wx/htmllbox.h>
29 #include <vector>
30 #include <lib_pin.h> // For PINTYPE_COUNT definition
31 
32 #include <dialog_erc_base.h>
34 #include <erc_settings.h>
35 
36 
37 #define DIALOG_ERC_WINDOW_NAME "DialogErcWindowName"
38 
39 
40 class SCH_MARKER;
41 
42 
44 {
45 public:
46  DIALOG_ERC( SCH_EDIT_FRAME* parent );
47  ~DIALOG_ERC();
48 
49  // PROGRESS_REPORTER_BASE calls
50  bool updateUI() override;
51  void AdvancePhase( const wxString& aMessage ) override;
52  void Report( const wxString& aMessage ) override;
53 
54  void PrevMarker();
55  void NextMarker();
56 
63  void ExcludeMarker( SCH_MARKER* aMarker = nullptr );
64 
66 
67 private:
68  // from DIALOG_ERC_BASE:
69  void OnCloseErcDialog( wxCloseEvent& event ) override;
70  void OnRunERCClick( wxCommandEvent& event ) override;
71  void OnEraseDrcMarkersClick( wxCommandEvent& event ) override;
72  void OnERCItemSelected( wxDataViewEvent& aEvent ) override;
73  void OnERCItemDClick( wxDataViewEvent& aEvent ) override;
74  void OnERCItemRClick( wxDataViewEvent& aEvent ) override;
75  void OnLinkClicked( wxHtmlLinkEvent& event ) override;
76 
77  void OnSeverity( wxCommandEvent& aEvent ) override;
78  void OnSaveReport( wxCommandEvent& aEvent ) override;
79  void OnCancelClick( wxCommandEvent& event ) override;
80 
81  void redrawDrawPanel();
82 
83  void testErc();
84 
85  bool writeReport( const wxString& aFullFileName );
86 
87  void deleteAllMarkers( bool aIncludeExclusions );
88 
89  void syncCheckboxes();
90  void updateDisplayedCounts();
91 
92 private:
94 
97 
98  bool m_running;
99  bool m_ercRun;
100 
102 };
103 
104 
105 #endif
106 
107 // _DIALOG_ERC_H_
void ExcludeMarker(SCH_MARKER *aMarker=nullptr)
Exclude aMarker from the ERC list.
Definition: dialog_erc.cpp:678
void deleteAllMarkers(bool aIncludeExclusions)
Definition: dialog_erc.cpp:745
void OnERCItemRClick(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:486
void OnCancelClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:231
RC_TREE_MODEL * m_markerTreeModel
Definition: dialog_erc.h:96
bool m_running
Definition: dialog_erc.h:98
void syncCheckboxes()
Definition: dialog_erc.cpp:256
virtual void AdvancePhase() override
Use the next available virtual zone of the dialog progress bar.
Class DIALOG_ERC_BASE.
void OnLinkClicked(wxHtmlLinkEvent &event) override
Definition: dialog_erc.cpp:265
bool writeReport(const wxString &aFullFileName)
Definition: dialog_erc.cpp:788
void OnEraseDrcMarkersClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:200
void PrevMarker()
Definition: dialog_erc.cpp:660
RC_ITEMS_PROVIDER * m_markerProvider
Definition: dialog_erc.h:95
void updateDisplayedCounts()
Definition: dialog_erc.cpp:173
Schematic editor (Eeschema) main window.
void OnSeverity(wxCommandEvent &aEvent) override
Definition: dialog_erc.cpp:711
Provide an abstract interface of a RC_ITEM* list manager.
Definition: rc_item.h:45
void Report(const wxString &aMessage) override
Display aMessage in the progress bar dialog.
Definition: dialog_erc.cpp:167
void UpdateAnnotationWarning()
Definition: dialog_erc.cpp:107
int m_severities
Definition: dialog_erc.h:101
DIALOG_ERC(SCH_EDIT_FRAME *parent)
Definition: dialog_erc.cpp:52
void OnERCItemSelected(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:444
SCH_EDIT_FRAME * m_parent
Definition: dialog_erc.h:93
void OnCloseErcDialog(wxCloseEvent &event) override
Definition: dialog_erc.cpp:245
This implements all the tricky bits for thread safety, but the GUI is left to derived classes.
void testErc()
Definition: dialog_erc.cpp:350
void OnERCItemDClick(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:472
bool updateUI() override
Definition: dialog_erc.cpp:145
void NextMarker()
Definition: dialog_erc.cpp:669
void OnSaveReport(wxCommandEvent &aEvent) override
Definition: dialog_erc.cpp:754
bool m_ercRun
Definition: dialog_erc.h:99
void redrawDrawPanel()
Definition: dialog_erc.cpp:342
void OnRunERCClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:272