2014-10-21 15:48:00 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
2016-07-16 10:54:55 +00:00
|
|
|
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
|
2014-10-21 15:48:00 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#ifndef _DIALOG_ERC_H_
|
|
|
|
#define _DIALOG_ERC_H_
|
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
#include <wx/htmllbox.h>
|
|
|
|
#include <vector>
|
2016-02-28 17:33:29 +00:00
|
|
|
#include <lib_pin.h> // For PINTYPE_COUNT definition
|
2009-07-08 15:42:45 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <dialog_erc_base.h>
|
2020-10-19 14:17:49 +00:00
|
|
|
#include <widgets/progress_reporter.h>
|
2019-03-11 21:32:05 +00:00
|
|
|
#include <erc_settings.h>
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2015-12-20 12:40:17 +00:00
|
|
|
// DIALOG_ERC class declaration
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2020-10-19 14:17:49 +00:00
|
|
|
class DIALOG_ERC : public DIALOG_ERC_BASE, PROGRESS_REPORTER
|
2009-07-05 12:09:41 +00:00
|
|
|
{
|
2009-07-03 18:25:06 +00:00
|
|
|
private:
|
2020-03-16 11:05:01 +00:00
|
|
|
SCH_EDIT_FRAME* m_parent;
|
|
|
|
|
|
|
|
RC_ITEMS_PROVIDER* m_markerProvider;
|
|
|
|
RC_TREE_MODEL* m_markerTreeModel;
|
|
|
|
|
2020-10-19 14:17:49 +00:00
|
|
|
bool m_running;
|
2020-09-21 10:37:20 +00:00
|
|
|
bool m_ercRun;
|
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
int m_severities;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
public:
|
2010-12-08 20:12:46 +00:00
|
|
|
DIALOG_ERC( SCH_EDIT_FRAME* parent );
|
2020-03-16 11:05:01 +00:00
|
|
|
~DIALOG_ERC();
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2020-10-19 14:17:49 +00:00
|
|
|
// PROGRESS_REPORTER calls
|
|
|
|
bool updateUI() override;
|
|
|
|
void AdvancePhase( const wxString& aMessage ) override;
|
|
|
|
void Report( const wxString& aMessage ) override;
|
|
|
|
|
2012-12-10 19:08:09 +00:00
|
|
|
private:
|
|
|
|
// from DIALOG_ERC_BASE:
|
2018-08-06 20:30:49 +00:00
|
|
|
void OnCloseErcDialog( wxCloseEvent& event ) override;
|
2020-03-16 11:05:01 +00:00
|
|
|
void OnRunERCClick( wxCommandEvent& event ) override;
|
2016-09-24 18:53:15 +00:00
|
|
|
void OnEraseDrcMarkersClick( wxCommandEvent& event ) override;
|
2020-03-16 11:05:01 +00:00
|
|
|
void OnERCItemSelected( wxDataViewEvent& aEvent ) override;
|
|
|
|
void OnERCItemDClick( wxDataViewEvent& aEvent ) override;
|
|
|
|
void OnERCItemRClick( wxDataViewEvent& aEvent ) override;
|
2020-10-19 14:17:49 +00:00
|
|
|
void OnLinkClicked( wxHtmlLinkEvent& event ) override;
|
2020-03-16 11:05:01 +00:00
|
|
|
|
|
|
|
void OnSeverity( wxCommandEvent& aEvent ) override;
|
|
|
|
void OnSaveReport( wxCommandEvent& aEvent ) override;
|
2020-10-19 14:17:49 +00:00
|
|
|
void OnCancelClick( wxCommandEvent& event ) override;
|
2015-09-10 12:03:16 +00:00
|
|
|
|
2020-09-21 10:37:20 +00:00
|
|
|
void redrawDrawPanel();
|
2018-11-14 23:34:32 +00:00
|
|
|
|
2020-10-19 14:17:49 +00:00
|
|
|
void testErc();
|
2012-11-30 12:28:23 +00:00
|
|
|
|
2020-03-16 11:05:01 +00:00
|
|
|
bool writeReport( const wxString& aFullFileName );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2020-08-02 21:45:06 +00:00
|
|
|
void deleteAllMarkers( bool aIncludeExclusions );
|
2020-03-16 11:05:01 +00:00
|
|
|
|
|
|
|
void syncCheckboxes();
|
|
|
|
void updateDisplayedCounts();
|
2007-06-05 12:10:51 +00:00
|
|
|
};
|
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
#endif
|
2009-07-08 15:42:45 +00:00
|
|
|
|
|
|
|
// _DIALOG_ERC_H_
|