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
b34df533
Commit
b34df533
authored
Oct 03, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more about Netclasses work
parent
24ce9409
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
163 additions
and
145 deletions
+163
-145
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+90
-86
event_handlers_tracks_vias_sizes.cpp
pcbnew/event_handlers_tracks_vias_sizes.cpp
+1
-0
onrightclick.cpp
pcbnew/onrightclick.cpp
+5
-3
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+67
-56
No files found.
internat/fr/kicad.mo
View file @
b34df533
No preview for this file type
internat/fr/kicad.po
View file @
b34df533
This diff is collapsed.
Click to expand it.
pcbnew/event_handlers_tracks_vias_sizes.cpp
View file @
b34df533
...
@@ -39,6 +39,7 @@ void WinEDA_PcbFrame::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
...
@@ -39,6 +39,7 @@ void WinEDA_PcbFrame::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
break
;
break
;
case
ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES
:
case
ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES
:
g_DesignSettings
.
m_UseConnectedTrackWidth
=
false
;
GetBoard
()
->
m_TrackWidthSelector
=
0
;
GetBoard
()
->
m_TrackWidthSelector
=
0
;
g_DesignSettings
.
m_CurrentTrackWidth
=
GetBoard
()
->
m_TrackWidthHistory
[
0
];
g_DesignSettings
.
m_CurrentTrackWidth
=
GetBoard
()
->
m_TrackWidthHistory
[
0
];
GetBoard
()
->
m_ViaSizeSelector
=
0
;
GetBoard
()
->
m_ViaSizeSelector
=
0
;
...
...
pcbnew/onrightclick.cpp
View file @
b34df533
...
@@ -853,7 +853,9 @@ static wxMenu* Append_Track_Width_List( BOARD * aBoard )
...
@@ -853,7 +853,9 @@ static wxMenu* Append_Track_Width_List( BOARD * aBoard )
if
(
g_DesignSettings
.
m_UseConnectedTrackWidth
)
if
(
g_DesignSettings
.
m_UseConnectedTrackWidth
)
trackwidth_menu
->
Check
(
ID_POPUP_PCB_SELECT_AUTO_WIDTH
,
true
);
trackwidth_menu
->
Check
(
ID_POPUP_PCB_SELECT_AUTO_WIDTH
,
true
);
if
(
aBoard
->
m_ViaSizeSelector
!=
0
||
aBoard
->
m_TrackWidthSelector
!=
0
)
if
(
aBoard
->
m_ViaSizeSelector
!=
0
||
aBoard
->
m_TrackWidthSelector
!=
0
||
g_DesignSettings
.
m_UseConnectedTrackWidth
)
trackwidth_menu
->
Append
(
ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES
,
trackwidth_menu
->
Append
(
ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES
,
_
(
"Use Netclass Values"
),
_
(
"Use Netclass Values"
),
_
(
"Use track and via sizes from their Netclass values"
),
_
(
"Use track and via sizes from their Netclass values"
),
...
@@ -870,7 +872,7 @@ static wxMenu* Append_Track_Width_List( BOARD * aBoard )
...
@@ -870,7 +872,7 @@ static wxMenu* Append_Track_Width_List( BOARD * aBoard )
msg
.
Printf
(
_
(
"Track %.3f"
),
value
);
msg
.
Printf
(
_
(
"Track %.3f"
),
value
);
if
(
ii
==
0
)
if
(
ii
==
0
)
msg
<<
_
(
" (
Use
NetClass)"
);
msg
<<
_
(
" (
from
NetClass)"
);
trackwidth_menu
->
Append
(
ID_POPUP_PCB_SELECT_WIDTH1
+
ii
,
msg
,
wxEmptyString
,
true
);
trackwidth_menu
->
Append
(
ID_POPUP_PCB_SELECT_WIDTH1
+
ii
,
msg
,
wxEmptyString
,
true
);
...
@@ -894,7 +896,7 @@ static wxMenu* Append_Track_Width_List( BOARD * aBoard )
...
@@ -894,7 +896,7 @@ static wxMenu* Append_Track_Width_List( BOARD * aBoard )
else
else
msg
.
Printf
(
_
(
"Via %.3f"
),
value
);
msg
.
Printf
(
_
(
"Via %.3f"
),
value
);
if
(
ii
==
0
)
if
(
ii
==
0
)
msg
<<
_
(
" (
Use
NetClass)"
);
msg
<<
_
(
" (
from
NetClass)"
);
trackwidth_menu
->
Append
(
ID_POPUP_PCB_SELECT_VIASIZE1
+
ii
,
msg
,
wxEmptyString
,
true
);
trackwidth_menu
->
Append
(
ID_POPUP_PCB_SELECT_VIASIZE1
+
ii
,
msg
,
wxEmptyString
,
true
);
}
}
if
(
aBoard
->
m_ViaSizeSelector
<
(
int
)
aBoard
->
m_ViaSizeHistory
.
size
()
)
if
(
aBoard
->
m_ViaSizeSelector
<
(
int
)
aBoard
->
m_ViaSizeHistory
.
size
()
)
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
b34df533
/****************************************************************
/****************************************************************
toolbars_update_user_interface.cpp
*
toolbars_update_user_interface.cpp
****************************************************************/
****************************************************************/
/*
/*
function to update toolbars UI after changing parameters
*
function to update toolbars UI after changing parameters
*/
*/
#include "fctsys.h"
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "appl_wxstruct.h"
...
@@ -19,11 +20,12 @@ function to update toolbars UI after changing parameters
...
@@ -19,11 +20,12 @@ function to update toolbars UI after changing parameters
/* helper to convert an integer value to a string, using mils or mm
/* helper to convert an integer value to a string, using mils or mm
* according to g_UnitMetric value
* according to g_UnitMetric value
*/
*/
static
wxString
ReturnStringValue
(
int
aValue
)
static
wxString
ReturnStringValue
(
int
aValue
)
{
{
wxString
text
;
wxString
text
;
const
wxChar
*
format
;
const
wxChar
*
format
;
double
value
=
To_User_Unit
(
g_UnitMetric
,
aValue
,
PCB_INTERNAL_UNIT
);
double
value
=
To_User_Unit
(
g_UnitMetric
,
aValue
,
PCB_INTERNAL_UNIT
);
if
(
g_UnitMetric
==
INCHES
)
if
(
g_UnitMetric
==
INCHES
)
{
{
format
=
wxT
(
" %.1f"
);
format
=
wxT
(
" %.1f"
);
...
@@ -33,21 +35,23 @@ static wxString ReturnStringValue(int aValue)
...
@@ -33,21 +35,23 @@ static wxString ReturnStringValue(int aValue)
format
=
wxT
(
" %.3f"
);
format
=
wxT
(
" %.3f"
);
text
.
Printf
(
format
,
value
);
text
.
Printf
(
format
,
value
);
if
(
g_UnitMetric
==
INCHES
)
if
(
g_UnitMetric
==
INCHES
)
text
+=
_
(
" mils"
);
text
+=
_
(
" mils"
);
else
else
text
+=
_
(
" mm"
);
text
+=
_
(
" mm"
);
return
text
;
return
text
;
}
}
/**
/**
* Function AuxiliaryToolBar_DesignRules_Update_UI
* Function AuxiliaryToolBar_DesignRules_Update_UI
* update the displayed values: track widths, via sizes, clearance, Netclass name
* update the displayed values: track widths, via sizes, clearance, Netclass name
* used when a netclass is selected
* used when a netclass is selected
*/
*/
void
WinEDA_PcbFrame
::
AuxiliaryToolBar_DesignRules_Update_UI
(
)
void
WinEDA_PcbFrame
::
AuxiliaryToolBar_DesignRules_Update_UI
()
{
{
wxString
nclname
=
GetBoard
()
->
m_CurrentNetClassName
;
wxString
nclname
=
GetBoard
()
->
m_CurrentNetClassName
;
wxString
msg
=
_
(
"NetClass: "
)
+
nclname
;
wxString
msg
=
_
(
"NetClass: "
)
+
nclname
;
m_NetClassSelectedBox
->
Clear
();
m_NetClassSelectedBox
->
Clear
();
m_NetClassSelectedBox
->
AppendText
(
msg
);
m_NetClassSelectedBox
->
AppendText
(
msg
);
...
@@ -55,13 +59,13 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_DesignRules_Update_UI( )
...
@@ -55,13 +59,13 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_DesignRules_Update_UI( )
if
(
m_ClearanceBox
)
if
(
m_ClearanceBox
)
{
{
wxString
msg
=
_
(
"Clearance"
)
+
ReturnStringValue
(
netclass
->
GetClearance
()
);
wxString
msg
=
_
(
"Clearance"
)
+
ReturnStringValue
(
netclass
->
GetClearance
()
);
m_ClearanceBox
->
Clear
();
m_ClearanceBox
->
Clear
();
m_ClearanceBox
->
AppendText
(
msg
);
m_ClearanceBox
->
AppendText
(
msg
);
}
}
}
}
/**
/**
* Function AuxiliaryToolBar_Update_UI
* Function AuxiliaryToolBar_Update_UI
* update the displayed values on auxiliary horizontal toolbar
* update the displayed values on auxiliary horizontal toolbar
...
@@ -71,20 +75,23 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_DesignRules_Update_UI( )
...
@@ -71,20 +75,23 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_DesignRules_Update_UI( )
* next items (if any) = ordered list of sizes (extra sizes).
* next items (if any) = ordered list of sizes (extra sizes).
* So the current selected class value can be same as an other extra value
* So the current selected class value can be same as an other extra value
*/
*/
void
WinEDA_PcbFrame
::
AuxiliaryToolBar_Update_UI
(
)
void
WinEDA_PcbFrame
::
AuxiliaryToolBar_Update_UI
()
{
{
wxString
msg
;
wxString
msg
;
AuxiliaryToolBar_DesignRules_Update_UI
(
);
AuxiliaryToolBar_DesignRules_Update_UI
();
m_AuxiliaryToolBar
->
ToggleTool
(
ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH
,
g_DesignSettings
.
m_UseConnectedTrackWidth
);
if
(
m_SelTrackWidthBox
&&
m_TrackAndViasSizesList_Changed
)
if
(
m_SelTrackWidthBox
&&
m_TrackAndViasSizesList_Changed
)
{
{
m_SelTrackWidthBox
->
Clear
();
m_SelTrackWidthBox
->
Clear
();
for
(
unsigned
ii
=
0
;
ii
<
GetBoard
()
->
m_TrackWidthHistory
.
size
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
GetBoard
()
->
m_TrackWidthHistory
.
size
();
ii
++
)
{
{
msg
=
_
(
"Track"
)
+
ReturnStringValue
(
GetBoard
()
->
m_TrackWidthHistory
[
ii
]
);
msg
=
_
(
"Track"
)
+
ReturnStringValue
(
GetBoard
()
->
m_TrackWidthHistory
[
ii
]
);
if
(
ii
==
0
)
if
(
ii
==
0
)
msg
<<
_
(
" *"
);
msg
<<
_
(
" *"
);
m_SelTrackWidthBox
->
Append
(
msg
);
m_SelTrackWidthBox
->
Append
(
msg
);
}
}
}
}
...
@@ -97,9 +104,9 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_Update_UI( )
...
@@ -97,9 +104,9 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_Update_UI( )
m_SelViaSizeBox
->
Clear
();
m_SelViaSizeBox
->
Clear
();
for
(
unsigned
ii
=
0
;
ii
<
GetBoard
()
->
m_ViaSizeHistory
.
size
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
GetBoard
()
->
m_ViaSizeHistory
.
size
();
ii
++
)
{
{
msg
=
_
(
"Via"
)
+
ReturnStringValue
(
GetBoard
()
->
m_ViaSizeHistory
[
ii
]
);
msg
=
_
(
"Via"
)
+
ReturnStringValue
(
GetBoard
()
->
m_ViaSizeHistory
[
ii
]
);
if
(
ii
==
0
)
if
(
ii
==
0
)
msg
<<
_
(
" *"
);
msg
<<
_
(
" *"
);
m_SelViaSizeBox
->
Append
(
msg
);
m_SelViaSizeBox
->
Append
(
msg
);
}
}
}
}
...
@@ -119,7 +126,8 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_Update_UI( )
...
@@ -119,7 +126,8 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_Update_UI( )
break
;
break
;
}
}
}
}
if
(
not_found
)
if
(
not_found
)
m_SelZoomBox
->
SetSelection
(
-
1
);
m_SelZoomBox
->
SetSelection
(
-
1
);
}
}
...
@@ -186,7 +194,9 @@ void WinEDA_PcbFrame::SetToolbars()
...
@@ -186,7 +194,9 @@ void WinEDA_PcbFrame::SetToolbars()
!
Drc_On
);
!
Drc_On
);
m_OptionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_DRC_OFF
,
m_OptionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_DRC_OFF
,
Drc_On
?
Drc_On
?
_
(
"DRC Off (Disable !!!), Currently: DRC is active"
)
:
_
(
"DRC Off (Disable !!!), Currently: DRC is active"
)
:
_
(
"DRC On (Currently: DRC is inactive !!!)"
)
);
_
(
"DRC On (Currently: DRC is inactive !!!)"
)
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SELECT_UNIT_MM
,
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SELECT_UNIT_MM
,
...
@@ -267,11 +277,12 @@ void WinEDA_PcbFrame::SetToolbars()
...
@@ -267,11 +277,12 @@ void WinEDA_PcbFrame::SetToolbars()
g_ModuleTextNOVColor
&
(
ITEM_NOT_SHOW
)
?
g_ModuleTextNOVColor
&
(
ITEM_NOT_SHOW
)
?
_
(
"Show invisible text"
)
:
_
(
"Show invisible text"
)
:
_
(
"Hide invisible text"
)
);
_
(
"Hide invisible text"
)
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
m_AuxVToolBar
?
true
:
false
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1
,
m_AuxVToolBar
?
true
:
false
);
}
}
if
(
m_AuxiliaryToolBar
)
if
(
m_AuxiliaryToolBar
)
AuxiliaryToolBar_Update_UI
(
);
AuxiliaryToolBar_Update_UI
();
UpdateToolbarLayerInfo
();
UpdateToolbarLayerInfo
();
PrepareLayerIndicator
();
PrepareLayerIndicator
();
...
...
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