diff options
author | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-03-06 09:12:52 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-03-06 08:32:02 +0000 |
commit | f160b711fe28fab24331d7365ddb2152d5a09e6f (patch) | |
tree | 630914ae182c5b2548a921fde6f337e5a69a59eb /doc | |
parent | 5ba3fe6bae69901d334cefe7a3fbf9248424bec4 (diff) |
Doc: move ScriptEngine scripting docs to separate files
Change-Id: Iac1c810cf52fb4a480ebde956d62830af97b6f8c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/scripting-api/buttons.qdoc | 62 | ||||
-rw-r--r-- | doc/scripting-api/console.qdoc | 55 | ||||
-rw-r--r-- | doc/scripting-api/gui.qdoc | 135 | ||||
-rw-r--r-- | doc/scripting-api/print.qdoc | 31 | ||||
-rw-r--r-- | doc/scripting-api/qdesktopservices.qdoc | 96 | ||||
-rw-r--r-- | doc/scripting-api/qfiledialog.qdoc | 71 | ||||
-rw-r--r-- | doc/scripting-api/qinstaller.qdoc | 85 |
7 files changed, 535 insertions, 0 deletions
diff --git a/doc/scripting-api/buttons.qdoc b/doc/scripting-api/buttons.qdoc new file mode 100644 index 000000000..5fb130f1e --- /dev/null +++ b/doc/scripting-api/buttons.qdoc @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmltype buttons + \inqmlmodule scripting + + \brief Provides buttons that can be used on installer pages. + + You can use a set of standard buttons and some custom buttons on the + installer pages. For more information about the buttons used by default on + each installer page, see \l {Controller Scripting}. +*/ + +/*! + \qmlproperty enumeration buttons::QWizard + + Specifies the buttons on an installer page. + + \value buttons.BackButton + The \uicontrol Back button (\uicontrol {Go Back} on OS X.) + \value buttons.NextButton + The \uicontrol Next button (\uicontrol Continue on OS X.) + \value buttons.CommitButton + The \uicontrol Commit button. + \value buttons.FinishButton + The \uicontrol Finish button (\uicontrol Done on OS X.) + \value buttons.CancelButton + The \uicontrol Cancel button. + \value buttons.HelpButton + The \uicontrol Help button. + \value buttons.CustomButton1 + A custom button. + \value buttons.CustomButton2 + A custom button. + \value buttons.CustomButton3 + A custom button. +*/ diff --git a/doc/scripting-api/console.qdoc b/doc/scripting-api/console.qdoc new file mode 100644 index 000000000..c323093a5 --- /dev/null +++ b/doc/scripting-api/console.qdoc @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmltype console + \inqmlmodule scripting + \brief Provides methods for logging and debugging. + + You can use the \c console object to print log information about installer + functions to the console. The following example uses the \c console object + \l{console::log()}{log} method and \l installer object + \l{installer::isUpdater()}, \l{installer::isUninstaller()}, and + \l{installer::isPackageManager()} methods to display a message that + indicates whether the maintenance tool is currently being used to update, + remove, or add components. + + \code + onPackageManagerCoreTypeChanged = function() + { + console.log("Is Updater: " + installer.isUpdater()); + console.log("Is Uninstaller: " + installer.isUninstaller()); + console.log("Is Package Manager: " + installer.isPackageManager()); + } + \endcode +*/ + +/*! + \qmlmethod void console::log(string value) + + Prints the string specified by \a value to the console. +*/ diff --git a/doc/scripting-api/gui.qdoc b/doc/scripting-api/gui.qdoc new file mode 100644 index 000000000..e81ebd68d --- /dev/null +++ b/doc/scripting-api/gui.qdoc @@ -0,0 +1,135 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmltype gui + \inqmlmodule scripting + \brief Enables interaction with the installer UI. +*/ + +/*! + \qmlsignal gui::interrupted() +*/ + +/*! + \qmlsignal gui::languageChanged() +*/ + +/*! + \qmlsignal gui::finishButtonClicked() +*/ + +/*! + \qmlsignal gui::gotRestarted() +*/ + +/*! + \qmlsignal gui::settingsButtonClicked(); +*/ + +/*! + \qmlmethod object gui::pageById(int id) + + Returns the installer page specified by \a id. The values of \c id for the + available installer pages are provided by QInstaller::WizardPage. +*/ + +/*! + \qmlmethod object gui::pageByObjectName(string name) + + Returns the installer page specified by \a name. The value of \c name is the + object name set in the UI file that defines the installer page. +*/ + +/*! + \qmlmethod object gui::currentPageWidget() + + Returns the current wizard page. +*/ + +/*! + \qmlmethod object gui::pageWidgetByObjectName(string name) +*/ + +/*! + \qmlmethod string gui::defaultButtonText(int wizardButton) +*/ + +/*! + \qmlmethod void gui::clickButton(int wizardButton, int delayInMs) + + Automatically clicks the button specified by \a wizardButton after a delay + in milliseconds specified by \a delayInMs. +*/ + +/*! + \qmlmethod boolean gui::isButtonEnabled(int wizardButton) +*/ + +/*! + \qmlmethod void gui::showSettingsButton(boolean show) +*/ + +/*! + \qmlmethod void gui::setSettingsButtonEnabled(boolean enable) +*/ + +/*! + \qmlmethod object gui::findChild(object parent, string objectName) + + Returns the first descendant of \a parent that has \a objectName as name. + + \sa QObject::findChild +*/ + +/*! + \qmlmethod object[] gui::findChildren(object parent, string objectName) + + Returns all descendants of \a parent that have \a objectName as name. + + \sa QObject::findChildren +*/ + +/*! + \qmlmethod void gui::cancelButtonClicked() +*/ + +/*! + \qmlmethod void gui::reject() +*/ + +/*! + \qmlmethod void gui::rejectWithoutPrompt() +*/ + +/*! + \qmlmethod void gui::showFinishedPage() +*/ + +/*! + \qmlmethod void gui::setModified(boolean value) +*/ diff --git a/doc/scripting-api/print.qdoc b/doc/scripting-api/print.qdoc new file mode 100644 index 000000000..edef60638 --- /dev/null +++ b/doc/scripting-api/print.qdoc @@ -0,0 +1,31 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmltype print + \inqmlmodule scripting +*/ diff --git a/doc/scripting-api/qdesktopservices.qdoc b/doc/scripting-api/qdesktopservices.qdoc new file mode 100644 index 000000000..1c321f997 --- /dev/null +++ b/doc/scripting-api/qdesktopservices.qdoc @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmltype QDesktopServices + \inqmlmodule scripting + + \brief Provides methods for accessing common desktop services. + + Many desktop environments provide services that can be used by applications + to perform common tasks, such as opening a file, in a way that is both + consistent and takes into account the user's application preferences. + + This object contains methods that provide simple interfaces to these + services that indicate whether they succeeded or failed. + + The openUrl() method is used to open files located at arbitrary URLs in + external applications. For URLs that correspond to resources on the local + filing system (where the URL scheme is "file"), a suitable application is + used to open the file. + + The displayName() and storageLocation() methods take one of the following + enums as an argument: + + \list + \li DesktopServices.DesktopLocation + \li DesktopServices.DocumentsLocation + \li DesktopServices.FontsLocation + \li DesktopServices.ApplicationsLocation + \li DesktopServices.MusicLocation + \li DesktopServices.MoviesLocation + \li DesktopServices.PicturesLocation + \li DesktopServices.TempLocation + \li DesktopServices.HomeLocation + \li DesktopServices.DataLocation + \li DesktopServices.CacheLocation + \li DesktopServices.GenericDataLocation + \li DesktopServices.RuntimeLocation + \li DesktopServices.ConfigLocation + \li DesktopServices.DownloadLocation + \li DesktopServices.GenericCacheLocation + \li DesktopServices.GenericConfigLocation + \endlist + + The enum values correspond to the values of the + \l{QStandardPaths::StandardLocation} enum with the same names. +*/ + +/*! + \qmlproperty enumeration QDesktopServices::QStandardPaths + \internal +*/ + +/*! + \qmlmethod boolean QDesktopServices::openUrl(string url) + + Uses the URL scheme \c file to open the specified \a url with a suitable + application. +*/ + +/*! + \qmlmethod string QDesktopServices::displayName(int location) + + Returns a localized display name for the specified \a location or an empty + QString if no relevant location can be found. +*/ + +/*! + \qmlmethod string QDesktopServices::storageLocation(int location) + + Returns the specified \a location. +*/ diff --git a/doc/scripting-api/qfiledialog.qdoc b/doc/scripting-api/qfiledialog.qdoc new file mode 100644 index 000000000..7a201811f --- /dev/null +++ b/doc/scripting-api/qfiledialog.qdoc @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmltype QFileDialog + \inqmlmodule scripting + \brief Provides a dialog that allows users to select files or directories. + + Use the QFileDialog::getExistingDirectory() method to create a modal dialog + that displays an existing directory selected by the user. Use the + QFileDialog::getOpenFileName() method to create a dialog that displays + matching files in the directory selected by the user. +*/ + +/*! + \qmlmethod string QFileDialog::getExistingDirectory(string caption, string dir) + + Returns an existing directory selected by the user. + + The dialog's working directory is set to \a dir, and the caption is set to + \a caption. Either of these may be an empty string, in which case the + current directory and a default caption will be used, respectively. +*/ + +/*! + \qmlmethod string QFileDialog::getOpenFileName(string caption, string dir, string filter) + + Returns an existing file selected by the user. If the user selects + \uicontrol Cancel, returns a null string. + + The file dialog's caption is set to \a caption. If \c caption is not + specified, a default caption is used. + + The file dialog's working directory is set to \a dir. If \c dir includes a + file name, the file will be selected. Only files that match the specified + \a filter are shown. Either of these may be an empty string. + + To specify multiple filters, separate them with two semicolons (;;). For + example: + + \code + "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" + \endcode + + On Windows, and OS X, this static function will use the native file dialog + and not a QFileDialog. +*/ diff --git a/doc/scripting-api/qinstaller.qdoc b/doc/scripting-api/qinstaller.qdoc new file mode 100644 index 000000000..bb37f526e --- /dev/null +++ b/doc/scripting-api/qinstaller.qdoc @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Installer Framework. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmltype QInstaller + \inqmlmodule scripting + + \brief Provides access to the installer status and pages from Qt Script. + + For more information about using the \c QInstaller object in control + scripts, see \l{Controller Scripting}. + + For examples of using the pages to support end user workflows, see + \l{End User Workflows}. +*/ + +/*! + \qmlproperty enumeration QInstaller::WizardPage + + The installer has various pre-defined pages that can be used to for example insert pages + in a certain place: + + \value QInstaller.Introduction + \l{Introduction Page} + \value QInstaller.TargetDirectory + \l{Target Directory Page} + \value QInstaller.ComponentSelection + \l{Component Selection Page} + \value QInstaller.LicenseCheck + \l{License Agreement Page} + \value QInstaller.StartMenuSelection + \l{Start Menu Directory Page} + \value QInstaller.ReadyForInstallation + \l{Ready for Installation Page} + \value QInstaller.PerformInstallation + \l{Perform Installation Page} + \value QInstaller.InstallationFinished + \l{Finished Page} + + \omitvalue QInstaller.End +*/ + +/*! + \qmlproperty enumeration QInstaller::status + + Status of the installer. + + Possible values are: + + \value QInstaller.Success + Installation was successful. + \value QInstaller.Failure + Installation failed. + \value QInstaller.Running + Installation is in progress. + \value QInstaller.Canceled + Installation was canceled. + \value QInstaller.Unfinished + Installation was not completed. + \value QInstaller.ForceUpdate +*/ |