Macro Nascondi Pannelli

From FreeCAD Documentation
Revision as of 08:10, 25 January 2015 by FuzzyBot (talk | contribs) (Updating to match new version of source page)

File:Macro Toggle Views Visibility Macro Toggle Views Visibility

Description
This macro toggles the visibility of various supporting views in FreeCAD, allowing the main window to be viewed with all available screen space.

Author: Piffpoof
Author
Piffpoof
Download
None
Links
Macro Version
1.0
Date last modified
None
FreeCAD Version(s)
None
Default shortcut
None
See also
None

Description

When working with FreeCAD there are times when you need many supporting windows open, such as Combo View, Report View, etc. There are other times when you want all the clutter of the supporting windows to disappear so that all the screen space available can be used to view the model being worked with. This macro lets you hide all the supporting windows (or make them visible again) with one click on the toolbar.

Installation

Installation is comprised of copying the two code to the appropriate Macro directory and invoking it from the Macro menu. It is much preferable to add it both to a toolbar so as to be more easily available.

Uso

Fare clic sul pulsante della barra degli strumenti associato, o richiamarle dal menu Macro. Tutte le finestre di supporto quali Console Python, Rapporto e Vista Combinata diventeranno tutte visibili o tutte nascoste.

Interfaccia utente

L'azione dell'utente è immediatamente confermata dal fatto che le finestre di supporto appaiono o spariscono.

Script

# macro to toggle visibility of Report view, Python console, Combo view
from PySide import QtCore, QtGui
mainWindow = FreeCADGui.getMainWindow()
dockWidgets = mainWindow.findChildren(QtGui.QDockWidget)

for dw in dockWidgets:
	if dw.objectName() == "Python console":
		pcWidget = dw
	if dw.objectName() == "Combo View":
		cvWidget = dw
	if dw.objectName() == "Report view":
		rvWidget = dw

if pcWidget.isVisible():
	pcWidget.hide()
	cvWidget.hide()
	rvWidget.hide()
else:
	pcWidget.show()
	cvWidget.show()
	rvWidget.show()
Other languages: