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
53b8a8ca
Commit
53b8a8ca
authored
Apr 20, 2015
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: add the board thickness setup in dialog_layers_setup.cpp (mainly for the 3D viewer)
parent
4e210a2d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
330 additions
and
5 deletions
+330
-5
dialog_layers_setup.cpp
pcbnew/dialogs/dialog_layers_setup.cpp
+10
-0
dialog_layers_setup_base.cpp
pcbnew/dialogs/dialog_layers_setup_base.cpp
+28
-2
dialog_layers_setup_base.fbp
pcbnew/dialogs/dialog_layers_setup_base.fbp
+288
-2
dialog_layers_setup_base.h
pcbnew/dialogs/dialog_layers_setup_base.h
+4
-1
No files found.
pcbnew/dialogs/dialog_layers_setup.cpp
View file @
53b8a8ca
...
@@ -322,6 +322,9 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( wxTopLevelWindow* aParent, BOARD* aBoa
...
@@ -322,6 +322,9 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( wxTopLevelWindow* aParent, BOARD* aBoa
m_copperLayerCount
=
m_pcb
->
GetCopperLayerCount
();
m_copperLayerCount
=
m_pcb
->
GetCopperLayerCount
();
showCopperChoice
(
m_copperLayerCount
);
showCopperChoice
(
m_copperLayerCount
);
setCopperLayerCheckBoxes
(
m_copperLayerCount
);
setCopperLayerCheckBoxes
(
m_copperLayerCount
);
m_staticTextBrdThicknessUnit
->
SetLabel
(
GetAbbreviatedUnitsLabel
(
g_UserUnit
)
);
PutValueInLocalUnits
(
*
m_textCtrlBrdThickness
,
m_pcb
->
GetDesignSettings
().
GetBoardThickness
()
);
showBoardLayerNames
();
showBoardLayerNames
();
...
@@ -620,6 +623,13 @@ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event )
...
@@ -620,6 +623,13 @@ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event )
}
}
}
}
int
thickness
=
ValueFromTextCtrl
(
*
m_textCtrlBrdThickness
);
// Clamp the value between reasonable values
thickness
=
Clamp
(
Millimeter2iu
(
0.1
),
thickness
,
Millimeter2iu
(
3.0
)
);
m_pcb
->
GetDesignSettings
().
SetBoardThickness
(
thickness
);
EndModal
(
wxID_OK
);
EndModal
(
wxID_OK
);
}
}
}
}
...
...
pcbnew/dialogs/dialog_layers_setup_base.cpp
View file @
53b8a8ca
...
@@ -33,7 +33,7 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
...
@@ -33,7 +33,7 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bPresetsSizer
->
Add
(
m_PresetsChoice
,
0
,
wxEXPAND
|
wxRIGHT
|
wxLEFT
,
5
);
bPresetsSizer
->
Add
(
m_PresetsChoice
,
0
,
wxEXPAND
|
wxRIGHT
|
wxLEFT
,
5
);
bChoicesSizer
->
Add
(
bPresetsSizer
,
1
,
wxEXPAND
,
5
);
bChoicesSizer
->
Add
(
bPresetsSizer
,
0
,
wxEXPAND
,
5
);
wxBoxSizer
*
bCopperLayersSizer
;
wxBoxSizer
*
bCopperLayersSizer
;
bCopperLayersSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
bCopperLayersSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
...
@@ -49,7 +49,33 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
...
@@ -49,7 +49,33 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bCopperLayersSizer
->
Add
(
m_CopperLayersChoice
,
0
,
wxEXPAND
|
wxRIGHT
|
wxLEFT
,
5
);
bCopperLayersSizer
->
Add
(
m_CopperLayersChoice
,
0
,
wxEXPAND
|
wxRIGHT
|
wxLEFT
,
5
);
bChoicesSizer
->
Add
(
bCopperLayersSizer
,
1
,
wxEXPAND
,
5
);
bChoicesSizer
->
Add
(
bCopperLayersSizer
,
0
,
wxEXPAND
,
5
);
wxBoxSizer
*
bBrdThicknessSizer
;
bBrdThicknessSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
m_staticTextBrdThickness
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Board Thickness"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTextBrdThickness
->
Wrap
(
-
1
);
bBrdThicknessSizer
->
Add
(
m_staticTextBrdThickness
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
wxFlexGridSizer
*
fgSizerBrdThickness
;
fgSizerBrdThickness
=
new
wxFlexGridSizer
(
0
,
2
,
0
,
0
);
fgSizerBrdThickness
->
AddGrowableCol
(
0
);
fgSizerBrdThickness
->
SetFlexibleDirection
(
wxBOTH
);
fgSizerBrdThickness
->
SetNonFlexibleGrowMode
(
wxFLEX_GROWMODE_SPECIFIED
);
m_textCtrlBrdThickness
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
fgSizerBrdThickness
->
Add
(
m_textCtrlBrdThickness
,
0
,
wxEXPAND
|
wxBOTTOM
|
wxRIGHT
|
wxLEFT
,
5
);
m_staticTextBrdThicknessUnit
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Unit"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticTextBrdThicknessUnit
->
Wrap
(
-
1
);
fgSizerBrdThickness
->
Add
(
m_staticTextBrdThicknessUnit
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxBOTTOM
|
wxRIGHT
,
5
);
bBrdThicknessSizer
->
Add
(
fgSizerBrdThickness
,
1
,
wxEXPAND
,
5
);
bChoicesSizer
->
Add
(
bBrdThicknessSizer
,
1
,
wxEXPAND
,
5
);
bMainSizer
->
Add
(
bChoicesSizer
,
0
,
wxEXPAND
,
5
);
bMainSizer
->
Add
(
bChoicesSizer
,
0
,
wxEXPAND
,
5
);
...
...
pcbnew/dialogs/dialog_layers_setup_base.fbp
View file @
53b8a8ca
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">
1
</property>
<property name="proportion">
0
</property>
<object class="wxBoxSizer" expanded="1">
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="minimum_size"></property>
<property name="name">bPresetsSizer</property>
<property name="name">bPresetsSizer</property>
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">
1
</property>
<property name="proportion">
0
</property>
<object class="wxBoxSizer" expanded="1">
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="minimum_size"></property>
<property name="name">bCopperLayersSizer</property>
<property name="name">bCopperLayersSizer</property>
...
@@ -466,6 +466,292 @@
...
@@ -466,6 +466,292 @@
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bBrdThicknessSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Board Thickness</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticTextBrdThickness</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</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</property>
<property name="proportion">1</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">0</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgSizerBrdThickness</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_textCtrlBrdThickness</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></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 class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Unit</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticTextBrdThicknessUnit</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</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>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<object class="sizeritem" expanded="1">
pcbnew/dialogs/dialog_layers_setup_base.h
View file @
53b8a8ca
...
@@ -22,9 +22,9 @@ class DIALOG_SHIM;
...
@@ -22,9 +22,9 @@ class DIALOG_SHIM;
#include <wx/settings.h>
#include <wx/settings.h>
#include <wx/choice.h>
#include <wx/choice.h>
#include <wx/sizer.h>
#include <wx/sizer.h>
#include <wx/textctrl.h>
#include <wx/panel.h>
#include <wx/panel.h>
#include <wx/checkbox.h>
#include <wx/checkbox.h>
#include <wx/textctrl.h>
#include <wx/scrolwin.h>
#include <wx/scrolwin.h>
#include <wx/button.h>
#include <wx/button.h>
#include <wx/dialog.h>
#include <wx/dialog.h>
...
@@ -192,6 +192,9 @@ class DIALOG_LAYERS_SETUP_BASE : public DIALOG_SHIM
...
@@ -192,6 +192,9 @@ class DIALOG_LAYERS_SETUP_BASE : public DIALOG_SHIM
wxChoice
*
m_PresetsChoice
;
wxChoice
*
m_PresetsChoice
;
wxStaticText
*
m_staticTextCopperLayers
;
wxStaticText
*
m_staticTextCopperLayers
;
wxChoice
*
m_CopperLayersChoice
;
wxChoice
*
m_CopperLayersChoice
;
wxStaticText
*
m_staticTextBrdThickness
;
wxTextCtrl
*
m_textCtrlBrdThickness
;
wxStaticText
*
m_staticTextBrdThicknessUnit
;
wxStaticText
*
m_staticTextLayers
;
wxStaticText
*
m_staticTextLayers
;
wxPanel
*
m_TitlePanel
;
wxPanel
*
m_TitlePanel
;
wxScrolledWindow
*
m_LayersListPanel
;
wxScrolledWindow
*
m_LayersListPanel
;
...
...
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