@@ -354,3 +354,197 @@ change them)
354354
355355@sa UpdateController::runAsAdmin
356356*/
357+
358+ /*!
359+ @fn QtAutoUpdater::UpdateController::getUpdater
360+
361+ @returns The Updater object this controller uses internally to check for updates
362+
363+ The returned object is owned by the controller and should not be deleted. The returned
364+ object is `const` because manually changing the updater (e.g. by calling
365+ Updater::checkForUpdates) could break the controller and lead to a crash! You may only
366+ use this function to e.g. get extended error information.
367+
368+ @note Some functions, like Updater::abortUpdateCheck or Updater::cancelExitRun may be safe
369+ to call, even though they are not `const` However, I will give no guarantee for any of the
370+ unconstant functions. If you need to do something like that, you can cast the returned
371+ point and try it out.
372+
373+ @sa Updater
374+ */
375+
376+ /*!
377+ @fn QtAutoUpdater::UpdateController::parentWidget
378+
379+ @returns The parent widget, if available
380+
381+ This function will only return a value if the parent of the updater is a widget. If thats
382+ not the case, `NULL` will be returned.
383+
384+ @note Even if `NULL` is returned, the controller can have an object parent. Check
385+ QObject::parent if you want to now whether the controller has any parent or not.
386+
387+ @sa QObject::parent, UpdateController::setParent(QWidget *), UpdateController::setParent(QObject *)
388+ */
389+
390+ /*!
391+ @fn QtAutoUpdater::UpdateController::setParent(QWidget *)
392+
393+ @overload
394+ @param parent The new parent widget for the controller and it's windows
395+
396+ Sets the parent for this object to `parent` **and** sets `parent` to be the parent window for
397+ all dialogs of the controller.
398+
399+ @overloads{
400+ @ovElem{setParent(QWidget *)}
401+ @ovElem{setParent(QObject *)}
402+ }
403+
404+ @sa QObject::parent, UpdateController::parentWidget, UpdateController::UpdateController(QWidget *)
405+ */
406+
407+ /*!
408+ @fn QtAutoUpdater::UpdateController::setParent(QObject *)
409+
410+ @overload
411+ @param parent The new parent object for the controller
412+
413+ Sets the parent for this object to `parent` **and** sets parent widget of all the
414+ controllers dialogs to `NULL`! This means they will become top-level windows without a
415+ parent.
416+
417+ @overloads{
418+ @ovElem{setParent(QWidget *)}
419+ @ovElem{setParent(QObject *)}
420+ }
421+
422+ @sa QObject::parent, UpdateController::parentWidget, UpdateController::UpdateController(QObject *)
423+ */
424+
425+ /*!
426+ @fn QtAutoUpdater::UpdateController::start
427+
428+ @param displayLevel The DisplayLevel to be used for this run
429+ @return `true`, if the controller started, `false` if it already was running
430+
431+ start will only work if the updater isn't already running, but if it isn't, this function
432+ will always succeed.
433+
434+ @note This function will not return until the maintenancetool has started checking for
435+ updates (or immediatly if already running). If the level is for example
436+ UpdateController::AskLevel, this function will block while the question box is shown to
437+ the user.
438+
439+ @sa UpdateController::running, UpdateController::cancelUpdate
440+ */
441+
442+ /*!
443+ @fn QtAutoUpdater::UpdateController::cancelUpdate
444+
445+ @param maxDelay the maximal (asynchrounus) delay to wait
446+ @return `true`, if the canceling was started, `false` if not
447+
448+ This function will only return `true` if the canceling was **started** successfully. It
449+ will not wait for the controller to be actually canceled. However, you can be shure that
450+ the controller will be canceled before `maxDelay` has passed.
451+
452+ If `false` is returned, this can either mean that the controller is currently not running
453+ (user UpdateController::running to check that) or that it is showing an "uncancelable" dialog
454+ to the user (Any dialog but the progress dialog is "uncancelable"). If thats the case, you
455+ have no other choice but to wait for the user to close all those dialogs.
456+
457+ @sa UpdateController::running, UpdateController::start
458+ */
459+
460+ /*!
461+ @fn QtAutoUpdater::UpdateController::scheduleUpdate(qint64 , bool, DisplayLevel)
462+
463+ @overload
464+ @param delayMinutes The time (in minutes) to wait until the update is started
465+ @param repeated Specifies, whether the updater should be started every `delayMinutes`
466+ or only once
467+ @param displayLevel The display-level to be used by the controller
468+ @returns The internal ID of this update task. Can be used to cancel the task
469+
470+ Schedules an update to be run after `delayMinutes` minutes. If `repeated` is `true`, the
471+ controller will not just be run once, but every `delayMinutes` minutes (infinitly, until
472+ this instance is destroyed or the task canceled).
473+
474+ @overloads{
475+ @povElem{scheduleUpdate(UpdateTask *, DisplayLevel)}
476+ @ovElem{scheduleUpdate(qint64 , bool, DisplayLevel)}
477+ @ovElem{scheduleUpdate(const QDateTime &, DisplayLevel)}
478+ }
479+
480+ @sa UpdateController::cancelScheduledUpdate, BasicLoopUpdateTask, UpdateController::start
481+ */
482+
483+ /*!
484+ @fn QtAutoUpdater::UpdateController::scheduleUpdate(const QDateTime &, DisplayLevel)
485+
486+ @overload
487+ @param when The timepoint where the update should be started
488+ @param displayLevel The display-level to be used by the controller
489+ @returns The internal ID of this update task. Can be used to cancel the task
490+
491+ Schedules an update to be run at `when`. If `when` lays in the past, nothing will happen.
492+ The update will be started once that time is reached (assuming that this controller instance
493+ is still alive at that timepoint).
494+
495+ @overloads{
496+ @povElem{scheduleUpdate(UpdateTask *, DisplayLevel)}
497+ @ovElem{scheduleUpdate(qint64 , bool, DisplayLevel)}
498+ @ovElem{scheduleUpdate(const QDateTime &, DisplayLevel)}
499+ }
500+
501+ @sa UpdateController::cancelScheduledUpdate, TimePointUpdateTask, UpdateController::start
502+ */
503+
504+ /*!
505+ @fn QtAutoUpdater::UpdateController::scheduleUpdate(UpdateTask *, DisplayLevel)
506+
507+ @overload
508+ @param task The task to be scheduled
509+ @param displayLevel The display-level to be used by the controller
510+ @returns The internal ID of this update task. Can be used to cancel the task
511+
512+ Uses `task` to schedule updates. For more details about the different tasks, check
513+ the UpdateTask documentation.
514+
515+ @warning The scheduler will take ownership of `task`. Since `task` will be used in a
516+ different thread, you must not access it after passing it to this function
517+
518+ Scheduling an update means that the controller will use the UpdateScheduler to schedule an
519+ update. as soons as the UpdateTask reached the point where it "matched" (meets the
520+ timepoint it was scheduled for), the scheduler will notify the controller, and the
521+ controller will autmatically start checking for updates.
522+
523+ @note After scheduling the update, you will have no way to take track of the schedule.
524+ If the controller is already running while the task is triggered, nothing will happend.
525+
526+ To cancel the update task, call UpdateController::cancelScheduledUpdate.
527+
528+ @overloads{
529+ @povElem{scheduleUpdate(UpdateTask *, DisplayLevel)}
530+ @ovElem{scheduleUpdate(qint64 , bool, DisplayLevel)}
531+ @ovElem{scheduleUpdate(const QDateTime &, DisplayLevel)}
532+ }
533+
534+ @sa UpdateController::cancelScheduledUpdate, UpdateTask, UpdateController::start
535+ */
536+
537+ /*!
538+ @fn QtAutoUpdater::UpdateController::cancelScheduledUpdate
539+
540+ @param taskId The id of the task to be canceled
541+
542+ Cancels the task with the id `taskId`. If there was a task with that ID, you can be shure
543+ that it will be canceled.
544+
545+ @attention The canceling will happen, but may be a little delayed (because of
546+ multithreading). This means that it's possible that a canceled task fires one or more
547+ updates that have reached their timepoint before they could be canceled.
548+
549+ @sa UpdateController::scheduleUpdate(UpdateTask *, DisplayLevel)
550+ */
0 commit comments