diff options
author | Katja Marttila <katja.marttila@qt.io> | 2020-06-24 08:00:52 +0300 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2020-06-25 12:16:25 +0300 |
commit | 519899850f86cb99cdd4c2f84f63ac2a28bfe193 (patch) | |
tree | 319e17fa14ec946c85d4895fdba905ec6225ce41 /src/libs/installer/packagemanagercore.h | |
parent | 7ab5e03c384f0a9364697743bd274486b1b6c2dd (diff) |
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 <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src/libs/installer/packagemanagercore.h')
-rw-r--r-- | src/libs/installer/packagemanagercore.h | 6 |
1 files changed, 4 insertions, 2 deletions
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, |