Import 2017-06-07 23:51:09: master 0783e45b

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-03-30 23:05:04 master 75650086
Changeset

ENH: Added option for setting the layoutManager in the main application

It is useful for slicelets, where the main window is not created and this the slicer.app.layoutManager() is not set.

Example for setting up a layout manager in a slicelet:

layoutWidget = slicer.qMRMLLayoutWidget()
layoutManager = slicer.qSlicerLayoutManager()
layoutManager.setMRMLScene(slicer.mrmlScene)
layoutManager.setScriptedDisplayableManagerDirectory(slicer.app.slicerHome + "/bin/Python/mrmlDisplayableManager")
layoutWidget.setLayoutManager(layoutManager)
slicer.app.setLayoutManager(layoutManager)
layoutWidget.setLayout(slicer.vtkMRMLLayoutNode.SlicerLayoutFourUpView)

somelayout.addWidget(layoutWidget)

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24132 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Base/QTGUI/qSlicerApplication.h Diff File
mod - Base/QTGUI/qSlicerLayoutManager.h Diff File
mod - Modules/Scripted/Editor/Editor.py Diff File