Slicer
5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Class querying application updates on the download server. More...
#include <Base/QTCore/qSlicerApplicationUpdateManager.h>
Public Types | |
typedef qSlicerApplicationUpdateManagerPrivate | Pimpl |
Pimpl typedef. More... | |
typedef qSlicerApplicationUpdateManager | Self |
Self typedef. More... | |
typedef QObject | Superclass |
Superclass typedef. More... | |
Properties | |
QUrl | applicationDownloadPageUrl |
bool | autoUpdateCheck |
Periodically check for updates on the server. More... | |
bool | isUpdateAvailable |
QString | latestReleaseVersion |
QString | slicerArch |
QString | slicerOs |
QString | slicerRevision |
Public Slots | |
void | checkForUpdate () |
void | setAutoUpdateCheck (bool enable) |
Enable/disable automatic periodic update checks on the server. More... | |
Signals | |
void | autoUpdateCheckChanged () |
Emitted when autoUpdateCheck property is changed. More... | |
void | updateAvailable (bool isAvailable) |
void | updateCheckCompleted (bool success) |
Emitted when availability update check is completed. More... | |
void | slicerRequirementsChanged (const QString &revision, const QString &os, const QString &arch) |
Public Member Functions | |
QUrl | applicationDownloadPageUrl () const |
bool | autoUpdateCheck () const |
bool | checkForUpdate (bool force, bool waitForCompletion) |
Check for updates. Reads the last cached value if recently queries from the server. Emits updateAvailable(bool) signal if update has become available/unavailable. More... | |
bool | isUpdateAvailable () const |
Return True if an updated version is available for the application Does not call checkForUpdate(). More... | |
QDateTime | lastUpdateCheckTime () const |
QString | latestReleaseRevision () const |
Return latest application release version (e.g., 30893) More... | |
QString | latestReleaseVersion () const |
Return latest application release version (e.g., 5.0.3) More... | |
qSlicerApplicationUpdateManager (QObject *parent=nullptr) | |
Constructor. More... | |
Q_INVOKABLE QUrl | serverUrl () const |
Application update server URL used to perform API calls. More... | |
void | setSlicerRequirements (const QString &revision, const QString &os, const QString &arch) |
Set Slicer revision, operating system and architecture. More... | |
QString | slicerArch () const |
QString | slicerOs () const |
QString | slicerRevision () const |
~qSlicerApplicationUpdateManager () override | |
Destructor. More... | |
Static Public Member Functions | |
static bool | isApplicationUpdateEnabled () |
Protected Slots | |
bool | onReleaseInfoQueryFinished (const QUuid &requestId) |
void | refreshUpdateAvailable () |
Protected Attributes | |
QScopedPointer< qSlicerApplicationUpdateManagerPrivate > | d_ptr |
Class querying application updates on the download server.
Automatic update check is enabled/disabled by ApplicationUpdates/Enabled application setting, enabled by default.
Application update feature can be excluded from the build by setting CMake variable Slicer_BUILD_APPLICATIONUPDATE_SUPPORT=OFF.
Definition at line 39 of file qSlicerApplicationUpdateManager.h.
typedef qSlicerApplicationUpdateManagerPrivate qSlicerApplicationUpdateManager::Pimpl |
Pimpl typedef.
Definition at line 56 of file qSlicerApplicationUpdateManager.h.
Self typedef.
Definition at line 59 of file qSlicerApplicationUpdateManager.h.
typedef QObject qSlicerApplicationUpdateManager::Superclass |
Superclass typedef.
Definition at line 53 of file qSlicerApplicationUpdateManager.h.
|
read |
Definition at line 49 of file qSlicerApplicationUpdateManager.h.
|
readwrite |
Periodically check for updates on the server.
Definition at line 46 of file qSlicerApplicationUpdateManager.h.
|
read |
Definition at line 47 of file qSlicerApplicationUpdateManager.h.
|
read |
Definition at line 48 of file qSlicerApplicationUpdateManager.h.
|
read |
Definition at line 44 of file qSlicerApplicationUpdateManager.h.
|
read |
Definition at line 43 of file qSlicerApplicationUpdateManager.h.
|
read |
Definition at line 42 of file qSlicerApplicationUpdateManager.h.
|
explicit |
Constructor.
|
override |
Destructor.
QUrl qSlicerApplicationUpdateManager::applicationDownloadPageUrl | ( | ) | const |
Return URL string of the application download website (html page that can be displayed for the user).
bool qSlicerApplicationUpdateManager::autoUpdateCheck | ( | ) | const |
|
signal |
Emitted when autoUpdateCheck property is changed.
bool qSlicerApplicationUpdateManager::checkForUpdate | ( | bool | force, |
bool | waitForCompletion | ||
) |
Check for updates. Reads the last cached value if recently queries from the server. Emits updateAvailable(bool) signal if update has become available/unavailable.
force | set to true to force query from the server. |
waitForCompletion | set to true to wait for the server response |
|
slot |
Checks for application update (server query is not forced, does not wait for completion)
|
static |
Return true if application update is enabled in application settings (ApplicationUpdates/Enabled). Enabled by default.
bool qSlicerApplicationUpdateManager::isUpdateAvailable | ( | ) | const |
Return True if an updated version is available for the application Does not call checkForUpdate().
QDateTime qSlicerApplicationUpdateManager::lastUpdateCheckTime | ( | ) | const |
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.
QString qSlicerApplicationUpdateManager::latestReleaseRevision | ( | ) | const |
Return latest application release version (e.g., 30893)
QString qSlicerApplicationUpdateManager::latestReleaseVersion | ( | ) | const |
Return latest application release version (e.g., 5.0.3)
|
protectedslot |
|
protectedslot |
Q_INVOKABLE QUrl qSlicerApplicationUpdateManager::serverUrl | ( | ) | const |
Application update server URL used to perform API calls.
If set, it returns the value from application settings value ApplicationUpdate/ServerUrl
.
It is set to https://download.slicer.org
by default.
For local testing during development:
https://download.slicer.org/find?os=win&stability=release
find
in a local folderfile:///c:/temp/slicerupdatetest/
) as Update server URL
in application settings.
|
slot |
Enable/disable automatic periodic update checks on the server.
void qSlicerApplicationUpdateManager::setSlicerRequirements | ( | const QString & | revision, |
const QString & | os, | ||
const QString & | arch | ||
) |
Set Slicer revision, operating system and architecture.
Signal slicerRevisionChanged(), slicerArchChanged() and slicerArchChanged() are emitted only if the corresponding value is updated.
The slicerRequirementsChanged() signal is emitted only once it at least one of the three properties has been updated.
The updateAvailable(bool) signal is emitted with the update availability determined based on the new requirements.
QString qSlicerApplicationUpdateManager::slicerArch | ( | ) | const |
Get Slicer architecture.
QString qSlicerApplicationUpdateManager::slicerOs | ( | ) | const |
Get Slicer operating system.
|
signal |
Emitted when Slicer application revision, operating system, or architecture is set.
QString qSlicerApplicationUpdateManager::slicerRevision | ( | ) | const |
Get Slicer revision.
|
signal |
Emitted when application update availability has changed or an update check has been completed.
|
signal |
Emitted when availability update check is completed.
|
protected |
Definition at line 168 of file qSlicerApplicationUpdateManager.h.