@@ -118,6 +118,17 @@ int main(int argc, char *argv[])
118118@endcode
119119*/
120120
121+ /*!
122+ @enum QtAutoUpdater::UpdateController::DisplayLevel
123+
124+ The display level controlls the kind of dialogs shown to the user. Levels are ranked from
125+ the lowest (`AutomaticLevel = 0`) to the highest (`AskLevel = 5`). Each Level includes all
126+ levels with a smaller value, i.e. using the `AskLevel` will add the ask dialog to everything
127+ shown with `ProgressLevel`, but not less.
128+
129+ @sa @ref image_page "Image Page"
130+ */
131+
121132/*!
122133@property QtAutoUpdater::UpdateController::maintenanceToolPath
123134
@@ -136,7 +147,7 @@ documentation of that property for more details.
136147*/
137148
138149/*!
139- @property QtAutoUpdater::Updater ::running
150+ @property QtAutoUpdater::UpdateController ::running
140151
141152@default{`false`}
142153
@@ -154,7 +165,7 @@ property of the attached updater can return `false` while this one returns `true
154165*/
155166
156167/*!
157- @property QtAutoUpdater::Updater ::runAsAdmin
168+ @property QtAutoUpdater::UpdateController ::runAsAdmin
158169
159170@default{`true`}
160171
@@ -169,7 +180,177 @@ the write accessor function of this property.
169180@accessors{
170181 @readAc{runAsAdmin()}
171182 @writeAc{setRunAsAdmin()}
183+ @notifyAc{runAsAdminChanged()}
172184}
173185
174- @sa UpdateController::getUpdater, UpdateController::start, UpdateController::cancelUpdate
186+ @sa UpdateController::setRunAsAdmin, UpdateController::updateRunArgs
187+ */
188+
189+ /*!
190+ @property QtAutoUpdater::UpdateController::updateRunArgs
191+
192+ @default{`{"--updater"}`}
193+
194+ These arguments will be used to invoke the updater with it on exit (if updates are
195+ available). See Updater::runUpdaterOnExit(AdminAuthoriser *) for more details about
196+ "running on exit". If UpdateController::runAsAdmin is set to `true`, the maintenancetool
197+ will be run with elevated rights.
198+
199+ @accessors{
200+ @readAc{updateRunArgs()}
201+ @writeAc{setUpdateRunArgs()}
202+ @resetAc{resetUpdateRunArgs()}
203+ }
204+
205+ @sa UpdateController::runAsAdmin, Updater::runUpdaterOnExit(AdminAuthoriser *)
206+ */
207+
208+ /*!
209+ @fn QtAutoUpdater::UpdateController::UpdateController(QObject *)
210+
211+ @overload
212+ @param parent The parent object. Will serve as parent for the controller
213+
214+ The created controller will not be bound to a specific window. Instead, all it's dialogs
215+ will be top-level windows without a parent and application modal.
216+
217+ @note If you set `parent` to anything but `NULL`, make shure the parent object lives long
218+ enough for the controller to receive the QCoreApplication::aboutToQuit signal, since thats
219+ required for the updater to show the maintenancetool as updater.
220+
221+ @overloads{
222+ @povElem{UpdateController(QObject *)}
223+ @povElem{UpdateController(QWidget *)}
224+ @ovElem{UpdateController(const QString &, QObject *)}
225+ @ovElem{UpdateController(const QString &, QWidget *)}
226+ }
227+
228+ @sa QObject::parent, UpdateController::setParent(QObject *)
229+ */
230+
231+ /*!
232+ @fn QtAutoUpdater::UpdateController::UpdateController(QWidget *)
233+
234+ @overload
235+ @param parentWidget The parent widget. Will serve as parent for the controller and windows
236+
237+ The created controller will be bound to the widget. This means all dialogs will be child
238+ windows of the widgets window. On Mac, dialogs will be shown as "Sheets" of the parent
239+ window.
240+
241+ @note If you set `parent` to anything but `NULL`, make shure the parent object lives long
242+ enough for the controller to receive the QCoreApplication::aboutToQuit signal, since thats
243+ required for the updater to show the maintenancetool as updater.
244+
245+ @overloads{
246+ @povElem{UpdateController(QObject *)}
247+ @povElem{UpdateController(QWidget *)}
248+ @ovElem{UpdateController(const QString &, QObject *)}
249+ @ovElem{UpdateController(const QString &, QWidget *)}
250+ }
251+
252+ @sa UpdateController::parentWidget, UpdateController::setParent(QWidget *)
253+ */
254+
255+ /*!
256+ @fn QtAutoUpdater::UpdateController::UpdateController(const QString &, QObject *)
257+
258+ @overload
259+ @param maintenanceToolPath The path to the maintenancetool
260+ @param parent The parent object. Will serve as parent for the controller
261+
262+ The maintenancetool path will be set to the given one (and cannot be changed). See
263+ UpdateController::maintenanceToolPath for more details.
264+
265+ @overloads{
266+ @povElem{UpdateController(QObject *)}
267+ @povElem{UpdateController(QWidget *)}
268+ @ovElem{UpdateController(const QString &, QObject *)}
269+ @ovElem{UpdateController(const QString &, QWidget *)}
270+ }
271+
272+ @sa QObject::parent, UpdateController::setParent(QObject *), UpdateController::maintenanceToolPath
273+ */
274+
275+ /*!
276+ @fn QtAutoUpdater::UpdateController::UpdateController(const QString &, QWidget *)
277+
278+ @overload
279+ @param maintenanceToolPath The path to the maintenancetool
280+ @param parentWidget The parent widget. Will serve as parent for the controller and windows
281+
282+ The maintenancetool path will be set to the given one (and cannot be changed). See
283+ UpdateController::maintenanceToolPath for more details.
284+
285+ @overloads{
286+ @povElem{UpdateController(QObject *)}
287+ @povElem{UpdateController(QWidget *)}
288+ @ovElem{UpdateController(const QString &, QObject *)}
289+ @ovElem{UpdateController(const QString &, QWidget *)}
290+ }
291+
292+ @sa UpdateController::parentWidget, UpdateController::setParent(QWidget *), UpdateController::maintenanceToolPath
293+ */
294+
295+ /*!
296+ @fn QtAutoUpdater::UpdateController::getUpdateAction
297+
298+ @returns The action associated with this controller
299+
300+ The action will automatically start the controller with the display-level
301+ `UpdateController::ProgressLevel`. In addition to that, the action will be automatically
302+ disabled if the controller is already running. For images check the
303+ @ref image_page "Image Page".
304+
305+ The action has a text, an icon and a tooltip. The icon is set to be only visibile in a
306+ toolbar, not in a menu. On Mac, the action will be place in the Applications menu if
307+ added to the Menubar.
308+
309+ @attention This function will always return the same QAction object for each controller.
310+ Thus, you may never delete the action. It will be deleted on destruction of the the
311+ controller. Take in mind that any change you make to this action (for example change the
312+ icon) will thus be that way for *all* components that use this action.
313+
314+ @sa UpdateController::createUpdatePanel, @ref image_page "Image Page"
315+ */
316+
317+ /*!
318+ @fn QtAutoUpdater::UpdateController::createUpdatePanel
319+
320+ @param parentWidget The parent widget of the update panel widget
321+ @returns The action associated with this controller
322+
323+ The UpdatePanel is a ready-made "button" to check for updates. It is connected to this
324+ controller and thus will automatically start checking for updates with the level
325+ `UpdateController::ExtendedInfoLevel`. Since the panel itself shows a progress, no progress
326+ dialog is needed here. For images check the @ref image_page "Image Page".
327+
328+ The panel will represent the controllers state and automatically enable/disable itself to
329+ avoid start beeing called twice. In addition to that, the whole panel widget will be disabled
330+ if the controller gets deleted while the panel is still existings. (Even if it wasn't,
331+ it will not crash if the button is clicked).
332+
333+ @note The UpdatePanel class itself is an internal class. Reason: It directly derives from
334+ QWidget and does not add any new public accessible functions. Thus, even if the class would
335+ be returned, there would be no difference to a QWidget except of the pointer type.
336+
337+ @sa UpdateController::getUpdateAction, @ref image_page "Image Page"
338+ */
339+
340+ /*!
341+ @fn QtAutoUpdater::UpdateController::setRunAsAdmin
342+
343+ <b>Property: UpdateController::runAsAdmin</b>
344+
345+ @param runAsAdmin `true`, if the maintenancetool should be run as admin/root, `false` to
346+ run it with the rights of the current user
347+ @param userEditable If set to `true`, the user can change this value in the info dialog.
348+ If set to `false`, he will not be able to do so
349+
350+ The second parameter allows you to disable the change of this property by the user. If
351+ `userEditable` is true, the user can check/uncheck a checkbox in the info dialog. If
352+ `false`, this checkbox will be disabled. (The user can see the required rights, but not
353+ change them)
354+
355+ @sa UpdateController::runAsAdmin
175356*/
0 commit comments