Macro GuiResetToolbars: Difference between revisions
No edit summary |
(Fixed icon location for Addon Manager.) |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 5: | Line 5: | ||
{{Macro |
{{Macro |
||
|Name=GuiResetToolbars |
|Name=GuiResetToolbars |
||
|Description=This macro resets the position of the toolbars. Run the macro within a workbench that has a missing toolbar(s). |
|||
|Description=Reset Toolbars position. |
|||
|Author= |
|Author=PR-DC |
||
|Download=[https://wiki. |
|Download=[https://wiki.freecad.org/images/f/f8/GuiResetToolbars.svg ToolBar Icon] |
||
|Date=2020-04-21 |
|Date=2020-04-21 |
||
|Version=1.0.0 |
|Version=1.0.0 |
||
|FCVersion= 0.18.4 and above |
|FCVersion= 0.18.4 and above |
||
|SeeAlso=[https://github.com/ |
|SeeAlso=[https://github.com/PR-DC/GuiResetToolbars/ Github repository] |
||
}} |
}} |
||
== |
==Description== <!--T:2--> |
||
<!--T:3--> |
<!--T:3--> |
||
This macro resets the position of the toolbars |
This macro resets the position of the toolbars. |
||
== |
==Usage== <!--T:4--> |
||
⚫ | |||
<!--T:5--> |
|||
⚫ | |||
Run the macro within a workbench that has a missing toolbar(s). |
|||
==Script== <!--T:6--> |
|||
<!--T:9--> |
|||
ToolBar Icon |
|||
⚫ | |||
⚫ | |||
'''GuiResetToolbars.FCMacro''' |
'''GuiResetToolbars.FCMacro''' |
||
{{ |
{{MacroCode|code= |
||
# Reset Toolbars position |
# Reset Toolbars position |
||
# Author: Milos Petrasinovic <mpetrasinovic@ |
# Author: Milos Petrasinovic <mpetrasinovic@pr-dc.com> |
||
# |
# PR-DC, Republic of Serbia |
||
# info@ |
# info@pr-dc.com |
||
# |
# |
||
# -------------------- |
# -------------------- |
||
# |
# |
||
# Copyright (C) 2020 |
# Copyright (C) 2020 PR-DC <info@pr-dc.com> |
||
# |
# |
||
# This program is free software: you can redistribute it and/or modify |
# This program is free software: you can redistribute it and/or modify |
||
Line 53: | Line 60: | ||
__Name__ = 'GuiResetToolbars' |
__Name__ = 'GuiResetToolbars' |
||
__Comment__ = 'Reset Toolbars position' |
__Comment__ = 'Reset Toolbars position' |
||
__Author__ = ' |
__Author__ = 'PR-DC' |
||
__Version__ = '1.0.0' |
__Version__ = '1.0.0' |
||
__Date__ = '2020-04-21' |
__Date__ = '2020-04-21' |
||
__License__ = 'LGPL-3.0-or-later' |
__License__ = 'LGPL-3.0-or-later' |
||
__Web__ = "https://github.com/ |
__Web__ = "https://github.com/PR-DC/GuiResetToolbars/" |
||
__Wiki__ = 'https://wiki.freecadweb.org/Macro_GuiResetToolbars' |
__Wiki__ = 'https://wiki.freecadweb.org/Macro_GuiResetToolbars' |
||
__Icon__ = 'GuiResetToolbars.svg' |
__Icon__ = 'https://wiki.freecad.org/images/f/f8/GuiResetToolbars.svg' |
||
__Help__ = 'Run the macro within a workbench that has missing toolbar(s)' |
__Help__ = 'Run the macro within a workbench that has missing toolbar(s)' |
||
__Status__ = 'stable' |
__Status__ = 'stable' |
||
__Requires__ = 'Freecad >= 0.18.4' |
__Requires__ = 'Freecad >= 0.18.4' |
||
__Communication__ = 'https://github.com/ |
__Communication__ = 'https://github.com/PR-DC/GuiResetToolbars/issues/' |
||
__Files__ = 'GuiResetToolbars.svg' |
__Files__ = 'GuiResetToolbars.svg' |
||
Line 74: | Line 81: | ||
mw.addToolBar(QtCore.Qt.TopToolBarArea, i) |
mw.addToolBar(QtCore.Qt.TopToolBarArea, i) |
||
}} |
}} |
||
<translate> |
|||
==Links== <!--T:7--> |
|||
<!--T:8--> |
|||
The forum discussion [https://forum.freecadweb.org/viewtopic.php?f=3&t=45452&p=390034#p389404 Reset toolbar position] |
|||
</translate> |
Latest revision as of 21:57, 28 December 2023
Description |
---|
This macro resets the position of the toolbars. Run the macro within a workbench that has a missing toolbar(s). Macro version: 1.0.0 Last modified: 2020-04-21 FreeCAD version: 0.18.4 and above Download: ToolBar Icon Author: PR-DC |
Author |
PR-DC |
Download |
ToolBar Icon |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
1.0.0 |
Date last modified |
2020-04-21 |
FreeCAD Version(s) |
0.18.4 and above |
Default shortcut |
None |
See also |
Github repository |
Description
This macro resets the position of the toolbars.
Usage
Run the macro within a workbench that has a missing toolbar(s).
Script
GuiResetToolbars.FCMacro
# Reset Toolbars position # Author: Milos Petrasinovic <mpetrasinovic@pr-dc.com> # PR-DC, Republic of Serbia # info@pr-dc.com # # -------------------- # # Copyright (C) 2020 PR-DC <info@pr-dc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # # -------------------- __Name__ = 'GuiResetToolbars' __Comment__ = 'Reset Toolbars position' __Author__ = 'PR-DC' __Version__ = '1.0.0' __Date__ = '2020-04-21' __License__ = 'LGPL-3.0-or-later' __Web__ = "https://github.com/PR-DC/GuiResetToolbars/" __Wiki__ = 'https://wiki.freecadweb.org/Macro_GuiResetToolbars' __Icon__ = 'https://wiki.freecad.org/images/f/f8/GuiResetToolbars.svg' __Help__ = 'Run the macro within a workbench that has missing toolbar(s)' __Status__ = 'stable' __Requires__ = 'Freecad >= 0.18.4' __Communication__ = 'https://github.com/PR-DC/GuiResetToolbars/issues/' __Files__ = 'GuiResetToolbars.svg' import FreeCADGui as gui from PySide import QtGui, QtCore # FreeCAD's special PySide! mw = gui.getMainWindow() tb = mw.findChildren(QtGui.QToolBar) for i in tb: mw.addToolBar(QtCore.Qt.TopToolBarArea, i)
Links
The forum discussion Reset toolbar position