Skip to content

Commit f9df553

Browse files
committed
updated gui doc
1 parent 3f47cab commit f9df553

File tree

5 files changed

+106
-212
lines changed

5 files changed

+106
-212
lines changed

doc/autoupdater.dox

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,69 @@ a gui and the Core-Library.
1616
- UpdateController
1717
- UpdateButton
1818
*/
19+
20+
/*!
21+
@page image_page Image Page
22+
23+
@brief Shows sample images for the updater for all the supported platforms
24+
@tableofcontents
25+
26+
# Images {#autoupdater_controller_images}
27+
## Windows - Windows 10 {#autoupdater_controller_images_win}
28+
### The Updater Elements {#autoupdater_controller_images_win_1}
29+
@image html win_dialog_ask.png "Ask Dialog"<br>
30+
@image html win_dialog_progress.png "Progress Dialog"<br>
31+
@image html win_dialog_no_updates.png "No Updates Dialog"<br>
32+
@image html win_dialog_info.png "Detailed Update Information Dialog"<br>
33+
@image html win_dialog_info_simple.png "Simple Update Information Dialog"<br>
34+
@image html win_dialog_exit.png "Automatic Run - Exit Notification Dialog"<br>
35+
36+
### The Update Button {#autoupdater_controller_images_win_2}
37+
@image html win_button_idle.png "Button before clicking"<br>
38+
@image html win_button_checking.png "Button while checking"<br>
39+
@image html win_button_updates.png "Button with updates"<br>
40+
@image html win_button_no_updates.png "Button without updates"<br>
41+
42+
### The Action {#autoupdater_controller_images_win_3}
43+
@image html win_action.png "Update action inside a menu and a toolbar"<br>
44+
45+
## Mac - OsX 10.11 {#autoupdater_controller_images_osx}
46+
The following pictures show the controller with a parent windows. Thus, all dialogs
47+
are shown as "sheets" to that window. If you create the UpdateController without a widget,
48+
they will show as normal toplevel windows instead.
49+
50+
### The Updater Elements {#autoupdater_controller_images_osx_1}
51+
@image html mac_dialog_ask.png "Ask Dialog"<br>
52+
@image html mac_dialog_progress.png "Progress Dialog"<br>
53+
@image html mac_dialog_no_updates.png "No Updates Dialog"<br>
54+
@image html mac_dialog_info.png "Detailed Update Information Dialog"<br>
55+
@image html mac_dialog_info_simple.png "Simple Update Information Dialog"<br>
56+
@image html mac_dialog_exit.png "Automatic Run - Exit Notification Dialog"<br>
57+
58+
### The Update Button {#autoupdater_controller_images_osx_2}
59+
@image html mac_button_idle.png "Button before clicking"<br>
60+
@image html mac_button_checking.png "Button while checking"<br>
61+
@image html mac_button_updates.png "Button with updates"<br>
62+
@image html mac_button_no_updates.png "Button without updates"<br>
63+
64+
### The Action {#autoupdater_controller_images_osx_3}
65+
@image html mac_action.png "Update action inside a menu and a toolbar"<br>
66+
67+
## X11 - Ubuntu 14.04 {#autoupdater_controller_images_x11}
68+
### The Updater Elements {#autoupdater_controller_images_x11_1}
69+
@image html x11_dialog_ask.png "Ask Dialog"<br>
70+
@image html x11_dialog_progress.png "Progress Dialog"<br>
71+
@image html x11_dialog_no_updates.png "No Updates Dialog"<br>
72+
@image html x11_dialog_info.png "Detailed Update Information Dialog"<br>
73+
@image html x11_dialog_info_simple.png "Simple Update Information Dialog"<br>
74+
@image html x11_dialog_exit.png "Automatic Run - Exit Notification Dialog"<br>
75+
76+
### The Update Button {#autoupdater_controller_images_x11_2}
77+
@image html x11_button_idle.png "Button before clicking"<br>
78+
@image html x11_button_checking.png "Button while checking"<br>
79+
@image html x11_button_updates.png "Button with updates"<br>
80+
@image html x11_button_no_updates.png "Button without updates"<br>
81+
82+
### The Action {#autoupdater_controller_images_x11_3}
83+
@image html x11_action.png "Update action inside a menu and a toolbar"<br>
84+
*/

doc/updatebutton.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ If `controller` is `nullptr`, the button will be disabled until you set a contro
103103

104104
The button will look like it looks after it's creation. Any progress or message will be reset.
105105
However, if the UpdateButton itself is disabled because of a missing controller, this will not be
106-
reset. Neither will the animation file or the display level be reset.
106+
reset. Neither will the animation file nor the display level be reset.
107107

108108
@note Calling this slot while the updater is running will still reset the button, but after the updater
109109
has finished, the button will show the result (if enabled).

doc/updatecontroller.dox

Lines changed: 7 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,3 @@
1-
/*!
2-
@page image_page Image Page
3-
4-
@brief Shows sample images for the updater for all the supported platforms
5-
@tableofcontents
6-
7-
# Images {#autoupdater_controller_images}
8-
## Windows - Windows 10 {#autoupdater_controller_images_win}
9-
### The Updater Elements {#autoupdater_controller_images_win_1}
10-
@image html win_dialog_ask.png "Ask Dialog"<br>
11-
@image html win_dialog_progress.png "Progress Dialog"<br>
12-
@image html win_dialog_no_updates.png "No Updates Dialog"<br>
13-
@image html win_dialog_info.png "Detailed Update Information Dialog"<br>
14-
@image html win_dialog_info_simple.png "Simple Update Information Dialog"<br>
15-
@image html win_dialog_exit.png "Automatic Run - Exit Notification Dialog"<br>
16-
17-
### The Update Button {#autoupdater_controller_images_win_2}
18-
@image html win_button_idle.png "Button before clicking"<br>
19-
@image html win_button_checking.png "Button while checking"<br>
20-
@image html win_button_updates.png "Button with updates"<br>
21-
@image html win_button_no_updates.png "Button without updates"<br>
22-
23-
### The Action {#autoupdater_controller_images_win_3}
24-
@image html win_action.png "Update action inside a menu and a toolbar"<br>
25-
26-
## Mac - OsX 10.11 {#autoupdater_controller_images_osx}
27-
The following pictures show the controller with a parent windows. Thus, all dialogs
28-
are shown as "sheets" to that window. If you create the UpdateController without a widget,
29-
they will show as normal toplevel windows instead.
30-
31-
### The Updater Elements {#autoupdater_controller_images_osx_1}
32-
@image html mac_dialog_ask.png "Ask Dialog"<br>
33-
@image html mac_dialog_progress.png "Progress Dialog"<br>
34-
@image html mac_dialog_no_updates.png "No Updates Dialog"<br>
35-
@image html mac_dialog_info.png "Detailed Update Information Dialog"<br>
36-
@image html mac_dialog_info_simple.png "Simple Update Information Dialog"<br>
37-
@image html mac_dialog_exit.png "Automatic Run - Exit Notification Dialog"<br>
38-
39-
### The Update Button {#autoupdater_controller_images_osx_2}
40-
@image html mac_button_idle.png "Button before clicking"<br>
41-
@image html mac_button_checking.png "Button while checking"<br>
42-
@image html mac_button_updates.png "Button with updates"<br>
43-
@image html mac_button_no_updates.png "Button without updates"<br>
44-
45-
### The Action {#autoupdater_controller_images_osx_3}
46-
@image html mac_action.png "Update action inside a menu and a toolbar"<br>
47-
48-
## X11 - Ubuntu 14.04 {#autoupdater_controller_images_x11}
49-
### The Updater Elements {#autoupdater_controller_images_x11_1}
50-
@image html x11_dialog_ask.png "Ask Dialog"<br>
51-
@image html x11_dialog_progress.png "Progress Dialog"<br>
52-
@image html x11_dialog_no_updates.png "No Updates Dialog"<br>
53-
@image html x11_dialog_info.png "Detailed Update Information Dialog"<br>
54-
@image html x11_dialog_info_simple.png "Simple Update Information Dialog"<br>
55-
@image html x11_dialog_exit.png "Automatic Run - Exit Notification Dialog"<br>
56-
57-
### The Update Button {#autoupdater_controller_images_x11_2}
58-
@image html x11_button_idle.png "Button before clicking"<br>
59-
@image html x11_button_checking.png "Button while checking"<br>
60-
@image html x11_button_updates.png "Button with updates"<br>
61-
@image html x11_button_no_updates.png "Button without updates"<br>
62-
63-
### The Action {#autoupdater_controller_images_x11_3}
64-
@image html x11_action.png "Update action inside a menu and a toolbar"<br>
65-
*/
66-
671
/*!
682
@class QtAutoUpdater::UpdateController
693

@@ -78,56 +12,6 @@ to do is starting this controller. This can be done in 4 ways:
7812
## Images
7913
For a full collection of all immages, please go to the @ref image_page "Image Page"
8014

81-
## Example
82-
This example will show you the full dialog flow of the controller. Both libraries are
83-
required for this example. Since there is no mainwindow in this example, you will only
84-
see the controller dialogs. Please not that you can control how much of that dialogset
85-
will be shown to the user. This example is *reduced*! for a full example with all parts
86-
of the controller, check the `Tests/WidgetsTest` application.
87-
88-
@attention Since this library requires the maintenancetool that is deployed with every
89-
Qt Installer Framework installation, the examples cannot be tested without a
90-
maintenancetool! If you intend to use this library, the maintenancetool will be
91-
available for your final application. For testing purpose or the examples, I set the
92-
path to the `MaintenanceTool` that is deployed with the installation of Qt (or any
93-
other maintenancetool). So make shure to adjust the path if you try to run the examples.
94-
95-
@code{.cpp}
96-
#include <QApplication>
97-
#include <updatecontroller.h>
98-
99-
int main(int argc, char *argv[])
100-
{
101-
QApplication a(argc, argv);
102-
//Since there is no mainwindow, the various dialogs should not quit the app
103-
QApplication::setQuitOnLastWindowClosed(false);
104-
//create the update controller with the application as parent -> will live long enough start the tool on exit
105-
//since the parent is not a widget, all dialogs will be top-level windows
106-
QtAutoUpdater::UpdateController *controller = new QtAutoUpdater::UpdateController("C:/Qt/MaintenanceTool", &a);//.exe is automatically added
107-
108-
QObject::connect(updater, &QtAutoUpdater::UpdateController::runningChanged, [updater](bool running) {
109-
qDebug() << "Running changed:" << running;
110-
//quit the application as soon as the updating finished
111-
if(!running)
112-
qApp->quit();
113-
});
114-
115-
//start the update check -> AskLevel to give the user maximum control
116-
controller->start(QtAutoUpdater::UpdateController::AskLevel);
117-
return a.exec();
118-
}
119-
@endcode
120-
121-
## Changing the update icon
122-
The controller uses one special icon in many of it's dialogs. This icon is a resource fail and can
123-
be replaced by overwriting the resource. Simply create an entry in a resource file with the following path:
124-
`:/QtAutoUpdater/icons/update.ico`. This way the controller will use your icon instead of the default one.
125-
The file type of the icon has to stay the same, i.e. `.ico`. Otherwise loading will fail.
126-
127-
@note This "replacement" is nothing I have implemented, but a result of how the resource system of Qt works. This may change
128-
in different version. If you intend to make use of it, please try it out! If this feature is requested without the "hack", I
129-
will add it in a future release.
130-
13115
@sa QtAutoUpdater::Updater, QtAutoUpdater::UpdateButton
13216
*/
13317

@@ -218,7 +102,7 @@ or not (owner-id == 0). It it belongs to root, the property will be set to `true
218102
otherwise to `false`. For windows, there is currently no easy way to get this information. And since
219103
programs are typically installed for all users, the default is `true`
220104

221-
@note This property will not modify already planned runs on exit. If you need to modify it,
105+
@attention This property will not modify already planned runs on exit. If you need to modify it,
222106
make shure to call this function before checking for updates, or use
223107
Updater::runUpdaterOnExit(AdminAuthoriser *) instead
224108

@@ -242,7 +126,7 @@ available). See Updater::runUpdaterOnExit(AdminAuthoriser *) for more details ab
242126
"running on exit". If UpdateController::runAsAdmin is set to `true`, the maintenancetool
243127
will be run with elevated rights.
244128

245-
@note This property will not modify already planned runs on exit. If you need to modify it,
129+
@attention This property will not modify already planned runs on exit. If you need to modify it,
246130
make shure to call this function before checking for updates, or use
247131
Updater::runUpdaterOnExit(AdminAuthoriser *) instead
248132

@@ -280,7 +164,6 @@ For a comparison how each of these dialogs looks on each platform, check the
280164
/*!
281165
@fn QtAutoUpdater::UpdateController::UpdateController(QObject *)
282166

283-
@overload
284167
@param parent The parent object. Will serve as parent for the controller
285168

286169
The created controller will not be bound to a specific window. Instead, all it's dialogs
@@ -293,20 +176,12 @@ required for the updater to show the maintenancetool as updater. One good approa
293176
shure the controller gets deleted and that it will happen after the signal is to use `qApp`
294177
as parent (QCoreApplication::instance()).
295178

296-
@overloads{
297-
@povElem{UpdateController(QObject *)}
298-
@povElem{UpdateController(QWidget *, QObject *)}
299-
@ovElem{UpdateController(const QString &, QObject *)}
300-
@ovElem{UpdateController(const QString &, QWidget *, QObject *)}
301-
}
302-
303-
@sa UpdateController::parentWindow
179+
@sa UpdateController::parentWindow, UpdateController::maintenanceToolPath
304180
*/
305181

306182
/*!
307183
@fn QtAutoUpdater::UpdateController::UpdateController(QWidget *, QObject *)
308184

309-
@overload
310185
@param parentWindow The parent window. Will serve as parent for the windows
311186
@param parent The parent object. Will serve as parent for the controller
312187

@@ -319,55 +194,21 @@ done using `parent`. If you set `parent` to anything but `nullptr`, make shure t
319194
lives long enough for the controller to receive the QCoreApplication::aboutToQuit signal,
320195
since thats required for the updater to show the maintenancetool as updater.
321196

322-
@overloads{
323-
@povElem{UpdateController(QObject *)}
324-
@povElem{UpdateController(QWidget *, QObject *)}
325-
@ovElem{UpdateController(const QString &, QObject *)}
326-
@ovElem{UpdateController(const QString &, QWidget *, QObject *)}
327-
}
328-
329-
@sa UpdateController::parentWindow
197+
@sa UpdateController::parentWindow, UpdateController::maintenanceToolPath
330198
*/
331199

332200
/*!
333201
@fn QtAutoUpdater::UpdateController::UpdateController(const QString &, QObject *)
334202

335-
@overload
336203
@param maintenanceToolPath The path to the maintenancetool
337-
@param parent The parent object. Will serve as parent for the controller
338-
339-
The maintenancetool path will be set to the given one (and cannot be changed). See
340-
UpdateController::maintenanceToolPath for more details.
341-
342-
@overloads{
343-
@povElem{UpdateController(QObject *)}
344-
@povElem{UpdateController(QWidget *, QObject *)}
345-
@ovElem{UpdateController(const QString &, QObject *)}
346-
@ovElem{UpdateController(const QString &, QWidget *, QObject *)}
347-
}
348-
349-
@sa UpdateController::parentWindow, UpdateController::maintenanceToolPath
204+
@copydetails UpdateController::UpdateController(QObject *)
350205
*/
351206

352207
/*!
353208
@fn QtAutoUpdater::UpdateController::UpdateController(const QString &, QWidget *, QObject *)
354209

355-
@overload
356210
@param maintenanceToolPath The path to the maintenancetool
357-
@param parentWindow The parent widget. Will serve as parent for the controller and windows
358-
@param parent The parent object. Will serve as parent for the controller
359-
360-
The maintenancetool path will be set to the given one (and cannot be changed). See
361-
UpdateController::maintenanceToolPath for more details.
362-
363-
@overloads{
364-
@povElem{UpdateController(QObject *)}
365-
@povElem{UpdateController(QWidget *, QObject *)}
366-
@ovElem{UpdateController(const QString &, QObject *)}
367-
@ovElem{UpdateController(const QString &, QWidget *, QObject *)}
368-
}
369-
370-
@sa UpdateController::parentWindow, UpdateController::maintenanceToolPath
211+
@copydetails UpdateController::UpdateController(QWidget *, QObject *)
371212
*/
372213

373214
/*!
@@ -400,8 +241,6 @@ unset the QAction::menuRole.
400241
/*!
401242
@fn QtAutoUpdater::UpdateController::setRunAsAdmin
402243

403-
<b>Property: UpdateController::runAsAdmin</b>
404-
405244
@param runAsAdmin `true`, if the maintenancetool should be run as admin/root, `false` to
406245
run it with the rights of the current user
407246
@param userEditable If set to `true`, the user can change this value in the info dialog.
@@ -425,7 +264,7 @@ object is `const` because manually changing the updater (e.g. by calling
425264
Updater::checkForUpdates) could break the controller and lead to a crash! You may only
426265
use this function to e.g. get extended error information.
427266

428-
@note Some functions, like Updater::abortUpdateCheck or Updater::cancelExitRun may be safe
267+
@note Some functions, like Updater::abortUpdateCheck or Updater::cancelExitRun could be safe
429268
to call, even though they are not `const` However, I will give no guarantee for any of the
430269
unconstant functions. If you need to do something like that, you can cast the returned
431270
pointer and try it out.
@@ -471,7 +310,6 @@ have no other choice but to wait for the user to close all those dialogs.
471310
/*!
472311
@fn QtAutoUpdater::UpdateController::scheduleUpdate(int , bool, DisplayLevel)
473312

474-
@overload
475313
@param delaySeconds The time (in seconds) to wait until the update is started
476314
@param repeated Specifies, whether the updater should be started every `delaySeconds`
477315
or only once
@@ -487,18 +325,12 @@ If the controller is already running while the task is triggered, nothing will h
487325
The scheduled update will only work if this same instance of the controller is still alive
488326
at that time.
489327

490-
@overloads{
491-
@ovElem{scheduleUpdate(int , bool, DisplayLevel)}
492-
@ovElem{scheduleUpdate(const QDateTime &, DisplayLevel)}
493-
}
494-
495328
@sa UpdateController::cancelScheduledUpdate, UpdateController::start
496329
*/
497330

498331
/*!
499332
@fn QtAutoUpdater::UpdateController::scheduleUpdate(const QDateTime &, DisplayLevel)
500333

501-
@overload
502334
@param when The timepoint where the update should be started
503335
@param displayLevel The display-level to be used by the controller
504336
@returns The internal ID of this update task. Can be used to cancel the task
@@ -512,11 +344,6 @@ If the controller is already running while the task is triggered, nothing will h
512344
The scheduled update will only work if this same instance of the controller is still alive
513345
at that time.
514346

515-
@overloads{
516-
@ovElem{scheduleUpdate(int , bool, DisplayLevel)}
517-
@ovElem{scheduleUpdate(const QDateTime &, DisplayLevel)}
518-
}
519-
520347
@sa UpdateController::cancelScheduledUpdate, UpdateController::start
521348
*/
522349

0 commit comments

Comments
 (0)