From 519899850f86cb99cdd4c2f84f63ac2a28bfe193 Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Wed, 24 Jun 2020 08:00:52 +0300 Subject: Add possibility to add custom widget from script to certain position If several custom widgets are added to same page, the order of the widgets is arbitrary. Added a new member to addWizardPageItem which can define the position of the widget in the page, relative to another custom widgets. Non-custom widgets are always placed on top as before. Task-number: QTIFW-1847 Change-Id: Iadafef3a08e60a8b05b959cb06caea2a2042b419 Reviewed-by: Arttu Tarkiainen --- src/libs/installer/packagemanagercore.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libs/installer/packagemanagercore.h') diff --git a/src/libs/installer/packagemanagercore.h b/src/libs/installer/packagemanagercore.h index f67caeb64..87a14b93d 100644 --- a/src/libs/installer/packagemanagercore.h +++ b/src/libs/installer/packagemanagercore.h @@ -282,7 +282,8 @@ public: Q_INVOKABLE bool addWizardPage(QInstaller::Component *component, const QString &name, int page); Q_INVOKABLE bool removeWizardPage(QInstaller::Component *component, const QString &name); - Q_INVOKABLE bool addWizardPageItem(QInstaller::Component *component, const QString &name, int page); + Q_INVOKABLE bool addWizardPageItem(QInstaller::Component *component, const QString &name, + int page, int position = 100); Q_INVOKABLE bool removeWizardPageItem(QInstaller::Component *component, const QString &name); Q_INVOKABLE bool setDefaultPageVisible(int page, bool visible); Q_INVOKABLE void setValidatorForCustomPage(QInstaller::Component *component, const QString &name, @@ -354,7 +355,8 @@ Q_SIGNALS: void wizardPageInsertionRequested(QWidget *widget, QInstaller::PackageManagerCore::WizardPage page); void wizardPageRemovalRequested(QWidget *widget); - void wizardWidgetInsertionRequested(QWidget *widget, QInstaller::PackageManagerCore::WizardPage page); + void wizardWidgetInsertionRequested(QWidget *widget, QInstaller::PackageManagerCore::WizardPage page, + int position); void wizardWidgetRemovalRequested(QWidget *widget); void wizardPageVisibilityChangeRequested(bool visible, int page); void setValidatorForCustomPageRequested(QInstaller::Component *component, const QString &name, -- cgit v1.2.3