From 6ec6ac70d98195bb41a5ed60e47984bc640066fc Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Tue, 26 Oct 2021 08:50:07 +0300 Subject: Add click option for product image Product image can now be clicked. It opens either url in Web browser or if file reference is given, then it will be opened with the suitable application. Task-number: QTIFW-2361 Change-Id: I59ed1355e90c23c8d0a5124779725825ca1ee2c8 Reviewed-by: Arttu Tarkiainen --- .../doc/images/qtifw-examples-productimage.png | Bin 0 -> 57251 bytes examples/doc/productimage.qdoc | 57 +++++++++++++++++++++ examples/examples.pro | 1 + examples/productimage/config/Built_with_Qt.png | Bin 0 -> 13891 bytes .../productimage/config/Built_with_Qt_logo.png | Bin 0 -> 11097 bytes examples/productimage/config/config.xml | 19 +++++++ .../packages/com.vendor.product/meta/package.xml | 8 +++ examples/productimage/productimage.pro | 13 +++++ 8 files changed, 98 insertions(+) create mode 100644 examples/doc/images/qtifw-examples-productimage.png create mode 100644 examples/doc/productimage.qdoc create mode 100644 examples/productimage/config/Built_with_Qt.png create mode 100644 examples/productimage/config/Built_with_Qt_logo.png create mode 100644 examples/productimage/config/config.xml create mode 100644 examples/productimage/packages/com.vendor.product/meta/package.xml create mode 100644 examples/productimage/productimage.pro (limited to 'examples') diff --git a/examples/doc/images/qtifw-examples-productimage.png b/examples/doc/images/qtifw-examples-productimage.png new file mode 100644 index 000000000..8635b99a8 Binary files /dev/null and b/examples/doc/images/qtifw-examples-productimage.png differ diff --git a/examples/doc/productimage.qdoc b/examples/doc/productimage.qdoc new file mode 100644 index 000000000..cea128a50 --- /dev/null +++ b/examples/doc/productimage.qdoc @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2022 The Qt Company Ltd. +** Contact: https://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 https://www.qt.io/terms-conditions. For further +** information use the contact form at https://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: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example productimage + \ingroup qtifwexamples + \title Product Image Example + + \brief Using components' config.xml files to show a product image while + downloading and installing components. + + \image qtifw-examples-productimage.png + + \e {Product Image} example illustrates how to add product images to the installer and + show them while downloading and installing components. Product images can have an + optional \c url. When clicking the product image, \c url + is opened in a browser. If the \c url is a reference to a file, it will + be opened with a suitable application instead of a Web browser. + + \include installerfw-examples-configuring.qdocinc + + \list + \li The \c element can contain one or several \c + child elements, which each contain one \c element and an + optional \c . + \endlist + + \quotefile productimage/config/config.xml + + \include installerfw-examples-packaging.qdocinc + + \include installerfw-examples-generating.qdocinc +*/ diff --git a/examples/examples.pro b/examples/examples.pro index 45b065d4a..283f81abe 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -10,6 +10,7 @@ SUBDIRS += \ modifyextract \ online \ openreadme \ + productimage \ quitinstaller \ registerfileextension \ registervirtualcomponentforuninstall \ diff --git a/examples/productimage/config/Built_with_Qt.png b/examples/productimage/config/Built_with_Qt.png new file mode 100644 index 000000000..e61248151 Binary files /dev/null and b/examples/productimage/config/Built_with_Qt.png differ diff --git a/examples/productimage/config/Built_with_Qt_logo.png b/examples/productimage/config/Built_with_Qt_logo.png new file mode 100644 index 000000000..331664c90 Binary files /dev/null and b/examples/productimage/config/Built_with_Qt_logo.png differ diff --git a/examples/productimage/config/config.xml b/examples/productimage/config/config.xml new file mode 100644 index 000000000..4d5fe1a05 --- /dev/null +++ b/examples/productimage/config/config.xml @@ -0,0 +1,19 @@ + + + Product Image + 1.0.0 + Product Image Installer + Your vendor + Super App + @HomeDir@/IfwExamples/productimage + + + Built_with_Qt.png + https://www.qt.io/blog + + + Built_with_Qt_logo.png + https://www.qt.io/ + + + diff --git a/examples/productimage/packages/com.vendor.product/meta/package.xml b/examples/productimage/packages/com.vendor.product/meta/package.xml new file mode 100644 index 000000000..1a243da80 --- /dev/null +++ b/examples/productimage/packages/com.vendor.product/meta/package.xml @@ -0,0 +1,8 @@ + + + The root component + Install this example. + 1.0.0 + 2021-10-10 + true + diff --git a/examples/productimage/productimage.pro b/examples/productimage/productimage.pro new file mode 100644 index 000000000..415df49d5 --- /dev/null +++ b/examples/productimage/productimage.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 -- cgit v1.2.3