FreeCAD-macros

Форк
0
/
GuiResetToolbars.FCMacro 
46 строк · 1.6 Кб
1
# Reset Toolbars position
2
# Author: Milos Petrasinovic <mpetrasinovic@protors.co>
3
# PROTORS, Belgrade, Serbia
4
# info@protors.co
5
# 
6
# --------------------
7
#
8
# Copyright (C) 2020 PROTORS <info@protors.co>
9
# 
10
# This program is free software: you can redistribute it and/or modify
11
# it under the terms of the GNU Lesser General Public License as 
12
# published by the Free Software Foundation, either version 3 of the 
13
# License, or (at your option) any later version.
14
#  
15
# This program is distributed in the hope that it will be useful,
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
# GNU Lesser General Public License for more details.
19
#  
20
# You should have received a copy of the GNU Lesser General Public License
21
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
22
#
23
# --------------------
24

25
__Name__ = 'GuiResetToolbars'
26
__Comment__ = 'Reset Toolbars position'
27
__Author__ = 'PROTORS'
28
__Version__ = '1.0.0'
29
__Date__ = '2020-04-21'
30
__License__ = 'LGPL-3.0-or-later'
31
__Web__ = "https://github.com/protors/ResetToolbars/"
32
__Wiki__ = 'https://wiki.freecadweb.org/Macro_GuiResetToolbars'
33
__Icon__ = 'GuiResetToolbars.svg'
34
__Help__ = 'Run the macro within a workbench that has missing toolbar(s)'
35
__Status__ = 'stable'
36
__Requires__ = 'Freecad >= 0.18.4'
37
__Communication__ = 'https://github.com/protors/ResetToolbars/issues/'
38
__Files__ = 'GuiResetToolbars.svg'
39

40
import FreeCADGui as gui
41
from PySide import QtGui, QtCore # FreeCAD's special PySide!
42

43
mw = gui.getMainWindow()
44
tb = mw.findChildren(QtGui.QToolBar)
45
for i in tb:
46
    mw.addToolBar(QtCore.Qt.TopToolBarArea, i)
47

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.