MCPcopy Create free account
hub / github.com/Kitware/VeloView / onToogleAdvancedGUI

Function onToogleAdvancedGUI

Application/Ui/python/lidarview/applogic.py:1660–1682  ·  view source on GitHub ↗

Switch the GUI between advanced and classic mode

(updateSettings = True)

Source from the content-addressed store, hash-verified

1658 lidarInterpreter.CorrectIntensity = app.actions['actionCorrectIntensityValues'].isChecked()
1659
1660def onToogleAdvancedGUI(updateSettings = True):
1661 """ Switch the GUI between advanced and classic mode"""
1662 # hide/show Sources menu
1663 menuSources = getMainWindow().findChild("QMenu", "menuSources").menuAction()
1664 menuSources.visible = not menuSources.visible
1665 # hide/show Filters menu
1666 menuFilters = getMainWindow().findChild("QMenu", "menuFilters").menuAction()
1667 menuFilters.visible = not menuFilters.visible
1668 # hide/show Advance menu
1669 menuAdvance = getMainWindow().findChild("QMenu", "menuAdvance").menuAction()
1670 menuAdvance.visible = not menuAdvance.visible
1671 # hide/show view decorator
1672 getMainWindow().centralWidget().toggleWidgetDecoration()
1673 # hide/show some views
1674 advance_action = ["Display", "Information", "Memory Inspector", "Pipeline Browser", "Properties", "View"]
1675 for action in getMainWindow().findChild("QMenu", "menuViews").actions():
1676 if action.text in advance_action:
1677 action.visible = not action.visible
1678 # update the UserSettings
1679 if updateSettings:
1680 # booleans must be store as int
1681 newValue = int(not int(getPVSettings().value("LidarPlugin/AdvanceFeature/Enable", 0)))
1682 getPVSettings().setValue("LidarPlugin/AdvanceFeature/Enable", newValue)
1683
1684def switchVisibility(Proxy):
1685 """ Invert the Proxy visibility int the current view """

Callers 1

setupActionsFunction · 0.85

Calls 2

getMainWindowFunction · 0.85
getPVSettingsFunction · 0.85

Tested by

no test coverage detected