QSimpleUpdater
A simple auto-updater system for Qt applications
Public Slots | Signals | Public Member Functions | List of all members
Updater Class Reference

#include <Updater.h>

Inheritance diagram for Updater:

Public Slots

void checkForUpdates ()
 
void setUrl (const QString &url)
 
void setNotifyOnUpdate (const bool &notify)
 
void setNotifyOnFinish (const bool &notify)
 
void setModuleName (const QString &name)
 
void setModuleVersion (const QString &version)
 
void setDownloaderEnabled (const bool &enabled)
 
void setPlatformKey (const QString &platformKey)
 
void setUseCustomInstallProcedures (const bool &custom)
 

Signals

void checkingFinished (const QString &url)
 
void downloadFinished (const QString &url, const QString &filepath)
 

Public Member Functions

QString url () const
 
QString platformKey () const
 
bool notifyOnUpdate () const
 
bool notifyOnFinish () const
 
bool updateAvailable () const
 
bool downloaderEnabled () const
 
QString changelog () const
 
QString downloadUrl () const
 
QString latestVersion () const
 
QString moduleName () const
 
QString moduleVersion () const
 
bool useCustomInstallProcedures () const
 

Detailed Description

The Updater class is in charge of downloading and analyzing the appcast and "reacting" based on the options given by the user/developer/application.

Member Function Documentation

QString Updater::changelog ( ) const

Returns the latest changelog

void Updater::checkForUpdates ( )
slot

Downloads the update definitions file and analyzes it to determine the latest version and the download links

References url().

void Updater::checkingFinished ( const QString &  url)
signal

Emitted when the download definitions have been downloaded and analyzed.

Referenced by setModuleVersion().

bool Updater::downloaderEnabled ( ) const

Returns if the updater allows the integrated downloader to download and install the update (if aplicable).

Referenced by setModuleVersion().

void Updater::downloadFinished ( const QString &  url,
const QString &  filepath 
)
signal

Emitted when the download has finished. You can use this to implement your own procedures to install the downloaded updates.

QString Updater::downloadUrl ( ) const

Returns the URL from where we can download the update

Referenced by setModuleVersion().

QString Updater::latestVersion ( ) const

Returns the latest version online

Referenced by setModuleVersion().

QString Updater::moduleName ( ) const

Returns the application name, which can be set manually or automatically using the qApp->applicationName() function.

Referenced by setModuleVersion().

QString Updater::moduleVersion ( ) const

Returns the application version, which can be set manually or automatically using the qApp->applicationVersion() function.

Referenced by setModuleVersion().

bool Updater::notifyOnFinish ( ) const

Returns true if the class is set to notify the user when it finishes checking for updates (even if there are no updates available). By default this value is set to false.

Referenced by setModuleVersion().

bool Updater::notifyOnUpdate ( ) const

Returns true if the class is set to notify the user when an update is found online. By default this value is set to true.

Referenced by setModuleVersion().

QString Updater::platformKey ( ) const

Returns the current platform key, which is used to differentiate the different download links (and download versions) based on the current operating system.

You can modify this value with the setPlatformKey() function

Referenced by setModuleVersion(), and setPlatformKey().

void Updater::setDownloaderEnabled ( const bool &  enabled)
slot

If enabled is set to true, then the user will be able to download and install updates directly from the application, without the need of opening the download URL from a browser and manually installing the update.

void Updater::setModuleName ( const QString &  name)
slot

Changes the name of the module, this can be useful in large applications that only need to update certain components of them (e.g. plugins).

void Updater::setModuleVersion ( const QString &  version)
slot

Changes the version of the module, this can be useful in large applications that only need to update certain components of them (e.g. plugins).

References checkingFinished(), downloaderEnabled(), downloadUrl(), latestVersion(), moduleName(), moduleVersion(), notifyOnFinish(), notifyOnUpdate(), platformKey(), Downloader::startDownload(), updateAvailable(), and url().

void Updater::setNotifyOnFinish ( const bool &  notify)
slot

If set to true, the updater will notify the user when it finishes checking for updates (even where there are no updates available).

If set to false (default), the updater will only notify the user when there is an update available (if setNotifyOnUpdate() is true).

void Updater::setNotifyOnUpdate ( const bool &  notify)
slot

If notify is set to true, the QSimpleUpdater will notify the user when an update is available.

If notify is set to false, the QSimpleUpdater will not notify the user when an update is available.

void Updater::setPlatformKey ( const QString &  platformKey)
slot

Changes the platform key/id. This can be useful if the update depends on more than the underlying operating system on which the application runs.

References platformKey().

void Updater::setUrl ( const QString &  url)
slot

Changes the url from where we download the update definitions

References url().

void Updater::setUseCustomInstallProcedures ( const bool &  custom)
slot

If custom is set to true, then the Downloader will not attempt to open or install the downloaded updates. This can be useful if you want to implement your own install procedures using the downloadFinished() signal.

References Downloader::setUseCustomInstallProcedures().

bool Updater::updateAvailable ( ) const

Returns true if the updater found an updated version of the application/module online.

Referenced by setModuleVersion().

QString Updater::url ( ) const

Returns the AppCast URL (from which we extract the update definitions)

Referenced by checkForUpdates(), setModuleVersion(), and setUrl().

bool Updater::useCustomInstallProcedures ( ) const

Returns true if the downloader will not attempt to install the downloaded file.

This can be useful if you want to use the downloadFinished() signal to implement your own install procedures.

References Downloader::useCustomInstallProcedures().


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