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
Expand all
Hide 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
m_copperLayerCount
=
m_pcb
->
GetCopperLayerCount
();
showCopperChoice
(
m_copperLayerCount
);
setCopperLayerCheckBoxes
(
m_copperLayerCount
);
m_staticTextBrdThicknessUnit
->
SetLabel
(
GetAbbreviatedUnitsLabel
(
g_UserUnit
)
);
PutValueInLocalUnits
(
*
m_textCtrlBrdThickness
,
m_pcb
->
GetDesignSettings
().
GetBoardThickness
()
);
showBoardLayerNames
();
...
...
@@ -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
);
}
}
...
...
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
bPresetsSizer
->
Add
(
m_PresetsChoice
,
0
,
wxEXPAND
|
wxRIGHT
|
wxLEFT
,
5
);
bChoicesSizer
->
Add
(
bPresetsSizer
,
1
,
wxEXPAND
,
5
);
bChoicesSizer
->
Add
(
bPresetsSizer
,
0
,
wxEXPAND
,
5
);
wxBoxSizer
*
bCopperLayersSizer
;
bCopperLayersSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
...
...
@@ -49,7 +49,33 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
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
);
...
...
pcbnew/dialogs/dialog_layers_setup_base.fbp
View file @
53b8a8ca
This diff is collapsed.
Click to expand it.
pcbnew/dialogs/dialog_layers_setup_base.h
View file @
53b8a8ca
...
...
@@ -22,9 +22,9 @@ class DIALOG_SHIM;
#include <wx/settings.h>
#include <wx/choice.h>
#include <wx/sizer.h>
#include <wx/textctrl.h>
#include <wx/panel.h>
#include <wx/checkbox.h>
#include <wx/textctrl.h>
#include <wx/scrolwin.h>
#include <wx/button.h>
#include <wx/dialog.h>
...
...
@@ -192,6 +192,9 @@ class DIALOG_LAYERS_SETUP_BASE : public DIALOG_SHIM
wxChoice
*
m_PresetsChoice
;
wxStaticText
*
m_staticTextCopperLayers
;
wxChoice
*
m_CopperLayersChoice
;
wxStaticText
*
m_staticTextBrdThickness
;
wxTextCtrl
*
m_textCtrlBrdThickness
;
wxStaticText
*
m_staticTextBrdThicknessUnit
;
wxStaticText
*
m_staticTextLayers
;
wxPanel
*
m_TitlePanel
;
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