Open xvno opened 4 years ago
编写 Controller.prototype.IntroductionPageCallback()
这个方法来和 说明页
交互
ErrorLabel | Displays an error message. |
---|---|
NextButton | '...' |
CancelButton | '...' |
ErrorLabel | Displays an error message. |
---|---|
MessageLabel | Displays a message. By default, it displays the "Welcome to the |
InformationLabel | Displays progress information. |
Radio Buttons | Brief Description |
---|---|
PackageManagerRadioButton | The package manager radio button shown on the page while running as maintenance tool. |
UpdaterRadioButton | The updater radio button shown on the page while running as maintenance tool. |
UninstallerRadioButton | The uninstaller radio button shown on the page while running as maintenance tool. Selected by default. |
Progress Bar | Brief Description |
---|---|
InformationProgressBar | The progress bar shown while fetching remote packages. |
Qt Core Feature | Brief Description |
---|---|
packageManagerCoreTypeChanged() | Connect to this signal if you want to be notified when the type of maintenance tool changes. Note: The signal is only emitted when the user has started the binary as so called maintenance tool (after the installation) and switches between the radio buttons. |
function Controller () {
}
Controller.prototype.IntroductionPageCallback = function () {
var widget = gui.currentPageWidget(); // get the current wizard page
if (widget != null) {
widget.title = "New title."; // set the page title
widget.MessageLabel.setText("New Message."); // set the welcome text
}
}
Controller.prototype.TargetDirectoryPageCallback = function () {
gui.clickButton(buttons.NextButton); // automatically click the Next button
}
function Controller () {
var widget = gui.pageById(QInstaller.Introduction); // get the introduction wizard page
if (widget != null)
widget.packageManagerCoreTypeChanged.connect(onPackageManagerCoreTypeChanged);
}
onPackageManagerCoreTypeChanged = function () {
console.log("Is Updater: " + installer.isUpdater());
console.log("Is Uninstaller: " + installer.isUninstaller());
console.log("Is Package Manager: " + installer.isPackageManager());
}
编写这个函数来与widgets交互 Controller.prototype.LicenseAgreementPageCallback()
Button | Description |
---|---|
NextButton | '...' |
CancelButton | '...' |
BackButton | '...' |
Widgets | Brief Description |
---|---|
LicenseListWidget | Lists the available licenses. |
LicenseTextBrowser | Shows the content of the selected license file. |
AcceptLicenseLabel | Shows the text next to the accept license radio button. |
RejectLicenseLabel | Shows the text next to the reject license radio button. |
Radio Buttons | Brief Description |
---|---|
AcceptLicenseRadioButton | Accepts the license agreement. |
RejectLicenseRadioButton | Rejects the license agreement. Selected by default. |
编写函数 Controller.prototype.ComponentSelectionPageCallback()
Button | Description |
---|
NextButton CancelButton BackButton
Methods | Brief Description |
---|---|
selectAll() | Selects all available packages if possible. |
deselectAll() | Deselects all available packages if possible. |
selectDefault() | Resets the checked state of available packages to their initial state. |
selectComponent(id) | Selects the package with id (string). |
deselectComponent(id) | Deselects the package with id (string). |
Push Buttons | Brief Description |
---|---|
SelectAllComponentsButton | Selects all available packages if possible. |
DeselectAllComponentsButton | Deselects all available packages if possible. |
SelectDefaultComponentsButton | Resets the checked state of available packages to their initial state. |
ResetComponentsButton | Resets to already installed components. |
Button | Description |
---|
NextButton CancelButton BackButton
Widgets | Brief Description |
---|---|
StartMenuPathLineEdit | Shows the directory where to create the program's shortcut. |
Implement the Controller.prototype.ReadyForInstallationPageCallback()
function to interact with widgets on the ready for installation page.
Wizard button | Desc |
---|
CommitButton CancelButton BackButton
Widgets | Brief Description |
---|---|
MessageLabel | Displays a message. |
TaskDetailsBrowser | Displays some more detailed information about the installation. |
Implement the Controller.prototype.PerformInstallationPageCallback()
function to interact with widgets on the perform installation page.
Wizard Button | Description |
---|
CommitButton CancelButton
Implement the Controller.prototype.FinishedPageCallback()
function to interact with widgets on the installation finished page.
Wizard button | Description |
---|
CommitButton CancelButton FinishButton
Widgets | Brief Description |
---|---|
MessageLabel | Displays a message. |
RunItCheckBox | Text field that informs users that they can start an application after the installation process has finished. |
Predefined Installer Pages, 预定义的安装程序页面组