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
bc62df64
Commit
bc62df64
authored
Oct 06, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed resize problem in design rules dialog and minor enhancement
parent
6c3968a1
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
151 additions
and
163 deletions
+151
-163
dialog_design_rules.cpp
pcbnew/dialog_design_rules.cpp
+8
-8
dialog_design_rules.h
pcbnew/dialog_design_rules.h
+1
-1
dialog_design_rules_base.cpp
pcbnew/dialog_design_rules_base.cpp
+8
-13
dialog_design_rules_base.fbp
pcbnew/dialog_design_rules_base.fbp
+105
-116
dialog_design_rules_base.h
pcbnew/dialog_design_rules_base.h
+10
-7
dialog_drc.cpp
pcbnew/dialog_drc.cpp
+17
-18
dialog_drc.h
pcbnew/dialog_drc.h
+2
-0
No files found.
pcbnew/dialog_design_rules.cpp
View file @
bc62df64
...
...
@@ -86,7 +86,7 @@ DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( WinEDA_PcbFrame* parent ) :
m_rightListCtrl
->
SetColumnWidth
(
1
,
wxLIST_AUTOSIZE
);
Init
();
Init
DialogRules
();
SetAutoLayout
(
true
);
GetSizer
()
->
Fit
(
this
);
GetSizer
()
->
SetSizeHints
(
this
);
...
...
@@ -105,23 +105,23 @@ void DIALOG_DESIGN_RULES::PrintCurrentSettings( )
// Display min values:
value
=
ReturnStringFromValue
(
g_UnitMetric
,
g_DesignSettings
.
m_TrackMinWidth
,
internal_units
,
true
);
msg
.
Printf
(
_
(
"Minimum value for tracks width: <b>%s</b><br>
\n
"
),
GetChars
(
value
)
);
msg
.
Printf
(
_
(
"Minimum value for tracks width: <b>%s</b><br>
\n
"
),
value
.
c_str
(
)
);
m_MessagesList
->
AppendToPage
(
msg
);
value
=
ReturnStringFromValue
(
g_UnitMetric
,
g_DesignSettings
.
m_ViasMinSize
,
internal_units
,
true
);
msg
.
Printf
(
_
(
"Minimum value for vias diameter: <b>%s</b><br>
\n
"
),
GetChars
(
value
)
);
msg
.
Printf
(
_
(
"Minimum value for vias diameter: <b>%s</b><br>
\n
"
),
value
.
c_str
(
)
);
m_MessagesList
->
AppendToPage
(
msg
);
value
=
ReturnStringFromValue
(
g_UnitMetric
,
g_DesignSettings
.
m_MicroViasMinSize
,
internal_units
,
true
);
msg
.
Printf
(
_
(
"Minimum value for microvias diameter: <b>%s</b><br>
\n
"
),
GetChars
(
value
)
);
msg
.
Printf
(
_
(
"Minimum value for microvias diameter: <b>%s</b><br>
\n
"
),
value
.
c_str
(
)
);
m_MessagesList
->
AppendToPage
(
msg
);
}
/**************************************
******************************
/
void
DIALOG_DESIGN_RULES
::
Init
()
/**************************************
******************************
/
/**************************************/
void
DIALOG_DESIGN_RULES
::
Init
DialogRules
()
/**************************************/
{
SetFocus
();
SetReturnCode
(
0
);
...
...
@@ -409,7 +409,7 @@ void DIALOG_DESIGN_RULES::CopyRulesListToBoard()
void
DIALOG_DESIGN_RULES
::
OnCancelButtonClick
(
wxCommandEvent
&
event
)
/*****************************************************************/
{
EndModal
(
0
);
EndModal
(
wxID_CANCEL
);
}
...
...
pcbnew/dialog_design_rules.h
View file @
bc62df64
...
...
@@ -57,7 +57,7 @@ private:
void
OnLeftSelectAllButton
(
wxCommandEvent
&
event
);
void
OnRightSelectAllButton
(
wxCommandEvent
&
event
);
bool
TestDataValidity
(
);
void
Init
();
void
Init
DialogRules
();
void
InitRulesList
();
void
InitializeRulesSelectionBoxes
();
void
CopyRulesListToBoard
();
...
...
pcbnew/dialog_design_rules_base.cpp
View file @
bc62df64
...
...
@@ -94,7 +94,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_leftClassChoice
->
SetSelection
(
0
);
leftNetSelectBoxSizer
->
Add
(
m_leftClassChoice
,
0
,
wxEXPAND
|
wxTOP
|
wxBOTTOM
,
5
);
m_leftListCtrl
=
new
wxListCtrl
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLC_HRULES
|
wxLC_REPORT
|
wxLC_VRULES
);
m_leftListCtrl
=
new
wxListCtrl
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLC_HRULES
|
wxLC_REPORT
|
wxLC_VRULES
|
wxSUNKEN_BORDER
);
m_leftListCtrl
->
SetMinSize
(
wxSize
(
220
,
300
)
);
leftNetSelectBoxSizer
->
Add
(
m_leftListCtrl
,
1
,
wxEXPAND
|
wxTOP
|
wxBOTTOM
,
5
);
...
...
@@ -105,21 +105,16 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
bmiddleSizerNetSelect
=
new
wxBoxSizer
(
wxVERTICAL
);
m_buttonRightToLeft
=
new
wxButton
(
this
,
ID_LEFT_TO_RIGHT_COPY
,
_
(
"<<<"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
bmiddleSizerNetSelect
->
Add
(
m_buttonRightToLeft
,
0
,
wxAL
IGN_CENTER_HORIZONTAL
|
wxAL
L
,
5
);
bmiddleSizerNetSelect
->
Add
(
m_buttonRightToLeft
,
0
,
wxAL
L
|
wxALIGN_CENTER_HORIZONTA
L
,
5
);
m_buttonLeftToRight
=
new
wxButton
(
this
,
ID_RIGHT_TO_LEFT_COPY
,
_
(
">>>"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
bmiddleSizerNetSelect
->
Add
(
m_buttonLeftToRight
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
wxBoxSizer
*
bSizerButtonsSelecAll
;
bSizerButtonsSelecAll
=
new
wxBoxSizer
(
wxHORIZONTAL
);
bmiddleSizerNetSelect
->
Add
(
m_buttonLeftToRight
,
0
,
wxALL
|
wxALIGN_CENTER_HORIZONTAL
,
5
);
m_buttonLeftSelAll
=
new
wxButton
(
this
,
wxID_ANY
,
_
(
"<< Select All"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
b
SizerButtonsSelecAll
->
Add
(
m_buttonLeftSelAll
,
0
,
wxAL
L
,
5
);
b
middleSizerNetSelect
->
Add
(
m_buttonLeftSelAll
,
0
,
wxALL
|
wxALIGN_CENTER_HORIZONTA
L
,
5
);
m_buttonRightSelAll
=
new
wxButton
(
this
,
wxID_ANY
,
_
(
"Select All >>"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
bSizerButtonsSelecAll
->
Add
(
m_buttonRightSelAll
,
0
,
wxALIGN_BOTTOM
|
wxALIGN_RIGHT
|
wxALL
,
5
);
bmiddleSizerNetSelect
->
Add
(
bSizerButtonsSelecAll
,
0
,
wxALIGN_CENTER_HORIZONTAL
,
5
);
bmiddleSizerNetSelect
->
Add
(
m_buttonRightSelAll
,
0
,
wxALIGN_BOTTOM
|
wxALL
|
wxALIGN_CENTER_HORIZONTAL
,
5
);
sbSizer4
->
Add
(
bmiddleSizerNetSelect
,
0
,
wxALIGN_CENTER_VERTICAL
,
5
);
...
...
@@ -131,12 +126,12 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_rightClassChoice
->
SetSelection
(
0
);
rghtNetSelectBoxSizer
->
Add
(
m_rightClassChoice
,
0
,
wxEXPAND
|
wxTOP
|
wxBOTTOM
,
5
);
m_rightListCtrl
=
new
wxListCtrl
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLC_HRULES
|
wxLC_REPORT
|
wxLC_VRULES
);
m_rightListCtrl
=
new
wxListCtrl
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLC_HRULES
|
wxLC_REPORT
|
wxLC_VRULES
|
wxSUNKEN_BORDER
);
m_rightListCtrl
->
SetMinSize
(
wxSize
(
220
,
-
1
)
);
rghtNetSelectBoxSizer
->
Add
(
m_rightListCtrl
,
1
,
wxEXPAND
|
wxTOP
|
wxBOTTOM
,
5
);
sbSizer4
->
Add
(
rghtNetSelectBoxSizer
,
0
,
wxALL
|
wxEXPAND
,
5
);
sbSizer4
->
Add
(
rghtNetSelectBoxSizer
,
1
,
wxALL
|
wxEXPAND
,
5
);
bMainSizer
->
Add
(
sbSizer4
,
2
,
wxEXPAND
|
wxBOTTOM
|
wxRIGHT
|
wxLEFT
,
5
);
...
...
@@ -156,7 +151,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_sdbSizer1Cancel
=
new
wxButton
(
this
,
wxID_CANCEL
);
m_sdbSizer1
->
AddButton
(
m_sdbSizer1Cancel
);
m_sdbSizer1
->
Realize
();
bMainSizer
->
Add
(
m_sdbSizer1
,
0
,
wxAL
IGN_RIGHT
|
wxALL
|
wxEXPAND
,
5
);
bMainSizer
->
Add
(
m_sdbSizer1
,
0
,
wxAL
L
|
wxALIGN_RIGHT
,
5
);
this
->
SetSizer
(
bMainSizer
);
this
->
Layout
();
...
...
pcbnew/dialog_design_rules_base.fbp
View file @
bc62df64
...
...
@@ -16,7 +16,7 @@
<property
name=
"path"
>
.
</property>
<property
name=
"precompiled_header"
></property>
<property
name=
"relative_path"
>
1
</property>
<property
name=
"use_enum"
>
0
</property>
<property
name=
"use_enum"
>
1
</property>
<property
name=
"use_microsoft_bom"
>
0
</property>
<object
class=
"Dialog"
expanded=
"1"
>
<property
name=
"bg"
></property>
...
...
@@ -462,7 +462,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"
>
wxSUNKEN_BORDER
</property>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
...
...
@@ -521,7 +521,7 @@
<property
name=
"permission"
>
none
</property>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxAL
IGN_CENTER_HORIZONTAL|wxAL
L
</property>
<property
name=
"flag"
>
wxAL
L|wxALIGN_CENTER_HORIZONTA
L
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxButton"
expanded=
"1"
>
<property
name=
"bg"
></property>
...
...
@@ -573,7 +573,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxAL
IGN_CENTER_HORIZONTAL|wxAL
L
</property>
<property
name=
"flag"
>
wxAL
L|wxALIGN_CENTER_HORIZONTA
L
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxButton"
expanded=
"1"
>
<property
name=
"bg"
></property>
...
...
@@ -625,16 +625,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALIGN_CENTER_HORIZONTAL
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxBoxSizer"
expanded=
"0"
>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
bSizerButtonsSelecAll
</property>
<property
name=
"orient"
>
wxHORIZONTAL
</property>
<property
name=
"permission"
>
none
</property>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL
</property>
<property
name=
"flag"
>
wxALL|wxALIGN_CENTER_HORIZONTAL
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxButton"
expanded=
"1"
>
<property
name=
"bg"
></property>
...
...
@@ -686,7 +677,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALIGN_BOTTOM|wxALIGN_RIGHT|wxAL
L
</property>
<property
name=
"flag"
>
wxALIGN_BOTTOM|wxALL|wxALIGN_CENTER_HORIZONTA
L
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxButton"
expanded=
"1"
>
<property
name=
"bg"
></property>
...
...
@@ -738,12 +729,10 @@
</object>
</object>
</object>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
0
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxBoxSizer"
expanded=
"1"
>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
rghtNetSelectBoxSizer
</property>
...
...
@@ -823,7 +812,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"
>
wxSUNKEN_BORDER
</property>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
...
...
@@ -941,7 +930,7 @@
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxAL
IGN_RIGHT|wxALL|wxEXPAND
</property>
<property
name=
"flag"
>
wxAL
L|wxALIGN_RIGHT
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStdDialogButtonSizer"
expanded=
"1"
>
<property
name=
"Apply"
>
0
</property>
...
...
pcbnew/dialog_design_rules_base.h
View file @
bc62df64
...
...
@@ -26,13 +26,6 @@
///////////////////////////////////////////////////////////////////////////
#define wxID_ADD_NETCLASS 1000
#define wxID_REMOVE_NETCLASS 1001
#define ID_LEFT_CHOICE_CLICK 1002
#define ID_LEFT_TO_RIGHT_COPY 1003
#define ID_RIGHT_TO_LEFT_COPY 1004
#define ID_RIGHT_CHOICE_CLICK 1005
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_DESIGN_RULES_BASE
///////////////////////////////////////////////////////////////////////////////
...
...
@@ -41,6 +34,16 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
private
:
protected
:
enum
{
wxID_ADD_NETCLASS
=
1000
,
wxID_REMOVE_NETCLASS
,
ID_LEFT_CHOICE_CLICK
,
ID_LEFT_TO_RIGHT_COPY
,
ID_RIGHT_TO_LEFT_COPY
,
ID_RIGHT_CHOICE_CLICK
,
};
wxGrid
*
m_grid
;
wxButton
*
m_addButton
;
wxButton
*
m_removeButton
;
...
...
pcbnew/dialog_drc.cpp
View file @
bc62df64
...
...
@@ -65,6 +65,20 @@ void DIALOG_DRC_CONTROL::Init()
// m_SetClearance->SetSelection(0,0);
}
/* accept DRC parameters (min clearance value and min sizes
*/
void
DIALOG_DRC_CONTROL
::
SetDrcParmeters
(
)
{
g_DesignSettings
.
m_TrackClearance
=
ReturnValueFromTextCtrl
(
*
m_SetClearance
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_TrackMinWidth
=
ReturnValueFromTextCtrl
(
*
m_SetTrackMinWidthCtrl
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_ViasMinSize
=
ReturnValueFromTextCtrl
(
*
m_SetViaMinSizeCtrl
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_MicroViasMinSize
=
ReturnValueFromTextCtrl
(
*
m_SetMicroViakMinSizeCtrl
,
m_Parent
->
m_InternalUnits
);
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DRC_RUN
...
...
@@ -87,14 +101,7 @@ void DIALOG_DRC_CONTROL::OnStartdrcClick( wxCommandEvent& event )
reportName
=
m_RptFilenameCtrl
->
GetValue
();
}
g_DesignSettings
.
m_TrackClearance
=
ReturnValueFromTextCtrl
(
*
m_SetClearance
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_TrackMinWidth
=
ReturnValueFromTextCtrl
(
*
m_SetTrackMinWidthCtrl
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_ViasMinSize
=
ReturnValueFromTextCtrl
(
*
m_SetViaMinSizeCtrl
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_MicroViasMinSize
=
ReturnValueFromTextCtrl
(
*
m_SetMicroViakMinSizeCtrl
,
m_Parent
->
m_InternalUnits
);
SetDrcParmeters
(
);
m_tester
->
SetSettings
(
true
,
// Pad to pad DRC test enabled
true
,
// unconnected pdas DRC test enabled
...
...
@@ -172,14 +179,7 @@ void DIALOG_DRC_CONTROL::OnListUnconnectedClick( wxCommandEvent& event )
reportName
=
m_RptFilenameCtrl
->
GetValue
();
}
g_DesignSettings
.
m_TrackClearance
=
ReturnValueFromTextCtrl
(
*
m_SetClearance
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_TrackMinWidth
=
ReturnValueFromTextCtrl
(
*
m_SetTrackMinWidthCtrl
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_ViasMinSize
=
ReturnValueFromTextCtrl
(
*
m_SetViaMinSizeCtrl
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_MicroViasMinSize
=
ReturnValueFromTextCtrl
(
*
m_SetMicroViakMinSizeCtrl
,
m_Parent
->
m_InternalUnits
);
SetDrcParmeters
(
);
m_tester
->
SetSettings
(
true
,
// Pad to pad DRC test enabled
true
,
// unconnected pdas DRC test enabled
...
...
@@ -252,6 +252,7 @@ void DIALOG_DRC_CONTROL::OnButtonBrowseRptFileClick( wxCommandEvent& event )
void
DIALOG_DRC_CONTROL
::
OnOkClick
(
wxCommandEvent
&
event
)
{
SetReturnCode
(
wxID_OK
);
SetDrcParmeters
(
);
m_tester
->
DestroyDialog
(
wxID_OK
);
}
...
...
@@ -283,8 +284,6 @@ void DIALOG_DRC_CONTROL::OnReportCheckBoxClicked( wxCommandEvent& event )
m_RptFilenameCtrl
->
Enable
(
false
);
m_BrowseButton
->
Enable
(
false
);
}
// event.Skip();
}
...
...
pcbnew/dialog_drc.h
View file @
bc62df64
...
...
@@ -53,6 +53,8 @@ private:
void
Init
(
);
void
SetDrcParmeters
(
);
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX
void
OnReportCheckBoxClicked
(
wxCommandEvent
&
event
);
...
...
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