KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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-2023 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
30#include <dialog_erc_base.h>
32
33
37wxDECLARE_EVENT( EDA_EVT_CLOSE_ERC_DIALOG, wxCommandEvent );
38
39
40#define DIALOG_ERC_WINDOW_NAME "DialogErcWindowName"
41
42
43class SCH_MARKER;
44
45
47{
48public:
49 DIALOG_ERC( SCH_EDIT_FRAME* parent );
51
52 // PROGRESS_REPORTER_BASE calls
53 bool updateUI() override;
54 void AdvancePhase( const wxString& aMessage ) override;
55 void Report( const wxString& aMessage ) override;
56
57 void PrevMarker();
58 void NextMarker();
59 void SelectMarker( const SCH_MARKER* aMarker );
60
67 void ExcludeMarker( SCH_MARKER* aMarker = nullptr );
68
70
71private:
72 // from DIALOG_ERC_BASE:
73 void OnCloseErcDialog( wxCloseEvent& event ) override;
74 void OnRunERCClick( wxCommandEvent& event ) override;
75 void OnDeleteOneClick( wxCommandEvent& event ) override;
76 void OnDeleteAllClick( wxCommandEvent& event ) override;
77 void OnERCItemSelected( wxDataViewEvent& aEvent ) override;
78 void OnERCItemDClick( wxDataViewEvent& aEvent ) override;
79 void OnERCItemRClick( wxDataViewEvent& aEvent ) override;
80 void OnIgnoredItemRClick( wxListEvent& aEvent ) override;
81 void OnEditViolationSeverities( wxHyperlinkEvent& aEvent ) override;
82
83 void OnLinkClicked( wxHtmlLinkEvent& event ) override;
84
85 void OnSeverity( wxCommandEvent& aEvent ) override;
86 void OnSaveReport( wxCommandEvent& aEvent ) override;
87 void OnCancelClick( wxCommandEvent& event ) override;
88
89 void centerMarkerIdleHandler( wxIdleEvent& aEvent );
90
91 void redrawDrawPanel();
92
93 void testErc();
94
95 bool writeReport( const wxString& aFullFileName );
96
97 void deleteAllMarkers( bool aIncludeExclusions );
98
99 void syncCheckboxes();
101
102private:
105
108
109 std::shared_ptr<RC_ITEMS_PROVIDER> m_markerProvider;
110 RC_TREE_MODEL* m_markerTreeModel; // wx reference-counted ptr
111
114
116
118};
119
120
121#endif
122
123// _DIALOG_ERC_H_
Class DIALOG_ERC_BASE.
void ExcludeMarker(SCH_MARKER *aMarker=nullptr)
Exclude aMarker from the ERC list.
Definition: dialog_erc.cpp:944
void OnIgnoredItemRClick(wxListEvent &aEvent) override
Definition: dialog_erc.cpp:869
const SCH_MARKER * m_centerMarkerOnIdle
Definition: dialog_erc.h:115
void OnERCItemDClick(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:589
std::shared_ptr< RC_ITEMS_PROVIDER > m_markerProvider
Definition: dialog_erc.h:109
void syncCheckboxes()
Definition: dialog_erc.cpp:374
bool m_ercRun
Definition: dialog_erc.h:113
void testErc()
Definition: dialog_erc.cpp:498
void SelectMarker(const SCH_MARKER *aMarker)
Definition: dialog_erc.cpp:921
bool updateUI() override
Definition: dialog_erc.cpp:201
SCH_EDIT_FRAME * m_parent
Definition: dialog_erc.h:103
wxString m_violationsTitleTemplate
Definition: dialog_erc.h:106
void OnERCItemRClick(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:603
bool writeReport(const wxString &aFullFileName)
void centerMarkerIdleHandler(wxIdleEvent &aEvent)
Definition: dialog_erc.cpp:936
void OnDeleteAllClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:307
void OnLinkClicked(wxHtmlLinkEvent &event) override
Definition: dialog_erc.cpp:383
int m_severities
Definition: dialog_erc.h:117
void OnRunERCClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:389
void deleteAllMarkers(bool aIncludeExclusions)
wxString m_ignoredTitleTemplate
Definition: dialog_erc.h:107
void OnDeleteOneClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:290
void OnSaveReport(wxCommandEvent &aEvent) override
void PrevMarker()
Definition: dialog_erc.cpp:897
void NextMarker()
Definition: dialog_erc.cpp:909
SCHEMATIC * m_currentSchematic
Definition: dialog_erc.h:104
void OnEditViolationSeverities(wxHyperlinkEvent &aEvent) override
Definition: dialog_erc.cpp:977
void UpdateAnnotationWarning()
Definition: dialog_erc.cpp:165
void redrawDrawPanel()
Definition: dialog_erc.cpp:490
void Report(const wxString &aMessage) override
Display aMessage in the progress bar dialog.
Definition: dialog_erc.cpp:223
void OnERCItemSelected(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:527
RC_TREE_MODEL * m_markerTreeModel
Definition: dialog_erc.h:110
void updateDisplayedCounts()
Definition: dialog_erc.cpp:229
void OnSeverity(wxCommandEvent &aEvent) override
Definition: dialog_erc.cpp:983
bool m_running
Definition: dialog_erc.h:112
void OnCloseErcDialog(wxCloseEvent &event) override
Definition: dialog_erc.cpp:352
void OnCancelClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:338
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:77
Schematic editor (Eeschema) main window.
wxDECLARE_EVENT(EDA_EVT_CLOSE_ERC_DIALOG, wxCommandEvent)
Event sent to parent when dialog is mode-less.