Slicer
5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Class querying and storing extensions data. More...
#include <Base/QTCore/qSlicerExtensionsManagerModel.h>
Public Types | |
typedef QVariantMap | ExtensionMetadataType |
Extension metadata typedef. More... | |
enum | MatadataSource { MetadataAll = 0, MetadataLocal, MetadataServer } |
typedef qSlicerExtensionsManagerModelPrivate | Pimpl |
Pimpl typedef. More... | |
typedef qSlicerExtensionsManagerModel | Self |
Self typedef. More... | |
enum | ServerAPI { Girder_v1 = 1, ServerAPI_Last } |
typedef QObject | Superclass |
Superclass typedef. More... | |
Properties | |
QStringList | activeTasks |
bool | autoInstallDependencies |
Automatically install all dependencies (other extensions that the installed extension requires) when installing an extension. More... | |
bool | autoUpdateCheck |
Download extensions metadata from the server at application startup to allow the application to display update available indicator. More... | |
bool | autoUpdateInstall |
Automatically install any extension updates. More... | |
QStringList | availableUpdateExtensions |
Names of extensions that have updates available on the server. More... | |
QStringList | bookmarkedExtensions |
Names of bookmarked extensions. More... | |
QStringList | enabledExtensions |
QString | extensionsSettingsFilePath |
QStringList | installedExtensions |
int | installedExtensionsCount |
bool | interactive |
QStringList | managedExtensions |
Names of extensions that are installed or bookmarked. More... | |
int | managedExtensionsCount |
Number of extensions that are installed or bookmarked. More... | |
bool | newExtensionEnabledByDefault |
int | numberOfInstalledExtensions |
QString | slicerArch |
QString | slicerOs |
QString | slicerRevision |
Public Slots | |
void | aboutToLoadExtensions () |
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 update of extensionName Tell the application to keep extensionName installed. More... | |
void | checkForExtensionsUpdates () |
QStringList | checkInstallPrerequisites () const |
bool | downloadAndInstallExtension (const QString &extensionId, bool installDependencies=true, bool waitForCompletion=false) |
Download and install extensionId The extensionId corresponds to the identifier used on the extension server itself. More... | |
bool | downloadAndInstallExtensionByName (const QString &extensionName, bool installDependencies=true, bool waitForCompletion=false) |
Download and install extensionId The extensionId corresponds to the identifier used on the extension server itself. This method is used by the extensions.slicer.org extension installer. More... | |
bool | exportExtensionList (QString &exportFilePath) |
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 | setAutoInstallDependencies (bool enable) |
void | setAutoUpdateCheck (bool enable) |
void | setAutoUpdateInstall (bool enable) |
void | setExtensionBookmarked (const QString &extensionName, bool value) |
Add/remove bookmark for an extension. Add/remove this extension from the list of bookmarked extensions in the application settings. More... | |
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... | |
void | setInteractive (bool value) |
bool | uninstallScheduledExtensions (QStringList &uninstalledExtensions) |
bool | uninstallScheduledExtensions () |
bool | updateExtensionsMetadataFromServer (bool force=false, bool waitForCompletion=false) |
void | updateModel () |
Full update of the extensions from extension description files and settings. More... | |
bool | updateScheduledExtensions (QStringList &updatedExtensions) |
bool | updateScheduledExtensions () |
Q_INVOKABLE bool | waitForAllTasksCompletion (int timeoutMsec=-1) const |
Signals | |
void | activeTasksChanged () |
Emitted when background tasks are started or completed. More... | |
void | autoUpdateSettingsChanged () |
Emitted when autoUpdateCheck, autoUpdateInstall, or autoInstallDependencies properties are changed. More... | |
void | downloadFinished (QNetworkReply *reply) |
void | downloadStarted (QNetworkReply *reply) |
void | extensionBookmarkedChanged (const QString &extensionName, bool value) |
Emitted when bookmark is added to or removed from an extension. More... | |
void | extensionCancelledScheduleForUninstall (const QString &extensionName) |
void | extensionCancelledScheduleForUpdate (const QString &extensionName) |
void | extensionEnabledChanged (const QString &extensionName, bool value) |
void | extensionIdentifedAsIncompatible (const QString &extensionName) |
void | extensionInstalled (const QString &extensionName) |
void | extensionMetadataUpdated (const QString &extensionName) |
Emitted when extension metadata (description, icon URL, etc. is updated) More... | |
void | extensionScheduledForUninstall (const QString &extensionName) |
void | extensionScheduledForUpdate (const QString &extensionName) |
void | extensionsSettingsFilePathChanged (const QString &extensionsSettingsFilePath) |
void | extensionUninstalled (const QString &extensionName) |
void | extensionUpdateAvailable (const QString &extensionName) |
void | extensionUpdated (const QString &extensionName) |
void | extensionUpdatesAvailable (bool available) |
Emitted after updates are checked on the extensions server. More... | |
void | installDownloadProgress (const QString &extensionName, qint64 received, qint64 total) |
void | interactiveChanged (bool interactive) |
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) |
void | updateExtensionsMetadataFromServerCompleted (bool success) |
Emitted when metadata download from the extensions server is completed. More... | |
Public Member Functions | |
QStringList | activeTasks () const |
Number of operations in progress. More... | |
bool | autoInstallDependencies () const |
bool | autoUpdateCheck () const |
bool | autoUpdateInstall () const |
QStringList | availableUpdateExtensions () const |
QStringList | bookmarkedExtensions () const |
Return names of all bookmarked extensions. More... | |
QStringList | enabledExtensions () const |
Return names of all enabled extensions sorted in alphabetical order. More... | |
Q_INVOKABLE QString | extensionDescription (const QString &extensionName) const |
Q_INVOKABLE QString | extensionDescriptionFile (const QString &extensionName) const |
Q_INVOKABLE QString | extensionInstallPath (const QString &extensionName) const |
Q_INVOKABLE ExtensionMetadataType | extensionMetadata (const QString &extensionName, int source=MetadataAll) const |
Q_INVOKABLE QStringList | extensionModulePaths (const QString &extensionName) const |
Q_INVOKABLE QString | extensionsInstallPath () const |
Q_INVOKABLE QUrl | extensionsListUrl () const |
Returns the URL of the extensions manager frontend for the current application version and operating system. More... | |
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... | |
Q_INVOKABLE QUrl | frontendServerUrl () const |
Frontend server URL displaying extension manager web page. More... | |
QStringList | installedExtensions () const |
Return names of all installed extensions sorted in alphabetical order. More... | |
int | installedExtensionsCount () const |
Return the number of installed extensions. More... | |
Q_INVOKABLE bool | installExtension (const QString &archiveFile, bool installDependencies=true, bool waitForCompletion=false) |
Q_INVOKABLE bool | installExtension (const QString &extensionName, ExtensionMetadataType extensionMetadata, const QString &archiveFile, bool installDependencies=true, bool waitForCompletion=false) |
bool | interactive () const |
Q_INVOKABLE bool | isExtensionBookmarked (const QString &extensionName) const |
Return True if the extensionName is bookmarked. Bookmarked extensions are included in the list of managed extensions list, even if not installed. More... | |
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... | |
bool | isExtensionLoaded (const QString &extensionName) const |
Return True if the extensionName is loaded. 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 |
QDateTime | lastUpdateTimeExtensionsMetadataFromServer () |
QStringList | managedExtensions () const |
Return names of all managed extensions, i.e., installed or bookmarked extensions. More... | |
int | managedExtensionsCount () const |
Return the number of managed extensions. More... | |
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. Deprecated, use installedExtensionsCount instead. More... | |
qSlicerExtensionsManagerModel (QObject *parent=nullptr) | |
Constructor. More... | |
QStringList | scheduledForUninstallExtensions () const |
Return names of all extensions scheduled for uninstall. More... | |
QStringList | scheduledForUpdateExtensions () const |
int | serverAPI () const |
Q_INVOKABLE QUrl | serverUrl () const |
Backend server URL used to perform API calls. More... | |
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 |
bool | uninstallExtension (const QString &extensionName) |
Uninstall extensionName It is only allowed if the extension is not loaded already. If the extension is already loaded then use scheduleExtensionForUninstall instead. More... | |
~qSlicerExtensionsManagerModel () override | |
Destructor. More... | |
Static Public Member Functions | |
static ExtensionMetadataType | convertExtensionMetadata (const ExtensionMetadataType &extensionMetadata, int serverAPI) |
static ExtensionMetadataType | filterExtensionMetadata (const ExtensionMetadataType &extensionMetadata, int serverAPI) |
static ExtensionMetadataType | parseExtensionDescriptionFile (const QString &file) |
static QStringList | readArrayValues (QSettings &settings, const QString &arrayName, const QString fieldName) |
static int | serverAPIFromString (const QString &str) |
static QString | serverAPIToString (int serverAPI) |
static QStringList | serverKeysToIgnore (int serverAPI) |
static QHash< QString, QString > | serverToExtensionDescriptionKey (int serverAPI) |
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 | |
bool | onExtensionsMetadataFromServerQueryFinished (const QUuid &requestId) |
void | onInstallDownloadFinished (qSlicerExtensionDownloadTask *task) |
void | onInstallDownloadProgress (qSlicerExtensionDownloadTask *task, qint64 received, qint64 total) |
void | onUpdateDownloadFinished (qSlicerExtensionDownloadTask *task) |
void | onUpdateDownloadProgress (qSlicerExtensionDownloadTask *task, qint64 received, qint64 total) |
Protected Attributes | |
QScopedPointer< qSlicerExtensionsManagerModelPrivate > | d_ptr |
Class querying and storing extensions data.
The model maintains a list of "managed" extensions, i.e., extensions that are currently installed or that the user bookmarked.
Definition at line 47 of file qSlicerExtensionsManagerModel.h.
Extension metadata typedef.
Definition at line 93 of file qSlicerExtensionsManagerModel.h.
typedef qSlicerExtensionsManagerModelPrivate qSlicerExtensionsManagerModel::Pimpl |
Pimpl typedef.
Definition at line 81 of file qSlicerExtensionsManagerModel.h.
Self typedef.
Definition at line 84 of file qSlicerExtensionsManagerModel.h.
typedef QObject qSlicerExtensionsManagerModel::Superclass |
Superclass typedef.
Definition at line 78 of file qSlicerExtensionsManagerModel.h.
Definition at line 154 of file qSlicerExtensionsManagerModel.h.
Enumerator | |
---|---|
Girder_v1 | |
ServerAPI_Last |
Definition at line 95 of file qSlicerExtensionsManagerModel.h.
|
read |
Definition at line 74 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Automatically install all dependencies (other extensions that the installed extension requires) when installing an extension.
Definition at line 73 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Download extensions metadata from the server at application startup to allow the application to display update available indicator.
Definition at line 69 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Automatically install any extension updates.
Definition at line 71 of file qSlicerExtensionsManagerModel.h.
|
read |
Names of extensions that have updates available on the server.
Definition at line 61 of file qSlicerExtensionsManagerModel.h.
|
read |
Names of bookmarked extensions.
Definition at line 57 of file qSlicerExtensionsManagerModel.h.
|
read |
Definition at line 59 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 64 of file qSlicerExtensionsManagerModel.h.
|
read |
Definition at line 58 of file qSlicerExtensionsManagerModel.h.
|
read |
Definition at line 51 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 63 of file qSlicerExtensionsManagerModel.h.
|
read |
Names of extensions that are installed or bookmarked.
Definition at line 55 of file qSlicerExtensionsManagerModel.h.
|
read |
Number of extensions that are installed or bookmarked.
Definition at line 53 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 62 of file qSlicerExtensionsManagerModel.h.
|
read |
Definition at line 50 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 67 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 66 of file qSlicerExtensionsManagerModel.h.
|
readwrite |
Definition at line 65 of file qSlicerExtensionsManagerModel.h.
|
explicit |
Constructor.
|
override |
Destructor.
|
slot |
Call this method when extensions are started to be loaded. It allows to the model to know which extensions are loaded, which is important because after application startup extensions cannot be immediately loaded or unloaded.
QStringList qSlicerExtensionsManagerModel::activeTasks | ( | ) | const |
Number of operations in progress.
|
signal |
Emitted when background tasks are started or completed.
bool qSlicerExtensionsManagerModel::autoInstallDependencies | ( | ) | const |
bool qSlicerExtensionsManagerModel::autoUpdateCheck | ( | ) | const |
bool qSlicerExtensionsManagerModel::autoUpdateInstall | ( | ) | const |
|
signal |
Emitted when autoUpdateCheck, autoUpdateInstall, or autoInstallDependencies properties are changed.
QStringList qSlicerExtensionsManagerModel::availableUpdateExtensions | ( | ) | const |
Get list of extension names that has available updates.
QStringList qSlicerExtensionsManagerModel::bookmarkedExtensions | ( | ) | const |
Return names of all bookmarked extensions.
|
slot |
Cancel the uninstallation of extensionName Tell the application to keep extensionName installed.
|
slot |
Cancel the update of extensionName Tell the application to keep extensionName installed.
|
slot |
Compares current extensions versions with versions available on the server. Emits extensionMetadataUpdated(QString extensionName) and emit extensionUpdatesAvailable(bool found) signals. If Extensions/AutoUpdateInstall is enabled in application settings then this will also install the updated extensions.
|
slot |
|
static |
Convert server keys to extensions manager model keys.
|
slot |
Download and install extensionId The extensionId corresponds to the identifier used on the extension server itself.
|
slot |
Download and install extensionId The extensionId corresponds to the identifier used on the extension server itself. This method is used by the extensions.slicer.org extension installer.
|
signal |
|
signal |
QStringList qSlicerExtensionsManagerModel::enabledExtensions | ( | ) | const |
Return names of all enabled extensions sorted in alphabetical order.
|
slot |
|
signal |
Emitted when bookmark is added to or removed from an extension.
|
signal |
|
signal |
Q_INVOKABLE QString qSlicerExtensionsManagerModel::extensionDescription | ( | const QString & | extensionName | ) | const |
Q_INVOKABLE QString qSlicerExtensionsManagerModel::extensionDescriptionFile | ( | const QString & | extensionName | ) | const |
|
signal |
|
signal |
|
signal |
Q_INVOKABLE QString qSlicerExtensionsManagerModel::extensionInstallPath | ( | const QString & | extensionName | ) | const |
Q_INVOKABLE ExtensionMetadataType qSlicerExtensionsManagerModel::extensionMetadata | ( | const QString & | extensionName, |
int | source = MetadataAll |
||
) | const |
|
signal |
Emitted when extension metadata (description, icon URL, etc. is updated)
Q_INVOKABLE QStringList qSlicerExtensionsManagerModel::extensionModulePaths | ( | const QString & | extensionName | ) | const |
|
signal |
|
signal |
Q_INVOKABLE QString qSlicerExtensionsManagerModel::extensionsInstallPath | ( | ) | const |
Q_INVOKABLE QUrl qSlicerExtensionsManagerModel::extensionsListUrl | ( | ) | const |
Returns the URL of the extensions manager frontend for the current application version and operating system.
QString qSlicerExtensionsManagerModel::extensionsSettingsFilePath | ( | ) | const |
Set/Get extension settings file path.
Signal extensionsSettingsFilePathChanged() is emitted when a new path is set.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
Emitted after updates are checked on the extensions server.
Q_INVOKABLE bool qSlicerExtensionsManagerModel::extractExtensionArchive | ( | const QString & | extensionName, |
const QString & | archiveFile, | ||
const QString & | destinationPath | ||
) |
Extract archiveFile into destinationPath/extensionName directory.
|
static |
Remove server metadata fields that should be ignored.
Q_INVOKABLE QUrl qSlicerExtensionsManagerModel::frontendServerUrl | ( | ) | const |
Frontend server URL displaying extension manager web page.
If set, it returns the value associated with SLICER_EXTENSIONS_MANAGER_FRONTEND_SERVER_URL
environment variable. Otherwise, it returns the extensions settings value Extensions/FrontendServerUrl
.
|
slot |
|
signal |
QStringList qSlicerExtensionsManagerModel::installedExtensions | ( | ) | const |
Return names of all installed extensions sorted in alphabetical order.
int qSlicerExtensionsManagerModel::installedExtensionsCount | ( | ) | const |
Return the number of installed extensions.
Q_INVOKABLE bool qSlicerExtensionsManagerModel::installExtension | ( | const QString & | archiveFile, |
bool | installDependencies = true , |
||
bool | waitForCompletion = false |
||
) |
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, | ||
bool | installDependencies = true , |
||
bool | waitForCompletion = false |
||
) |
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.
bool qSlicerExtensionsManagerModel::interactive | ( | ) | const |
If set to true (by default) then the user may be asked to confirm installation of additional dependencies. If set to false then no blocking popups are displayed and dependencies are installed automatically.
|
signal |
Q_INVOKABLE bool qSlicerExtensionsManagerModel::isExtensionBookmarked | ( | const QString & | extensionName | ) | const |
Return True if the extensionName is bookmarked. Bookmarked extensions are included in the list of managed extensions list, even if not installed.
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.
bool qSlicerExtensionsManagerModel::isExtensionLoaded | ( | const QString & | extensionName | ) | const |
Return True if the extensionName is loaded.
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.QDateTime qSlicerExtensionsManagerModel::lastUpdateTimeExtensionsMetadataFromServer | ( | ) |
Return time of last successful update of extensions metadata from the server. If there has not been any updates then it the object is set to null.
QStringList qSlicerExtensionsManagerModel::managedExtensions | ( | ) | const |
Return names of all managed extensions, i.e., installed or bookmarked extensions.
int qSlicerExtensionsManagerModel::managedExtensionsCount | ( | ) | const |
Return the number of managed extensions.
|
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. Deprecated, use installedExtensionsCount instead.
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
static |
|
static |
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).
int qSlicerExtensionsManagerModel::serverAPI | ( | ) | const |
Return current serverAPI.
|
static |
Return ServerAPI from the string str.
|
static |
Return a string representation of the serverAPI.
|
static |
Server metadata fields that should not be copied to the extensions manager model.
|
static |
Conversion map to get extensions manager model keys from metadata returned by the extensions server
Q_INVOKABLE QUrl qSlicerExtensionsManagerModel::serverUrl | ( | ) | const |
Backend server URL used to perform API calls.
If set, it returns the value associated with SLICER_EXTENSIONS_MANAGER_SERVER_URL
environment variable. Otherwise, it returns the extensions settings value Extensions/ServerUrl
.
|
slot |
|
slot |
|
slot |
|
slot |
Add/remove bookmark for an extension. Add/remove this extension from the list of bookmarked extensions in the application settings.
|
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::setExtensionsSettingsFilePath | ( | const QString & | extensionsSettingsFilePath | ) |
|
slot |
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 |
bool qSlicerExtensionsManagerModel::uninstallExtension | ( | const QString & | extensionName | ) |
Uninstall extensionName It is only allowed if the extension is not loaded already. If the extension is already loaded then use scheduleExtensionForUninstall instead.
|
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 |
Request updating the extension metadata that is stored on the extensions server. Only queries the extensions server if update is due (sufficient time is elapsed since the last update), or force is set to true. The last query result is saved and if the server is not contacted then this cached information is used. Set waitForCompletion to true to make sure all metadata is up-to-date when the method returns. Returns false if waitForCompletion is set to true and metadata cannot be retrieved.
|
signal |
Emitted when metadata download from the extensions server is completed.
|
slot |
Full update of the extensions from extension description files and settings.
|
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.
|
slot |
Wait for all active tasks to complete. Set timeoutMsec to specify maximum time to wait for completion (set negative value to wait indefinitely). Returns true if all tasks are completed.
|
static |
|
static |
|
protected |
Definition at line 563 of file qSlicerExtensionsManagerModel.h.