MeVisLab Scripting Reference
MLABPackageManager Class Reference

Inherits QObject.

Public Slots

Package Manager Script Access


QStringList getBinPaths ()
 
QStringList getLibPaths ()
 
QStringList getAdditionalPythonPaths (PythonPathType pathType=PythonPathType::LocalAndInstalled) const
 
QObjectList packages ()
 
QObjectList packagesByGroup (const QString &group)
 
MLABPackagepackageByIdentifier (const QString &packageName)
 
QStringList findSharedLibrary (const QString &name)
 
QStringList findExecutable (const QString &name)
 
QString getMeVisPythonExecutable (bool preferReleaseMode=true)
 
QString findApplicationBundleWithId (const QString &bundleId, bool returnBundleExecutable=false)
 
QString getPathInPackage (const QString &packageIdentifier, const QString &pathToAppend)
 
MLABPackagefindPackageContainingPath (const QString &absPath, QString *relativePath=nullptr)
 
QStringList findPackageIdentifierAndRelativePath (const QString &absPath)
 
QVariantList checkForMultipleCopiesOfSharedLibraries ()
 
bool isPackagePathAlreadyPresent (const QString &path)
 
MLABPackageinternalAddDummyPackage (const QString &group, const QString &name, const QString &path)
 
void internalRemoveDummyPackage (MLABPackage *package)
 
QStringList findProjectSubDirectoriesInPackage (MLABPackage *package, const QString &subDirectoryName, bool inZipFile=false) const
 

Detailed Description

Manages MeVisLab module packages.

Member Function Documentation

◆ checkForMultipleCopiesOfSharedLibraries

QVariantList MLABPackageManager::checkForMultipleCopiesOfSharedLibraries ( )
slot

Returns whether there are multiple copies of shared libraries which are returned as QVariantList of QStringLists.

◆ findApplicationBundleWithId

QString MLABPackageManager::findApplicationBundleWithId ( const QString &  bundleId,
bool  returnBundleExecutable = false 
)
slot

Returns path to bundle if found in package (Mac OS X only).

◆ findExecutable

QStringList MLABPackageManager::findExecutable ( const QString &  name)
slot

Returns the path(s) to the executable if it exists, an empty list otherwise (where the name is just the name, without debug postfix and platform ending).

On Mac OS X it also looks for application bundles and if found returns the main executable of the bundle.

◆ findPackageContainingPath

MLABPackage* MLABPackageManager::findPackageContainingPath ( const QString &  absPath,
QString *  relativePath = nullptr 
)
slot

Searches the packages and returns the package that contains the given path.

Parameters
absPaththe absolute path
relativePathwill be the path from the package to the contained path, or untouched if no package was found.

◆ findPackageIdentifierAndRelativePath

QStringList MLABPackageManager::findPackageIdentifierAndRelativePath ( const QString &  absPath)
slot

Searches the packages and returns the package identifier and the relative path into the package (or an empty list).

◆ findProjectSubDirectoriesInPackage

QStringList MLABPackageManager::findProjectSubDirectoriesInPackage ( MLABPackage package,
const QString &  subDirectoryName,
bool  inZipFile = false 
) const
slot

Searches for project sub directories with the given name in the project directory.

The search is recursive and the found project sub directories are returned.

◆ findSharedLibrary

QStringList MLABPackageManager::findSharedLibrary ( const QString &  name)
slot

Returns the path(s) to the shared library(s) if it exists, an empty list otherwise (where the library name is just the name, without debug postfix and platform ending).

◆ getAdditionalPythonPaths

QStringList MLABPackageManager::getAdditionalPythonPaths ( PythonPathType  pathType = PythonPathType::LocalAndInstalled) const
slot

Returns the list of additional Python paths contributed by the packages (.../Modules/Scripts/python and .../site-packages)

◆ getBinPaths

QStringList MLABPackageManager::getBinPaths ( )
slot

Returns the binary paths that need to be set.

◆ getLibPaths

QStringList MLABPackageManager::getLibPaths ( )
slot

Returns the library paths that need to be set.

◆ getMeVisPythonExecutable

QString MLABPackageManager::getMeVisPythonExecutable ( bool  preferReleaseMode = true)
slot

Return the MeVisPython executable at the platform specific location in MeVis/ThirdParty.

Parameters
preferReleaseModeif this is not set, the executable mode will try to match that of the calling MeVisLab instance, otherwise it will prefer the release mode executable and fall back to the debug version only if the release version does not exist.

◆ getPathInPackage

QString MLABPackageManager::getPathInPackage ( const QString &  packageIdentifier,
const QString &  pathToAppend 
)
slot

Returns the given path inside of the given package.

◆ internalAddDummyPackage

MLABPackage* MLABPackageManager::internalAddDummyPackage ( const QString &  group,
const QString &  name,
const QString &  path 
)
slot

Internal method for adding a dummy package, ONLY use this for testing purposes.

◆ internalRemoveDummyPackage

void MLABPackageManager::internalRemoveDummyPackage ( MLABPackage package)
slot

Internal method for removing a dummy package, ONLY use this for testing purposes.

◆ isPackagePathAlreadyPresent

bool MLABPackageManager::isPackagePathAlreadyPresent ( const QString &  path)
slot

Returns whether the given path is already part of the scanned package paths or a subdirectory of one of the package paths.

◆ packageByIdentifier

MLABPackage* MLABPackageManager::packageByIdentifier ( const QString &  packageName)
slot

Returns the specified package info.

◆ packages

QObjectList MLABPackageManager::packages ( )
slot

Returns the list of packages as QObjectList, since QSA does not support QList<MLABPackage>.

◆ packagesByGroup

QObjectList MLABPackageManager::packagesByGroup ( const QString &  group)
slot

Returns the list of packages as QObjectList, since QSA does not support QList<MLABPackage>.