From f4ec5b8ef15b2574076b4f3d0dabb6e42d8bdb22 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Thu, 22 May 2025 11:46:16 +0300 Subject: Add possibility to add warning labels from script Introducing new invokable methods, addWizardPageWarning() and removeWizardPageWarning() to add and remove warning messages to existing pages. Warning messages can be added also with existing addWizardPageItem() -function, but the new method utilizes the LabelWithPixmap -class, which draws a warning image and a label with text wrapped. Task-number: QTIFW-3555 Change-Id: Ie7867d369762f7616ce8c7ca47d102111d651da5 Reviewed-by: Arttu Tarkiainen --- doc/scripting-api/packagemanagercore.qdoc | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc/scripting-api') diff --git a/doc/scripting-api/packagemanagercore.qdoc b/doc/scripting-api/packagemanagercore.qdoc index e24ee9f16..ad6fb53cd 100644 --- a/doc/scripting-api/packagemanagercore.qdoc +++ b/doc/scripting-api/packagemanagercore.qdoc @@ -556,6 +556,35 @@ \sa addWizardPageItem() */ +/*! + \qmlmethod boolean installer::addWizardPageWarning(string message, + int page, string id, int position) + + Adds a warning label into the installer's GUI wizard. The label is added on + \a page ordered by \a position number. If several widgets are added to the same + page, the widget with lower \a position number will be inserted on top. The label + is identified with \a id. + + See \l{Controller Scripting} for the possible values of \a page. + + If the installation is not a command line install, returns \c true and emits the + wizardPageWarningInsertionRequested() signal. + + \sa removeWizardPageWarning(), wizardPageWarningInsertionRequested() +*/ + +/*! + \fn boolean removeWizardPageWarning(string id) + + Removes the widget with the identification \a id, previously added to the + installer's wizard by addWarningMessage(). + + If the installation is not a command line install, returns \c true and + emits the wizardPageWarningRemovalRequested() signal. + + \sa addWizardPageWarning() +*/ + /*! \qmlmethod void installer::addUserRepositories(stringlist repositories) -- cgit v1.2.3