fsleyes.controls.controlpanel
¶
This module provides the ControlPanel
, ControlToolBar
,
and SettingsPanel
classes, base-classes for all FSLeyes controls.
See the fsleyes
package documentation for an overview of FSLeyes views
and controls.
The SettingsPanel
is a convenience
class for certain FSLeyes control panels (see the :fsleyes
documentation).
-
class
fsleyes.controls.controlpanel.
ControlMixin
¶ Bases:
object
Mixin class for the
ControlPanel
andControlToolBar
.-
static
supportedViews
()¶ Return the views that this control supports.
This method may be overridden by sub-classes to return a list of the view types that are supported by this control. For example, the
OrthoToolBar
control is intended to be used solely with theOrthoPanel
view.The default implementation returns
None
, which is interpreted as being compatible with all views.
-
static
defaultLayout
()¶ Return default options for
ViewPanel.togglePanel()
.This method may be overridden by sub-classes to return a
dict
containing keyword arguments to be used by theViewPanel.togglePanel()
method when a control panel of this type is added. WhentogglePanel
is called, if any arguments are provided, the arguments returned by this method are not used.
-
__dict__
= mappingproxy({'__module__': 'fsleyes.controls.controlpanel', '__doc__': 'Mixin class for the :class:`ControlPanel` and :class:`ControlToolBar`.\n ', 'supportedViews': <staticmethod object>, 'defaultLayout': <staticmethod object>, '__dict__': <attribute '__dict__' of 'ControlMixin' objects>, '__weakref__': <attribute '__weakref__' of 'ControlMixin' objects>})¶
-
__module__
= 'fsleyes.controls.controlpanel'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
static
-
class
fsleyes.controls.controlpanel.
ControlPanel
(parent, overlayList, displayCtx, frame, *args, **kwargs)¶ Bases:
fsleyes.panel.FSLeyesPanel
,fsleyes.controls.controlpanel.ControlMixin
The
ControlPanel
is the base class for all FSLeyes controls.-
__module__
= 'fsleyes.controls.controlpanel'¶
-
-
class
fsleyes.controls.controlpanel.
ControlToolBar
(parent, overlayList, displayCtx, frame, height=32, orient=<MagicMock name='mock.HORIZONTAL' id='140736142353488'>, *args, **kwargs)¶ Bases:
fsleyes.toolbar.FSLeyesToolBar
,fsleyes.controls.controlpanel.ControlMixin
The
ControlToolBar
is the base class for all FSLeyes toolbars.-
__module__
= 'fsleyes.controls.controlpanel'¶
-
-
class
fsleyes.controls.controlpanel.
SettingsPanel
(*args, **kwargs)¶ Bases:
fsleyes.controls.controlpanel.ControlPanel
The
SettingsPanel
is a convenience class for FSLeyes control panels which use afsleyes_widgets.WidgetList
to display a collection of controls for the user. When displayed as a dialog/ floating frame, theSettingsPanel
will automatically resize itself to fit its contents. See theCanvasSettingsPanel
for an example.-
__init__
(*args, **kwargs)¶ Create a
SettingsPanel
. All arguments are passed to theFSLeyesPanel.__init__()
method.
-
getWidgetList
()¶ Returns the
fsleyes_widgets.WidgetList
which should be used by sub-classes to display content to the user.
-
_SettingsPanel__widgetListChange
(ev)¶ Called whenever the widget list contents change. If this panel is floating, its parent is autmatically resized.
-
__module__
= 'fsleyes.controls.controlpanel'¶
-