Skip to content

Commit e9cb86c

Browse files
committed
completed widgets gui doc
1 parent 6365d24 commit e9cb86c

File tree

6 files changed

+267
-391
lines changed

6 files changed

+267
-391
lines changed

doc/updatebutton.dox

Lines changed: 51 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,101 @@
11
/*!
22
@class QtAutoUpdater::UpdateButton
33

4-
The UpdateButton is a ready-made "button" to check for updates. It is connected to this
5-
controller and thus will automatically start checking for updates. Since the button itself
6-
shows a progress, no progress dialog is needed here. For images check the @ref qtautoupdater_image_page "Image Page".
4+
The UpdateButton is a ready-made "button" to check for updates. It is connected to an updater and
5+
thus will automatically start checking for updates. It will also display a progress and optionally
6+
allow canceling and installation of updates.
77

8-
The button will represent the controllers state and automatically enable/disable itself to
8+
The button will represent the updaters state and automatically enable/disable itself to
99
avoid start beeing called twice. In addition to that, the whole button widget will be disabled
10-
if the controller gets deleted while the button is still existings. (Even if it wasn't,
11-
it will not crash if the button is clicked).
10+
if the updater gets deleted while the button is still existant.
1211

13-
@sa QtAutoUpdater::UpdateController, UpdateController::createUpdateAction, @ref qtautoupdater_image_page "Image Page"
12+
@sa QtAutoUpdater::Updater, UpdateController::createUpdateAction,
13+
@ref qtautoupdater_image_page "Image Page"
1414
*/
1515

1616
/*!
17-
@property QtAutoUpdater::UpdateButton::animationFile
17+
@property QtAutoUpdater::UpdateButton::updater
1818

19-
@default{`:/QtAutoUpdater/icons/updateRunning.gif`}
19+
@default{`nullptr`}
2020

21-
The default file will show a simple idle animation. If this does not fit into your ui,
22-
you can use this property to specify a different animation source.
21+
The button can only be used if the updater was set, either directly or via the constructor. The
22+
button attaches to the updater and reacts on changes in it's state to react accordingly.
2323

2424
@accessors{
25-
@readAc{animationFile()}
26-
@writeAc{setAnimationFile()}
27-
@writeAc{setAnimationDevice()}
28-
@resetAc{resetAnimationFile()}
25+
@readAc{updater()}
26+
@writeAc{setUpdater()}
27+
@notifyAc{updaterChanged()}
2928
}
3029

31-
@sa @ref qtautoupdater_image_page "Image Page"
30+
@sa UpdateButton::mode
3231
*/
3332

3433
/*!
35-
@property QtAutoUpdater::UpdateButton::showResult
34+
@property QtAutoUpdater::UpdateButton::mode
3635

37-
@default{`true`}
36+
@default{`UpdateButton::ModeFlag::AllowAndShowAll`}
3837

39-
If set to `true`, after an update check, a short info text will be shown next to the button.
40-
It will tell the user whether updates are available or not. In addition to that, if updates
41-
are available, the button will be disabled.<br>
42-
If set to `false`, the button will not show any information after the update and return to the
43-
state it had before checking for updates - just a simple button.<br>
44-
In both cases, while the updater is running, the information will be shown as always.
38+
The mode is used to control the buttons behaviour. See UpdateButton::ModeFlag for details about what
39+
each mode does. By default, all features are enabled.
4540

4641
@accessors{
47-
@readAc{isShowingResult()}
48-
@writeAc{setShowResult()}
42+
@readAc{mode()}
43+
@writeAc{setMode()}
44+
@notifyAc{modeChanged()}
4945
}
5046

51-
@sa @ref qtautoupdater_image_page "Image Page", UpdateButton::animationFile
47+
@sa UpdateButton::ModeFlag
5248
*/
5349

5450
/*!
55-
@property QtAutoUpdater::UpdateButton::displayLevel
51+
@property QtAutoUpdater::UpdateButton::animationFile
5652

57-
@default{`UpdateController::ExtendedInfoLevel`}
53+
@default{`:/QtAutoUpdater/icons/updateRunning.gif`}
5854

59-
This will simply be used as parameter for UpdateController::start when the button is clicked.
55+
The default file will show a simple idle animation. If this does not fit the style of your ui, you
56+
can use this property to specify a different animation source.
6057

6158
@accessors{
62-
@readAc{displayLevel()}
63-
@writeAc{setDisplayLevel()}
59+
@readAc{animationFile()}
60+
@writeAc{setAnimationFile()}
61+
@writeAc{setAnimationDevice()}
62+
@resetAc{resetAnimationFile()}
63+
@notifyAc{animationFileChanged()}
6464
}
6565

66-
@sa UpdateController::start, UpdateController::DisplayLevel
66+
@sa @ref qtautoupdater_image_page "Image Page"
6767
*/
6868

6969
/*!
70-
@property QtAutoUpdater::UpdateButton::controller
71-
72-
@default{`nullptr`}
70+
@property QtAutoUpdater::UpdateButton::installMode
7371

74-
The button can only be used correctly if a controller is set. If no controller is set,
75-
the button will be disabled. Changing the controller will reset the buttons state. If the
76-
controller gets destroyed, the button will reset and disabled itself automatically.
72+
@default{`Updater::InstallModeFlag::Parallel`}
7773

78-
@note You can manually enable the button, even without a set controller. In this case, all that
79-
happens is nothing: The button will be there, but just nothing happens if it is clicked.
74+
The install mode to be passed to Updater::runUpdater, if the ModeFlag::AllowInstall flag is set and
75+
the user launches an installation via the button.
8076

8177
@accessors{
82-
@readAc{controller()}
83-
@writeAc{setController()}
84-
@notifyAc{controllerChanged()}
78+
@readAc{installMode()}
79+
@writeAc{setInstallMode()}
80+
@notifyAc{installModeChanged()}
8581
}
8682

87-
@sa QtAutoUpdater::UpdateController, UpdateButton::resetState
83+
@sa Updater::runUpdater, Updater::InstallModeFlag, UpdateButton::installScope
8884
*/
8985

9086
/*!
91-
@fn QtAutoUpdater::UpdateButton::UpdateButton
92-
93-
@param parent The parent widget of the button
94-
@param controller The UpdateController to be used by the button
95-
96-
If `controller` is `nullptr`, the button will be disabled until you set a controller manually.
87+
@property QtAutoUpdater::UpdateButton::installScope
9788

98-
@sa UpdateButton::controller
99-
*/
100-
101-
/*!
102-
@fn QtAutoUpdater::UpdateButton::resetState
89+
@default{`Updater::InstallScope::PreferInternal`}
10390

104-
The button will look like it looks after it's creation. Any progress or message will be reset.
105-
However, if the UpdateButton itself is disabled because of a missing controller, this will not be
106-
reset. Neither will the animation file nor the display level be reset.
91+
The install scope to be passed to Updater::runUpdater, if the ModeFlag::AllowInstall flag is set and
92+
the user launches an installation via the button.
10793

108-
@note Calling this slot while the updater is running will still reset the button, but after the updater
109-
has finished, the button will show the result (if enabled).
94+
@accessors{
95+
@readAc{installScope()}
96+
@writeAc{setInstallScope()}
97+
@notifyAc{installScopeChanged()}
98+
}
11099

111-
@sa UpdateButton::showResult, UpdateButton::animationFile, UpdateController::running
100+
@sa Updater::runUpdater, Updater::InstallScope, UpdateButton::installMode
112101
*/
113-

0 commit comments

Comments
 (0)