PackageManagerGui Class

class QInstaller::PackageManagerGui

The PackageManagerGui class provides the core functionality for non-interactive installations. More...

Header: #include <PackageManagerGui>
Inherits: QWizard

Public Functions

PackageManagerGui(QInstaller::PackageManagerCore *core, QWidget *parent = 0)
virtual ~PackageManagerGui() = 0
void callControlScriptMethod(const QString &methodName)
void clickButton(int wb, int delay = 0)
void clickButton(const QString &objectName, int delay = 0) const
QWidget *currentPageWidget() const
QString defaultButtonText(int wizardButton) const
bool isButtonEnabled(int wb)
bool isSilent() const
void loadControlScript(const QString &scriptPath)
QWidget *pageById(int id) const
QWidget *pageByObjectName(const QString &name) const
QWidget *pageWidgetByObjectName(const QString &name) const
void requestSettingsButtonByInstaller(bool request)
void setSettingsButtonEnabled(bool enabled)
void setSilent(bool silent)
void setTextItems(QObject *object, const QStringList &items)
void setWizardPageButtonText(int pageId, int buttonId, const QString &buttonText)
void showSettingsButton(bool show)
void updateButtonLayout()

Public Slots

void cancelButtonClicked()
virtual void reject() override
void rejectWithoutPrompt()
void setMaxSize()
void showFinishedPage()
void updatePageListWidget()


Static Public Members

QWizard::WizardStyle getStyle(const QString &name)

Protected Functions

void executeControlScript(int pageId)
QInstaller::PackageManagerCore *packageManagerCore() const

Reimplemented Protected Functions

virtual bool event(QEvent *event) override
virtual void showEvent(QShowEvent *event) override

Protected Slots

void setAutomatedPageSwitchEnabled(bool request)
void setValidatorForCustomPageRequested(QInstaller::Component *component, const QString &name, const QString &callbackName)
void wizardPageInsertionRequested(QWidget *widget, QInstaller::PackageManagerCore::WizardPage page)
void wizardPageRemovalRequested(QWidget *widget)
void wizardPageVisibilityChangeRequested(bool visible, int p)
void wizardWidgetInsertionRequested(QWidget *widget, QInstaller::PackageManagerCore::WizardPage page, int position)
void wizardWidgetRemovalRequested(QWidget *widget)

Detailed Description

Member Function Documentation

[explicit] PackageManagerGui::PackageManagerGui(QInstaller::PackageManagerCore *core, QWidget *parent = 0)

Constructs a package manager UI with package manager specified by core and parent as parent.

[pure virtual noexcept] PackageManagerGui::~PackageManagerGui()

Destructs a package manager UI.

[signal] void PackageManagerGui::aboutApplicationClicked()

See also gui.aboutApplicationClicked.

void PackageManagerGui::callControlScriptMethod(const QString &methodName)

Calls the control script method specified by methodName.

[slot] void PackageManagerGui::cancelButtonClicked()

See also gui.cancelButtonClicked.

void PackageManagerGui::clickButton(int wb, int delay = 0)

Clicks the button specified by wb after the delay specified by delay.

See also gui.clickButton.

void PackageManagerGui::clickButton(const QString &objectName, int delay = 0) const

Clicks the button specified by objectName after the delay specified by delay.

See also gui.clickButton.

QWidget *PackageManagerGui::currentPageWidget() const

See also gui.currentPageWidget.

QString PackageManagerGui::defaultButtonText(int wizardButton) const

Returns the default text for the button specified by wizardButton.

See also gui.defaultButtonText.

[override virtual protected] bool PackageManagerGui::event(QEvent *event)

Reimplements: QWizard::event(QEvent *event).

[protected] void PackageManagerGui::executeControlScript(int pageId)

Executes the control script on the page specified by pageId.

[signal] void PackageManagerGui::finishButtonClicked()

See also gui.finishButtonClicked.

[static] QWizard::WizardStyle PackageManagerGui::getStyle(const QString &name)

Returns the style of the package manager UI depending on name:

  • Classic - Classic UI style for Windows 7 and earlier.
  • Modern - Modern UI style for Windows 8.
  • Mac - UI style for macOS.
  • Aero - Aero Peek for Windows 7.

[signal] void PackageManagerGui::gotRestarted()

See also gui.gotRestarted.

[signal] void PackageManagerGui::interrupted()

See also gui.interrupted.

bool PackageManagerGui::isButtonEnabled(int wb)

Returns true if the button specified by wb is enabled. Returns false if a button of the specified type is not found.

See also gui.isButtonEnabled.

bool PackageManagerGui::isSilent() const

Returns the current silent state.

[signal] void PackageManagerGui::languageChanged()

See also gui.languageChanged.

void PackageManagerGui::loadControlScript(const QString &scriptPath)

Loads the script specified by scriptPath to perform the installation non-interactively. Throws QInstaller::Error if the script is not readable or it cannot be parsed.

[protected] QInstaller::PackageManagerCore *PackageManagerGui::packageManagerCore() const

Returns the package manager core.

QWidget *PackageManagerGui::pageById(int id) const

Returns the page specified by id.

See also gui.pageById.

QWidget *PackageManagerGui::pageByObjectName(const QString &name) const

Returns the page specified by the object name name from a UI file.

See also gui.pageByObjectName.

QWidget *PackageManagerGui::pageWidgetByObjectName(const QString &name) const

For dynamic pages, returns the widget specified by name read from the UI file.

See also gui.pageWidgetByObjectName.

[override virtual slot] void PackageManagerGui::reject()

Reimplements: QDialog::reject().

[slot] void PackageManagerGui::rejectWithoutPrompt()

See also gui.rejectWithoutPrompt.

void PackageManagerGui::requestSettingsButtonByInstaller(bool request)

Shows the Settings button if request is true. If script has set the settings button visibility, this function has no effect.

[protected slot] void PackageManagerGui::setAutomatedPageSwitchEnabled(bool request)

Enables automatic page switching when request is true.

[slot] void PackageManagerGui::setMaxSize()

Limits installer maximum size to screen size.

void PackageManagerGui::setSettingsButtonEnabled(bool enabled)

Enables the Settings button by setting enabled to true.

See also gui.setSettingsButtonEnabled.

void PackageManagerGui::setSilent(bool silent)

Hides the GUI when silent is true.

See also isSilent().

void PackageManagerGui::setTextItems(QObject *object, const QStringList &items)

Updates the model of object (which must be a QComboBox or QAbstractItemView) such that it contains the given items.

[protected slot] void PackageManagerGui::setValidatorForCustomPageRequested(QInstaller::Component *component, const QString &name, const QString &callbackName)

Sets a validator for the custom page specified by name and callbackName requested by component.

void PackageManagerGui::setWizardPageButtonText(int pageId, int buttonId, const QString &buttonText)

Sets buttonText for button specified by buttonId to a installer page pageId.

Note: In some pages, installer will change the button text when entering the page. In that case, you need to connect to entered() -signal of the page to change the buttonText.

See also gui.setWizardPageButtonText.

[signal] void PackageManagerGui::settingsButtonClicked()

See also gui.settingsButtonClicked.

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

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

[slot] void PackageManagerGui::showFinishedPage()

See also gui.showFinishedPage.

void PackageManagerGui::showSettingsButton(bool show)

Shows the Settings button if show is true.

See also gui.showSettingsButton.

void PackageManagerGui::updateButtonLayout()

Forces an update of our own button layout. Needs to be called whenever a button option has been set.

[slot] void PackageManagerGui::updatePageListWidget()

Updates the installer page list.

[protected slot] void PackageManagerGui::wizardPageInsertionRequested(QWidget *widget, QInstaller::PackageManagerCore::WizardPage page)

Requests the insertion of the page specified by widget at the position specified by page. If that position is already occupied by another page, the value is decremented until an empty slot is found.

[protected slot] void PackageManagerGui::wizardPageRemovalRequested(QWidget *widget)

Requests the removal of the page specified by widget.

[protected slot] void PackageManagerGui::wizardPageVisibilityChangeRequested(bool visible, int p)

Requests changing the visibility of the page specified by p to visible.

[protected slot] void PackageManagerGui::wizardWidgetInsertionRequested(QWidget *widget, QInstaller::PackageManagerCore::WizardPage page, int position)

Requests the insertion of widget on page. Widget with lower position number will be inserted on top.

[protected slot] void PackageManagerGui::wizardWidgetRemovalRequested(QWidget *widget)

Requests the removal of widget from installer pages.

© 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.