ComponentSelectionPage Class

class QInstaller::ComponentSelectionPage

The ComponentSelectionPage class changes the checked state of components. More...

Header: #include <ComponentSelectionPage>
Inherits: QInstaller::PackageManagerPage

Public Functions

ComponentSelectionPage(QInstaller::PackageManagerCore *core)
virtual ~ComponentSelectionPage()
bool addVirtualComponentToUninstall(const QString &name)
void allowCompressedRepositoryInstall()
void deselectAll()
void deselectComponent(const QString &id)
void selectAll()
void selectComponent(const QString &id)
void selectDefault()

Reimplemented Public Functions

virtual bool isComplete() const override

Reimplemented Protected Functions

virtual void entering() override
virtual void leaving() override
virtual void showEvent(QShowEvent *event) override

Detailed Description

Member Function Documentation

ComponentSelectionPage::ComponentSelectionPage(QInstaller::PackageManagerCore *core)

Constructs a component selection page with core as parent.

[virtual] ComponentSelectionPage::~ComponentSelectionPage()

Destructs a component selection page.

bool ComponentSelectionPage::addVirtualComponentToUninstall(const QString &name)

Adds an additional virtual component with the name to be installed.

Returns true if the virtual component is found and not installed.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

void ComponentSelectionPage::allowCompressedRepositoryInstall()

Adds the possibility to install a compressed repository on component selection page. A new button which opens a file browser is added for compressed repository selection.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

void ComponentSelectionPage::deselectAll()

Deselects all components in the component tree.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

void ComponentSelectionPage::deselectComponent(const QString &id)

Deselects the component with id in the component tree.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

[override virtual protected] void ComponentSelectionPage::entering()

Reimplements: PackageManagerPage::entering().

Initializes the page's fields based on values from fields on previous pages. The text to display depends on whether the page is being used in an installer, updater, or uninstaller.

[override virtual] bool ComponentSelectionPage::isComplete() const

Reimplements: PackageManagerPage::isComplete() const.

Returns true if at least one component is checked on the page.

[override virtual protected] void ComponentSelectionPage::leaving()

Reimplements: PackageManagerPage::leaving().

Called when end users leave the page and the PackageManagerGui:currentPageChanged() signal is triggered.

void ComponentSelectionPage::selectAll()

Selects all components in the component tree.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

void ComponentSelectionPage::selectComponent(const QString &id)

Selects the component with id in the component tree.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

void ComponentSelectionPage::selectDefault()

Selects the components that have the <Default> element set to true in the package information file.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

[override virtual protected] void ComponentSelectionPage::showEvent(QShowEvent *event)

Reimplements: QWidget::showEvent(QShowEvent *event).

Called when the show event event occurs. Switching pages back and forth might restore or remove the checked state of certain components the end users have checked or not checked, because the dependencies are resolved and checked when clicking Next. So as not to confuse the end users with newly checked components they did not check, the state they left the page in is restored.

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.