summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2014-12-22 15:08:53 +0100
committerLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-01-08 17:01:22 +0100
commit4b63ef5f75f729b02a0f5d9cb178052e04cd8b44 (patch)
tree67c5f682a3fe32c6b48449f9feccc8f33803c8f3 /examples
parent86a40b0fca8f075c51870d80a8789bec06076a8f (diff)
Doc: add docs for the Open Readme example
Change-Id: I0abee03607ee82a7753e5b857392da31dfe54551 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/doc/images/qtifw-examples-openreadme.pngbin0 -> 24131 bytes
-rw-r--r--examples/doc/openreadme.qdoc46
-rw-r--r--examples/openreadme/config/config.xml8
3 files changed, 50 insertions, 4 deletions
diff --git a/examples/doc/images/qtifw-examples-openreadme.png b/examples/doc/images/qtifw-examples-openreadme.png
new file mode 100644
index 000000000..4cebedc75
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-openreadme.png
Binary files differ
diff --git a/examples/doc/openreadme.qdoc b/examples/doc/openreadme.qdoc
index 165caf4e2..b81812fb0 100644
--- a/examples/doc/openreadme.qdoc
+++ b/examples/doc/openreadme.qdoc
@@ -33,9 +33,55 @@
\brief Adding a check box for opening the readme file to the final
installer page.
+ \image qtifw-examples-openreadme.png
+
+ \e{Open ReadMe} illustrates how to use the \c Component() function to add a
+ check box to the installation finished page and to open the readme file if
+ end users select the check box.
+
\include installerfw-examples-configuring.qdocinc
\quotefile openreadme/config/config.xml
+ \include installerfw-examples-packaging.qdocinc
+
+ \list
+ \li The \c <Default> section is set to \c true to preselect the
+ component in the installer.
+ \li The \c <Script> section specifies the file name of the JavaScript
+ file that is loaded to perform operations.
+ \li The \c <UserInterfaces> section specifies the file name of the
+ installer page (.ui file) to use.
+ \endlist
+
+ \quotefile openreadme/packages/or.qtproject.ifw.example.openreadme/meta/package.xml
+
+ \section1 Opening Files After Installation
+
+ In installscript.qs, we use the \c Component() function to connect to the
+ \c installationFinishedPageIsShown signal when the installation is complete
+ and to the \c installationFinished signal when the end users click
+ \uicontrol Finish (\uicontrol Done on OS X):
+
+ \quotefromfile openreadme/packages/or.qtproject.ifw.example.openreadme/meta/installscript.qs
+ \skipto Component()
+ \printuntil }
+
+ We call the component::createOperations() function to override the default
+ method for creating operations:
+
+ \printuntil }
+
+ If the installation is successful, we call the installer::addWizardPageItem()
+ function to replace the last installer page with a custom page that contains
+ the \uicontrol {OpenReadMe} check box:
+
+ \printuntil /^\}/
+
+ We set the \c readMeCheckBox to \c checked by default and use the
+ QDesktopServices::openURL() function to open the readme file:
+
+ \printuntil /^\}/
+
\include installerfw-examples-generating.qdocinc
*/
diff --git a/examples/openreadme/config/config.xml b/examples/openreadme/config/config.xml
index b1ec192e6..bd6092a8a 100644
--- a/examples/openreadme/config/config.xml
+++ b/examples/openreadme/config/config.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
- <Name>Qt Installer Framework - Open ReadMe Example</Name>
+ <Name>Open Readme Example</Name>
<Version>1.0.0</Version>
- <Title>Qt Installer Framework - Open Readme Example</Title>
+ <Title>Open Readme Example</Title>
<Publisher>Qt-Project</Publisher>
- <StartMenuDir>Qt Installer Framework - 'Open ReadMe' Example</StartMenuDir>
- <TargetDir>@HomeDir@/IFWOpenReadMeExample</TargetDir>
+ <StartMenuDir>Qt IFW Examples</StartMenuDir>
+ <TargetDir>@HomeDir@/IfwExample</TargetDir>
</Installer>