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
29e7638a
Commit
29e7638a
authored
Feb 27, 2014
by
Martin Janitschke
Committed by
jean-pierre charras
Feb 27, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make microwave toolbar accessible from menu (Bug #1285425 )
parent
031202a8
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
6 deletions
+46
-6
wxPcbStruct.h
include/wxPcbStruct.h
+1
-0
dialog_general_options.cpp
pcbnew/dialogs/dialog_general_options.cpp
+4
-0
help_common_strings.h
pcbnew/help_common_strings.h
+2
-0
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+7
-0
pcbframe.cpp
pcbnew/pcbframe.cpp
+3
-0
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+11
-0
pcbnew_id.h
pcbnew/pcbnew_id.h
+1
-0
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+11
-6
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+6
-0
No files found.
include/wxPcbStruct.h
View file @
29e7638a
...
@@ -279,6 +279,7 @@ public:
...
@@ -279,6 +279,7 @@ public:
void
OnUpdateSelectAutoTrackWidth
(
wxUpdateUIEvent
&
aEvent
);
void
OnUpdateSelectAutoTrackWidth
(
wxUpdateUIEvent
&
aEvent
);
void
OnUpdateAutoPlaceModulesMode
(
wxUpdateUIEvent
&
aEvent
);
void
OnUpdateAutoPlaceModulesMode
(
wxUpdateUIEvent
&
aEvent
);
void
OnUpdateAutoPlaceTracksMode
(
wxUpdateUIEvent
&
aEvent
);
void
OnUpdateAutoPlaceTracksMode
(
wxUpdateUIEvent
&
aEvent
);
void
OnUpdateMuWaveToolbar
(
wxUpdateUIEvent
&
aEvent
);
/**
/**
* Function RecordMacros.
* Function RecordMacros.
...
...
pcbnew/dialogs/dialog_general_options.cpp
View file @
29e7638a
...
@@ -237,6 +237,10 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -237,6 +237,10 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
m_show_microwave_tools
=
state
;
m_show_microwave_tools
=
state
;
m_auimgr
.
GetPane
(
wxT
(
"m_microWaveToolBar"
)
).
Show
(
m_show_microwave_tools
);
m_auimgr
.
GetPane
(
wxT
(
"m_microWaveToolBar"
)
).
Show
(
m_show_microwave_tools
);
m_auimgr
.
Update
();
m_auimgr
.
Update
();
GetMenuBar
()
->
SetLabel
(
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
,
m_show_microwave_tools
?
_
(
"Hide Microwave Toolbar"
)
:
_
(
"Show Microwave Toolbar"
));
break
;
break
;
case
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR
:
case
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR
:
...
...
pcbnew/help_common_strings.h
View file @
29e7638a
...
@@ -22,3 +22,5 @@
...
@@ -22,3 +22,5 @@
#define HELP_ZOOM_REDRAW _( "Redraw the screen of the board" )
#define HELP_ZOOM_REDRAW _( "Redraw the screen of the board" )
#define HELP_SHOW_HIDE_LAYERMANAGER _( "Show/hide the layers manager toolbar" )
#define HELP_SHOW_HIDE_LAYERMANAGER _( "Show/hide the layers manager toolbar" )
#define HELP_SHOW_HIDE_MICROWAVE_TOOLS _( "Show/hide the toolbar for microwave tools\nThis is a experimental feature (under development)" )
pcbnew/menubar_pcbframe.cpp
View file @
29e7638a
...
@@ -482,6 +482,13 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
...
@@ -482,6 +482,13 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
HELP_SHOW_HIDE_LAYERMANAGER
,
HELP_SHOW_HIDE_LAYERMANAGER
,
KiBitmap
(
layers_manager_xpm
)
);
KiBitmap
(
layers_manager_xpm
)
);
AddMenuItem
(
configmenu
,
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
,
m_show_microwave_tools
?
_
(
"Hide Microwave Toolbar"
)
:
_
(
"Show Microwave Toolbar"
),
HELP_SHOW_HIDE_MICROWAVE_TOOLS
,
KiBitmap
(
mw_toolbar_xpm
)
);
// General
// General
#ifdef __WXMAC__
#ifdef __WXMAC__
configmenu
->
Append
(
wxID_PREFERENCES
);
configmenu
->
Append
(
wxID_PREFERENCES
);
...
...
pcbnew/pcbframe.cpp
View file @
29e7638a
...
@@ -141,6 +141,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
...
@@ -141,6 +141,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_MENU_RANGE
(
ID_PREFERENCES_HOTKEY_START
,
ID_PREFERENCES_HOTKEY_END
,
EVT_MENU_RANGE
(
ID_PREFERENCES_HOTKEY_START
,
ID_PREFERENCES_HOTKEY_END
,
PCB_EDIT_FRAME
::
Process_Config
)
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
wxID_PREFERENCES
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
wxID_PREFERENCES
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_PCB_LAYERS_SETUP
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_PCB_LAYERS_SETUP
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_PCB_MASK_CLEARANCE
,
PCB_EDIT_FRAME
::
Process_Config
)
EVT_MENU
(
ID_PCB_MASK_CLEARANCE
,
PCB_EDIT_FRAME
::
Process_Config
)
...
@@ -292,6 +293,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
...
@@ -292,6 +293,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
PCB_EDIT_FRAME
::
OnUpdateVerticalToolbar
)
PCB_EDIT_FRAME
::
OnUpdateVerticalToolbar
)
EVT_UPDATE_UI_RANGE
(
ID_TB_OPTIONS_SHOW_ZONES
,
ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY
,
EVT_UPDATE_UI_RANGE
(
ID_TB_OPTIONS_SHOW_ZONES
,
ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY
,
PCB_EDIT_FRAME
::
OnUpdateZoneDisplayStyle
)
PCB_EDIT_FRAME
::
OnUpdateZoneDisplayStyle
)
EVT_UPDATE_UI_RANGE
(
ID_PCB_MUWAVE_START_CMD
,
ID_PCB_MUWAVE_END_CMD
,
PCB_EDIT_FRAME
::
OnUpdateMuWaveToolbar
)
END_EVENT_TABLE
()
END_EVENT_TABLE
()
...
...
pcbnew/pcbnew_config.cpp
View file @
29e7638a
...
@@ -77,6 +77,17 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
...
@@ -77,6 +77,17 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
_
(
"Hide &Layers Manager"
)
:
_
(
"Show &Layers Manager"
));
_
(
"Hide &Layers Manager"
)
:
_
(
"Show &Layers Manager"
));
break
;
break
;
case
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
:
m_show_microwave_tools
=
!
m_show_microwave_tools
;
m_auimgr
.
GetPane
(
wxT
(
"m_microWaveToolBar"
)
).
Show
(
m_show_microwave_tools
);
m_auimgr
.
Update
();
GetMenuBar
()
->
SetLabel
(
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
,
m_show_microwave_tools
?
_
(
"Hide Microwave Toolbar"
)
:
_
(
"Show Microwave Toolbar"
));
break
;
case
ID_PCB_LAYERS_SETUP
:
case
ID_PCB_LAYERS_SETUP
:
InstallDialogLayerSetup
();
InstallDialogLayerSetup
();
break
;
break
;
...
...
pcbnew/pcbnew_id.h
View file @
29e7638a
...
@@ -280,6 +280,7 @@ enum pcbnew_ids
...
@@ -280,6 +280,7 @@ enum pcbnew_ids
ID_PCB_LIB_TABLE_EDIT
,
ID_PCB_LIB_TABLE_EDIT
,
ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG
,
ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG
,
ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG
,
ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG
,
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR
,
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR
,
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR
,
ID_TB_OPTIONS_SHOW_ZONES
,
ID_TB_OPTIONS_SHOW_ZONES
,
...
...
pcbnew/tool_pcb.cpp
View file @
29e7638a
...
@@ -398,7 +398,7 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar()
...
@@ -398,7 +398,7 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar()
m_optionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE
,
m_optionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE
,
wxEmptyString
,
wxEmptyString
,
KiBitmap
(
mw_toolbar_xpm
),
KiBitmap
(
mw_toolbar_xpm
),
_
(
"Show/hide the toolbar for microwaves tools
\n
This is a experimental feature (under development)"
)
,
HELP_SHOW_HIDE_MICROWAVE_TOOLS
,
wxITEM_CHECK
);
wxITEM_CHECK
);
...
@@ -500,25 +500,30 @@ void PCB_EDIT_FRAME::ReCreateMicrowaveVToolbar()
...
@@ -500,25 +500,30 @@ void PCB_EDIT_FRAME::ReCreateMicrowaveVToolbar()
// Set up toolbar
// Set up toolbar
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_SELF_CMD
,
wxEmptyString
,
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_SELF_CMD
,
wxEmptyString
,
KiBitmap
(
mw_add_line_xpm
),
KiBitmap
(
mw_add_line_xpm
),
_
(
"Create line of specified length for microwave applications"
)
);
_
(
"Create line of specified length for microwave applications"
),
wxITEM_CHECK
);
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_GAP_CMD
,
wxEmptyString
,
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_GAP_CMD
,
wxEmptyString
,
KiBitmap
(
mw_add_gap_xpm
),
KiBitmap
(
mw_add_gap_xpm
),
_
(
"Create gap of specified length for microwave applications"
)
);
_
(
"Create gap of specified length for microwave applications"
),
wxITEM_CHECK
);
m_microWaveToolBar
->
AddSeparator
();
m_microWaveToolBar
->
AddSeparator
();
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_STUB_CMD
,
wxEmptyString
,
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_STUB_CMD
,
wxEmptyString
,
KiBitmap
(
mw_add_stub_xpm
),
KiBitmap
(
mw_add_stub_xpm
),
_
(
"Create stub of specified length for microwave applications"
)
);
_
(
"Create stub of specified length for microwave applications"
),
wxITEM_CHECK
);
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD
,
wxEmptyString
,
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_STUB_ARC_CMD
,
wxEmptyString
,
KiBitmap
(
mw_add_stub_arc_xpm
),
KiBitmap
(
mw_add_stub_arc_xpm
),
_
(
"Create stub (arc) of specified length for microwave applications"
)
);
_
(
"Create stub (arc) of specified length for microwave applications"
),
wxITEM_CHECK
);
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD
,
wxEmptyString
,
m_microWaveToolBar
->
AddTool
(
ID_PCB_MUWAVE_TOOL_FUNCTION_SHAPE_CMD
,
wxEmptyString
,
KiBitmap
(
mw_add_shape_xpm
),
KiBitmap
(
mw_add_shape_xpm
),
_
(
"Create a polynomial shape for microwave applications"
)
);
_
(
"Create a polynomial shape for microwave applications"
),
wxITEM_CHECK
);
m_microWaveToolBar
->
Realize
();
m_microWaveToolBar
->
Realize
();
}
}
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
29e7638a
...
@@ -204,6 +204,12 @@ void PCB_EDIT_FRAME::OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent )
...
@@ -204,6 +204,12 @@ void PCB_EDIT_FRAME::OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent )
aEvent
.
Check
(
GetToolId
()
==
aEvent
.
GetId
()
);
aEvent
.
Check
(
GetToolId
()
==
aEvent
.
GetId
()
);
}
}
void
PCB_EDIT_FRAME
::
OnUpdateMuWaveToolbar
(
wxUpdateUIEvent
&
aEvent
)
{
if
(
aEvent
.
GetEventObject
()
==
m_microWaveToolBar
)
aEvent
.
Check
(
GetToolId
()
==
aEvent
.
GetId
()
);
}
void
PCB_EDIT_FRAME
::
OnUpdateAutoPlaceTracksMode
(
wxUpdateUIEvent
&
aEvent
)
void
PCB_EDIT_FRAME
::
OnUpdateAutoPlaceTracksMode
(
wxUpdateUIEvent
&
aEvent
)
{
{
...
...
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