PackageManagerGui Class
(QInstaller::PackageManagerGui)The PackageManagerGui class provides the core functionality for non-interactive installations. More...
Header: | #include <PackageManagerGui> |
Public Functions
PackageManagerGui(PackageManagerCore *core, QWidget *parent = 0) | |
virtual | ~PackageManagerGui() = 0 |
void | callControlScriptMethod(const QString &methodName) |
void | clickButton(int wb, int delay = 0) |
QWidget * | currentPageWidget() const |
QString | defaultButtonText(int wizardButton) const |
bool | isButtonEnabled(int wb) |
void | loadControlScript(const QString &scriptPath) |
QWidget * | pageById(int id) const |
QWidget * | pageByObjectName(const QString &name) const |
QWidget * | pageWidgetByObjectName(const QString &name) const |
void | setSettingsButtonEnabled(bool enabled) |
void | showSettingsButton(bool show) |
void | updateButtonLayout() |
Public Slots
void | cancelButtonClicked() |
void | reject() |
void | rejectWithoutPrompt() |
void | showFinishedPage() |
Signals
void | finishButtonClicked() |
void | gotRestarted() |
void | interrupted() |
void | languageChanged() |
void | settingsButtonClicked() |
Static Public Members
QWizard::WizardStyle | getStyle(const QString &name) |
Protected Functions
bool | event(QEvent *event) |
void | executeControlScript(int pageId) |
PackageManagerCore * | packageManagerCore() const |
void | showEvent(QShowEvent *event) |
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) |
void | wizardWidgetRemovalRequested(QWidget *widget) |
Detailed Description
The PackageManagerGui class provides the core functionality for non-interactive installations.
Member Function Documentation
PackageManagerGui::PackageManagerGui(PackageManagerCore *core, QWidget *parent = 0)
Constructs a package manager UI with package manager specified by core and parent as parent.
[pure virtual]
PackageManagerGui::~PackageManagerGui()
Destructs a package manager UI.
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.
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.
[protected]
bool PackageManagerGui::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 OS X.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.
[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]
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.
[slot]
void PackageManagerGui::reject()
[slot]
void PackageManagerGui::rejectWithoutPrompt()
See also gui.rejectWithoutPrompt.
[protected slot]
void PackageManagerGui::setAutomatedPageSwitchEnabled(bool request)
Enables automatic page switching when request is true
.
void PackageManagerGui::setSettingsButtonEnabled(bool enabled)
Enables the Settings button by setting enabled to true
.
See also gui.setSettingsButtonEnabled.
[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.
[signal]
void PackageManagerGui::settingsButtonClicked()
See also gui.settingsButtonClicked.
[protected]
void PackageManagerGui::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.
[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)
Requests the insertion of widget on page.
[protected slot]
void PackageManagerGui::wizardWidgetRemovalRequested(QWidget *widget)
Requests the removal of widget from installer pages.