From 36a12f8d13e7e43fee4be09a1c87606b79b55e5c Mon Sep 17 00:00:00 2001 From: Alex Spataru Date: Fri, 8 Jul 2016 23:55:44 -0600 Subject: [PATCH] Add private documentation --- doc/config/doxyfile | 2 +- doc/output/html/class_downloader-members.html | 22 +- doc/output/html/class_downloader.html | 302 +++++++++++++++++- .../html/class_q_simple_updater-members.html | 19 +- doc/output/html/class_q_simple_updater.html | 74 +++-- doc/output/html/class_updater-members.html | 47 ++- doc/output/html/class_updater.html | 181 ++++++++++- doc/output/html/functions.html | 51 +++ doc/output/html/functions_func.html | 51 +++ doc/output/html/search/all_0.js | 6 +- doc/output/html/search/all_2.js | 3 +- doc/output/html/search/all_3.js | 3 +- doc/output/html/search/all_7.js | 4 +- doc/output/html/search/all_8.js | 2 +- doc/output/html/search/all_9.js | 10 +- doc/output/html/search/all_a.js | 6 +- doc/output/html/search/all_b.html | 26 ++ doc/output/html/search/all_b.js | 13 + doc/output/html/search/all_c.html | 26 ++ doc/output/html/search/all_c.js | 9 + doc/output/html/search/functions_0.js | 6 +- doc/output/html/search/functions_2.js | 3 +- doc/output/html/search/functions_3.js | 2 +- doc/output/html/search/functions_4.js | 3 +- doc/output/html/search/functions_5.js | 4 +- doc/output/html/search/functions_6.js | 3 +- doc/output/html/search/functions_7.js | 12 +- doc/output/html/search/functions_8.js | 5 +- doc/output/html/search/functions_9.html | 26 ++ doc/output/html/search/functions_9.js | 4 + doc/output/html/search/functions_a.html | 26 ++ doc/output/html/search/functions_a.js | 13 + doc/output/html/search/functions_b.html | 26 ++ doc/output/html/search/functions_b.js | 8 + doc/output/html/search/searchdata.js | 4 +- 35 files changed, 897 insertions(+), 105 deletions(-) create mode 100644 doc/output/html/search/all_b.html create mode 100644 doc/output/html/search/all_b.js create mode 100644 doc/output/html/search/all_c.html create mode 100644 doc/output/html/search/all_c.js create mode 100644 doc/output/html/search/functions_9.html create mode 100644 doc/output/html/search/functions_9.js create mode 100644 doc/output/html/search/functions_a.html create mode 100644 doc/output/html/search/functions_a.js create mode 100644 doc/output/html/search/functions_b.html create mode 100644 doc/output/html/search/functions_b.js diff --git a/doc/config/doxyfile b/doc/config/doxyfile index fab6ac5..61275ba 100644 --- a/doc/config/doxyfile +++ b/doc/config/doxyfile @@ -432,7 +432,7 @@ EXTRACT_ALL = NO # be included in the documentation. # The default value is: NO. -EXTRACT_PRIVATE = NO +EXTRACT_PRIVATE = YES # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. diff --git a/doc/output/html/class_downloader-members.html b/doc/output/html/class_downloader-members.html index ffd4911..4afb637 100644 --- a/doc/output/html/class_downloader-members.html +++ b/doc/output/html/class_downloader-members.html @@ -91,10 +91,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

This is the complete list of members for Downloader, including all inherited members.

- - - - + + + + + + + + + + + + + + + + + +
Downloader(QWidget *parent=0) (defined in Downloader)Downloaderexplicit
downloadFinished(const QString &url, const QString &filepath) (defined in Downloader)Downloadersignal
setUseCustomInstallProcedures(const bool &custom)Downloaderslot
startDownload(const QUrl &url)Downloaderslot
calculateSizes(qint64 received, qint64 total)Downloaderprivateslot
calculateTimeRemaining(qint64 received, qint64 total)Downloaderprivateslot
cancelDownload()Downloaderprivateslot
Downloader(QWidget *parent=0) (defined in Downloader)Downloaderexplicit
downloadFinished(const QString &url, const QString &filepath) (defined in Downloader)Downloadersignal
installUpdate()Downloaderprivateslot
m_filePath (defined in Downloader)Downloaderprivate
m_manager (defined in Downloader)Downloaderprivate
m_reply (defined in Downloader)Downloaderprivate
m_startTime (defined in Downloader)Downloaderprivate
m_ui (defined in Downloader)Downloaderprivate
m_useCustomProcedures (defined in Downloader)Downloaderprivate
onDownloadFinished()Downloaderprivateslot
openDownload()Downloaderprivateslot
round(const qreal &input)Downloaderprivate
setUseCustomInstallProcedures(const bool &custom)Downloaderslot
startDownload(const QUrl &url)Downloaderslot
updateProgress(qint64 received, qint64 total)Downloaderprivateslot
useCustomInstallProcedures() const Downloader
~Downloader() (defined in Downloader)Downloader
diff --git a/doc/output/html/class_downloader.html b/doc/output/html/class_downloader.html index 12e5b2a..6557dfe 100644 --- a/doc/output/html/class_downloader.html +++ b/doc/output/html/class_downloader.html @@ -88,6 +88,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); Public Slots | Signals | Public Member Functions | +Private Slots | +Private Member Functions | +Private Attributes | List of all members
Downloader Class Reference
@@ -127,10 +130,264 @@ Public Member Functions   bool useCustomInstallProcedures () const   + + + + + + + + + + + + + + + + +

+Private Slots

void openDownload ()
 
void installUpdate ()
 
void cancelDownload ()
 
void onDownloadFinished ()
 
void calculateSizes (qint64 received, qint64 total)
 
void updateProgress (qint64 received, qint64 total)
 
void calculateTimeRemaining (qint64 received, qint64 total)
 
+ + + +

+Private Member Functions

qreal round (const qreal &input)
 
+ + + + + + + + + + + + +

+Private Attributes

+uint m_startTime
 
+QString m_filePath
 
+Ui::Downloader * m_ui
 
+QNetworkReply * m_reply
 
+bool m_useCustomProcedures
 
+QNetworkAccessManager * m_manager
 

Detailed Description

Implements an integrated file downloader with a nice UI.

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void Downloader::calculateSizes (qint64 received,
qint64 total 
)
+
+privateslot
+
+

Calculates the appropiate size units (bytes, KB or MB) for the received data and the total download size. Then, this function proceeds to update the dialog controls/UI.

+ +

References round().

+ +

Referenced by updateProgress().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void Downloader::calculateTimeRemaining (qint64 received,
qint64 total 
)
+
+privateslot
+
+

Uses two time samples (from the current time and a previous sample) to calculate how many bytes have been downloaded.

+

Then, this function proceeds to calculate the appropiate units of time (hours, minutes or seconds) and constructs a user-friendly string, which is displayed in the dialog.

+ +

Referenced by updateProgress().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void Downloader::cancelDownload ()
+
+privateslot
+
+

Prompts the user if he/she wants to cancel the download and cancels the download if the user agrees to do that.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void Downloader::installUpdate ()
+
+privateslot
+
+

Instructs the OS to open the downloaded file.

+
Note
If useCustomInstallProcedures() returns true, the function will not instruct the OS to open the downloaded file. You can use the signals fired by the QSimpleUpdater to install the update with your own implementations/code.
+ +

References openDownload(), and useCustomInstallProcedures().

+ +

Referenced by onDownloadFinished().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void Downloader::onDownloadFinished ()
+
+privateslot
+
+

Writes the downloaded data to a temp. directory and updates the UI controls.

Note
If the function detects that the downloaded data is an HTML file (e.g. a redirection notice from the server), the function will add the *.html extension to the downloaded file. This ensures that the download will be resumed when the OS opens a web-browser with the redirection notice.
+ +

References installUpdate().

+ +

Referenced by startDownload().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
void Downloader::openDownload ()
+
+privateslot
+
+

Opens the downloaded file.

Note
If the downloaded file is not found, then the function will alert the user about the error.
+ +

Referenced by installUpdate().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
qreal Downloader::round (const qreal & input)
+
+private
+
+

Rounds the given input to two decimal places

+ +

Referenced by calculateSizes().

+ +
+
@@ -182,9 +439,48 @@ Public Member Functions

Begins downloading the file at the given url

-

References useCustomInstallProcedures().

+

References onDownloadFinished(), and updateProgress().

-

Referenced by Updater::setUseCustomInstallProcedures().

+

Referenced by Updater::setUpdateAvailable().

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void Downloader::updateProgress (qint64 received,
qint64 total 
)
+
+privateslot
+
+

Uses the received and total parameters to get the download progress and update the progressbar value on the dialog.

+ +

References calculateSizes(), and calculateTimeRemaining().

+ +

Referenced by startDownload().

@@ -202,7 +498,7 @@ Public Member Functions

Returns true if the updater shall not intervene when the download has finished (you can use the QSimpleUpdater signals to know when the download is completed).

-

Referenced by startDownload(), and Updater::useCustomInstallProcedures().

+

Referenced by installUpdate(), and Updater::useCustomInstallProcedures().

diff --git a/doc/output/html/class_q_simple_updater-members.html b/doc/output/html/class_q_simple_updater-members.html index 100b54c..3ef5384 100644 --- a/doc/output/html/class_q_simple_updater-members.html +++ b/doc/output/html/class_q_simple_updater-members.html @@ -105,15 +105,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); getNotifyOnUpdate(const QString &url) const QSimpleUpdater getPlatformKey(const QString &url) const QSimpleUpdater getUpdateAvailable(const QString &url) const QSimpleUpdater - setDownloaderEnabled(const QString &url, const bool &enabled)QSimpleUpdaterslot - setModuleName(const QString &url, const QString &name)QSimpleUpdaterslot - setModuleVersion(const QString &url, const QString &version)QSimpleUpdaterslot - setNotifyOnFinish(const QString &url, const bool &notify)QSimpleUpdaterslot - setNotifyOnUpdate(const QString &url, const bool &notify)QSimpleUpdaterslot - setPlatformKey(const QString &url, const QString &platform)QSimpleUpdaterslot - setUseCustomInstallProcedures(const QString &url, const bool &custom)QSimpleUpdaterslot - usesCustomInstallProcedures(const QString &url) const QSimpleUpdater - ~QSimpleUpdater() (defined in QSimpleUpdater)QSimpleUpdaterprotected + getUpdater(const QString &url) const QSimpleUpdaterprivate + setDownloaderEnabled(const QString &url, const bool &enabled)QSimpleUpdaterslot + setModuleName(const QString &url, const QString &name)QSimpleUpdaterslot + setModuleVersion(const QString &url, const QString &version)QSimpleUpdaterslot + setNotifyOnFinish(const QString &url, const bool &notify)QSimpleUpdaterslot + setNotifyOnUpdate(const QString &url, const bool &notify)QSimpleUpdaterslot + setPlatformKey(const QString &url, const QString &platform)QSimpleUpdaterslot + setUseCustomInstallProcedures(const QString &url, const bool &custom)QSimpleUpdaterslot + usesCustomInstallProcedures(const QString &url) const QSimpleUpdater + ~QSimpleUpdater() (defined in QSimpleUpdater)QSimpleUpdaterprotected