KiCad PCB EDA Suite
dialog_erc.cpp File Reference

Electrical Rules Check dialog implementation. More...

#include <fctsys.h>
#include <sch_draw_panel.h>
#include <kicad_string.h>
#include <gestfich.h>
#include <pgm_base.h>
#include <sch_screen.h>
#include <sch_edit_frame.h>
#include <invoke_sch_dialog.h>
#include <project.h>
#include <kiface_i.h>
#include <bitmaps.h>
#include <reporter.h>
#include <wildcards_and_files_ext.h>
#include <sch_view.h>
#include <netlist.h>
#include <netlist_object.h>
#include <sch_marker.h>
#include <sch_sheet.h>
#include <lib_pin.h>
#include <sch_component.h>
#include <dialog_erc.h>
#include <erc.h>
#include <id.h>

Go to the source code of this file.

Macros

#define ID_MATRIX_0   1800
 

Functions

 EVT_COMMAND_RANGE (ID_MATRIX_0, ID_MATRIX_0+(PINTYPE_COUNT *PINTYPE_COUNT)-1, wxEVT_COMMAND_BUTTON_CLICKED, DIALOG_ERC::ChangeErrorLevel) DIALOG_ERC
 
wxDialog * InvokeDialogERC (SCH_EDIT_FRAME *aCaller)
 Create the modeless DIALOG_ERC and show it, return something to destroy or close it. More...
 

Variables

int DiagErc [PINTYPE_COUNT][PINTYPE_COUNT]
 
int DefaultDiagErc [PINTYPE_COUNT][PINTYPE_COUNT]
 Default Look up table which gives the ERC error level for a pair of connected pins Same as DiagErc, but cannot be modified. More...
 

Detailed Description

Electrical Rules Check dialog implementation.

Definition in file dialog_erc.cpp.

Macro Definition Documentation

#define ID_MATRIX_0   1800

Definition at line 67 of file dialog_erc.cpp.

Referenced by DIALOG_ERC::ChangeErrorLevel(), and DIALOG_ERC::ReBuildMatrixPanel().

Function Documentation

EVT_COMMAND_RANGE ( ID_MATRIX_0  ,
ID_MATRIX_0+(PINTYPE_COUNT *PINTYPE_COUNT)-  1,
wxEVT_COMMAND_BUTTON_CLICKED  ,
DIALOG_ERC::ChangeErrorLevel   
)

Definition at line 71 of file dialog_erc.cpp.

76  :
77  DIALOG_ERC_BASE( parent, ID_DIALOG_ERC // parent looks for this ID explicitly
78  )
79 {
80  m_parent = parent;
81  m_lastMarkerFound = NULL;
82 
83  wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
84  infoFont.SetSymbolicSize( wxFONTSIZE_SMALL );
85  m_textMarkers->SetFont( infoFont );
86  m_titleMessages->SetFont( infoFont );
87 
88  Init();
89 
90  // We use a sdbSizer to get platform-dependent ordering of the action buttons, but
91  // that requires us to correct the button labels here.
92  m_sdbSizer1OK->SetLabel( _( "Run" ) );
93  m_sdbSizer1Cancel->SetLabel( _( "Close" ) );
94  m_sdbSizer1->Layout();
95 
96  m_sdbSizer1OK->SetDefault();
97 
98  // Now all widgets have the size fixed, call FinishDialogSettings
99  FinishDialogSettings();
100 }
Class DIALOG_ERC_BASE.
eeschema ERC modeless dialog ID
Definition: id.h:284
wxDialog* InvokeDialogERC ( SCH_EDIT_FRAME aCaller)

Create the modeless DIALOG_ERC and show it, return something to destroy or close it.

The dialog will have ID_DIALOG_ERC from id.h

Definition at line 673 of file dialog_erc.cpp.

References DIALOG_ERC::DIALOG_ERC(), and DIALOG_SHIM::Show().

Referenced by SCH_EDIT_FRAME::OnErc().

674 {
675  // This is a modeless dialog, so new it rather than instantiating on stack.
676  DIALOG_ERC* dlg = new DIALOG_ERC( aCaller );
677 
678  dlg->Show( true );
679 
680  return dlg; // wxDialog is information hiding about DIALOG_ERC.
681 }
bool Show(bool show) override

Variable Documentation

int DefaultDiagErc[PINTYPE_COUNT][PINTYPE_COUNT]

Default Look up table which gives the ERC error level for a pair of connected pins Same as DiagErc, but cannot be modified.

Used to init or reset DiagErc note also, to avoid inconsistancy: DefaultDiagErc[i][j] = DefaultDiagErc[j][i]

Definition at line 133 of file erc.cpp.

Referenced by DIALOG_ERC::ReBuildMatrixPanel(), and DIALOG_ERC::ResetDefaultERCDiag().