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#include <lib_pin.h> // For PINTYPE_COUNT definition
30
31#include <dialog_erc_base.h>
33#include <erc_settings.h>
34
35
39wxDECLARE_EVENT( EDA_EVT_CLOSE_ERC_DIALOG, wxCommandEvent );
40
41
42#define DIALOG_ERC_WINDOW_NAME "DialogErcWindowName"
43
44
45class SCH_MARKER;
46
47
49{
50public:
51 DIALOG_ERC( SCH_EDIT_FRAME* parent );
53
54 // PROGRESS_REPORTER_BASE calls
55 bool updateUI() override;
56 void AdvancePhase( const wxString& aMessage ) override;
57 void Report( const wxString& aMessage ) override;
58
59 void PrevMarker();
60 void NextMarker();
61 void SelectMarker( const SCH_MARKER* aMarker );
62
69 void ExcludeMarker( SCH_MARKER* aMarker = nullptr );
70
72
73private:
74 // from DIALOG_ERC_BASE:
75 void OnCloseErcDialog( wxCloseEvent& event ) override;
76 void OnRunERCClick( wxCommandEvent& event ) override;
77 void OnDeleteOneClick( wxCommandEvent& event ) override;
78 void OnDeleteAllClick( wxCommandEvent& event ) override;
79 void OnERCItemSelected( wxDataViewEvent& aEvent ) override;
80 void OnERCItemDClick( wxDataViewEvent& aEvent ) override;
81 void OnERCItemRClick( wxDataViewEvent& aEvent ) override;
82 void OnEditViolationSeverities( wxHyperlinkEvent& aEvent ) override;
83
84 void OnLinkClicked( wxHtmlLinkEvent& event ) override;
85
86 void OnSeverity( wxCommandEvent& aEvent ) override;
87 void OnSaveReport( wxCommandEvent& aEvent ) override;
88 void OnCancelClick( wxCommandEvent& event ) override;
89
90 void centerMarkerIdleHandler( wxIdleEvent& aEvent );
91
92 void redrawDrawPanel();
93
94 void testErc();
95
96 bool writeReport( const wxString& aFullFileName );
97
98 void deleteAllMarkers( bool aIncludeExclusions );
99
100 void syncCheckboxes();
102
103private:
106
109
110 std::shared_ptr<RC_ITEMS_PROVIDER> m_markerProvider;
111 RC_TREE_MODEL* m_markerTreeModel; // wx reference-counted ptr
112
115
117
119};
120
121
122#endif
123
124// _DIALOG_ERC_H_
Class DIALOG_ERC_BASE.
void ExcludeMarker(SCH_MARKER *aMarker=nullptr)
Exclude aMarker from the ERC list.
Definition: dialog_erc.cpp:803
const SCH_MARKER * m_centerMarkerOnIdle
Definition: dialog_erc.h:116
void OnERCItemDClick(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:559
std::shared_ptr< RC_ITEMS_PROVIDER > m_markerProvider
Definition: dialog_erc.h:110
void syncCheckboxes()
Definition: dialog_erc.cpp:359
bool m_ercRun
Definition: dialog_erc.h:114
void testErc()
Definition: dialog_erc.cpp:472
void SelectMarker(const SCH_MARKER *aMarker)
Definition: dialog_erc.cpp:780
bool updateUI() override
Definition: dialog_erc.cpp:186
SCH_EDIT_FRAME * m_parent
Definition: dialog_erc.h:104
wxString m_violationsTitleTemplate
Definition: dialog_erc.h:107
void OnERCItemRClick(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:573
bool writeReport(const wxString &aFullFileName)
void centerMarkerIdleHandler(wxIdleEvent &aEvent)
Definition: dialog_erc.cpp:795
void OnDeleteAllClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:292
void OnLinkClicked(wxHtmlLinkEvent &event) override
Definition: dialog_erc.cpp:368
int m_severities
Definition: dialog_erc.h:118
void OnRunERCClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:375
void deleteAllMarkers(bool aIncludeExclusions)
Definition: dialog_erc.cpp:869
wxString m_ignoredTitleTemplate
Definition: dialog_erc.h:108
void OnDeleteOneClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:275
void OnSaveReport(wxCommandEvent &aEvent) override
Definition: dialog_erc.cpp:881
void PrevMarker()
Definition: dialog_erc.cpp:756
void NextMarker()
Definition: dialog_erc.cpp:768
SCHEMATIC * m_currentSchematic
Definition: dialog_erc.h:105
void OnEditViolationSeverities(wxHyperlinkEvent &aEvent) override
Definition: dialog_erc.cpp:836
void UpdateAnnotationWarning()
Definition: dialog_erc.cpp:150
void redrawDrawPanel()
Definition: dialog_erc.cpp:464
void Report(const wxString &aMessage) override
Display aMessage in the progress bar dialog.
Definition: dialog_erc.cpp:208
void OnERCItemSelected(wxDataViewEvent &aEvent) override
Definition: dialog_erc.cpp:500
RC_TREE_MODEL * m_markerTreeModel
Definition: dialog_erc.h:111
void updateDisplayedCounts()
Definition: dialog_erc.cpp:214
void OnSeverity(wxCommandEvent &aEvent) override
Definition: dialog_erc.cpp:842
bool m_running
Definition: dialog_erc.h:113
void OnCloseErcDialog(wxCloseEvent &event) override
Definition: dialog_erc.cpp:337
void OnCancelClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:323
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:75
Schematic editor (Eeschema) main window.
wxDECLARE_EVENT(EDA_EVT_CLOSE_ERC_DIALOG, wxCommandEvent)
Event sent to parent when dialog is mode-less.