KiCad PCB EDA Suite
dialog_drc.cpp
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) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2009-2016 Dick Hollenbeck, dick@softplc.com
6  * Copyright (C) 2004-2020 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #include <base_units.h>
27 #include <bitmaps.h>
28 #include <collectors.h>
29 #include <confirm.h>
30 #include <dialog_drc.h>
31 #include <fctsys.h>
32 #include <kiface_i.h>
33 #include <pcb_edit_frame.h>
34 #include <pcbnew_settings.h>
35 #include <pgm_base.h>
36 #include <tool/tool_manager.h>
37 #include <tools/pcb_actions.h>
39 #include <rc_item.h>
40 #include <wx/wupdlock.h>
41 #include <widgets/ui_common.h>
42 
43 DIALOG_DRC::DIALOG_DRC( DRC* aTester, PCB_EDIT_FRAME* aEditorFrame, wxWindow* aParent ) :
44  DIALOG_DRC_BASE( aParent ),
45  m_trackMinWidth( aEditorFrame, m_MinWidthLabel, m_MinWidthCtrl, m_MinWidthUnits, true ),
46  m_viaMinSize( aEditorFrame, m_ViaMinLabel, m_ViaMinCtrl, m_ViaMinUnits, true ),
47  m_uviaMinSize( aEditorFrame, m_uViaMinLabel, m_uViaMinCtrl, m_uViaMinUnits, true ),
48  m_markersProvider( nullptr ),
49  m_markerTreeModel( nullptr ),
50  m_unconnectedItemsProvider( nullptr ),
51  m_unconnectedTreeModel( nullptr ),
52  m_footprintWarningsProvider( nullptr ),
53  m_footprintWarningsTreeModel( nullptr ),
55 {
56  SetName( DIALOG_DRC_WINDOW_NAME ); // Set a window name to be able to find it
57 
58  m_tester = aTester;
59  m_brdEditor = aEditorFrame;
62 
64  m_markerDataView->AssociateModel( m_markerTreeModel );
65 
68 
71 
72  m_Notebook->SetSelection( 0 );
73 
74  // We use a sdbSizer here to get the order right, which is platform-dependent
75  m_sdbSizer1OK->SetLabel( _( "Run DRC" ) );
76  m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
77  m_sizerButtons->Layout();
78 
79  m_sdbSizer1OK->SetDefault();
80 
81  initValues();
83 
85 }
86 
87 
89 {
90  m_brdEditor->FocusOnItem( nullptr );
91 
93  settings->m_DrcDialog.refill_zones = m_cbRefillZones->GetValue();
95  settings->m_DrcDialog.test_footprints = m_cbTestFootprints->GetValue();
97 
98  m_markerTreeModel->DecRef();
99 }
100 
101 
102 void DIALOG_DRC::OnActivateDlg( wxActivateEvent& aEvent )
103 {
105  {
106  // If m_currentBoard is not the current parent board,
107  // (for instance because a new board was loaded),
108  // close the dialog, because many pointers are now invalid
109  // in lists
110  SetReturnCode( wxID_CANCEL );
111  Close();
112  m_tester->DestroyDRCDialog( wxID_CANCEL );
113  return;
114  }
115 
116  // updating data which can be modified outside the dialog (DRC parameters, units ...)
117  // because the dialog is not modal
120 
125 }
126 
127 
129 {
133 }
134 
135 
137 {
138  m_markersTitleTemplate = m_Notebook->GetPageText( 0 );
139  m_unconnectedTitleTemplate = m_Notebook->GetPageText( 1 );
140  m_footprintsTitleTemplate = m_Notebook->GetPageText( 2 );
141 
143 
144  auto cfg = m_brdEditor->GetSettings();
145 
146  m_cbRefillZones->SetValue( cfg->m_DrcDialog.refill_zones );
147  m_cbReportAllTrackErrors->SetValue( cfg->m_DrcDialog.test_track_to_zone );
148  m_cbTestFootprints->SetValue( cfg->m_DrcDialog.test_footprints );
149 
150  m_severities = cfg->m_DrcDialog.severities;
154 
155  Layout(); // adding the units above expanded Clearance text, now resize.
156 
157  SetFocus();
158 }
159 
160 
162 {
166 
168 }
169 
170 
171 // Don't globally define this; different facilities use different definitions of "ALL"
173 
174 
176 {
177  m_showAll->SetValue( m_severities == RPT_SEVERITY_ALL );
181 }
182 
183 
184 void DIALOG_DRC::OnRunDRCClick( wxCommandEvent& aEvent )
185 {
188  m_tester->m_refillZones = m_cbRefillZones->GetValue();
191 
194 
195  wxBeginBusyCursor();
196  wxWindowDisabler disabler;
197 
198  // run all the tests, with no UI at this time.
199  m_Messages->Clear();
200  wxSafeYield(); // Allows time slice to refresh the Messages
202 
203  m_Notebook->ChangeSelection( 0 ); // display the "Problems/Markers" tab
204 
205  wxEndBusyCursor();
206 
208  SetFocus();
209  m_Notebook->GetPage( m_Notebook->GetSelection() )->SetFocus();
210 }
211 
212 
214 {
215  m_markersProvider = aProvider;
218 }
219 
220 
222 {
223  m_unconnectedItemsProvider = aProvider;
226 }
227 
228 
230 {
231  m_footprintWarningsProvider = aProvider;
234 }
235 
236 
237 void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
238 {
239  const KIID& itemID = RC_TREE_MODEL::ToUUID( aEvent.GetItem() );
240  BOARD_ITEM* item = m_brdEditor->GetBoard()->GetItem( itemID );
241  WINDOW_THAWER thawer( m_brdEditor );
242 
243  m_brdEditor->FocusOnItem( item );
245 
246  aEvent.Skip();
247 }
248 
249 
250 void DIALOG_DRC::OnDRCItemDClick( wxDataViewEvent& aEvent )
251 {
252  if( aEvent.GetItem().IsOk() )
253  {
254  // turn control over to m_brdEditor, hide this DIALOG_DRC window,
255  // no destruction so we can preserve listbox cursor
256  if( !IsModal() )
257  Show( false );
258  }
259 
260  aEvent.Skip();
261 }
262 
263 
264 void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
265 {
266  RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
267 
268  if( !node )
269  return;
270 
271  RC_ITEM* rcItem = node->m_RcItem;
272  wxString listName;
273  wxMenu menu;
274 
275  switch( m_BrdSettings.m_DRCSeverities[ rcItem->GetErrorCode() ] )
276  {
277  case RPT_SEVERITY_ERROR: listName = _( "errors" ); break;
278  case RPT_SEVERITY_WARNING: listName = _( "warnings" ); break;
279  default: listName = _( "appropriate" ); break;
280  }
281 
282  if( rcItem->GetParent()->IsExcluded() )
283  {
284  menu.Append( 1, _( "Remove exclusion for this violation" ),
285  wxString::Format( _( "It will be placed back in the %s list" ), listName ) );
286  }
287  else
288  {
289  menu.Append( 2, _( "Exclude this violation" ),
290  wxString::Format( _( "It will be excluded from the %s list" ), listName ) );
291  }
292 
293  menu.AppendSeparator();
294 
296  {
297  menu.Append( 3, wxString::Format( _( "Change severity to Error for all '%s' violations" ),
298  rcItem->GetErrorText(),
299  _( "Violation severities can also be edited in the Board Setup... dialog" ) ) );
300  }
301  else
302  {
303  menu.Append( 4, wxString::Format( _( "Change severity to Warning for all '%s' violations" ),
304  rcItem->GetErrorText(),
305  _( "Violation severities can also be edited in the Board Setup... dialog" ) ) );
306  }
307 
308  menu.Append( 5, wxString::Format( _( "Ignore all '%s' violations" ),
309  rcItem->GetErrorText() ),
310  _( "Violations will not be checked or reported" ) );
311 
312  menu.AppendSeparator();
313 
314  menu.Append( 6, _( "Edit violation severities..." ), _( "Open the Board Setup... dialog" ) );
315 
316  switch( GetPopupMenuSelectionFromUser( menu ) )
317  {
318  case 1:
319  node->m_RcItem->GetParent()->SetExcluded( false );
320 
321  // Update view
322  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
324  break;
325 
326  case 2:
327  node->m_RcItem->GetParent()->SetExcluded( true );
328 
329  // Update view
331  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->ValueChanged( node );
332  else
333  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->DeleteCurrentItem( false );
334 
336  break;
337 
338  case 3:
341 
342  // Rebuild model and view
343  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->SetProvider( m_markersProvider );
345  break;
346 
347  case 4:
350 
351  // Rebuild model and view
352  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->SetProvider( m_markersProvider );
354  break;
355 
356  case 5:
359 
360  for( MARKER_PCB* marker : m_brdEditor->GetBoard()->Markers() )
361  {
362  if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() )
363  m_brdEditor->GetBoard()->Delete( marker );
364  }
365 
366  // Rebuild model and view
367  static_cast<RC_TREE_MODEL*>( aEvent.GetModel() )->SetProvider( m_markersProvider );
369  break;
370 
371  case 6:
372  m_brdEditor->DoShowBoardSetupDialog( _( "Violation Severity" ) );
373  break;
374  }
375 }
376 
377 
378 void DIALOG_DRC::OnSeverity( wxCommandEvent& aEvent )
379 {
380  int flag = 0;
381 
382  if( aEvent.GetEventObject() == m_showAll )
383  flag = RPT_SEVERITY_ALL;
384  else if( aEvent.GetEventObject() == m_showErrors )
385  flag = RPT_SEVERITY_ERROR;
386  else if( aEvent.GetEventObject() == m_showWarnings )
387  flag = RPT_SEVERITY_WARNING;
388  else if( aEvent.GetEventObject() == m_showExclusions )
389  flag = RPT_SEVERITY_EXCLUSION;
390 
391  if( aEvent.IsChecked() )
392  m_severities |= flag;
393  else if( aEvent.GetEventObject() == m_showAll )
395  else
396  m_severities &= ~flag;
397 
398  syncCheckboxes();
399 
400  // Set the provider's severity levels through the TreeModel so that the old tree
401  // can be torn down before the severity changes.
402  //
403  // It's not clear this is required, but we've had a lot of issues with wxDataView
404  // being cranky on various platforms.
405 
409 
411 }
412 
413 
414 void DIALOG_DRC::OnSaveReport( wxCommandEvent& aEvent )
415 {
416  wxFileName fn( "./DRC." + ReportFileExtension );
417 
418  wxFileDialog dlg( this, _( "Save Report to File" ), fn.GetPath(), fn.GetFullName(),
419  ReportFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
420 
421  if( dlg.ShowModal() != wxID_OK )
422  return;
423 
424  fn = dlg.GetPath();
425 
426  if( fn.GetExt().IsEmpty() )
427  fn.SetExt( ReportFileExtension );
428 
429  if( !fn.IsAbsolute() )
430  {
431  wxString prj_path = Prj().GetProjectPath();
432  fn.MakeAbsolute( prj_path );
433  }
434 
435  if( writeReport( fn.GetFullPath() ) )
436  {
437  m_Messages->AppendText( wxString::Format( _( "Report file '%s' created\n" ),
438  fn.GetFullPath() ) );
439  }
440  else
441  {
442  DisplayError( this, wxString::Format( _( "Unable to create report file '%s'" ),
443  fn.GetFullPath() ) );
444  }
445 }
446 
447 
448 void DIALOG_DRC::OnCancelClick( wxCommandEvent& aEvent )
449 {
450  m_brdEditor->FocusOnItem( nullptr );
451 
452  SetReturnCode( wxID_CANCEL );
454 
455  // The dialog can be modal or not modal.
456  // Leave the DRC caller destroy (or not) the dialog
457  m_tester->DestroyDRCDialog( wxID_CANCEL );
458 }
459 
460 
461 void DIALOG_DRC::OnChangingNotebookPage( wxNotebookEvent& aEvent )
462 {
463  // Shouldn't be necessary, but is on at least OSX
464  if( aEvent.GetSelection() >= 0 )
465  m_Notebook->ChangeSelection( (unsigned) aEvent.GetSelection() );
466 
467  m_markerDataView->UnselectAll();
468  m_unconnectedDataView->UnselectAll();
469  m_footprintsDataView->UnselectAll();
470 }
471 
472 
474 {
475  WINDOW_THAWER thawer( m_brdEditor );
476 
478 }
479 
480 
482 {
483  // Clear current selection list to avoid selection of deleted items
485 
488 }
489 
490 
491 bool DIALOG_DRC::writeReport( const wxString& aFullFileName )
492 {
493  FILE* fp = wxFopen( aFullFileName, wxT( "w" ) );
494 
495  if( fp == NULL )
496  return false;
497 
498  int count;
499  EDA_UNITS units = GetUserUnits();
500 
501  fprintf( fp, "** Drc report for %s **\n", TO_UTF8( m_brdEditor->GetBoard()->GetFileName() ) );
502 
503  wxDateTime now = wxDateTime::Now();
504 
505  fprintf( fp, "** Created on %s **\n", TO_UTF8( now.Format( wxT( "%F %T" ) ) ) );
506 
507  count = m_markersProvider->GetCount();
508 
509  fprintf( fp, "\n** Found %d DRC violations **\n", count );
510 
511  for( int i = 0; i < count; ++i )
512  fprintf( fp, "%s", TO_UTF8( m_markersProvider->GetItem( i )->ShowReport( units ) ) );
513 
515 
516  fprintf( fp, "\n** Found %d unconnected pads **\n", count );
517 
518  for( int i = 0; i < count; ++i )
519  fprintf( fp, "%s", TO_UTF8( m_unconnectedItemsProvider->GetItem( i )->ShowReport( units ) ) );
520 
522 
523  fprintf( fp, "\n** Found %d Footprint errors **\n", count );
524 
525  for( int i = 0; i < count; ++i )
526  fprintf( fp, "%s", TO_UTF8( m_footprintWarningsProvider->GetItem( i )->ShowReport( units ) ) );
527 
528 
529  fprintf( fp, "\n** End of Report **\n" );
530 
531  fclose( fp );
532 
533  return true;
534 }
535 
536 
537 void DIALOG_DRC::OnDeleteOneClick( wxCommandEvent& aEvent )
538 {
539  if( m_Notebook->GetSelection() == 0 )
540  {
541  // Clear the selection. It may be the selected DRC marker.
543 
545 
546  // redraw the pcb
548  }
549  else if( m_Notebook->GetSelection() == 1 )
550  {
552  }
553  else if( m_Notebook->GetSelection() == 2 )
554  {
556  }
557 
559 }
560 
561 
562 void DIALOG_DRC::OnDeleteAllClick( wxCommandEvent& aEvent )
563 {
565 
568 }
569 
570 
572 {
573  wxString msg;
574 
575  // First the tab headers:
576  //
577 
578  if( m_tester->m_drcRun )
579  {
581  m_Notebook->SetPageText( 0, msg );
582 
584  m_Notebook->SetPageText( 1, msg );
585 
588  else
589  {
591  msg.Replace( wxT( "%d" ), _( "not run" ) );
592  }
593  m_Notebook->SetPageText( 2, msg );
594  }
595  else
596  {
598  msg.Replace( wxT( "(%d)" ), wxEmptyString );
599  m_Notebook->SetPageText( 0, msg );
600 
602  msg.Replace( wxT( "(%d)" ), wxEmptyString );
603  m_Notebook->SetPageText( 1, msg );
604 
606  msg.Replace( wxT( "(%d)" ), wxEmptyString );
607  m_Notebook->SetPageText( 2, msg );
608  }
609 
610  // And now the badges:
611  //
612 
613  int numErrors = 0;
614  int numWarnings = 0;
615  int numExcluded = 0;
616 
617  if( m_markersProvider )
618  {
622  }
623 
625  {
629  }
630 
632  {
636  }
637 
638  m_errorsBadge->SetBitmap( MakeBadge( RPT_SEVERITY_ERROR, numErrors, m_errorsBadge ) );
639  m_warningsBadge->SetBitmap( MakeBadge( RPT_SEVERITY_WARNING, numWarnings, m_warningsBadge ) );
641 }
DIALOG_DRC(DRC *aTester, PCB_EDIT_FRAME *aEditorFrame, wxWindow *aParent)
Constructors.
Definition: dialog_drc.cpp:43
bool m_refillZones
Definition: drc.h:151
static TOOL_ACTION selectionClear
Clears the current selection.
Definition: pcb_actions.h:73
wxCheckBox * m_showWarnings
void initValues()
Definition: dialog_drc.cpp:136
EDA_UNITS
Definition: common.h:184
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:239
UNIT_BINDER m_trackMinWidth
Definition: dialog_drc.h:105
void syncCheckboxes()
Definition: dialog_drc.cpp:175
wxCheckBox * m_cbTestFootprints
wxButton * m_sdbSizer1Cancel
wxNotebook * m_Notebook
void DestroyDRCDialog(int aReason)
Deletes this ui dialog box and zeros out its pointer to remember the state of the dialog's existence.
void updateDisplayedCounts()
Definition: dialog_drc.cpp:571
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
static int RPT_SEVERITY_ALL
Definition: dialog_drc.cpp:172
void OnDRCItemRClick(wxDataViewEvent &aEvent) override
Definition: dialog_drc.cpp:264
void SetProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: rc_item.cpp:166
wxCheckBox * m_cbReportAllTrackErrors
Implementation of conversion functions that require both schematic and board internal units.
This file is part of the common library.
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
RC_TREE_MODEL * m_markerTreeModel
Definition: dialog_drc.h:110
Class DIALOG_DRC_BASE.
std::map< int, int > m_DRCSeverities
RC_ITEM is a holder for a DRC (in Pcbnew) or ERC (in Eeschema) error item.
Definition: rc_item.h:82
void displayDRCValues()
Definition: dialog_drc.cpp:128
PCB_EDIT_FRAME * m_brdEditor
Definition: dialog_drc.h:99
MARKERS & Markers()
Definition: class_board.h:248
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
bool writeReport(const wxString &aFullFileName)
Function writeReport outputs the MARKER items and unconnecte DRC_ITEMs with commentary to an open tex...
Definition: dialog_drc.cpp:491
void refreshBoardEditor()
Definition: dialog_drc.cpp:473
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
void OnDeleteOneClick(wxCommandEvent &aEvent) override
Definition: dialog_drc.cpp:537
wxString m_footprintsTitleTemplate
Definition: dialog_drc.h:103
UNIT_BINDER m_viaMinSize
Definition: dialog_drc.h:106
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Function RunAction() Runs the specified action.
Definition: tool_manager.h:139
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:512
virtual int GetCount(int aSeverity=-1)=0
static KIID ToUUID(wxDataViewItem aItem)
Definition: rc_item.cpp:67
wxStaticBitmap * m_errorsBadge
BOARD_DESIGN_SETTINGS m_BrdSettings
Definition: dialog_drc.h:50
RC_ITEMS_PROVIDER * m_markersProvider
Definition: dialog_drc.h:109
void OnDRCItemDClick(wxDataViewEvent &aEvent) override
Definition: dialog_drc.cpp:250
void RecordDRCExclusions()
Scan existing markers and record data from any that are Excluded.
wxButton * m_sdbSizer1OK
const wxString & GetFileName() const
Definition: class_board.h:218
BOARD_ITEM * GetItem(const KIID &aID)
BOARD * m_currentBoard
Definition: dialog_drc.h:97
virtual RC_ITEM * GetItem(int aIndex)=0
Function GetItem retrieves a RC_ITEM by pointer.
VTBL_ENTRY const wxString GetProjectPath() const
Function GetProjectPath returns the full path of the project.
Definition: project.cpp:102
void DeleteCurrentItem(bool aDeep)
Definition: rc_item.cpp:302
void SetSeverities(int aSeverities)
Definition: rc_item.cpp:172
Provide an abstract interface of a RC_ITEM* list manager.
Definition: rc_item.h:42
void OnChangingNotebookPage(wxNotebookEvent &aEvent) override
Definition: dialog_drc.cpp:461
EDA_UNITS GetUserUnits() const
Definition: dialog_shim.h:132
RC_ITEMS_PROVIDER * m_unconnectedItemsProvider
Definition: dialog_drc.h:112
DRC * m_tester
Definition: dialog_drc.h:98
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Definition: macros.h:48
wxCheckBox * m_showExclusions
Definition: common.h:65
wxString m_markersTitleTemplate
Definition: dialog_drc.h:101
int GetDRCItemCount() const
Definition: rc_item.h:338
bool m_testFootprints
Definition: drc.h:153
wxCheckBox * m_cbRefillZones
wxStaticBitmap * m_warningsBadge
bool m_doZonesTest
Definition: drc.h:149
void SetExcluded(bool aExcluded)
Definition: marker_base.h:173
wxDataViewCtrl * m_footprintsDataView
#define NULL
RC_ITEMS_PROVIDER * m_footprintWarningsProvider
Definition: dialog_drc.h:115
wxBoxSizer * m_sizerButtons
void OnDeleteAllClick(wxCommandEvent &aEvent) override
Definition: dialog_drc.cpp:562
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition: rc_item.h:322
wxString ReportFileWildcard()
void OnDRCItemSelected(wxDataViewEvent &aEvent) override
Definition: dialog_drc.cpp:237
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
RC_TREE_MODEL * m_footprintWarningsTreeModel
Definition: dialog_drc.h:116
int GetErrorCode() const
Definition: rc_item.h:273
void SetFootprintsProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: dialog_drc.cpp:229
Definition of file extensions used in Kicad.
#define DIALOG_DRC_WINDOW_NAME
Definition: dialog_drc.h:44
Functions to provide common constants and other functions to assist in making a consistent UI.
void deleteAllMarkers()
Definition: dialog_drc.cpp:481
void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aDesignSettings)
Function SetDesignSettings.
Definition: class_board.h:522
bool IsExcluded() const
Definition: marker_base.h:172
virtual wxString GetErrorText() const =0
Function GetErrorText returns the string form of a drc error code.
bool m_reportAllTrackErrors
Definition: drc.h:152
bool m_drcRun
Definition: drc.h:185
void OnRunDRCClick(wxCommandEvent &aEvent) override
Definition: dialog_drc.cpp:184
bool Show(bool show) override
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
RC_TREE_MODEL * m_unconnectedTreeModel
Definition: dialog_drc.h:113
wxDataViewCtrl * m_unconnectedDataView
bool m_footprintsTested
Definition: drc.h:186
void OnCancelClick(wxCommandEvent &aEvent) override
Definition: dialog_drc.cpp:448
void DeleteAllItems()
Definition: rc_item.cpp:341
void SetMarkersProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: dialog_drc.cpp:213
RC_ITEM * m_RcItem
Definition: rc_item.h:307
wxDataViewCtrl * m_markerDataView
UNIT_BINDER m_uviaMinSize
Definition: dialog_drc.h:107
see class PGM_BASE
void DoShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString, const wxString &aInitialParentPage=wxEmptyString)
Function ShowBoardSetupDialog.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
const std::string ReportFileExtension
wxBitmap MakeBadge(SEVERITY aStyle, int aCount, wxWindow *aWindow, int aDepth)
Definition: ui_common.cpp:34
#define _(s)
Definition: 3d_actions.cpp:33
wxStaticBitmap * m_exclusionsBadge
wxCheckBox * m_showErrors
Design Rule Checker object that performs all the DRC tests.
Definition: drc.h:133
wxCheckBox * m_cbReportTracksToZonesErrors
virtual void SetValue(int aValue)
Function SetValue Sets new value (in Internal Units) for the text field, taking care of units convers...
wxCheckBox * m_showAll
PCB_EDIT_FRAME is the main frame for Pcbnew.
void OnActivateDlg(wxActivateEvent &aEvent) override
handler for activate event, updating data which can be modified outside the dialog (DRC parameters)
Definition: dialog_drc.cpp:102
virtual long long int GetValue()
Function GetValue Returns the current value in Internal Units.
virtual void Delete(BOARD_ITEM *aItem)
Removes an item from the container and deletes it.
MARKER_BASE * GetParent() const
Definition: rc_item.h:256
int m_severities
Definition: dialog_drc.h:118
DIALOG_DRC m_DrcDialog
virtual wxString ShowReport(EDA_UNITS aUnits) const
Function ShowReport translates this object into a text string suitable for saving to disk in a report...
Definition: rc_item.cpp:44
BOARD * GetBoard() const
void setDRCParameters()
Definition: dialog_drc.cpp:161
void RunTests(wxTextCtrl *aMessages=NULL)
Run all the tests specified with a previous call to SetSettings()
void OnSaveReport(wxCommandEvent &aEvent) override
Definition: dialog_drc.cpp:414
void FocusOnItem(BOARD_ITEM *aItem)
void SetUnconnectedProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: dialog_drc.cpp:221
wxTextCtrl * m_Messages
wxString m_unconnectedTitleTemplate
Definition: dialog_drc.h:102
void OnSeverity(wxCommandEvent &aEvent) override
Definition: dialog_drc.cpp:378
PCBNEW_SETTINGS * GetSettings()