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
73a8cd61
Commit
73a8cd61
authored
May 12, 2014
by
Lorenzo Marcantonio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added eeschema option for the default pin length
parent
7dc8fc1f
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
315 additions
and
21 deletions
+315
-21
dialog_eeschema_options.h
eeschema/dialogs/dialog_eeschema_options.h
+3
-0
dialog_eeschema_options_base.cpp
eeschema/dialogs/dialog_eeschema_options_base.cpp
+13
-10
dialog_eeschema_options_base.fbp
eeschema/dialogs/dialog_eeschema_options_base.fbp
+254
-1
dialog_eeschema_options_base.h
eeschema/dialogs/dialog_eeschema_options_base.h
+4
-3
eeschema_config.cpp
eeschema/eeschema_config.cpp
+21
-1
general.h
eeschema/general.h
+7
-1
lib_pin.cpp
eeschema/lib_pin.cpp
+1
-1
lib_pin.h
eeschema/lib_pin.h
+0
-1
pinedit.cpp
eeschema/pinedit.cpp
+12
-3
No files found.
eeschema/dialogs/dialog_eeschema_options.h
View file @
73a8cd61
...
@@ -58,6 +58,9 @@ public:
...
@@ -58,6 +58,9 @@ public:
void
SetLineWidth
(
int
aWidth
)
{
m_spinLineWidth
->
SetValue
(
aWidth
);
}
void
SetLineWidth
(
int
aWidth
)
{
m_spinLineWidth
->
SetValue
(
aWidth
);
}
int
GetLineWidth
(
void
)
{
return
m_spinLineWidth
->
GetValue
();
}
int
GetLineWidth
(
void
)
{
return
m_spinLineWidth
->
GetValue
();
}
void
SetPinLength
(
int
aLength
)
{
m_spinPinLength
->
SetValue
(
aLength
);
}
int
GetPinLength
(
void
)
{
return
m_spinPinLength
->
GetValue
();
}
void
SetTextSize
(
int
text_size
)
{
m_spinTextSize
->
SetValue
(
text_size
);
}
void
SetTextSize
(
int
text_size
)
{
m_spinTextSize
->
SetValue
(
text_size
);
}
int
GetTextSize
(
void
)
{
return
m_spinTextSize
->
GetValue
();
}
int
GetTextSize
(
void
)
{
return
m_spinTextSize
->
GetValue
();
}
...
...
eeschema/dialogs/dialog_eeschema_options_base.cpp
View file @
73a8cd61
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8
2012)
// C++ code generated with wxFormBuilder (version
Apr 10
2012)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
...
@@ -35,7 +35,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
...
@@ -35,7 +35,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
bSizer3
=
new
wxBoxSizer
(
wxVERTICAL
);
bSizer3
=
new
wxBoxSizer
(
wxVERTICAL
);
wxFlexGridSizer
*
fgSizer1
;
wxFlexGridSizer
*
fgSizer1
;
fgSizer1
=
new
wxFlexGridSizer
(
1
0
,
3
,
0
,
0
);
fgSizer1
=
new
wxFlexGridSizer
(
1
1
,
3
,
0
,
0
);
fgSizer1
->
AddGrowableCol
(
0
);
fgSizer1
->
AddGrowableCol
(
0
);
fgSizer1
->
AddGrowableCol
(
1
);
fgSizer1
->
AddGrowableCol
(
1
);
fgSizer1
->
AddGrowableCol
(
2
);
fgSizer1
->
AddGrowableCol
(
2
);
...
@@ -89,6 +89,17 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
...
@@ -89,6 +89,17 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
m_staticLineWidthUnits
->
Wrap
(
-
1
);
m_staticLineWidthUnits
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticLineWidthUnits
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxRIGHT
|
wxLEFT
,
3
);
fgSizer1
->
Add
(
m_staticLineWidthUnits
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxRIGHT
|
wxLEFT
,
3
);
m_staticText52
=
new
wxStaticText
(
m_panel1
,
wxID_ANY
,
_
(
"Default pin length:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText52
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText52
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxLEFT
|
wxRIGHT
,
3
);
m_spinPinLength
=
new
wxSpinCtrl
(
m_panel1
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
wxSP_ARROW_KEYS
|
wxSP_WRAP
,
50
,
1000
,
100
);
fgSizer1
->
Add
(
m_spinPinLength
,
0
,
wxALIGN_CENTER
|
wxALL
|
wxEXPAND
,
3
);
m_staticPinLengthUnits
=
new
wxStaticText
(
m_panel1
,
wxID_ANY
,
_
(
"mils"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticPinLengthUnits
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticPinLengthUnits
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxLEFT
|
wxRIGHT
,
3
);
m_staticText7
=
new
wxStaticText
(
m_panel1
,
wxID_ANY
,
_
(
"Default text &size:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText7
=
new
wxStaticText
(
m_panel1
,
wxID_ANY
,
_
(
"Default text &size:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText7
->
Wrap
(
-
1
);
m_staticText7
->
Wrap
(
-
1
);
fgSizer1
->
Add
(
m_staticText7
,
1
,
wxALIGN_CENTER_VERTICAL
|
wxRIGHT
|
wxLEFT
,
3
);
fgSizer1
->
Add
(
m_staticText7
,
1
,
wxALIGN_CENTER_VERTICAL
|
wxRIGHT
|
wxLEFT
,
3
);
...
@@ -236,7 +247,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
...
@@ -236,7 +247,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
fgSizer2
->
Add
(
m_staticText15
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
fgSizer2
->
Add
(
m_staticText15
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
m_fieldName1
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName1
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName1
->
SetMaxLength
(
0
);
fgSizer2
->
Add
(
m_fieldName1
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer2
->
Add
(
m_fieldName1
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
m_staticText161
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 2"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText161
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 2"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
...
@@ -244,7 +254,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
...
@@ -244,7 +254,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
fgSizer2
->
Add
(
m_staticText161
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
fgSizer2
->
Add
(
m_staticText161
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
m_fieldName2
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName2
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName2
->
SetMaxLength
(
0
);
fgSizer2
->
Add
(
m_fieldName2
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer2
->
Add
(
m_fieldName2
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
m_staticText17
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 3"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText17
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 3"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
...
@@ -252,7 +261,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
...
@@ -252,7 +261,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
fgSizer2
->
Add
(
m_staticText17
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
fgSizer2
->
Add
(
m_staticText17
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
m_fieldName3
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName3
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName3
->
SetMaxLength
(
0
);
fgSizer2
->
Add
(
m_fieldName3
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer2
->
Add
(
m_fieldName3
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
m_staticText18
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 4"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText18
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 4"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
...
@@ -260,7 +268,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
...
@@ -260,7 +268,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
fgSizer2
->
Add
(
m_staticText18
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
fgSizer2
->
Add
(
m_staticText18
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
m_fieldName4
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName4
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName4
->
SetMaxLength
(
0
);
fgSizer2
->
Add
(
m_fieldName4
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer2
->
Add
(
m_fieldName4
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
m_staticText19
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 5"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText19
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 5"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
...
@@ -268,7 +275,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
...
@@ -268,7 +275,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
fgSizer2
->
Add
(
m_staticText19
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
fgSizer2
->
Add
(
m_staticText19
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
m_fieldName5
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName5
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName5
->
SetMaxLength
(
0
);
fgSizer2
->
Add
(
m_fieldName5
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer2
->
Add
(
m_fieldName5
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
m_staticText20
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 6"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText20
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 6"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
...
@@ -276,7 +282,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
...
@@ -276,7 +282,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
fgSizer2
->
Add
(
m_staticText20
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
fgSizer2
->
Add
(
m_staticText20
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
m_fieldName6
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName6
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName6
->
SetMaxLength
(
0
);
fgSizer2
->
Add
(
m_fieldName6
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer2
->
Add
(
m_fieldName6
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
m_staticText21
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 7"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText21
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 7"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
...
@@ -284,7 +289,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
...
@@ -284,7 +289,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
fgSizer2
->
Add
(
m_staticText21
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
fgSizer2
->
Add
(
m_staticText21
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
m_fieldName7
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName7
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName7
->
SetMaxLength
(
0
);
fgSizer2
->
Add
(
m_fieldName7
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer2
->
Add
(
m_fieldName7
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
m_staticText22
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 8"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText22
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Custom field 8"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
...
@@ -292,7 +296,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
...
@@ -292,7 +296,6 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
fgSizer2
->
Add
(
m_staticText22
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
fgSizer2
->
Add
(
m_staticText22
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALIGN_RIGHT
|
wxALL
,
3
);
m_fieldName8
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName8
=
new
wxTextCtrl
(
m_panel2
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_fieldName8
->
SetMaxLength
(
0
);
fgSizer2
->
Add
(
m_fieldName8
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
fgSizer2
->
Add
(
m_fieldName8
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
|
wxEXPAND
,
3
);
...
...
eeschema/dialogs/dialog_eeschema_options_base.fbp
View file @
73a8cd61
This diff is collapsed.
Click to expand it.
eeschema/dialogs/dialog_eeschema_options_base.h
View file @
73a8cd61
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Oct 8
2012)
// C++ code generated with wxFormBuilder (version
Apr 10
2012)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
...
@@ -11,8 +11,6 @@
...
@@ -11,8 +11,6 @@
#include <wx/artprov.h>
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/intl.h>
class
DIALOG_SHIM
;
#include "dialog_shim.h"
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/stattext.h>
...
@@ -69,6 +67,9 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
...
@@ -69,6 +67,9 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
wxStaticText
*
m_staticText5
;
wxStaticText
*
m_staticText5
;
wxSpinCtrl
*
m_spinLineWidth
;
wxSpinCtrl
*
m_spinLineWidth
;
wxStaticText
*
m_staticLineWidthUnits
;
wxStaticText
*
m_staticLineWidthUnits
;
wxStaticText
*
m_staticText52
;
wxSpinCtrl
*
m_spinPinLength
;
wxStaticText
*
m_staticPinLengthUnits
;
wxStaticText
*
m_staticText7
;
wxStaticText
*
m_staticText7
;
wxSpinCtrl
*
m_spinTextSize
;
wxSpinCtrl
*
m_spinTextSize
;
wxStaticText
*
m_staticTextSizeUnits
;
wxStaticText
*
m_staticTextSizeUnits
;
...
...
eeschema/eeschema_config.cpp
View file @
73a8cd61
...
@@ -84,7 +84,7 @@ int GetDefaultLineThickness()
...
@@ -84,7 +84,7 @@ int GetDefaultLineThickness()
return
s_drawDefaultLineThickness
;
return
s_drawDefaultLineThickness
;
}
}
void
SetDefaultLineThickness
(
int
aThickness
)
void
SetDefaultLineThickness
(
int
aThickness
)
{
{
if
(
aThickness
>=
1
)
if
(
aThickness
>=
1
)
s_drawDefaultLineThickness
=
aThickness
;
s_drawDefaultLineThickness
=
aThickness
;
...
@@ -92,6 +92,21 @@ void SetDefaultLineThickness( int aThickness)
...
@@ -92,6 +92,21 @@ void SetDefaultLineThickness( int aThickness)
s_drawDefaultLineThickness
=
1
;
s_drawDefaultLineThickness
=
1
;
}
}
/*
* Default pin length
*/
static
int
s_defaultPinLength
;
int
GetDefaultPinLength
()
{
return
s_defaultPinLength
;
}
void
SetDefaultPinLength
(
int
aLength
)
{
s_defaultPinLength
=
aLength
;
}
EDA_COLOR_T
GetLayerColor
(
LayerNumber
aLayer
)
EDA_COLOR_T
GetLayerColor
(
LayerNumber
aLayer
)
{
{
return
s_layerColor
[
aLayer
];
return
s_layerColor
[
aLayer
];
...
@@ -269,6 +284,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
...
@@ -269,6 +284,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
dlg
.
SetGridSizes
(
grid_list
,
GetScreen
()
->
GetGridId
()
);
dlg
.
SetGridSizes
(
grid_list
,
GetScreen
()
->
GetGridId
()
);
dlg
.
SetBusWidth
(
GetDefaultBusThickness
()
);
dlg
.
SetBusWidth
(
GetDefaultBusThickness
()
);
dlg
.
SetLineWidth
(
GetDefaultLineThickness
()
);
dlg
.
SetLineWidth
(
GetDefaultLineThickness
()
);
dlg
.
SetPinLength
(
GetDefaultPinLength
()
);
dlg
.
SetTextSize
(
GetDefaultLabelSize
()
);
dlg
.
SetTextSize
(
GetDefaultLabelSize
()
);
dlg
.
SetRepeatHorizontal
(
g_RepeatStep
.
x
);
dlg
.
SetRepeatHorizontal
(
g_RepeatStep
.
x
);
dlg
.
SetRepeatVertical
(
g_RepeatStep
.
y
);
dlg
.
SetRepeatVertical
(
g_RepeatStep
.
y
);
...
@@ -317,6 +333,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
...
@@ -317,6 +333,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event )
SetDefaultBusThickness
(
dlg
.
GetBusWidth
()
);
SetDefaultBusThickness
(
dlg
.
GetBusWidth
()
);
SetDefaultLineThickness
(
dlg
.
GetLineWidth
()
);
SetDefaultLineThickness
(
dlg
.
GetLineWidth
()
);
SetDefaultPinLength
(
dlg
.
GetPinLength
()
);
SetDefaultLabelSize
(
dlg
.
GetTextSize
()
);
SetDefaultLabelSize
(
dlg
.
GetTextSize
()
);
g_RepeatStep
.
x
=
dlg
.
GetRepeatHorizontal
();
g_RepeatStep
.
x
=
dlg
.
GetRepeatHorizontal
();
g_RepeatStep
.
y
=
dlg
.
GetRepeatVertical
();
g_RepeatStep
.
y
=
dlg
.
GetRepeatVertical
();
...
@@ -477,6 +494,7 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave )
...
@@ -477,6 +494,7 @@ void SCH_EDIT_FRAME::SaveProjectSettings( bool aAskForSave )
static
const
wxChar
DefaultBusWidthEntry
[]
=
wxT
(
"DefaultBusWidth"
);
static
const
wxChar
DefaultBusWidthEntry
[]
=
wxT
(
"DefaultBusWidth"
);
static
const
wxChar
DefaultDrawLineWidthEntry
[]
=
wxT
(
"DefaultDrawLineWidth"
);
static
const
wxChar
DefaultDrawLineWidthEntry
[]
=
wxT
(
"DefaultDrawLineWidth"
);
static
const
wxChar
DefaultPinLengthEntry
[]
=
wxT
(
"DefaultPinLength"
);
static
const
wxChar
ShowHiddenPinsEntry
[]
=
wxT
(
"ShowHiddenPins"
);
static
const
wxChar
ShowHiddenPinsEntry
[]
=
wxT
(
"ShowHiddenPins"
);
static
const
wxChar
HorzVertLinesOnlyEntry
[]
=
wxT
(
"HorizVertLinesOnly"
);
static
const
wxChar
HorzVertLinesOnlyEntry
[]
=
wxT
(
"HorizVertLinesOnly"
);
static
const
wxChar
PreviewFramePositionXEntry
[]
=
wxT
(
"PreviewFramePositionX"
);
static
const
wxChar
PreviewFramePositionXEntry
[]
=
wxT
(
"PreviewFramePositionX"
);
...
@@ -602,6 +620,7 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
...
@@ -602,6 +620,7 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
SetDefaultBusThickness
(
aCfg
->
Read
(
DefaultBusWidthEntry
,
12l
)
);
SetDefaultBusThickness
(
aCfg
->
Read
(
DefaultBusWidthEntry
,
12l
)
);
SetDefaultLineThickness
(
aCfg
->
Read
(
DefaultDrawLineWidthEntry
,
6l
)
);
SetDefaultLineThickness
(
aCfg
->
Read
(
DefaultDrawLineWidthEntry
,
6l
)
);
SetDefaultPinLength
(
aCfg
->
Read
(
DefaultPinLengthEntry
,
300l
)
);
aCfg
->
Read
(
ShowHiddenPinsEntry
,
&
m_showAllPins
,
false
);
aCfg
->
Read
(
ShowHiddenPinsEntry
,
&
m_showAllPins
,
false
);
aCfg
->
Read
(
HorzVertLinesOnlyEntry
,
&
m_forceHVLines
,
true
);
aCfg
->
Read
(
HorzVertLinesOnlyEntry
,
&
m_forceHVLines
,
true
);
...
@@ -691,6 +710,7 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
...
@@ -691,6 +710,7 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
aCfg
->
Write
(
DefaultBusWidthEntry
,
(
long
)
GetDefaultBusThickness
()
);
aCfg
->
Write
(
DefaultBusWidthEntry
,
(
long
)
GetDefaultBusThickness
()
);
aCfg
->
Write
(
DefaultDrawLineWidthEntry
,
(
long
)
GetDefaultLineThickness
()
);
aCfg
->
Write
(
DefaultDrawLineWidthEntry
,
(
long
)
GetDefaultLineThickness
()
);
aCfg
->
Write
(
DefaultPinLengthEntry
,
(
long
)
GetDefaultPinLength
()
);
aCfg
->
Write
(
ShowHiddenPinsEntry
,
m_showAllPins
);
aCfg
->
Write
(
ShowHiddenPinsEntry
,
m_showAllPins
);
aCfg
->
Write
(
HorzVertLinesOnlyEntry
,
GetForceHVLines
()
);
aCfg
->
Write
(
HorzVertLinesOnlyEntry
,
GetForceHVLines
()
);
...
...
eeschema/general.h
View file @
73a8cd61
...
@@ -74,7 +74,13 @@ extern SCH_SHEET* g_RootSheet;
...
@@ -74,7 +74,13 @@ extern SCH_SHEET* g_RootSheet;
* default thickness line value (i.e. = 0 ).
* default thickness line value (i.e. = 0 ).
*/
*/
int
GetDefaultLineThickness
();
int
GetDefaultLineThickness
();
void
SetDefaultLineThickness
(
int
aThickness
);
void
SetDefaultLineThickness
(
int
aThickness
);
/**
* Default length for new pins in module editor
*/
int
GetDefaultPinLength
();
void
SetDefaultPinLength
(
int
aLength
);
/**
/**
* Default line thickness used to draw/plot busses.
* Default line thickness used to draw/plot busses.
...
...
eeschema/lib_pin.cpp
View file @
73a8cd61
...
@@ -185,7 +185,7 @@ const wxChar* MsgPinElectricType[] =
...
@@ -185,7 +185,7 @@ const wxChar* MsgPinElectricType[] =
LIB_PIN
::
LIB_PIN
(
LIB_COMPONENT
*
aParent
)
:
LIB_PIN
::
LIB_PIN
(
LIB_COMPONENT
*
aParent
)
:
LIB_ITEM
(
LIB_PIN_T
,
aParent
)
LIB_ITEM
(
LIB_PIN_T
,
aParent
)
{
{
m_length
=
DEFAULT_PIN_LENGTH
;
// default Pin len
m_length
=
GetDefaultPinLength
();
// default Pin len
m_orientation
=
PIN_RIGHT
;
// Pin orient: Up, Down, Left, Right
m_orientation
=
PIN_RIGHT
;
// Pin orient: Up, Down, Left, Right
m_shape
=
NONE
;
// Pin shape, bitwise.
m_shape
=
NONE
;
// Pin shape, bitwise.
m_type
=
PIN_UNSPECIFIED
;
// electrical type of pin
m_type
=
PIN_UNSPECIFIED
;
// electrical type of pin
...
...
eeschema/lib_pin.h
View file @
73a8cd61
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#define TARGET_PIN_RADIUS 12 // Circle diameter drawn at the active end of pins
#define TARGET_PIN_RADIUS 12 // Circle diameter drawn at the active end of pins
#define DEFAULT_PIN_LENGTH 300 // Default Length of a pin when it is created.
// pins: special symbols sizes
// pins: special symbols sizes
#define INVERT_PIN_RADIUS 30 // Radius of inverted pin circle.
#define INVERT_PIN_RADIUS 30 // Radius of inverted pin circle.
...
...
eeschema/pinedit.cpp
View file @
73a8cd61
...
@@ -59,13 +59,22 @@ static wxPoint PinPreviousPos;
...
@@ -59,13 +59,22 @@ static wxPoint PinPreviousPos;
static
int
LastPinType
=
PIN_INPUT
;
static
int
LastPinType
=
PIN_INPUT
;
static
int
LastPinOrient
=
PIN_RIGHT
;
static
int
LastPinOrient
=
PIN_RIGHT
;
static
int
LastPinShape
=
NONE
;
static
int
LastPinShape
=
NONE
;
static
int
LastPinLength
=
DEFAULT_PIN_LENGTH
;
static
int
LastPinNameSize
=
DEFAULT_TEXT_SIZE
;
static
int
LastPinNameSize
=
DEFAULT_TEXT_SIZE
;
static
int
LastPinNumSize
=
DEFAULT_TEXT_SIZE
;
static
int
LastPinNumSize
=
DEFAULT_TEXT_SIZE
;
static
bool
LastPinCommonConvert
=
false
;
static
bool
LastPinCommonConvert
=
false
;
static
bool
LastPinCommonUnit
=
false
;
static
bool
LastPinCommonUnit
=
false
;
static
bool
LastPinVisible
=
true
;
static
bool
LastPinVisible
=
true
;
// The -1 is a non-valid value to trigger delayed initialization
static
int
LastPinLength
=
-
1
;
static
int
GetLastPinLength
()
{
if
(
LastPinLength
==
-
1
)
LastPinLength
=
GetDefaultPinLength
();
return
LastPinLength
;
}
void
LIB_EDIT_FRAME
::
OnEditPin
(
wxCommandEvent
&
event
)
void
LIB_EDIT_FRAME
::
OnEditPin
(
wxCommandEvent
&
event
)
{
{
...
@@ -136,7 +145,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
...
@@ -136,7 +145,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
pin
->
SetNumber
(
dlg
.
GetPadName
()
);
pin
->
SetNumber
(
dlg
.
GetPadName
()
);
pin
->
SetNumberTextSize
(
LastPinNumSize
);
pin
->
SetNumberTextSize
(
LastPinNumSize
);
pin
->
SetOrientation
(
LastPinOrient
);
pin
->
SetOrientation
(
LastPinOrient
);
pin
->
SetLength
(
LastPinLength
);
pin
->
SetLength
(
GetLastPinLength
()
);
pin
->
SetType
(
LastPinType
);
pin
->
SetType
(
LastPinType
);
pin
->
SetShape
(
LastPinShape
);
pin
->
SetShape
(
LastPinShape
);
pin
->
SetConversion
(
(
LastPinCommonConvert
)
?
0
:
m_convert
);
pin
->
SetConversion
(
(
LastPinCommonConvert
)
?
0
:
m_convert
);
...
@@ -389,7 +398,7 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC )
...
@@ -389,7 +398,7 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC )
pin
->
SetFlags
(
IS_LINKED
);
pin
->
SetFlags
(
IS_LINKED
);
pin
->
Move
(
GetCrossHairPosition
(
true
)
);
pin
->
Move
(
GetCrossHairPosition
(
true
)
);
pin
->
SetLength
(
LastPinLength
);
pin
->
SetLength
(
GetLastPinLength
()
);
pin
->
SetOrientation
(
LastPinOrient
);
pin
->
SetOrientation
(
LastPinOrient
);
pin
->
SetType
(
LastPinType
);
pin
->
SetType
(
LastPinType
);
pin
->
SetShape
(
LastPinShape
);
pin
->
SetShape
(
LastPinShape
);
...
...
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