MeVisLab Scripting Reference
MLABNetwork Class Reference

#include <mlabNetwork.h>

Inherits QObject.

Public Slots

bool cloneSelection ()
 
bool copySelection ()
 
MLABModulecreateLocalModule (const QString &name)
 
MLABModulecreateModule (const QString &name)
 
bool cutSelection ()
 
void deselectAll ()
 
QString filename ()
 
MLABModulegetSingleSelectedModule ()
 
void invertSelection ()
 
QString localPath ()
 
MLABModulelookupModule (const QString &name)
 
QList< MLABModule * > modules ()
 
MLABMacroModuleparentMacro () const
 
bool pasteSelection ()
 
void redo ()
 
void removeModule (MLABModule *module)
 
void removeModuleUndoable (MLABModule *module)
 
void removeNonPersistent ()
 
void removeSelection (bool undoable=true)
 
void selectAll ()
 
QList< MLABModule * > selectedModules ()
 
void selectSingleModule (MLABModule *module)
 
void translateSelection (const QPoint &delta)
 
void undo ()
 

Public Member Functions

const MLABModuleList & modulesConst ()
 

Protected Member Functions

void distributeSelection (DistributeType distributeType)
 

Detailed Description

This class represents a network of MLABModule instances.

The MLABNetwork is typically not needed in scripting, since MLABModule::addModule() MLABModule::remove() etc. access the MLABNetwork indirectly.

Member Function Documentation

◆ cloneSelection

bool MLABNetwork::cloneSelection ( )
slot

Clones selection.

◆ copySelection

bool MLABNetwork::copySelection ( )
slot

Copies selection.

◆ createLocalModule

MLABModule * MLABNetwork::createLocalModule ( const QString & name)
slot

Creates and adds a new local module to the network.

If the module is not a local module and also not found in the database, NULL is returned. (Note that the precedence is for creating local macro modules, but if that fails, an existing global module will be used if available.) If the module cannot be created because of ML or OpenInventor, it is still added but has an invalid state (use isValid() to check).

◆ createModule

MLABModule * MLABNetwork::createModule ( const QString & name)
slot

Creates and adds a new module to the network.

If the module is not found in the database, and is also no local module NULL is returned. If the module cannot be created because of ML or OpenInventor, it is still added but has an invalid state (use isValid() to check).

◆ cutSelection

bool MLABNetwork::cutSelection ( )
slot

Cuts selection.

◆ deselectAll

◆ distributeSelection()

void MLABNetwork::distributeSelection ( DistributeType distributeType)
protected

Distributes the module selection according to the given type.

◆ filename

QString MLABNetwork::filename ( )
slot

Returns absolute filename of this network (may be empty).

◆ getSingleSelectedModule

MLABModule * MLABNetwork::getSingleSelectedModule ( )
slot

Returns the module that is currently selected (if only one module IS selected), otherwise NULL.

See also
deselectAll()
selectSingleModule()
invertSelection()
removeSelection()
selectAll()
MLABModule::isSelected()
MLABModule::setSelected()

◆ invertSelection

◆ localPath

QString MLABNetwork::localPath ( )
slot

Returns the absolute local path of this filename (may be empty).

◆ lookupModule

MLABModule * MLABNetwork::lookupModule ( const QString & name)
slot

Finds and returns a module by instanceName.

◆ modules

QList< MLABModule * > MLABNetwork::modules ( )
slot

Returns a list of all modules in the network.

◆ modulesConst()

const MLABModuleList & MLABNetwork::modulesConst ( )

Returns direct access to the modules.

◆ parentMacro

MLABMacroModule * MLABNetwork::parentMacro ( ) const
slot

Returns owner (MacroModule, can be NULL).

◆ pasteSelection

bool MLABNetwork::pasteSelection ( )
slot

Pastes selection. Returns true if anything was pasted.

◆ redo

void MLABNetwork::redo ( )
slot

Redoes last command (and redraws).

◆ removeModule

void MLABNetwork::removeModule ( MLABModule * module)
slot

Removes a module from the network (immediate deletion of the module).

◆ removeModuleUndoable

void MLABNetwork::removeModuleUndoable ( MLABModule * module)
slot

Removes a module from the network (undoable).

◆ removeNonPersistent

void MLABNetwork::removeNonPersistent ( )
slot

Removes all non persistent modules.

◆ removeSelection

void MLABNetwork::removeSelection ( bool undoable = true)
slot

◆ selectAll

◆ selectedModules

QList< MLABModule * > MLABNetwork::selectedModules ( )
slot

Returns a list of selected modules in the network.

◆ selectSingleModule

void MLABNetwork::selectSingleModule ( MLABModule * module)
slot

Selects the given module (and only that module, other selections are cleared).

See also
deselectAll()
getSingleSelectedModule()
invertSelection()
removeSelection()
selectAll()
MLABModule::isSelected()
MLABModule::setSelected()

◆ translateSelection

void MLABNetwork::translateSelection ( const QPoint & delta)
slot

Translates the selected modules by delta.

◆ undo

void MLABNetwork::undo ( )
slot

Undoes last command (and redraws).