Pcbnew: display unconnected net count in DRC dialog.

This commit is contained in:
Dick Hollenbeck 2016-09-08 14:17:37 -04:00 committed by Wayne Stambaugh
parent 0b8ab2f73d
commit 2adfb09d0e
8 changed files with 906 additions and 497 deletions

View File

@ -6,7 +6,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2009 Dick Hollenbeck, dick@softplc.com * Copyright (C) 2009-2016 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 2004-2016 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2016 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
@ -214,6 +214,7 @@ void DIALOG_DRC_CONTROL::OnDeleteAllClick( wxCommandEvent& event )
{ {
DelDRCMarkers(); DelDRCMarkers();
RedrawDrawPanel(); RedrawDrawPanel();
UpdateDisplayedCounts();
} }
@ -270,6 +271,8 @@ void DIALOG_DRC_CONTROL::OnListUnconnectedClick( wxCommandEvent& event )
GetChars( reportName ) ) ); GetChars( reportName ) ) );
} }
UpdateDisplayedCounts();
wxEndBusyCursor(); wxEndBusyCursor();
/* there is currently nothing visible on the DrawPanel for unconnected pads /* there is currently nothing visible on the DrawPanel for unconnected pads
@ -656,4 +659,17 @@ void DIALOG_DRC_CONTROL::OnDeleteOneClick( wxCommandEvent& event )
*/ */
} }
} }
UpdateDisplayedCounts();
} }
void DIALOG_DRC_CONTROL::UpdateDisplayedCounts()
{
int marker_count = m_ClearanceListBox->GetItemCount();
int unconnected_count = m_UnconnectedListBox->GetItemCount();
m_MarkerCount->SetLabelText( wxString::Format( "%d", marker_count ) );
m_UnconnectedCount->SetLabelText( wxString::Format( "%d", unconnected_count ) );
}

View File

@ -69,6 +69,9 @@ public:
void GetRptSettings( bool* aEnable, wxString& aFileName ); void GetRptSettings( bool* aEnable, wxString& aFileName );
void UpdateDisplayedCounts();
private: private:
/** /**
* Function writeReport * Function writeReport

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version May 6 2016) // C++ code generated with wxFormBuilder (version Feb 16 2016)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -164,11 +164,35 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
m_MainSizer->Add( m_CommandSizer, 0, wxALL|wxEXPAND, 5 ); m_MainSizer->Add( m_CommandSizer, 0, wxALL|wxEXPAND, 5 );
m_staticTextErrMsg = new wxStaticText( this, wxID_ANY, _("Error Messages:"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticBoxSizer* m_ErrorMsgs;
m_staticTextErrMsg->Wrap( -1 ); m_ErrorMsgs = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Error Messages:") ), wxVERTICAL );
m_MainSizer->Add( m_staticTextErrMsg, 0, wxALL, 5 );
m_Notebook = new wxNotebook( this, ID_NOTEBOOK1, wxDefaultPosition, wxDefaultSize, 0 ); wxBoxSizer* bSizer8;
bSizer8 = new wxBoxSizer( wxHORIZONTAL );
m_MarkerCountLabel = new wxStaticText( m_ErrorMsgs->GetStaticBox(), wxID_ANY, _("Marker count:"), wxDefaultPosition, wxDefaultSize, 0 );
m_MarkerCountLabel->Wrap( -1 );
bSizer8->Add( m_MarkerCountLabel, 0, wxALL, 5 );
m_MarkerCount = new wxStaticText( m_ErrorMsgs->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
m_MarkerCount->Wrap( -1 );
bSizer8->Add( m_MarkerCount, 1, wxALL, 5 );
m_staticline1 = new wxStaticLine( m_ErrorMsgs->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
bSizer8->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_UnconnectedCountLabel = new wxStaticText( m_ErrorMsgs->GetStaticBox(), wxID_ANY, _("Unconnected count:"), wxDefaultPosition, wxDefaultSize, 0 );
m_UnconnectedCountLabel->Wrap( -1 );
bSizer8->Add( m_UnconnectedCountLabel, 0, wxALL, 5 );
m_UnconnectedCount = new wxStaticText( m_ErrorMsgs->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
m_UnconnectedCount->Wrap( -1 );
bSizer8->Add( m_UnconnectedCount, 1, wxALL, 5 );
m_ErrorMsgs->Add( bSizer8, 0, wxEXPAND, 5 );
m_Notebook = new wxNotebook( m_ErrorMsgs->GetStaticBox(), ID_NOTEBOOK1, wxDefaultPosition, wxDefaultSize, 0 );
m_panelClearanceListBox = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_panelClearanceListBox = new wxPanel( m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizeClearanceBox; wxBoxSizer* bSizeClearanceBox;
bSizeClearanceBox = new wxBoxSizer( wxVERTICAL ); bSizeClearanceBox = new wxBoxSizer( wxVERTICAL );
@ -199,7 +223,10 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
bSizerUnconnectedBox->Fit( m_panelUnconnectedBox ); bSizerUnconnectedBox->Fit( m_panelUnconnectedBox );
m_Notebook->AddPage( m_panelUnconnectedBox, _("Unconnected"), false ); m_Notebook->AddPage( m_panelUnconnectedBox, _("Unconnected"), false );
m_MainSizer->Add( m_Notebook, 1, wxEXPAND | wxALL, 5 ); m_ErrorMsgs->Add( m_Notebook, 1, wxEXPAND | wxALL, 5 );
m_MainSizer->Add( m_ErrorMsgs, 1, wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbSizer1OK = new wxButton( this, wxID_OK );

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version May 6 2016) // C++ code generated with wxFormBuilder (version Feb 16 2016)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -26,6 +26,7 @@ class DRCLISTBOX;
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/statline.h>
#include <wx/listbox.h> #include <wx/listbox.h>
#include <wx/panel.h> #include <wx/panel.h>
#include <wx/bitmap.h> #include <wx/bitmap.h>
@ -70,7 +71,9 @@ class DIALOG_DRC_CONTROL_BASE : public DIALOG_SHIM
wxButton* m_buttonListUnconnected; wxButton* m_buttonListUnconnected;
wxButton* m_DeleteAllButton; wxButton* m_DeleteAllButton;
wxButton* m_DeleteCurrentMarkerButton; wxButton* m_DeleteCurrentMarkerButton;
wxStaticText* m_staticTextErrMsg; wxStaticText* m_MarkerCountLabel;
wxStaticLine* m_staticline1;
wxStaticText* m_UnconnectedCountLabel;
wxNotebook* m_Notebook; wxNotebook* m_Notebook;
wxPanel* m_panelClearanceListBox; wxPanel* m_panelClearanceListBox;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizer1;
@ -101,6 +104,8 @@ class DIALOG_DRC_CONTROL_BASE : public DIALOG_SHIM
wxTextCtrl* m_SetTrackMinWidthCtrl; wxTextCtrl* m_SetTrackMinWidthCtrl;
wxTextCtrl* m_SetViaMinSizeCtrl; wxTextCtrl* m_SetViaMinSizeCtrl;
wxTextCtrl* m_SetMicroViakMinSizeCtrl; wxTextCtrl* m_SetMicroViakMinSizeCtrl;
wxStaticText* m_MarkerCount;
wxStaticText* m_UnconnectedCount;
DRCLISTBOX* m_ClearanceListBox; DRCLISTBOX* m_ClearanceListBox;
DRCLISTBOX* m_UnconnectedListBox; DRCLISTBOX* m_UnconnectedListBox;

View File

@ -1,7 +1,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2009 Dick Hollenbeck, dick@softplc.com * Copyright (C) 2009-2016 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or

View File

@ -320,6 +320,8 @@ void DRC::updatePointers()
{ {
m_drcDialog->m_ClearanceListBox->SetList( new DRC_LIST_MARKERS( m_pcb ) ); m_drcDialog->m_ClearanceListBox->SetList( new DRC_LIST_MARKERS( m_pcb ) );
m_drcDialog->m_UnconnectedListBox->SetList( new DRC_LIST_UNCONNECTED( &m_unconnected ) ); m_drcDialog->m_UnconnectedListBox->SetList( new DRC_LIST_UNCONNECTED( &m_unconnected ) );
m_drcDialog->UpdateDisplayedCounts();
} }
} }

View File

@ -5,7 +5,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2007 Dick Hollenbeck, dick@softplc.com * Copyright (C) 2007-2016 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 2015 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2015 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or