diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2020-05-08 16:38:15 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2020-06-11 12:19:06 +0300 |
commit | f6565bdc455d7b3a10941c29d780b58fc1305ef2 (patch) | |
tree | a9b11b7ba52e29ad845533303c85b4f69113ed92 /src/libs/installer/settings.cpp | |
parent | fc973b4c0b1b4e30ff69564565fd30e5ac18524a (diff) |
Add a page list widget to installer wizard
If an installer is configured with <WizardShowPageList> set to true
(default), a QListWidget set as a side widget for the wizard will be
shown. The list should indicate completed and incomplete pages and the
current wizard page. User navigation is not enabled in this change.
The page list should honor the visibility of individual pages and
update itself dynamically. In addition the visibility of a page in
page list widget can be set internally with setShowOnPageList() which
overrides other factors when hiding a page.
The page item title shown on the list can be set internally with
setPageListTitle() for the PackageManagerPage object, or the item can
alternatively use the normal page title and the object name.
Task-number: QTIFW-1755
Change-Id: I8a792d957a10e2176de5f42f29b1282e8e7667db
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/settings.cpp')
-rw-r--r-- | src/libs/installer/settings.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp index e6395e44c..97c20243d 100644 --- a/src/libs/installer/settings.cpp +++ b/src/libs/installer/settings.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -291,7 +291,7 @@ Settings Settings::fromFileAndPrefix(const QString &path, const QString &prefix, << scAllowSpaceInPath << scAllowNonAsciiCharacters << scDisableAuthorizationFallback << scDisableCommandLineInterface << scWizardStyle << scStyleSheet << scTitleColor - << scWizardDefaultWidth << scWizardDefaultHeight + << scWizardDefaultWidth << scWizardDefaultHeight << scWizardShowPageList << scRepositorySettingsPageVisible << scTargetConfigurationFile << scRemoteRepositories << scTranslations << scUrlQueryString << QLatin1String(scControlScript) << scCreateLocalRepository << scInstallActionColumnVisible << scSupportsModify << scAllowUnstableComponents @@ -455,7 +455,10 @@ static int lengthToInt(const QVariant &variant) int Settings::wizardDefaultWidth() const { - return lengthToInt(d->m_data.value(scWizardDefaultWidth)); + // Add a bit more sensible default width in case the page list widget is shown + // as it can take quite a lot horizontal space. A vendor can always override + // the default value. + return lengthToInt(d->m_data.value(scWizardDefaultWidth, wizardShowPageList() ? 800 : 0)); } int Settings::wizardDefaultHeight() const @@ -463,6 +466,11 @@ int Settings::wizardDefaultHeight() const return lengthToInt(d->m_data.value(scWizardDefaultHeight)); } +bool Settings::wizardShowPageList() const +{ + return d->m_data.value(scWizardShowPageList, true).toBool(); +} + QString Settings::installerApplicationIcon() const { return d->absolutePathFromKey(scInstallerApplicationIcon, systemIconSuffix()); |