Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
15b70020
Commit
15b70020
authored
Dec 03, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drc work
parent
4002c6f4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
32 deletions
+35
-32
dialog_drc.cpp
pcbnew/dialog_drc.cpp
+30
-26
dialog_drc.h
pcbnew/dialog_drc.h
+4
-1
drc.cpp
pcbnew/drc.cpp
+1
-0
drc_stuff.h
pcbnew/drc_stuff.h
+0
-5
No files found.
pcbnew/dialog_drc.cpp
View file @
15b70020
...
@@ -39,6 +39,12 @@
...
@@ -39,6 +39,12 @@
////@end XPM images
////@end XPM images
/**
* Class DRC_LIST_MARKERS
* is an implementation of the interface named DRC_ITEM_LIST which uses
* a BOARD instance to fulfill the interface. No ownership is taken of the
* BOARD.
*/
class
DRC_LIST_MARKERS
:
public
DRC_ITEM_LIST
class
DRC_LIST_MARKERS
:
public
DRC_ITEM_LIST
{
{
BOARD
*
m_board
;
BOARD
*
m_board
;
...
@@ -55,7 +61,7 @@ public:
...
@@ -55,7 +61,7 @@ public:
*/
*/
//-----<Interface DRC_ITEM_LIST
>---------------------------------------
//-----<Interface DRC_ITEM_LIST>---------------------------------------
void
DeleteAllItems
()
void
DeleteAllItems
()
{
{
...
@@ -86,13 +92,11 @@ public:
...
@@ -86,13 +92,11 @@ public:
return
m_board
->
GetMARKERCount
();
return
m_board
->
GetMARKERCount
();
}
}
//-----</Interface DRC_ITEM_LIST
>--------------------------------------
//-----</Interface DRC_ITEM_LIST>--------------------------------------
};
};
/**
/**
* Class DRCLISTBOX
* Class DRCLISTBOX
* is used to display a DRC_ITEM_LIST.
* is used to display a DRC_ITEM_LIST.
...
@@ -120,7 +124,7 @@ public:
...
@@ -120,7 +124,7 @@ public:
/**
/**
* Function SetList
* Function SetList
* sets the DRC_LIST for this listbox. Ownership of the DRC_ITEM_LIST is
* sets the DRC_
ITEM_
LIST for this listbox. Ownership of the DRC_ITEM_LIST is
* transfered to this DRCLISTBOX.
* transfered to this DRCLISTBOX.
* @param aList The DRC_ITEM_LIST* containing the DRC_ITEMs which will be
* @param aList The DRC_ITEM_LIST* containing the DRC_ITEMs which will be
* displayed in the wxHtmlListBox
* displayed in the wxHtmlListBox
...
@@ -139,7 +143,7 @@ public:
...
@@ -139,7 +143,7 @@ public:
* Function OnGetItem
* Function OnGetItem
* returns the html text associated with the DRC_ITEM given by index 'n'.
* returns the html text associated with the DRC_ITEM given by index 'n'.
* @param n An index into the list.
* @param n An index into the list.
* @return wxString - the simpl
y
html text to show in the listbox.
* @return wxString - the simpl
e
html text to show in the listbox.
*/
*/
wxString
OnGetItem
(
size_t
n
)
const
wxString
OnGetItem
(
size_t
n
)
const
{
{
...
@@ -157,7 +161,7 @@ public:
...
@@ -157,7 +161,7 @@ public:
* Function OnGetItem
* Function OnGetItem
* returns the html text associated with the given index 'n'.
* returns the html text associated with the given index 'n'.
* @param n An index into the list.
* @param n An index into the list.
* @return wxString - the simpl
y
html text to show in the listbox.
* @return wxString - the simpl
e
html text to show in the listbox.
*/
*/
wxString
OnGetItemMarkup
(
size_t
n
)
const
wxString
OnGetItemMarkup
(
size_t
n
)
const
{
{
...
@@ -463,7 +467,6 @@ void DrcDialog::CreateControls()
...
@@ -463,7 +467,6 @@ void DrcDialog::CreateControls()
m_UnconnectedListBox
->
Connect
(
ID_UNCONNECTED_LIST
,
wxEVT_RIGHT_UP
,
wxMouseEventHandler
(
DrcDialog
::
OnRightUpUnconnected
),
NULL
,
this
);
m_UnconnectedListBox
->
Connect
(
ID_UNCONNECTED_LIST
,
wxEVT_RIGHT_UP
,
wxMouseEventHandler
(
DrcDialog
::
OnRightUpUnconnected
),
NULL
,
this
);
////@end DrcDialog content construction
////@end DrcDialog content construction
// @todo this is expanding the Clearance text, so we need to recalc sizers.
AddUnitSymbol
(
*
m_ClearenceTitle
);
AddUnitSymbol
(
*
m_ClearenceTitle
);
Layout
();
// adding the units above expanded Clearance text, now resize.
Layout
();
// adding the units above expanded Clearance text, now resize.
...
@@ -535,12 +538,12 @@ void DrcDialog::OnStartdrcClick( wxCommandEvent& event )
...
@@ -535,12 +538,12 @@ void DrcDialog::OnStartdrcClick( wxCommandEvent& event )
m_ZonesTestCtrl
->
IsChecked
(),
m_ZonesTestCtrl
->
IsChecked
(),
reportName
,
m_CreateRptCtrl
->
IsChecked
()
);
reportName
,
m_CreateRptCtrl
->
IsChecked
()
);
DelDRCMarkers
();
m_Parent
->
Erase_Marqueurs
();
m_Parent
->
ReDrawPanel
();
SetCursor
(
wxCursor
(
wxCURSOR_WAIT
)
);
SetCursor
(
wxCursor
(
wxCURSOR_WAIT
)
);
wxYield
();
// process the cursor change event and the redraw.
// run all the tests, with no UI at this time.
// run all the tests, with no UI at this time.
m_tester
->
RunTests
();
m_tester
->
RunTests
();
...
@@ -557,24 +560,20 @@ void DrcDialog::OnStartdrcClick( wxCommandEvent& event )
...
@@ -557,24 +560,20 @@ void DrcDialog::OnStartdrcClick( wxCommandEvent& event )
//msg.Printf( _( "Report file <%s> created\n" ), s_RptFilename.GetData() );
//msg.Printf( _( "Report file <%s> created\n" ), s_RptFilename.GetData() );
}
}
SetCursor
(
wxCursor
(
wxCURSOR_WATCH
)
);
SetCursor
(
wxCursor
(
wxCURSOR_ARROW
)
);
// @todo set the list counts in the DRCLISTITEMS here.
m_Parent
->
ReDrawPanel
();
// printf("done with tests\n"
);
RedrawDrawPanel
(
);
}
}
/*!
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ERASE_DRC_MARKERS
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ERASE_DRC_MARKERS
*/
*/
void
DrcDialog
::
OnDeleteAllClick
(
wxCommandEvent
&
event
)
void
DrcDialog
::
OnDeleteAllClick
(
wxCommandEvent
&
event
)
{
{
m_ClearanceListBox
->
DeleteAllItems
();
DelDRCMarkers
();
m_UnconnectedListBox
->
DeleteAllItems
();
RedrawDrawPanel
();
m_Parent
->
ReDrawPanel
();
}
}
...
@@ -607,11 +606,12 @@ void DrcDialog::OnListUnconnectedClick( wxCommandEvent& event )
...
@@ -607,11 +606,12 @@ void DrcDialog::OnListUnconnectedClick( wxCommandEvent& event )
m_ZonesTestCtrl
->
IsChecked
(),
m_ZonesTestCtrl
->
IsChecked
(),
reportName
,
m_CreateRptCtrl
->
IsChecked
()
);
reportName
,
m_CreateRptCtrl
->
IsChecked
()
);
DelDRCMarkers
();
DelDRCMarkers
();
SetCursor
(
wxCursor
(
wxCURSOR_WAIT
)
);
SetCursor
(
wxCursor
(
wxCURSOR_WAIT
)
);
wxYield
();
// run all the tests, with no UI at this time.
// run all the tests, with no UI at this time.
m_tester
->
ListUnconnectedPads
();
m_tester
->
ListUnconnectedPads
();
...
@@ -628,11 +628,11 @@ void DrcDialog::OnListUnconnectedClick( wxCommandEvent& event )
...
@@ -628,11 +628,11 @@ void DrcDialog::OnListUnconnectedClick( wxCommandEvent& event )
//msg.Printf( _( "Report file <%s> created\n" ), s_RptFilename.GetData() );
//msg.Printf( _( "Report file <%s> created\n" ), s_RptFilename.GetData() );
}
}
SetCursor
(
wxCursor
(
wxCURSOR_
WATCH
)
);
SetCursor
(
wxCursor
(
wxCURSOR_
ARROW
)
);
// @todo set the list counts in the DRCLISTITEMS here.
// @todo set the list counts in the DRCLISTITEMS here.
m_Parent
->
Re
DrawPanel
();
Redraw
DrawPanel
();
}
}
/*!
/*!
...
@@ -826,14 +826,18 @@ void DrcDialog::OnUnconnectedSelectionEvent( wxCommandEvent& event )
...
@@ -826,14 +826,18 @@ void DrcDialog::OnUnconnectedSelectionEvent( wxCommandEvent& event )
}
}
void
DrcDialog
::
RedrawDrawPanel
()
{
m_Parent
->
DrawPanel
->
Refresh
();
}
/*********************************************************/
/*********************************************************/
void
DrcDialog
::
DelDRCMarkers
()
void
DrcDialog
::
DelDRCMarkers
()
/*********************************************************/
/*********************************************************/
{
{
m_
Parent
->
Erase_Marqueur
s
();
m_
ClearanceListBox
->
DeleteAllItem
s
();
m_
Parent
->
ReDrawPanel
();
m_
UnconnectedListBox
->
DeleteAllItems
();
}
}
...
...
pcbnew/dialog_drc.h
View file @
15b70020
...
@@ -160,6 +160,8 @@ public:
...
@@ -160,6 +160,8 @@ public:
static
bool
ShowToolTips
();
static
bool
ShowToolTips
();
void
DelDRCMarkers
();
void
DelDRCMarkers
();
void
RedrawDrawPanel
();
////@begin DrcDialog member variables
////@begin DrcDialog member variables
wxBoxSizer
*
m_MainSizer
;
wxBoxSizer
*
m_MainSizer
;
...
@@ -181,6 +183,7 @@ public:
...
@@ -181,6 +183,7 @@ public:
////@end DrcDialog member variables
////@end DrcDialog member variables
DRC
*
m_tester
;
DRC
*
m_tester
;
WinEDA_PcbFrame
*
m_Parent
;
WinEDA_PcbFrame
*
m_Parent
;
int
m_UnconnectedCount
;
int
m_UnconnectedCount
;
...
...
pcbnew/drc.cpp
View file @
15b70020
...
@@ -92,6 +92,7 @@ DRC::DRC( WinEDA_PcbFrame* aPcbWindow )
...
@@ -92,6 +92,7 @@ DRC::DRC( WinEDA_PcbFrame* aPcbWindow )
m_mainWindow
=
aPcbWindow
;
m_mainWindow
=
aPcbWindow
;
m_drawPanel
=
aPcbWindow
->
DrawPanel
;
m_drawPanel
=
aPcbWindow
->
DrawPanel
;
m_pcb
=
aPcbWindow
->
m_Pcb
;
m_pcb
=
aPcbWindow
->
m_Pcb
;
m_ui
=
0
;
// establish initial values for everything:
// establish initial values for everything:
m_doPad2PadTest
=
true
;
m_doPad2PadTest
=
true
;
...
...
pcbnew/drc_stuff.h
View file @
15b70020
...
@@ -250,11 +250,6 @@ public:
...
@@ -250,11 +250,6 @@ public:
/**
/**
* Class DRC
* Class DRC
* is the Design Rule Checker, and performs all the DRC tests. The output of
* is the Design Rule Checker, and performs all the DRC tests. The output of
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment