Slicer
4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
#include <Base/QTCore/qSlicerExtensionsManagerModel.h>
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 |
Definition at line 43 of file qSlicerExtensionsManagerModel.h.
Extension metadata typedef.
Definition at line 73 of file qSlicerExtensionsManagerModel.h.
typedef qSlicerExtensionsManagerModelPrivate qSlicerExtensionsManagerModel::Pimpl |
Pimpl typedef.
Definition at line 61 of file qSlicerExtensionsManagerModel.h.
Self typedef.
Definition at line 64 of file qSlicerExtensionsManagerModel.h.
typedef QObject qSlicerExtensionsManagerModel::Superclass |
Superclass typedef.
Definition at line 58 of file qSlicerExtensionsManagerModel.h.
|
read |
Definition at line 48 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 51 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 50 of file qSlicerExtensionsManagerModel.h.
|
read |
Definition at line 47 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 49 of file qSlicerExtensionsManagerModel.h.
|
read |
Definition at line 46 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 54 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 53 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 52 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 55 of file qSlicerExtensionsManagerModel.h.
|
explicit |
Constructor.
|
virtual |
Destructor.
|
slot |
Cancel the uninstallation of extensionName Tell the application to keep extensionName installed.
|
slot |
Cancel the uninstallation of extensionName Tell the application to keep extensionName installed.
|
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.
|
slot |
|
slot |
Download and install extensionId The extensionId corresponds to the identifier used on the extension server itself.
|
signal |
|
signal |
QStringList qSlicerExtensionsManagerModel::enabledExtensions | ( | ) | const |
Return names of all enabled extensions.
|
slot |
|
signal |
|
signal |
Q_INVOKABLE QString qSlicerExtensionsManagerModel::extensionDescriptionFile | ( | const QString & | extensionName | ) | const |
|
signal |
|
signal |
|
signal |
|
signal |
Q_INVOKABLE QString qSlicerExtensionsManagerModel::extensionInstallPath | ( | const QString & | extensionName | ) | const |
Q_INVOKABLE ExtensionMetadataType qSlicerExtensionsManagerModel::extensionMetadata | ( | const QString & | extensionName | ) | const |
Q_INVOKABLE QStringList qSlicerExtensionsManagerModel::extensionModulePaths | ( | const QString & | extensionName | ) | const |
|
signal |
|
signal |
QVariantMap qSlicerExtensionsManagerModel::extensionsHistoryInformation | ( | ) | const |
QString qSlicerExtensionsManagerModel::extensionsHistorySettingsFilePath | ( | ) | const |
Set/Get extension history settings file path.
Signal extensionsHistorySettingsFilePathChanged() is emitted when a new path is set.
|
signal |
Q_INVOKABLE QString qSlicerExtensionsManagerModel::extensionsInstallPath | ( | ) | const |
QString qSlicerExtensionsManagerModel::extensionsSettingsFilePath | ( | ) | const |
Set/Get extension settings file path.
Signal extensionsSettingsFilePathChanged() is emitted when a new path is set.
|
signal |
|
signal |
|
signal |
|
signal |
Q_INVOKABLE bool qSlicerExtensionsManagerModel::extractExtensionArchive | ( | const QString & | extensionName, |
const QString & | archiveFile, | ||
const QString & | destinationPath | ||
) |
Extract archiveFile into destinationPath/extensionName directory.
|
static |
|
slot |
|
slot |
|
slot |
|
signal |
QStringList qSlicerExtensionsManagerModel::installedExtensions | ( | ) | const |
Return names of all installed extensions.
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.
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.
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.
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.
Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionEnabled | ( | const QString & | extensionName | ) | const |
Return True if the extensionName is enabled.
Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionInstalled | ( | const QString & | extensionName | ) | const |
Return True if the extensionName is installed.
Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionScheduledForUninstall | ( | const QString & | extensionName | ) | const |
Return True if the extensionName is scheduled to be uninstalled.
Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionScheduledForUpdate | ( | const QString & | extensionName | ) | const |
Test if extension is scheduled to be updated.
true
if extensionName
is scheduled to be updated.Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionUpdateAvailable | ( | const QString & | extensionName | ) | const |
Check if an update is known to be available for the specified extension.
true
if a previous check for updates has determined that an update is available for the specified extension.
|
signal |
Q_INVOKABLE const QStandardItemModel* qSlicerExtensionsManagerModel::model | ( | ) | const |
Return the item model used internally.
|
signal |
bool qSlicerExtensionsManagerModel::newExtensionEnabledByDefault | ( | ) | const |
|
signal |
int qSlicerExtensionsManagerModel::numberOfInstalledExtensions | ( | ) | const |
Return the number of installed extensions.
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
static |
|
static |
Q_INVOKABLE ExtensionMetadataType qSlicerExtensionsManagerModel::retrieveExtensionMetadata | ( | const QString & | extensionId | ) |
Query the extension server and retrieve the metadata associated with extensionId.
Q_INVOKABLE ExtensionMetadataType qSlicerExtensionsManagerModel::retrieveExtensionMetadataByName | ( | const QString & | extensionName | ) |
Query the extension server and retrieve the metadata associated with extensionName.
QStringList qSlicerExtensionsManagerModel::scheduledForUninstallExtensions | ( | ) | const |
Return names of all extensions scheduled for uninstall.
QStringList qSlicerExtensionsManagerModel::scheduledForUpdateExtensions | ( | ) | const |
Get the names of all extensions scheduled for update.
|
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()
|
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).
|
static |
|
static |
Q_INVOKABLE QUrl qSlicerExtensionsManagerModel::serverUrl | ( | ) | const |
Q_INVOKABLE QUrl qSlicerExtensionsManagerModel::serverUrlWithExtensionsStorePath | ( | ) | const |
Q_INVOKABLE QUrl qSlicerExtensionsManagerModel::serverUrlWithPackagePath | ( | ) | const |
|
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.
void qSlicerExtensionsManagerModel::setExtensionsHistorySettingsFilePath | ( | const QString & | extensionsHistorySettingsFilePath | ) |
void qSlicerExtensionsManagerModel::setExtensionsSettingsFilePath | ( | const QString & | extensionsSettingsFilePath | ) |
void qSlicerExtensionsManagerModel::setNewExtensionEnabledByDefault | ( | bool | value | ) |
void qSlicerExtensionsManagerModel::setSlicerArch | ( | const QString & | arch | ) |
void qSlicerExtensionsManagerModel::setSlicerOs | ( | const QString & | os | ) |
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.
void qSlicerExtensionsManagerModel::setSlicerRevision | ( | const QString & | revision | ) |
void qSlicerExtensionsManagerModel::setSlicerVersion | ( | const QString & | version | ) |
QString qSlicerExtensionsManagerModel::slicerArch | ( | ) | const |
Set/Get Slicer architecture.
Signal slicerArchChanged() is emitted when a new architecture is set.
|
signal |
QString qSlicerExtensionsManagerModel::slicerOs | ( | ) | const |
Set/Get Slicer operating system.
Signal slicerOsChanged() is emitted when a new operating system is set.
|
signal |
|
signal |
QString qSlicerExtensionsManagerModel::slicerRevision | ( | ) | const |
Set/Get Slicer revision.
Signal slicerRevisionChanged() is emitted when a revision is set.
|
signal |
QString qSlicerExtensionsManagerModel::slicerVersion | ( | ) | const |
|
signal |
|
slot |
Uninstall extensions scheduled for uninstall.
uninstalledExtensions | QStringList which received the list of extensions which are successfully uninstalled. |
true
if all scheduled extensions are successfully uninstalled.
|
slot |
Uninstall extensions scheduled for uninstall.
true
if all scheduled extensions are successfully uninstalled.
|
signal |
|
slot |
|
slot |
Update extensions scheduled for update.
updatedExtensions | QStringList which received the list of extensions which are successfully updated. |
true
if all scheduled extensions are successfully updated.
|
slot |
Update extensions scheduled for update.
true
if all scheduled extensions are successfully updated.
|
static |
|
static |
|
protected |
Definition at line 411 of file qSlicerExtensionsManagerModel.h.