Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Properties | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Attributes
qSlicerExtensionsManagerModel Class Reference

#include <Base/QTCore/qSlicerExtensionsManagerModel.h>

Inheritance diagram for qSlicerExtensionsManagerModel:
Inheritance graph
[legend]
Collaboration diagram for qSlicerExtensionsManagerModel:
Collaboration graph
[legend]

Public Types

typedef QVariantMap ExtensionMetadataType
 Extension metadata typedef. More...
 
typedef qSlicerExtensionsManagerModelPrivate Pimpl
 Pimpl typedef. More...
 
typedef qSlicerExtensionsManagerModel Self
 Self typedef. More...
 
typedef QObject Superclass
 Superclass typedef. More...
 

Properties

QStringList enabledExtensions
 
QString extensionsHistorySettingsFilePath
 
QString extensionsSettingsFilePath
 
QStringList installedExtensions
 
bool newExtensionEnabledByDefault
 
int numberOfInstalledExtensions
 
QString slicerArch
 
QString slicerOs
 
QString slicerRevision
 
QString slicerVersion
 

Public Slots

bool cancelExtensionScheduledForUninstall (const QString &extensionName)
 Cancel the uninstallation of extensionName Tell the application to keep extensionName installed. More...
 
bool cancelExtensionScheduledForUpdate (const QString &extensionName)
 Cancel the uninstallation of extensionName Tell the application to keep extensionName installed. More...
 
void checkForUpdates (bool installUpdates)
 
QStringList checkInstallPrerequisites () const
 
bool downloadAndInstallExtension (const QString &extensionId)
 Download and install extensionId The extensionId corresponds to the identifier used on the extension server itself. More...
 
bool exportExtensionList (QString &exportFilePath)
 
void gatherExtensionsHistoryInformationOnStartup ()
 
QVariantMap getExtensionHistoryInformation ()
 
void identifyIncompatibleExtensions ()
 
bool scheduleExtensionForUninstall (const QString &extensionName)
 Schedule extensionName of uninstall Tell the application to uninstall extensionName when it will restart An extension scheduled for uninstall can be effectively uninstalled by calling uninstallScheduledExtensions() More...
 
bool scheduleExtensionForUpdate (const QString &extensionName)
 
void setExtensionEnabled (const QString &extensionName, bool value)
 Enable or disable an extension. Tell the application to load (or skip the loading) of extensionName by adding (or removing) all associated module paths to the application settings. More...
 
bool uninstallScheduledExtensions (QStringList &uninstalledExtensions)
 
bool uninstallScheduledExtensions ()
 
void updateModel ()
 
bool updateScheduledExtensions (QStringList &updatedExtensions)
 
bool updateScheduledExtensions ()
 

Signals

void downloadFinished (QNetworkReply *reply)
 
void downloadStarted (QNetworkReply *reply)
 
void extensionCancelledScheduleForUninstall (const QString &extensionName)
 
void extensionCancelledScheduleForUpdate (const QString &extensionName)
 
void extensionEnabledChanged (const QString &extensionName, bool value)
 
void extensionHistoryGatheredOnStartup (const QVariantMap &)
 
void extensionIdentifedAsIncompatible (const QString &extensionName)
 
void extensionInstalled (const QString &extensionName)
 
void extensionScheduledForUninstall (const QString &extensionName)
 
void extensionScheduledForUpdate (const QString &extensionName)
 
void extensionsHistorySettingsFilePathChanged (const QString &extensionsHistorySettingsFilePath)
 
void extensionsSettingsFilePathChanged (const QString &extensionsSettingsFilePath)
 
void extensionUninstalled (const QString &extensionName)
 
void extensionUpdateAvailable (const QString &extensionName)
 
void extensionUpdated (const QString &extensionName)
 
void installDownloadProgress (const QString &extensionName, qint64 received, qint64 total)
 
void messageLogged (const QString &text, ctkErrorLogLevel::LogLevels level) const
 
void modelUpdated ()
 
void newExtensionEnabledByDefaultChanged (bool value)
 
void slicerArchChanged (const QString &slicerArch)
 
void slicerOsChanged (const QString &slicerOs)
 
void slicerRequirementsChanged (const QString &revision, const QString &os, const QString &arch)
 
void slicerRevisionChanged (const QString &slicerRevision)
 
void slicerVersionChanged (const QString &slicerVersion)
 
void updateDownloadProgress (const QString &extensionName, qint64 received, qint64 total)
 

Public Member Functions

QStringList enabledExtensions () const
 Return names of all enabled extensions. More...
 
Q_INVOKABLE QString extensionDescriptionFile (const QString &extensionName) const
 
Q_INVOKABLE QString extensionInstallPath (const QString &extensionName) const
 
Q_INVOKABLE ExtensionMetadataType extensionMetadata (const QString &extensionName) const
 
Q_INVOKABLE QStringList extensionModulePaths (const QString &extensionName) const
 
QVariantMap extensionsHistoryInformation () const
 
QString extensionsHistorySettingsFilePath () const
 Set/Get extension history settings file path. More...
 
Q_INVOKABLE QString extensionsInstallPath () const
 
QString extensionsSettingsFilePath () const
 Set/Get extension settings file path. More...
 
Q_INVOKABLE bool extractExtensionArchive (const QString &extensionName, const QString &archiveFile, const QString &destinationPath)
 Extract archiveFile into destinationPath/extensionName directory. More...
 
QStringList installedExtensions () const
 Return names of all installed extensions. More...
 
Q_INVOKABLE bool installExtension (const QString &archiveFile)
 
Q_INVOKABLE bool installExtension (const QString &extensionName, ExtensionMetadataType extensionMetadata, const QString &archiveFile)
 
Q_INVOKABLE QStringList isExtensionCompatible (const QString &extensionName, const QString &slicerRevision, const QString &slicerOs, const QString &slicerArch) const
 Check if extensionName is compatible with the system identified by slicerRevision, slicerOs and slicerArch. More...
 
Q_INVOKABLE QStringList isExtensionCompatible (const QString &extensionName) const
 Check if extensionName is compatible. An extension is considered incompatible when the version of Slicer used to build the extension is different from the version of Slicer attempting to load the extension. More...
 
Q_INVOKABLE bool isExtensionEnabled (const QString &extensionName) const
 Return True if the extensionName is enabled. More...
 
Q_INVOKABLE bool isExtensionInstalled (const QString &extensionName) const
 Return True if the extensionName is installed. More...
 
Q_INVOKABLE bool isExtensionScheduledForUninstall (const QString &extensionName) const
 Return True if the extensionName is scheduled to be uninstalled. More...
 
Q_INVOKABLE bool isExtensionScheduledForUpdate (const QString &extensionName) const
 
Q_INVOKABLE bool isExtensionUpdateAvailable (const QString &extensionName) const
 
Q_INVOKABLE const QStandardItemModel * model () const
 Return the item model used internally. More...
 
bool newExtensionEnabledByDefault () const
 
int numberOfInstalledExtensions () const
 Return the number of installed extensions. More...
 
 qSlicerExtensionsManagerModel (QObject *parent=0)
 Constructor. More...
 
Q_INVOKABLE ExtensionMetadataType retrieveExtensionMetadata (const QString &extensionId)
 Query the extension server and retrieve the metadata associated with extensionId. More...
 
Q_INVOKABLE ExtensionMetadataType retrieveExtensionMetadataByName (const QString &extensionName)
 Query the extension server and retrieve the metadata associated with extensionName. More...
 
QStringList scheduledForUninstallExtensions () const
 Return names of all extensions scheduled for uninstall. More...
 
QStringList scheduledForUpdateExtensions () const
 
Q_INVOKABLE QUrl serverUrl () const
 
Q_INVOKABLE QUrl serverUrlWithExtensionsStorePath () const
 
Q_INVOKABLE QUrl serverUrlWithPackagePath () const
 
void setExtensionsHistorySettingsFilePath (const QString &extensionsHistorySettingsFilePath)
 
void setExtensionsSettingsFilePath (const QString &extensionsSettingsFilePath)
 
void setNewExtensionEnabledByDefault (bool value)
 
void setSlicerArch (const QString &arch)
 
void setSlicerOs (const QString &os)
 
void setSlicerRequirements (const QString &revision, const QString &os, const QString &arch)
 Convenience function setting Slicer revision, operating system and architecture. More...
 
void setSlicerRevision (const QString &revision)
 
void setSlicerVersion (const QString &version)
 
QString slicerArch () const
 Set/Get Slicer architecture. More...
 
QString slicerOs () const
 Set/Get Slicer operating system. More...
 
QString slicerRevision () const
 Set/Get Slicer revision. More...
 
QString slicerVersion () const
 
virtual ~qSlicerExtensionsManagerModel ()
 Destructor. More...
 

Static Public Member Functions

static ExtensionMetadataType filterExtensionMetadata (const ExtensionMetadataType &extensionMetadata)
 
static ExtensionMetadataType parseExtensionDescriptionFile (const QString &file)
 
static QStringList readArrayValues (QSettings &settings, const QString &arrayName, const QString fieldName)
 
static QStringList serverKeysToIgnore ()
 
static QHash< QString, QString > serverToExtensionDescriptionKey ()
 
static void writeArrayValues (QSettings &settings, const QStringList &values, const QString &arrayName, const QString fieldName)
 
static bool writeExtensionDescriptionFile (const QString &file, const ExtensionMetadataType &metadata)
 

Protected Slots

void onInstallDownloadFinished (qSlicerExtensionDownloadTask *task)
 
void onInstallDownloadProgress (qSlicerExtensionDownloadTask *task, qint64 received, qint64 total)
 
void onUpdateCheckComplete (const QUuid &requestId, const QList< QVariantMap > &results)
 
void onUpdateCheckFailed (const QUuid &requestId)
 
void onUpdateDownloadFinished (qSlicerExtensionDownloadTask *task)
 
void onUpdateDownloadProgress (qSlicerExtensionDownloadTask *task, qint64 received, qint64 total)
 

Protected Attributes

QScopedPointer< qSlicerExtensionsManagerModelPrivate > d_ptr
 

Detailed Description

Definition at line 43 of file qSlicerExtensionsManagerModel.h.

Member Typedef Documentation

◆ ExtensionMetadataType

Extension metadata typedef.

Definition at line 73 of file qSlicerExtensionsManagerModel.h.

◆ Pimpl

typedef qSlicerExtensionsManagerModelPrivate qSlicerExtensionsManagerModel::Pimpl

Pimpl typedef.

Definition at line 61 of file qSlicerExtensionsManagerModel.h.

◆ Self

Self typedef.

Definition at line 64 of file qSlicerExtensionsManagerModel.h.

◆ Superclass

Superclass typedef.

Definition at line 58 of file qSlicerExtensionsManagerModel.h.

Property Documentation

◆ enabledExtensions

QStringList qSlicerExtensionsManagerModel::enabledExtensions
read

Definition at line 48 of file qSlicerExtensionsManagerModel.h.

◆ extensionsHistorySettingsFilePath

QString qSlicerExtensionsManagerModel::extensionsHistorySettingsFilePath
readwrite

Definition at line 51 of file qSlicerExtensionsManagerModel.h.

◆ extensionsSettingsFilePath

QString qSlicerExtensionsManagerModel::extensionsSettingsFilePath
readwrite

Definition at line 50 of file qSlicerExtensionsManagerModel.h.

◆ installedExtensions

QStringList qSlicerExtensionsManagerModel::installedExtensions
read

Definition at line 47 of file qSlicerExtensionsManagerModel.h.

◆ newExtensionEnabledByDefault

bool qSlicerExtensionsManagerModel::newExtensionEnabledByDefault
readwrite

Definition at line 49 of file qSlicerExtensionsManagerModel.h.

◆ numberOfInstalledExtensions

int qSlicerExtensionsManagerModel::numberOfInstalledExtensions
read

Definition at line 46 of file qSlicerExtensionsManagerModel.h.

◆ slicerArch

QString qSlicerExtensionsManagerModel::slicerArch
readwrite

Definition at line 54 of file qSlicerExtensionsManagerModel.h.

◆ slicerOs

QString qSlicerExtensionsManagerModel::slicerOs
readwrite

Definition at line 53 of file qSlicerExtensionsManagerModel.h.

◆ slicerRevision

QString qSlicerExtensionsManagerModel::slicerRevision
readwrite

Definition at line 52 of file qSlicerExtensionsManagerModel.h.

◆ slicerVersion

QString qSlicerExtensionsManagerModel::slicerVersion
readwrite

Definition at line 55 of file qSlicerExtensionsManagerModel.h.

Constructor & Destructor Documentation

◆ qSlicerExtensionsManagerModel()

qSlicerExtensionsManagerModel::qSlicerExtensionsManagerModel ( QObject *  parent = 0)
explicit

Constructor.

◆ ~qSlicerExtensionsManagerModel()

virtual qSlicerExtensionsManagerModel::~qSlicerExtensionsManagerModel ( )
virtual

Destructor.

Member Function Documentation

◆ cancelExtensionScheduledForUninstall

bool qSlicerExtensionsManagerModel::cancelExtensionScheduledForUninstall ( const QString &  extensionName)
slot

Cancel the uninstallation of extensionName Tell the application to keep extensionName installed.

See also
scheduleExtensionForUninstall

◆ cancelExtensionScheduledForUpdate

bool qSlicerExtensionsManagerModel::cancelExtensionScheduledForUpdate ( const QString &  extensionName)
slot

Cancel the uninstallation of extensionName Tell the application to keep extensionName installed.

See also
scheduleExtensionForUninstall

◆ checkForUpdates

void qSlicerExtensionsManagerModel::checkForUpdates ( bool  installUpdates)
slot

Check for updates to installed extensions.

This checks each installed extension to see if it is the latest version. If installUpdates is true, available updates will be automatically scheduled for installation.

◆ checkInstallPrerequisites

QStringList qSlicerExtensionsManagerModel::checkInstallPrerequisites ( ) const
slot

◆ downloadAndInstallExtension

bool qSlicerExtensionsManagerModel::downloadAndInstallExtension ( const QString &  extensionId)
slot

Download and install extensionId The extensionId corresponds to the identifier used on the extension server itself.

See also
installExtension, scheduleExtensionForUninstall, uninstallScheduledExtensions

◆ downloadFinished

void qSlicerExtensionsManagerModel::downloadFinished ( QNetworkReply *  reply)
signal

◆ downloadStarted

void qSlicerExtensionsManagerModel::downloadStarted ( QNetworkReply *  reply)
signal

◆ enabledExtensions()

QStringList qSlicerExtensionsManagerModel::enabledExtensions ( ) const

Return names of all enabled extensions.

See also
setExtensionEnabled, extensionEnabledChanged, isExtensionEnabled

◆ exportExtensionList

bool qSlicerExtensionsManagerModel::exportExtensionList ( QString &  exportFilePath)
slot

◆ extensionCancelledScheduleForUninstall

void qSlicerExtensionsManagerModel::extensionCancelledScheduleForUninstall ( const QString &  extensionName)
signal

◆ extensionCancelledScheduleForUpdate

void qSlicerExtensionsManagerModel::extensionCancelledScheduleForUpdate ( const QString &  extensionName)
signal

◆ extensionDescriptionFile()

Q_INVOKABLE QString qSlicerExtensionsManagerModel::extensionDescriptionFile ( const QString &  extensionName) const

◆ extensionEnabledChanged

void qSlicerExtensionsManagerModel::extensionEnabledChanged ( const QString &  extensionName,
bool  value 
)
signal

◆ extensionHistoryGatheredOnStartup

void qSlicerExtensionsManagerModel::extensionHistoryGatheredOnStartup ( const QVariantMap )
signal

◆ extensionIdentifedAsIncompatible

void qSlicerExtensionsManagerModel::extensionIdentifedAsIncompatible ( const QString &  extensionName)
signal

◆ extensionInstalled

void qSlicerExtensionsManagerModel::extensionInstalled ( const QString &  extensionName)
signal

◆ extensionInstallPath()

Q_INVOKABLE QString qSlicerExtensionsManagerModel::extensionInstallPath ( const QString &  extensionName) const

◆ extensionMetadata()

Q_INVOKABLE ExtensionMetadataType qSlicerExtensionsManagerModel::extensionMetadata ( const QString &  extensionName) const

◆ extensionModulePaths()

Q_INVOKABLE QStringList qSlicerExtensionsManagerModel::extensionModulePaths ( const QString &  extensionName) const

◆ extensionScheduledForUninstall

void qSlicerExtensionsManagerModel::extensionScheduledForUninstall ( const QString &  extensionName)
signal

◆ extensionScheduledForUpdate

void qSlicerExtensionsManagerModel::extensionScheduledForUpdate ( const QString &  extensionName)
signal

◆ extensionsHistoryInformation()

QVariantMap qSlicerExtensionsManagerModel::extensionsHistoryInformation ( ) const

◆ extensionsHistorySettingsFilePath()

QString qSlicerExtensionsManagerModel::extensionsHistorySettingsFilePath ( ) const

Set/Get extension history settings file path.

Signal extensionsHistorySettingsFilePathChanged() is emitted when a new path is set.

◆ extensionsHistorySettingsFilePathChanged

void qSlicerExtensionsManagerModel::extensionsHistorySettingsFilePathChanged ( const QString &  extensionsHistorySettingsFilePath)
signal

◆ extensionsInstallPath()

Q_INVOKABLE QString qSlicerExtensionsManagerModel::extensionsInstallPath ( ) const

◆ extensionsSettingsFilePath()

QString qSlicerExtensionsManagerModel::extensionsSettingsFilePath ( ) const

Set/Get extension settings file path.

Signal extensionsSettingsFilePathChanged() is emitted when a new path is set.

◆ extensionsSettingsFilePathChanged

void qSlicerExtensionsManagerModel::extensionsSettingsFilePathChanged ( const QString &  extensionsSettingsFilePath)
signal

◆ extensionUninstalled

void qSlicerExtensionsManagerModel::extensionUninstalled ( const QString &  extensionName)
signal

◆ extensionUpdateAvailable

void qSlicerExtensionsManagerModel::extensionUpdateAvailable ( const QString &  extensionName)
signal

◆ extensionUpdated

void qSlicerExtensionsManagerModel::extensionUpdated ( const QString &  extensionName)
signal

◆ extractExtensionArchive()

Q_INVOKABLE bool qSlicerExtensionsManagerModel::extractExtensionArchive ( const QString &  extensionName,
const QString &  archiveFile,
const QString &  destinationPath 
)

Extract archiveFile into destinationPath/extensionName directory.

◆ filterExtensionMetadata()

static ExtensionMetadataType qSlicerExtensionsManagerModel::filterExtensionMetadata ( const ExtensionMetadataType extensionMetadata)
static

◆ gatherExtensionsHistoryInformationOnStartup

void qSlicerExtensionsManagerModel::gatherExtensionsHistoryInformationOnStartup ( )
slot

◆ getExtensionHistoryInformation

QVariantMap qSlicerExtensionsManagerModel::getExtensionHistoryInformation ( )
slot

◆ identifyIncompatibleExtensions

void qSlicerExtensionsManagerModel::identifyIncompatibleExtensions ( )
slot

◆ installDownloadProgress

void qSlicerExtensionsManagerModel::installDownloadProgress ( const QString &  extensionName,
qint64  received,
qint64  total 
)
signal

◆ installedExtensions()

QStringList qSlicerExtensionsManagerModel::installedExtensions ( ) const

Return names of all installed extensions.

See also
installExtension, numberOfInstalledExtensions, isExtensionInstalled, extensionInstalled

◆ installExtension() [1/2]

Q_INVOKABLE bool qSlicerExtensionsManagerModel::installExtension ( const QString &  archiveFile)

Install extension from the specified archive file.

This attempts to install an extension given only the archive file containing the extension. The archive file is inspected in order to determine the extension name.

See also
installExtension(const QString&,ExtensionMetadataType,const QString&)

◆ installExtension() [2/2]

Q_INVOKABLE bool qSlicerExtensionsManagerModel::installExtension ( const QString &  extensionName,
ExtensionMetadataType  extensionMetadata,
const QString &  archiveFile 
)

Install extension.

This attempts to install an extension with the specified name and metadata from the specified archive file. If the metadata is empty, the metadata from the extension description contained in the archive is used.

See also
downloadExtension, isExtensionScheduledForUninstall, extensionScheduledForUninstall

◆ isExtensionCompatible() [1/2]

Q_INVOKABLE QStringList qSlicerExtensionsManagerModel::isExtensionCompatible ( const QString &  extensionName,
const QString &  slicerRevision,
const QString &  slicerOs,
const QString &  slicerArch 
) const

Check if extensionName is compatible with the system identified by slicerRevision, slicerOs and slicerArch.

Returns
Return the reasons justifying the incompatibility or an empty list if the extension is compatible.

◆ isExtensionCompatible() [2/2]

Q_INVOKABLE QStringList qSlicerExtensionsManagerModel::isExtensionCompatible ( const QString &  extensionName) const

Check if extensionName is compatible. An extension is considered incompatible when the version of Slicer used to build the extension is different from the version of Slicer attempting to load the extension.

See also
isExtensionCompatible(const QString&, const QString&, const QString&)
setSlicerRevision, setSlicerOs, setSlicerArch, setSlicerRequirements

◆ isExtensionEnabled()

Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionEnabled ( const QString &  extensionName) const

Return True if the extensionName is enabled.

See also
setExtensionEnabled, extensionEnabledChanged, enabledExtensions

◆ isExtensionInstalled()

Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionInstalled ( const QString &  extensionName) const

Return True if the extensionName is installed.

See also
installExtension, numberOfInstalledExtensions, installedExtensions, extensionInstalled

◆ isExtensionScheduledForUninstall()

Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionScheduledForUninstall ( const QString &  extensionName) const

Return True if the extensionName is scheduled to be uninstalled.

See also
uninstallScheduledExtensions();

◆ isExtensionScheduledForUpdate()

Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionScheduledForUpdate ( const QString &  extensionName) const

Test if extension is scheduled to be updated.

Returns
true if extensionName is scheduled to be updated.
See also
updateScheduledExtensions();

◆ isExtensionUpdateAvailable()

Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionUpdateAvailable ( const QString &  extensionName) const

Check if an update is known to be available for the specified extension.

Returns
true if a previous check for updates has determined that an update is available for the specified extension.
See also
checkForUpdates

◆ messageLogged

void qSlicerExtensionsManagerModel::messageLogged ( const QString &  text,
ctkErrorLogLevel::LogLevels  level 
) const
signal

◆ model()

Q_INVOKABLE const QStandardItemModel* qSlicerExtensionsManagerModel::model ( ) const

Return the item model used internally.

◆ modelUpdated

void qSlicerExtensionsManagerModel::modelUpdated ( )
signal

◆ newExtensionEnabledByDefault()

bool qSlicerExtensionsManagerModel::newExtensionEnabledByDefault ( ) const

◆ newExtensionEnabledByDefaultChanged

void qSlicerExtensionsManagerModel::newExtensionEnabledByDefaultChanged ( bool  value)
signal

◆ numberOfInstalledExtensions()

int qSlicerExtensionsManagerModel::numberOfInstalledExtensions ( ) const

Return the number of installed extensions.

See also
installExtension, isExtensionInstalled, installedExtensions, extensionInstalled

◆ onInstallDownloadFinished

void qSlicerExtensionsManagerModel::onInstallDownloadFinished ( qSlicerExtensionDownloadTask task)
protectedslot

◆ onInstallDownloadProgress

void qSlicerExtensionsManagerModel::onInstallDownloadProgress ( qSlicerExtensionDownloadTask task,
qint64  received,
qint64  total 
)
protectedslot

◆ onUpdateCheckComplete

void qSlicerExtensionsManagerModel::onUpdateCheckComplete ( const QUuid &  requestId,
const QList< QVariantMap > &  results 
)
protectedslot

◆ onUpdateCheckFailed

void qSlicerExtensionsManagerModel::onUpdateCheckFailed ( const QUuid &  requestId)
protectedslot

◆ onUpdateDownloadFinished

void qSlicerExtensionsManagerModel::onUpdateDownloadFinished ( qSlicerExtensionDownloadTask task)
protectedslot

◆ onUpdateDownloadProgress

void qSlicerExtensionsManagerModel::onUpdateDownloadProgress ( qSlicerExtensionDownloadTask task,
qint64  received,
qint64  total 
)
protectedslot

◆ parseExtensionDescriptionFile()

static ExtensionMetadataType qSlicerExtensionsManagerModel::parseExtensionDescriptionFile ( const QString &  file)
static

◆ readArrayValues()

static QStringList qSlicerExtensionsManagerModel::readArrayValues ( QSettings &  settings,
const QString &  arrayName,
const QString  fieldName 
)
static

◆ retrieveExtensionMetadata()

Q_INVOKABLE ExtensionMetadataType qSlicerExtensionsManagerModel::retrieveExtensionMetadata ( const QString &  extensionId)

Query the extension server and retrieve the metadata associated with extensionId.

See also
setServerUrl

◆ retrieveExtensionMetadataByName()

Q_INVOKABLE ExtensionMetadataType qSlicerExtensionsManagerModel::retrieveExtensionMetadataByName ( const QString &  extensionName)

Query the extension server and retrieve the metadata associated with extensionName.

See also
setServerUrl

◆ scheduledForUninstallExtensions()

QStringList qSlicerExtensionsManagerModel::scheduledForUninstallExtensions ( ) const

Return names of all extensions scheduled for uninstall.

See also
scheduleExtensionForUninstall, isExtensionScheduledForUninstall, extensionScheduledForUninstall

◆ scheduledForUpdateExtensions()

QStringList qSlicerExtensionsManagerModel::scheduledForUpdateExtensions ( ) const

Get the names of all extensions scheduled for update.

See also
scheduleExtensionForUpdate, isExtensionScheduledForUpdate, extensionScheduledForUpdate

◆ scheduleExtensionForUninstall

bool qSlicerExtensionsManagerModel::scheduleExtensionForUninstall ( const QString &  extensionName)
slot

Schedule extensionName of uninstall Tell the application to uninstall extensionName when it will restart An extension scheduled for uninstall can be effectively uninstalled by calling uninstallScheduledExtensions()

See also
isExtensionScheduledForUninstall, uninstallScheduledExtensions

◆ scheduleExtensionForUpdate

bool qSlicerExtensionsManagerModel::scheduleExtensionForUpdate ( const QString &  extensionName)
slot

Schedule extensionName to be updated (reinstalled).

This records extensionName in the list of extensions scheduled to be updated (which is done by reinstalling the extension at next startup).

See also
isExtensionScheduledForUpdate, updateScheduledExtensions

◆ serverKeysToIgnore()

static QStringList qSlicerExtensionsManagerModel::serverKeysToIgnore ( )
static

◆ serverToExtensionDescriptionKey()

static QHash<QString, QString> qSlicerExtensionsManagerModel::serverToExtensionDescriptionKey ( )
static

◆ serverUrl()

Q_INVOKABLE QUrl qSlicerExtensionsManagerModel::serverUrl ( ) const

◆ serverUrlWithExtensionsStorePath()

Q_INVOKABLE QUrl qSlicerExtensionsManagerModel::serverUrlWithExtensionsStorePath ( ) const

◆ serverUrlWithPackagePath()

Q_INVOKABLE QUrl qSlicerExtensionsManagerModel::serverUrlWithPackagePath ( ) const

◆ setExtensionEnabled

void qSlicerExtensionsManagerModel::setExtensionEnabled ( const QString &  extensionName,
bool  value 
)
slot

Enable or disable an extension. Tell the application to load (or skip the loading) of extensionName by adding (or removing) all associated module paths to the application settings.

◆ setExtensionsHistorySettingsFilePath()

void qSlicerExtensionsManagerModel::setExtensionsHistorySettingsFilePath ( const QString &  extensionsHistorySettingsFilePath)

◆ setExtensionsSettingsFilePath()

void qSlicerExtensionsManagerModel::setExtensionsSettingsFilePath ( const QString &  extensionsSettingsFilePath)

◆ setNewExtensionEnabledByDefault()

void qSlicerExtensionsManagerModel::setNewExtensionEnabledByDefault ( bool  value)

◆ setSlicerArch()

void qSlicerExtensionsManagerModel::setSlicerArch ( const QString &  arch)

◆ setSlicerOs()

void qSlicerExtensionsManagerModel::setSlicerOs ( const QString &  os)

◆ setSlicerRequirements()

void qSlicerExtensionsManagerModel::setSlicerRequirements ( const QString &  revision,
const QString &  os,
const QString &  arch 
)

Convenience function setting Slicer revision, operating system and architecture.

Signal slicerRevisionChanged(), slicerArchChanged() and slicerArchChanged() are emitted only if the corresponding value is updated.

The, signal slicerRequirementsChanged() is emitted only once it at least one of the three properties has been updated.

◆ setSlicerRevision()

void qSlicerExtensionsManagerModel::setSlicerRevision ( const QString &  revision)

◆ setSlicerVersion()

void qSlicerExtensionsManagerModel::setSlicerVersion ( const QString &  version)

◆ slicerArch()

QString qSlicerExtensionsManagerModel::slicerArch ( ) const

Set/Get Slicer architecture.

Signal slicerArchChanged() is emitted when a new architecture is set.

◆ slicerArchChanged

void qSlicerExtensionsManagerModel::slicerArchChanged ( const QString &  slicerArch)
signal

◆ slicerOs()

QString qSlicerExtensionsManagerModel::slicerOs ( ) const

Set/Get Slicer operating system.

Signal slicerOsChanged() is emitted when a new operating system is set.

◆ slicerOsChanged

void qSlicerExtensionsManagerModel::slicerOsChanged ( const QString &  slicerOs)
signal

◆ slicerRequirementsChanged

void qSlicerExtensionsManagerModel::slicerRequirementsChanged ( const QString &  revision,
const QString &  os,
const QString &  arch 
)
signal

◆ slicerRevision()

QString qSlicerExtensionsManagerModel::slicerRevision ( ) const

Set/Get Slicer revision.

Signal slicerRevisionChanged() is emitted when a revision is set.

◆ slicerRevisionChanged

void qSlicerExtensionsManagerModel::slicerRevisionChanged ( const QString &  slicerRevision)
signal

◆ slicerVersion()

QString qSlicerExtensionsManagerModel::slicerVersion ( ) const

◆ slicerVersionChanged

void qSlicerExtensionsManagerModel::slicerVersionChanged ( const QString &  slicerVersion)
signal

◆ uninstallScheduledExtensions [1/2]

bool qSlicerExtensionsManagerModel::uninstallScheduledExtensions ( QStringList &  uninstalledExtensions)
slot

Uninstall extensions scheduled for uninstall.

Parameters
uninstalledExtensionsQStringList which received the list of extensions which are successfully uninstalled.
Returns
true if all scheduled extensions are successfully uninstalled.
See also
scheduleExtensionForUninstall, isExtensionScheduledForUninstall,

◆ uninstallScheduledExtensions [2/2]

bool qSlicerExtensionsManagerModel::uninstallScheduledExtensions ( )
slot

Uninstall extensions scheduled for uninstall.

Returns
true if all scheduled extensions are successfully uninstalled.
See also
scheduleExtensionForUninstall, isExtensionScheduledForUninstall,

◆ updateDownloadProgress

void qSlicerExtensionsManagerModel::updateDownloadProgress ( const QString &  extensionName,
qint64  received,
qint64  total 
)
signal

◆ updateModel

void qSlicerExtensionsManagerModel::updateModel ( )
slot

◆ updateScheduledExtensions [1/2]

bool qSlicerExtensionsManagerModel::updateScheduledExtensions ( QStringList &  updatedExtensions)
slot

Update extensions scheduled for update.

Parameters
updatedExtensionsQStringList which received the list of extensions which are successfully updated.
Returns
true if all scheduled extensions are successfully updated.
See also
scheduleExtensionForUpdate, isExtensionScheduledForUpdate

◆ updateScheduledExtensions [2/2]

bool qSlicerExtensionsManagerModel::updateScheduledExtensions ( )
slot

Update extensions scheduled for update.

Returns
true if all scheduled extensions are successfully updated.
See also
scheduleExtensionForUpdate, isExtensionScheduledForUpdate

◆ writeArrayValues()

static void qSlicerExtensionsManagerModel::writeArrayValues ( QSettings &  settings,
const QStringList &  values,
const QString &  arrayName,
const QString  fieldName 
)
static

◆ writeExtensionDescriptionFile()

static bool qSlicerExtensionsManagerModel::writeExtensionDescriptionFile ( const QString &  file,
const ExtensionMetadataType metadata 
)
static

Member Data Documentation

◆ d_ptr

QScopedPointer<qSlicerExtensionsManagerModelPrivate> qSlicerExtensionsManagerModel::d_ptr
protected

Definition at line 411 of file qSlicerExtensionsManagerModel.h.


The documentation for this class was generated from the following file: