MeVisLab Web Toolkit Reference
Loading...
Searching...
No Matches
MLAB.GUI.ModuleContextCreator Class Reference
Inheritance diagram for MLAB.GUI.ModuleContextCreator:
MLAB.Core.Object

Public Member Functions

 createModule ()
 createModuleContexts ()
 Collects all DOM elements that have the "data-mevislab-create-macro" attribute and creates module contexts for each of them.
 destroyModule ()
 disconnectModules ()
 Calls MLAB.Core.Module.closeConnection() for each module.
 getMeVisLabData ()
 Returns custom data attributes with the given tag name.
 getModule (moduleName)
 Returns the module by the given name.
 getModules ()
 Returns all top level modules.
 hasAnyModule ()
 Returns true if any module was created.
 notifyBodyIsVisible ()
 Calls MLAB.Core.Module.setBodyIsVisible() on each module.
 showIDEs ()
 Calls MLAB.Core.Module.showIDE() on each module.
Public Member Functions inherited from MLAB.Core.Object
 __init__ ()
 Creates a new MLAB.Core.Object.
 blockSignals (blocked)
 Sets if signals are blocked, which means that signals are suppressed in situations where they would have been emitted.
 connect (signal, receiver, slot)
 Connects a signal of this object to the slot of the receiver.
 connectCallback (signal, callback)
 Connects a signal of this object to the given callback function.
 connectSignal (signal, receiver, targetSignal)
 Connects a signal of this object to the signal of the receiver, so that if this signal is emitted, the target signal on the receiver is also emitted.
 disconnect (signal, receiver, signal)
 Disconnects a signal of this object from the slot of the receiver.
 disconnectCallback (signal, callback)
 Disconnects a signal of this object from the given callback function.
 disconnectReceiver (signal, receiver)
 Disconnects a signal of this object from all slots of the receiver.
 emit (signal)
 Emits a signal.
 isSignalRegistered ()
 Returns true if the given signal is registered.
 registerSignal (signal)
 Registers a signal.
 signalsBlocked ()
 Returns true if signals are blocked.

Protected Member Functions

 _createGUIFromDOMElements ()
 _createModuleContext (data)
 This method creates an MLAB.Core.ModuleContext instance.
 _handleModuleContextReady (moduleContext, moduleCreationStatus)
 This method is passed as a callback to MLAB.Core.ModuleContext.setModuleContextReadyCallback().
 _parseAttributeData ()
 Returns an object with the attributes given in the argument string.

Detailed Description

Definition at line 746 of file GUI.py.

Member Function Documentation

◆ _createGUIFromDOMElements()

MLAB.GUI.ModuleContextCreator._createGUIFromDOMElements ( )
protected

Definition at line 798 of file GUI.py.

◆ _createModuleContext()

MLAB.GUI.ModuleContextCreator._createModuleContext ( data)
protected

This method creates an MLAB.Core.ModuleContext instance.

The module type must be the ID of the DOM element. Optionally it may also include an instance name. If the module requires authentication a login dialog will be shown when the web socket connection to the module is established. A callback function that is called when all module windows have been created from the MDL can also be given.

Parameters
dataAn object with at least the "module" attribute and optional an "instanceName" attribute.
Returns
An MLAB.Core.Module instance or null if it could not be created.

Definition at line 762 of file GUI.py.

◆ _handleModuleContextReady()

MLAB.GUI.ModuleContextCreator._handleModuleContextReady ( moduleContext,
moduleCreationStatus )
protected

This method is passed as a callback to MLAB.Core.ModuleContext.setModuleContextReadyCallback().

It manages finished and failed module context creation. It also shows a login dialog if a module context is not ready because of missing authentication. If all module contexts are ready, then the module contexts are ready callback is called (see setModuleContextsReadyCallback()).

Parameters
moduleContextAn MLAB.Core.ModuleContext instance.
moduleCreationStatusThe module context creation status. See MLAB.Core.ModuleInfoMessage for possible values.

Definition at line 794 of file GUI.py.

◆ _parseAttributeData()

MLAB.GUI.ModuleContextCreator._parseAttributeData ( )
protected

Returns an object with the attributes given in the argument string.

The string should look something like this: key1: 'value1', key2: 'value2', ...

Definition at line 770 of file GUI.py.

◆ createModule()

MLAB.GUI.ModuleContextCreator.createModule ( )

Definition at line 802 of file GUI.py.

◆ createModuleContexts()

MLAB.GUI.ModuleContextCreator.createModuleContexts ( )

Collects all DOM elements that have the "data-mevislab-create-macro" attribute and creates module contexts for each of them.

Returns
Returns a list of the modules that are being created.

Definition at line 783 of file GUI.py.

◆ destroyModule()

MLAB.GUI.ModuleContextCreator.destroyModule ( )

Definition at line 806 of file GUI.py.

◆ disconnectModules()

MLAB.GUI.ModuleContextCreator.disconnectModules ( )

Calls MLAB.Core.Module.closeConnection() for each module.

Definition at line 827 of file GUI.py.

◆ getMeVisLabData()

MLAB.GUI.ModuleContextCreator.getMeVisLabData ( )

Returns custom data attributes with the given tag name.

Definition at line 775 of file GUI.py.

◆ getModule()

MLAB.GUI.ModuleContextCreator.getModule ( moduleName)

Returns the module by the given name.

The name may include multiple names divided by dots to access sub modules.

Parameters
moduleNameThe module name.
Returns
Returns the MLAB.Core.Module or null if it was not found.

Definition at line 822 of file GUI.py.

◆ getModules()

MLAB.GUI.ModuleContextCreator.getModules ( )

Returns all top level modules.

Returns
Returns a list with MLAB.Core.Module entries.

Definition at line 813 of file GUI.py.

◆ hasAnyModule()

MLAB.GUI.ModuleContextCreator.hasAnyModule ( )

Returns true if any module was created.

Returns
A boolean value.

Definition at line 751 of file GUI.py.

◆ notifyBodyIsVisible()

MLAB.GUI.ModuleContextCreator.notifyBodyIsVisible ( )

Calls MLAB.Core.Module.setBodyIsVisible() on each module.

Definition at line 832 of file GUI.py.

◆ showIDEs()

MLAB.GUI.ModuleContextCreator.showIDEs ( )

Calls MLAB.Core.Module.showIDE() on each module.

Definition at line 837 of file GUI.py.


The documentation for this class was generated from the following file:
  • C:/jh/mevislab/5.0_0/build/doc.gen/public/SDK/MeVisLabWebToolkitReference/source/MLAB/GUI.py