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
6bedc7e0
Commit
6bedc7e0
authored
Jul 08, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More about ERC and markers in eeschema ( work in progress )
parent
c61cce48
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
148 additions
and
27 deletions
+148
-27
dialog_erc.cpp
eeschema/dialog_erc.cpp
+10
-8
dialog_erc.h
eeschema/dialog_erc.h
+0
-1
dialog_erc_base.cpp
eeschema/dialog_erc_base.cpp
+18
-7
dialog_erc_base.fbp
eeschema/dialog_erc_base.fbp
+115
-8
dialog_erc_base.h
eeschema/dialog_erc_base.h
+5
-3
No files found.
eeschema/dialog_erc.cpp
View file @
6bedc7e0
...
...
@@ -78,7 +78,7 @@ void DIALOG_ERC::OnEraseDrcMarkersClick( wxCommandEvent& event )
*/
{
DeleteAllMarkers
(
MARK_ERC
);
m_M
essage
sList
->
ClearList
();
m_M
arker
sList
->
ClearList
();
m_Parent
->
DrawPanel
->
Refresh
();
}
...
...
@@ -101,23 +101,25 @@ void DIALOG_ERC::OnResetMatrixClick( wxCommandEvent& event )
void
DIALOG_ERC
::
OnErcCmpClick
(
wxCommandEvent
&
event
)
{
wxBusyCursor
();
m_MarkersList
->
Clear
();
m_MessagesList
->
Clear
();
wxSafeYield
();
// m_M
essage
sList must be redraw
wxSafeYield
();
// m_M
arker
sList must be redraw
wxArrayString
messageList
;
TestErc
(
&
messageList
);
#warning m_MessagesList->Append(messageList);
for
(
unsigned
ii
=
0
;
ii
<
messageList
.
GetCount
();
ii
++
)
m_MessagesList
->
AppendText
(
messageList
[
ii
]);
}
// Double click on a marker info:
void
DIALOG_ERC
::
OnLeftDClickMarkersList
(
wxCommandEvent
&
event
)
{
int
index
=
m_M
essage
sList
->
GetSelection
();
int
index
=
m_M
arker
sList
->
GetSelection
();
if
(
index
<
0
)
return
;
const
MARKER_SCH
*
marker
=
m_M
essage
sList
->
GetItem
(
(
unsigned
)
index
);
const
MARKER_SCH
*
marker
=
m_M
arker
sList
->
GetItem
(
(
unsigned
)
index
);
EndModal
(
1
);
...
...
@@ -294,7 +296,7 @@ void DIALOG_ERC::DisplayERC_MarkersList()
{
EDA_SheetList
SheetList
;
m_M
essage
sList
->
ClearList
();
m_M
arker
sList
->
ClearList
();
for
(
DrawSheetPath
*
Sheet
=
SheetList
.
GetFirst
();
Sheet
!=
NULL
;
Sheet
=
SheetList
.
GetNext
()
)
{
...
...
@@ -314,8 +316,8 @@ void DIALOG_ERC::DisplayERC_MarkersList()
// wxString msg;
// msg.Printf( _( "<b>sheet %s</b><ul>\n" ), Sheet->PathHumanReadable().GetData() );
// msg += Marker->GetReporter().ShowHtml();
// m_M
essage
sList->Append( msg );
m_M
essage
sList
->
AppendToList
(
Marker
);
// m_M
arker
sList->Append( msg );
m_M
arker
sList
->
AppendToList
(
Marker
);
}
}
}
...
...
eeschema/dialog_erc.h
View file @
6bedc7e0
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_erc.h
// Author: jean-pierre Charras
// Licence: GPL
...
...
eeschema/dialog_erc_base.cpp
View file @
6bedc7e0
...
...
@@ -68,8 +68,19 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin
bupperSizer
->
Add
(
sdiagSizer
,
0
,
0
,
5
);
wxBoxSizer
*
bSizeMessages
;
bSizeMessages
=
new
wxBoxSizer
(
wxVERTICAL
);
bupperSizer
->
Add
(
10
,
10
,
1
,
wxEXPAND
,
5
);
m_titleMessages
=
new
wxStaticText
(
m_PanelERC
,
wxID_ANY
,
_
(
"Messages:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_titleMessages
->
Wrap
(
-
1
);
bSizeMessages
->
Add
(
m_titleMessages
,
0
,
wxRIGHT
|
wxLEFT
,
5
);
m_MessagesList
=
new
wxTextCtrl
(
m_PanelERC
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
wxTE_MULTILINE
|
wxTE_READONLY
);
m_MessagesList
->
SetMinSize
(
wxSize
(
300
,
-
1
)
);
bSizeMessages
->
Add
(
m_MessagesList
,
1
,
wxEXPAND
|
wxBOTTOM
|
wxLEFT
,
5
);
bupperSizer
->
Add
(
bSizeMessages
,
1
,
wxEXPAND
,
5
);
wxBoxSizer
*
bbuttonsSizer
;
bbuttonsSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
...
...
@@ -94,14 +105,14 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin
m_staticline2
=
new
wxStaticLine
(
m_PanelERC
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLI_HORIZONTAL
);
bercSizer
->
Add
(
m_staticline2
,
0
,
wxEXPAND
|
wxALL
,
5
);
m_textM
essage
=
new
wxStaticText
(
m_PanelERC
,
wxID_ANY
,
_
(
"Message
s:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_textM
essage
->
Wrap
(
-
1
);
bercSizer
->
Add
(
m_textM
essage
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_textM
arkers
=
new
wxStaticText
(
m_PanelERC
,
wxID_ANY
,
_
(
"Marker
s:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_textM
arkers
->
Wrap
(
-
1
);
bercSizer
->
Add
(
m_textM
arkers
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_M
essagesList
=
new
ERC_HTML_LISTBOX
(
m_PanelERC
,
ID_MAKER_HTMLLISTBOX
,
wxDefaultPosition
,
wxDefaultSize
,
0
,
NULL
,
0
);
m_M
essage
sList
->
SetMinSize
(
wxSize
(
500
,
350
)
);
m_M
arkersList
=
new
ERC_HTML_LISTBOX
(
m_PanelERC
,
ID_MAKER_HTMLLISTBOX
,
wxDefaultPosition
,
wxDefaultSize
,
0
,
NULL
,
0
|
wxSIMPLE_BORDER
);
m_M
arker
sList
->
SetMinSize
(
wxSize
(
500
,
350
)
);
bercSizer
->
Add
(
m_M
essage
sList
,
1
,
wxALL
|
wxEXPAND
,
5
);
bercSizer
->
Add
(
m_M
arker
sList
,
1
,
wxALL
|
wxEXPAND
,
5
);
m_PanelERC
->
SetSizer
(
bercSizer
);
m_PanelERC
->
Layout
();
...
...
eeschema/dialog_erc_base.fbp
View file @
6bedc7e0
...
...
@@ -523,10 +523,117 @@
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"spacer"
expanded=
"1"
>
<property
name=
"height"
>
10
</property>
<object
class=
"wxBoxSizer"
expanded=
"1"
>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
bSizeMessages
</property>
<property
name=
"orient"
>
wxVERTICAL
</property>
<property
name=
"permission"
>
none
</property>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxRIGHT|wxLEFT
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStaticText"
expanded=
"1"
>
<property
name=
"bg"
></property>
<property
name=
"context_help"
></property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"font"
></property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Messages:
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
m_titleMessages
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
<property
name=
"style"
></property>
<property
name=
"subclass"
></property>
<property
name=
"tooltip"
></property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"wrap"
>
-1
</property>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
<event
name=
"OnMiddleUp"
></event>
<event
name=
"OnMotion"
></event>
<event
name=
"OnMouseEvents"
></event>
<event
name=
"OnMouseWheel"
></event>
<event
name=
"OnPaint"
></event>
<event
name=
"OnRightDClick"
></event>
<event
name=
"OnRightDown"
></event>
<event
name=
"OnRightUp"
></event>
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnUpdateUI"
></event>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND|wxBOTTOM|wxLEFT
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxTextCtrl"
expanded=
"1"
>
<property
name=
"bg"
></property>
<property
name=
"context_help"
></property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"font"
></property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"maxlength"
>
0
</property>
<property
name=
"minimum_size"
>
300,-1
</property>
<property
name=
"name"
>
m_MessagesList
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"width"
>
10
</property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxTE_MULTILINE|wxTE_READONLY
</property>
<property
name=
"subclass"
></property>
<property
name=
"tooltip"
></property>
<property
name=
"value"
></property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
<event
name=
"OnMiddleUp"
></event>
<event
name=
"OnMotion"
></event>
<event
name=
"OnMouseEvents"
></event>
<event
name=
"OnMouseWheel"
></event>
<event
name=
"OnPaint"
></event>
<event
name=
"OnRightDClick"
></event>
<event
name=
"OnRightDown"
></event>
<event
name=
"OnRightUp"
></event>
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnText"
></event>
<event
name=
"OnTextEnter"
></event>
<event
name=
"OnTextMaxLen"
></event>
<event
name=
"OnTextURL"
></event>
<event
name=
"OnUpdateUI"
></event>
</object>
</object>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
...
...
@@ -811,10 +918,10 @@
<property
name=
"font"
></property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
M
essage
s:
</property>
<property
name=
"label"
>
M
arker
s:
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
m_textM
essage
</property>
<property
name=
"name"
>
m_textM
arkers
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
...
...
@@ -865,7 +972,7 @@
<property
name=
"id"
>
ID_MAKER_HTMLLISTBOX
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
>
500,350
</property>
<property
name=
"name"
>
m_M
essage
sList
</property>
<property
name=
"name"
>
m_M
arker
sList
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
...
...
@@ -874,7 +981,7 @@
<property
name=
"tooltip"
></property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<property
name=
"window_style"
>
wxSIMPLE_BORDER
</property>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
...
...
eeschema/dialog_erc_base.h
View file @
6bedc7e0
...
...
@@ -20,6 +20,7 @@ class ERC_HTML_LISTBOX;
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/statline.h>
...
...
@@ -66,14 +67,15 @@ class DIALOG_ERC_BASE : public wxDialog
wxStaticText
*
m_LastWarningCount
;
wxStaticText
*
m_LastErrCountText
;
wxStaticText
*
m_LastErrCount
;
wxStaticText
*
m_titleMessages
;
wxTextCtrl
*
m_MessagesList
;
wxButton
*
m_buttonERC
;
wxButton
*
m_buttondelmarkers
;
wxButton
*
m_buttonClose
;
wxCheckBox
*
m_WriteResultOpt
;
wxStaticLine
*
m_staticline2
;
wxStaticText
*
m_textM
essage
;
ERC_HTML_LISTBOX
*
m_M
essage
sList
;
wxStaticText
*
m_textM
arkers
;
ERC_HTML_LISTBOX
*
m_M
arker
sList
;
wxPanel
*
m_PanelERCOptions
;
wxBoxSizer
*
m_PanelMatrixSizer
;
wxButton
*
m_ResetOptButton
;
...
...
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