summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@theqtcompany.com>2015-12-01 10:50:22 +0200
committerKatja Marttila <katja.marttila@theqtcompany.com>2016-01-18 12:01:50 +0000
commitba1209000a3175ce3b8f88829485c7c01efcc852 (patch)
treea9c943c38ad1fe3fe632cdaaac00a9586e147f8f /examples
parent8b344748b7059ade811c7b0f28c4458b0d01eb4d (diff)
Allow defining non-checkable items
This change will introduce new element 'Checkable' for package. Setting checkable to false will hide checkbox. Useful if use case is to install one sub item instead of all sub items. Change-Id: I8c731e77353b6da539dddcecdc8495b28ef5f7ea Task-number: QTIFW-773 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/doc/hidecheckbox.qdoc60
-rw-r--r--examples/doc/images/qtifw-examples-hidecheckbox.pngbin0 -> 24807 bytes
-rw-r--r--examples/hidecheckbox/README6
-rw-r--r--examples/hidecheckbox/config/config.xml9
-rw-r--r--examples/hidecheckbox/disabletoplevel.pro13
-rw-r--r--examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/data/testF_sub1_sub1.txt1
-rw-r--r--examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml7
-rw-r--r--examples/hidecheckbox/packages/componentF.subcomponent1/data/testF_sub1.txt1
-rw-r--r--examples/hidecheckbox/packages/componentF.subcomponent1/meta/package.xml9
-rw-r--r--examples/hidecheckbox/packages/componentF/data/testF.txt1
-rw-r--r--examples/hidecheckbox/packages/componentF/meta/package.xml9
11 files changed, 116 insertions, 0 deletions
diff --git a/examples/doc/hidecheckbox.qdoc b/examples/doc/hidecheckbox.qdoc
new file mode 100644
index 000000000..cdcc506c1
--- /dev/null
+++ b/examples/doc/hidecheckbox.qdoc
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+/*!
+ \example hidecheckbox
+ \ingroup qtifwexamples
+ \title Hide Checkbox Example
+
+ \brief Using components' package.xml files to hide checkboxes for items.
+
+ \image qtifw-examples-hidecheckbox.png
+
+ \e{Hide Checkbox} illustrates how to hide the checkbox for an item.
+
+ \include installerfw-examples-configuring.qdocinc
+
+ \quotefile hidecheckbox/config/config.xml
+
+ \include installerfw-examples-packaging.qdocinc
+
+ \list
+ \li The \c <Checkable> element specifies whether a checkbox is displayed next to an item.
+ Set to \c false to hide the checkbox for the item.
+ \endlist
+
+ This example attempts to install three components, so we create a package.xml file in each
+ component directory: componentF, componentF.subcomponent1, and
+ componentF.subcomponent1.subcomponent1. We also specify the component name and description
+ in each of them. The top level item, componentF, has \c <Checkable> set to \c false,
+ so it cannot be selected. It also does not install the package, for that
+ you will need to set \c <ForceInstallation> to \c true.
+
+ \quotefile hidecheckbox/packages/componentF/meta/package.xml
+
+ \include installerfw-examples-generating.qdocinc
+*/
diff --git a/examples/doc/images/qtifw-examples-hidecheckbox.png b/examples/doc/images/qtifw-examples-hidecheckbox.png
new file mode 100644
index 000000000..58b0a1848
--- /dev/null
+++ b/examples/doc/images/qtifw-examples-hidecheckbox.png
Binary files differ
diff --git a/examples/hidecheckbox/README b/examples/hidecheckbox/README
new file mode 100644
index 000000000..22619bf9c
--- /dev/null
+++ b/examples/hidecheckbox/README
@@ -0,0 +1,6 @@
+Shows how to disable top level item, allowing the installation of child items.
+
+Generate installer with
+
+binarycreator --offline-only -c config/config.xml -p packages installer
+
diff --git a/examples/hidecheckbox/config/config.xml b/examples/hidecheckbox/config/config.xml
new file mode 100644
index 000000000..db756799f
--- /dev/null
+++ b/examples/hidecheckbox/config/config.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Installer>
+ <Name>Hide item checkbox</Name>
+ <Version>1.0.0</Version>
+ <Title>Hide checkbox</Title>
+ <Publisher>The Qt Company</Publisher>
+ <StartMenuDir>Qt IFW Examples</StartMenuDir>
+ <TargetDir>@HomeDir@/IfwExamples/disabletoplevel</TargetDir>
+</Installer>
diff --git a/examples/hidecheckbox/disabletoplevel.pro b/examples/hidecheckbox/disabletoplevel.pro
new file mode 100644
index 000000000..415df49d5
--- /dev/null
+++ b/examples/hidecheckbox/disabletoplevel.pro
@@ -0,0 +1,13 @@
+TEMPLATE = aux
+
+INSTALLER = installer
+
+INPUT = $$PWD/config/config.xml $$PWD/packages
+example.input = INPUT
+example.output = $$INSTALLER
+example.commands = ../../bin/binarycreator -c $$PWD/config/config.xml -p $$PWD/packages ${QMAKE_FILE_OUT}
+example.CONFIG += target_predeps no_link combine
+
+QMAKE_EXTRA_COMPILERS += example
+
+OTHER_FILES = README
diff --git a/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/data/testF_sub1_sub1.txt b/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/data/testF_sub1_sub1.txt
new file mode 100644
index 000000000..0478bd970
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/data/testF_sub1_sub1.txt
@@ -0,0 +1 @@
+test sub sub versio3
diff --git a/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml b/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml
new file mode 100644
index 000000000..b613022a0
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF.subcomponent1.subsubcomponent1/meta/package.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Subsubcomponent 1</DisplayName>
+ <Description>This component does not depend on any other component.</Description>
+ <Version>1.0.2</Version>
+ <ReleaseDate>2015-12-01</ReleaseDate>
+</Package>
diff --git a/examples/hidecheckbox/packages/componentF.subcomponent1/data/testF_sub1.txt b/examples/hidecheckbox/packages/componentF.subcomponent1/data/testF_sub1.txt
new file mode 100644
index 000000000..c34214bb9
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF.subcomponent1/data/testF_sub1.txt
@@ -0,0 +1 @@
+test sub1 versio3
diff --git a/examples/hidecheckbox/packages/componentF.subcomponent1/meta/package.xml b/examples/hidecheckbox/packages/componentF.subcomponent1/meta/package.xml
new file mode 100644
index 000000000..58bbab370
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF.subcomponent1/meta/package.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Subcomponent 1</DisplayName>
+ <Description>This component contains sub component.</Description>
+ <Version>1.0.2</Version>
+ <ReleaseDate>2015-12-01</ReleaseDate>
+ <SortingPriority>100</SortingPriority>
+ <Checkable>true</Checkable>
+</Package>
diff --git a/examples/hidecheckbox/packages/componentF/data/testF.txt b/examples/hidecheckbox/packages/componentF/data/testF.txt
new file mode 100644
index 000000000..c34214bb9
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF/data/testF.txt
@@ -0,0 +1 @@
+test sub1 versio3
diff --git a/examples/hidecheckbox/packages/componentF/meta/package.xml b/examples/hidecheckbox/packages/componentF/meta/package.xml
new file mode 100644
index 000000000..96d7cbc21
--- /dev/null
+++ b/examples/hidecheckbox/packages/componentF/meta/package.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<Package>
+ <DisplayName>Uncheckable component</DisplayName>
+ <Description>This component is uncheckable.</Description>
+ <Version>1.0.0</Version>
+ <ReleaseDate>2015-12-01</ReleaseDate>
+ <SortingPriority>40</SortingPriority>
+ <Checkable>false</Checkable>
+</Package>