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-2022 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
40class SCH_MARKER;
41
42
44{
45public:
46 DIALOG_ERC( SCH_EDIT_FRAME* parent );
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 void SelectMarker( const SCH_MARKER* aMarker );
57
64 void ExcludeMarker( SCH_MARKER* aMarker = nullptr );
65
67
68private:
69 // from DIALOG_ERC_BASE:
70 void OnCloseErcDialog( wxCloseEvent& event ) override;
71 void OnRunERCClick( wxCommandEvent& event ) override;
72 void OnDeleteOneClick( wxCommandEvent& event ) override;
73 void OnDeleteAllClick( wxCommandEvent& event ) override;
74 void OnERCItemSelected( wxDataViewEvent& aEvent ) override;
75 void OnERCItemDClick( wxDataViewEvent& aEvent ) override;
76 void OnERCItemRClick( wxDataViewEvent& aEvent ) override;
77 void OnIgnoreItemRClick( wxListEvent& event ) override;
78
79 void OnLinkClicked( wxHtmlLinkEvent& event ) override;
80
81 void OnSeverity( wxCommandEvent& aEvent ) override;
82 void OnSaveReport( wxCommandEvent& aEvent ) override;
83 void OnCancelClick( wxCommandEvent& event ) override;
84
85 void centerMarkerIdleHandler( wxIdleEvent& aEvent );
86
87 void redrawDrawPanel();
88
89 void testErc();
90
91 bool writeReport( const wxString& aFullFileName );
92
93 void deleteAllMarkers( bool aIncludeExclusions );
94
95 void syncCheckboxes();
97
98private:
101
104
105 std::shared_ptr<RC_ITEMS_PROVIDER> m_markerProvider;
106 RC_TREE_MODEL* m_markerTreeModel; // wx reference-counted ptr
107
110
112
114};
115
116
117#endif
118
119// _DIALOG_ERC_H_
Class DIALOG_ERC_BASE.
void ExcludeMarker(SCH_MARKER *aMarker=nullptr)
Exclude aMarker from the ERC list.
Definition: dialog_erc.cpp:866
const SCH_MARKER * m_centerMarkerOnIdle
Definition: dialog_erc.h:111
void OnERCItemDClick(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:632
std::shared_ptr< RC_ITEMS_PROVIDER > m_markerProvider
Definition: dialog_erc.h:105
void syncCheckboxes()
Definition: dialog_erc.cpp:346
bool m_ercRun
Definition: dialog_erc.h:109
DIALOG_ERC(SCH_EDIT_FRAME *parent)
Definition: dialog_erc.cpp:62
void testErc()
Definition: dialog_erc.cpp:457
void SelectMarker(const SCH_MARKER *aMarker)
Definition: dialog_erc.cpp:843
bool updateUI() override
Definition: dialog_erc.cpp:181
SCH_EDIT_FRAME * m_parent
Definition: dialog_erc.h:99
void OnIgnoreItemRClick(wxListEvent &event) override
Definition: dialog_erc.cpp:899
wxString m_violationsTitleTemplate
Definition: dialog_erc.h:102
void OnERCItemRClick(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:646
bool writeReport(const wxString &aFullFileName)
Definition: dialog_erc.cpp:987
void centerMarkerIdleHandler(wxIdleEvent &aEvent)
Definition: dialog_erc.cpp:858
void OnDeleteAllClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:289
void OnLinkClicked(wxHtmlLinkEvent &event) override
Definition: dialog_erc.cpp:355
int m_severities
Definition: dialog_erc.h:113
void OnRunERCClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:362
void deleteAllMarkers(bool aIncludeExclusions)
Definition: dialog_erc.cpp:941
wxString m_ignoredTitleTemplate
Definition: dialog_erc.h:103
void OnDeleteOneClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:270
void OnSaveReport(wxCommandEvent &aEvent) override
Definition: dialog_erc.cpp:953
void PrevMarker()
Definition: dialog_erc.cpp:819
void NextMarker()
Definition: dialog_erc.cpp:831
SCHEMATIC * m_currentSchematic
Definition: dialog_erc.h:100
void UpdateAnnotationWarning()
Definition: dialog_erc.cpp:143
void redrawDrawPanel()
Definition: dialog_erc.cpp:449
void Report(const wxString &aMessage) override
Display aMessage in the progress bar dialog.
Definition: dialog_erc.cpp:203
void OnERCItemSelected(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:573
RC_TREE_MODEL * m_markerTreeModel
Definition: dialog_erc.h:106
void updateDisplayedCounts()
Definition: dialog_erc.cpp:209
void OnSeverity(wxCommandEvent &aEvent) override
Definition: dialog_erc.cpp:914
bool m_running
Definition: dialog_erc.h:108
void OnCloseErcDialog(wxCloseEvent &event) override
Definition: dialog_erc.cpp:335
void OnCancelClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:321
This implements all the tricky bits for thread safety, but the GUI is left to derived classes.
virtual void AdvancePhase() override
Use the next available virtual zone of the dialog progress bar.
Holds all the data relating to one schematic.
Definition: schematic.h:61
Schematic editor (Eeschema) main window.