From ed36c5f65fb243098a6351abea3a00ba9caa1dcd Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 10 Oct 2013 16:47:32 +0200 Subject: [Camera example] save captured images to /data/images This allows a user to browse through the photos from the "Photo Gallery" example. "Photo Gallery" looks for images in /data/images. Disable "video recording feature". Change-Id: Ib7c4d123c0e2fa5f9283dba3131e4accd576054b Reviewed-by: Eirik Aavitsland --- basicsuite/Camera/Controls.qml | 42 +++++++++++++++++++-------------------- basicsuite/Camera/description.txt | 2 +- basicsuite/Camera/main.qml | 6 +++--- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/basicsuite/Camera/Controls.qml b/basicsuite/Camera/Controls.qml index 63f750b..7f5e82d 100644 --- a/basicsuite/Camera/Controls.qml +++ b/basicsuite/Camera/Controls.qml @@ -5,7 +5,7 @@ Item { id: controlsRoot anchors.fill: parent - property alias cameraMode: cameraModeControl.selectedValue +// property alias cameraMode: cameraModeControl.selectedValue property alias requestedZoom: zoomControl.requestedZoom property alias actualZoom: zoomControl.actualZoom @@ -37,26 +37,26 @@ Item { anchors.bottomMargin: 50 } - CameraSetting { - id: cameraModeControl - anchors.right: parent.right - anchors.rightMargin: 20 - anchors.bottom: parent.bottom - anchors.bottomMargin: 20 - title: "MODE" - model: ListModel { - ListElement { - name: "Picture" - value: Camera.CaptureStillImage - } - ListElement { - name: "Video" - value: Camera.CaptureVideo - } - } - onCountChanged: currentIndex = 0 - enabled: controlsRoot.captureReady - } +// CameraSetting { +// id: cameraModeControl +// anchors.right: parent.right +// anchors.rightMargin: 20 +// anchors.bottom: parent.bottom +// anchors.bottomMargin: 20 +// title: "MODE" +// model: ListModel { +// ListElement { +// name: "Picture" +// value: Camera.CaptureStillImage +// } +// ListElement { +// name: "Video" +// value: Camera.CaptureVideo +// } +// } +// onCountChanged: currentIndex = 0 +// enabled: controlsRoot.captureReady +// } RecordingTime { anchors.right: parent.right diff --git a/basicsuite/Camera/description.txt b/basicsuite/Camera/description.txt index 7e94e89..71c3c44 100644 --- a/basicsuite/Camera/description.txt +++ b/basicsuite/Camera/description.txt @@ -1,5 +1,5 @@ This example demonstrates the use of the camera features of Qt Multimedia with Qt Quick. -It can take pictures and record videos. Files are saved inside the 'DCIM' folder on the external storage. +Demo can be used to take pictures. Files are saved inside the /data/images/ folder and can be viewed with the "Photo Gallery" application. Camera parameters such as flash mode, scene mode or white balance can be changed. The availability of parameters depends on what the camera driver provides. diff --git a/basicsuite/Camera/main.qml b/basicsuite/Camera/main.qml index a1cc89c..6a428e4 100644 --- a/basicsuite/Camera/main.qml +++ b/basicsuite/Camera/main.qml @@ -43,7 +43,7 @@ Rectangle { onLockStatusChanged: { if (camera.lockStatus === Camera.Locked && captureWhenLocked) { - camera.imageCapture.capture(); + camera.imageCapture.captureToLocation("/data/images/"); captureWhenLocked = false; } } @@ -160,7 +160,7 @@ Rectangle { actualZoom: camera.digitalZoom maximumZoom: camera.maximumDigitalZoom - onCameraModeChanged: camera.captureMode = controls.cameraMode + //onCameraModeChanged: camera.captureMode = controls.cameraMode onFlashModeChanged: if (visible) camera.flash.mode = controls.flashMode onFocusModeChanged: if (visible) camera.focus.focusMode = controls.focusMode @@ -195,7 +195,7 @@ Rectangle { camera.captureWhenLocked = true; camera.searchAndLock(); } else { - camera.imageCapture.capture(); + camera.imageCapture.captureToLocation("/data/images/"); } } } -- cgit v1.2.3 From 4e857032c66ffd92c5660cbc2cb9eced3ba82320 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 20 Sep 2013 13:44:31 +0200 Subject: Add sensor explorer demo to basicsuite Change-Id: Ifb2ea5b161d09ea500f7b51c8b0ffc422ab62073 Reviewed-by: Eirik Aavitsland --- .qmake.conf | 2 + basicsuite/SensorExplorer/SensorExplorer.pro | 4 + basicsuite/SensorExplorer/description.txt | 1 + .../SensorExplorer/doc/src/sensor_explorer.qdoc | 91 ++++++ basicsuite/SensorExplorer/imports/explorer.cpp | 136 +++++++++ basicsuite/SensorExplorer/imports/explorer.h | 79 +++++ basicsuite/SensorExplorer/imports/imports.pro | 17 ++ basicsuite/SensorExplorer/imports/main.cpp | 63 ++++ basicsuite/SensorExplorer/imports/plugin.json | 1 + basicsuite/SensorExplorer/imports/propertyinfo.cpp | 140 +++++++++ basicsuite/SensorExplorer/imports/propertyinfo.h | 83 ++++++ basicsuite/SensorExplorer/imports/qmldir | 2 + basicsuite/SensorExplorer/imports/sensoritem.cpp | 322 +++++++++++++++++++++ basicsuite/SensorExplorer/imports/sensoritem.h | 96 ++++++ basicsuite/SensorExplorer/main.qml | 224 ++++++++++++++ basicsuite/SensorExplorer/preview_l.jpg | Bin 0 -> 21818 bytes basicsuite/SensorExplorer/title.txt | 1 + basicsuite/basicsuite.pro | 3 +- 18 files changed, 1264 insertions(+), 1 deletion(-) create mode 100644 .qmake.conf create mode 100644 basicsuite/SensorExplorer/SensorExplorer.pro create mode 100644 basicsuite/SensorExplorer/description.txt create mode 100644 basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc create mode 100644 basicsuite/SensorExplorer/imports/explorer.cpp create mode 100644 basicsuite/SensorExplorer/imports/explorer.h create mode 100644 basicsuite/SensorExplorer/imports/imports.pro create mode 100644 basicsuite/SensorExplorer/imports/main.cpp create mode 100644 basicsuite/SensorExplorer/imports/plugin.json create mode 100644 basicsuite/SensorExplorer/imports/propertyinfo.cpp create mode 100644 basicsuite/SensorExplorer/imports/propertyinfo.h create mode 100644 basicsuite/SensorExplorer/imports/qmldir create mode 100644 basicsuite/SensorExplorer/imports/sensoritem.cpp create mode 100644 basicsuite/SensorExplorer/imports/sensoritem.h create mode 100644 basicsuite/SensorExplorer/main.qml create mode 100644 basicsuite/SensorExplorer/preview_l.jpg create mode 100644 basicsuite/SensorExplorer/title.txt diff --git a/.qmake.conf b/.qmake.conf new file mode 100644 index 0000000..53aeb41 --- /dev/null +++ b/.qmake.conf @@ -0,0 +1,2 @@ +load(qt_build_config) +MODULE_VERSION=1.0.0 diff --git a/basicsuite/SensorExplorer/SensorExplorer.pro b/basicsuite/SensorExplorer/SensorExplorer.pro new file mode 100644 index 0000000..175b966 --- /dev/null +++ b/basicsuite/SensorExplorer/SensorExplorer.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs +SUBDIRS += \ + imports + diff --git a/basicsuite/SensorExplorer/description.txt b/basicsuite/SensorExplorer/description.txt new file mode 100644 index 0000000..9724112 --- /dev/null +++ b/basicsuite/SensorExplorer/description.txt @@ -0,0 +1 @@ +This example provides a list of all available sensors installed on the system for which Qt has a backend. Start a sensor to see how values changes depending from environment and user-device interaction. diff --git a/basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc b/basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc new file mode 100644 index 0000000..be04215 --- /dev/null +++ b/basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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 sensor_explorer + \title Qt Sensors - Explorer QML example + \ingroup qtsensors-examples + + \section2 Sensor Explorer in QML + \brief The Sensor Explorer example demonstrates how to read the meta-data of available sensors. + + + This example is divided into two parts: + + \list + \li A \l{Sensor Explorer QML Import}{C++ plug-in} that provides QML alternatives for QSensorExplorer, QPropertyInfo and the QSensorItem classes. + \li A QML Application that uses the QML alternatives to read the sensors meta-data and present it. + \endlist + + + This is a pure QML application that can be run from Qt Creator or directly using the + \c qmlscene binary. You should install the other C++ plug-in before trying to run + this example, otherwise it will not find its dependencies. + + \code + qmlscene main.qml + \endcode + + To write a QML application that will use the Explorer QML type you need to do the following steps: + + Import the Explorer 1.0 declarative plugin: + + \snippet sensor_explorer/sensor_explorer.qml 0 + + Create a SensorExplorer QML item: + + \snippet sensor_explorer/sensor_explorer.qml 1 + + You can retrieve a list of all available sensors using the SensorExplorer: + + \snippet sensor_explorer/sensor_explorer.qml 2 + + To retrieve the properties of a SensorItem use: + + \snippet sensor_explorer/sensor_explorer.qml 3 + + Changing a property value can be done like: + + \snippet sensor_explorer/sensor_explorer.qml 4 + + Starting and stopping a sensor can be done like: + + \snippet sensor_explorer/sensor_explorer.qml 5 +*/ + +/*! + \example sensor_explorer/import + \title Sensor Explorer QML Import + + \section2 Sensor Explorer Declarative Plugin + \brief The Sensor Explorer QML import exports the QSensorExplorer, QPropertyInfo and the QSensorItem class as a QML type. + + This example creates the \e {Explorer 1.0} import. + + \sa {Qt Sensors - Explorer QML example} +*/ + diff --git a/basicsuite/SensorExplorer/imports/explorer.cpp b/basicsuite/SensorExplorer/imports/explorer.cpp new file mode 100644 index 0000000..f9edc90 --- /dev/null +++ b/basicsuite/SensorExplorer/imports/explorer.cpp @@ -0,0 +1,136 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "explorer.h" +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +/* + \class QSensorExplorer + \brief The QSensorExplorer type provides an easy access for reading all avalaible sensors installed on the system. +*/ + +/* + Construct a QSensorExplorer object with parent \a parent +*/ +QSensorExplorer::QSensorExplorer(QObject* parent) + : QObject(parent) + , _selectedSensorItem(0) +{ + loadSensors(); +} + +/* + Destructor of a QSensorExplorer +*/ +QSensorExplorer::~QSensorExplorer() +{ +} + +/* + Load all available sensors and store it in a list. +*/ +void QSensorExplorer::loadSensors() +{ + _availableSensors.clear(); + foreach (const QByteArray &type, QSensor::sensorTypes()) { + foreach (const QByteArray &identifier, QSensor::sensorsForType(type)) { + // Don't put in sensors we can't connect to + QSensor* sensor = new QSensor(type, this); + //sensor->setIdentifier(identifier); + if (!sensor->connectToBackend()) { + qWarning() << "Couldn't connect to" << sensor->description(); + continue; + } + _availableSensors.append(new QSensorItem(sensor, this)); + } + } + emit availableSensorsChanged(); +} + +/* + \fn QSensorExplorer::availableSensorsChanged() + Notifies the client if the list of the available sensors was changed +*/ + +/* + \property QSensorExplorer::availableSensors + Returns a list of all available sensor. +*/ +QQmlListProperty QSensorExplorer::availableSensors() +{ + return QQmlListProperty(this,_availableSensors); +} + +/* + \fn QSensorExplorer::selectedSensorItemChanged() + Notifies the client if the selected sensor has been changed +*/ + +/* + \property QSensorExplorer::selectedSensorItem + Returns the current selected sensor item. +*/ +QSensorItem* QSensorExplorer::selectedSensorItem() +{ + return _selectedSensorItem; +} + +/* + \fn QSensorExplorer::setSelectedSensorItem(QSensorItem* selitem) + Sets the QSensorItem \a selitem as the current selected QSensorItem. +*/ +void QSensorExplorer::setSelectedSensorItem(QSensorItem* selitem) +{ + if (selitem && _selectedSensorItem != selitem) { + if (_selectedSensorItem) + _selectedSensorItem->unSelect(); + _selectedSensorItem = selitem; + _selectedSensorItem->select(); + emit selectedSensorItemChanged(); + } +} + +QT_END_NAMESPACE diff --git a/basicsuite/SensorExplorer/imports/explorer.h b/basicsuite/SensorExplorer/imports/explorer.h new file mode 100644 index 0000000..d9d9546 --- /dev/null +++ b/basicsuite/SensorExplorer/imports/explorer.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSEONSOREXPLORER_H +#define QSEONSOREXPLORER_H + +#include +#include +#include "sensoritem.h" + +QT_BEGIN_NAMESPACE + +class QSensorExplorer : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQmlListProperty availableSensors READ availableSensors NOTIFY availableSensorsChanged) + Q_PROPERTY(QSensorItem* selectedSensorItem READ selectedSensorItem WRITE setSelectedSensorItem NOTIFY selectedSensorItemChanged) +public: + QSensorExplorer(QObject* parent = 0); + virtual ~QSensorExplorer(); + +private: + QQmlListProperty availableSensors(); + void loadSensors(); + void setSelectedSensorItem(QSensorItem* selitem); + QSensorItem* selectedSensorItem(); + +Q_SIGNALS: + void availableSensorsChanged(); + void selectedSensorItemChanged(); + +private: + QList _availableSensors; + QSensorItem* _selectedSensorItem; +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QSensorExplorer) + +#endif // QSEONSOREXPLORER_H diff --git a/basicsuite/SensorExplorer/imports/imports.pro b/basicsuite/SensorExplorer/imports/imports.pro new file mode 100644 index 0000000..c596185 --- /dev/null +++ b/basicsuite/SensorExplorer/imports/imports.pro @@ -0,0 +1,17 @@ +CXX_MODULE = qml +TARGET = sensorexplorer +TARGETPATH = Explorer +IMPORT_VERSION = 1.0 + +QT += qml sensors + +SOURCES = main.cpp \ + explorer.cpp \ + sensoritem.cpp \ + propertyinfo.cpp \ + +HEADERS = explorer.h \ + sensoritem.h \ + propertyinfo.h \ + +load(qml_plugin) diff --git a/basicsuite/SensorExplorer/imports/main.cpp b/basicsuite/SensorExplorer/imports/main.cpp new file mode 100644 index 0000000..3a8f506 --- /dev/null +++ b/basicsuite/SensorExplorer/imports/main.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include "explorer.h" + +QT_BEGIN_NAMESPACE + +class SensorExplorerDeclarativeModule : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json") +public: + virtual void registerTypes(const char *uri) + { + Q_ASSERT(QLatin1String(uri) == QLatin1String("Explorer")); + qmlRegisterType(uri, 1, 0, "SensorExplorer"); + qmlRegisterType(uri, 1, 0, "SensorItem"); + qmlRegisterType(uri, 1, 0, "PropertyInfo"); + } +}; + +QT_END_NAMESPACE + +#include "main.moc" diff --git a/basicsuite/SensorExplorer/imports/plugin.json b/basicsuite/SensorExplorer/imports/plugin.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/basicsuite/SensorExplorer/imports/plugin.json @@ -0,0 +1 @@ +{} diff --git a/basicsuite/SensorExplorer/imports/propertyinfo.cpp b/basicsuite/SensorExplorer/imports/propertyinfo.cpp new file mode 100644 index 0000000..0481d4d --- /dev/null +++ b/basicsuite/SensorExplorer/imports/propertyinfo.cpp @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "sensoritem.h" +#include +#include + +QT_BEGIN_NAMESPACE + +/* + \class QPropertyInfo + \brief The QPropertyInfo type provides an easy access for reading and writing the property values. +*/ + +/* + Construct a QPropertyInfo object with parent \a parent +*/ +QPropertyInfo::QPropertyInfo(QObject* parent) + : QObject(parent) + , _index(0) + , _isWriteable(false) + , _name("") + , _typeName("") + , _value("") +{} + +/* + Construct a QPropertyInfo object with parent \a parent, property name \a name, property index \a index, + property write access \a writeable, property type \a typeName and property value \a value +*/ +QPropertyInfo::QPropertyInfo(const QString& name, int index, bool writeable, const QString& typeName, const QString& value, QObject* parent) + : QObject(parent) + , _index(index) + , _isWriteable(writeable) + , _name(name) + , _typeName(typeName) + , _value(value) +{} + +/* + \property QPropertyInfo::name + Returns the name of the property +*/ +QString QPropertyInfo::name() +{ + return _name; +} + +/* + \property QPropertyInfo::typeName + Returns the type of the property +*/ +QString QPropertyInfo::typeName() +{ + return _typeName; +} + +/* + \property QPropertyInfo::value + Returns the current value of the property +*/ +QString QPropertyInfo::value() +{ + return _value; +} + +/* + \fn void QPropertyInfo::valueChanged() + Signal that notifies the client if the property value was changed. +*/ + +/* + \fn QPropertyInfo::setValue(const QString& value) + Sets the value \a value of the property +*/ +void QPropertyInfo::setValue(const QString& value) +{ + if (value != _value){ + _value = value; + emit valueChanged(); + } +} + +/* + \fn QPropertyInfo::index() + Returns the meta-data index of the property +*/ +int QPropertyInfo::index() +{ + return _index; +} + +/* + \property QPropertyInfo::isWriteable + Returns true if the property is writeable false if property is read only +*/ +bool QPropertyInfo::isWriteable() +{ + return _isWriteable; +} + +QT_END_NAMESPACE diff --git a/basicsuite/SensorExplorer/imports/propertyinfo.h b/basicsuite/SensorExplorer/imports/propertyinfo.h new file mode 100644 index 0000000..72ce640 --- /dev/null +++ b/basicsuite/SensorExplorer/imports/propertyinfo.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPROPERTYINFO_H +#define QPROPERTYINFO_H + +#include +#include + +QT_BEGIN_NAMESPACE + +class QPropertyInfo : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString name READ name CONSTANT) + Q_PROPERTY(QString typeName READ typeName CONSTANT) + Q_PROPERTY(QString value READ value NOTIFY valueChanged) + Q_PROPERTY(bool isWriteable READ isWriteable CONSTANT) + +public: + QPropertyInfo(QObject* parent = 0); + QPropertyInfo(const QString& name, int index, bool writeable, const QString& typeName, const QString& value, QObject* parent=0); + QString name(); + QString typeName(); + QString value(); + void setValue(const QString& value); + int index(); + bool isWriteable(); + +Q_SIGNALS: + void valueChanged(); + +private: + int _index; + bool _isWriteable; + QString _name; + QString _typeName; + QString _value; +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QPropertyInfo) + +#endif // QPROPERTYINFO_H diff --git a/basicsuite/SensorExplorer/imports/qmldir b/basicsuite/SensorExplorer/imports/qmldir new file mode 100644 index 0000000..ad67d81 --- /dev/null +++ b/basicsuite/SensorExplorer/imports/qmldir @@ -0,0 +1,2 @@ +module Explorer +plugin sensorexplorer diff --git a/basicsuite/SensorExplorer/imports/sensoritem.cpp b/basicsuite/SensorExplorer/imports/sensoritem.cpp new file mode 100644 index 0000000..cd33549 --- /dev/null +++ b/basicsuite/SensorExplorer/imports/sensoritem.cpp @@ -0,0 +1,322 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "sensoritem.h" +#include +#include + +QT_BEGIN_NAMESPACE + +/* + \class QSensorItem + \brief The QSensorItem type provides information about the meta-data from a sensors installed on the system. +*/ + +/* + Construct a QSensorItem object with parent \a parent +*/ +QSensorItem::QSensorItem(QObject* parent) + : QObject(parent) + , _qsensor(0) +{ +} + +/* + Construct a QSensorItem object with QSensor \a sensor and parent \a parent +*/ +QSensorItem::QSensorItem(QSensor* sensor, QObject* parent) + : QObject(parent) + , _qsensor(sensor) +{ +} + +/* + Destructor of a QSensorItem +*/ +QSensorItem::~QSensorItem() +{ +} + +/* + \fn QSensorItem::startChanged() + Notifies the client if the sensors has changed its start active status +*/ + +/* + \property QSensorItem::start + This property starts or stops the sensor +*/ +bool QSensorItem::start() +{ + return (_qsensor ? _qsensor->isActive() : false); +} + +void QSensorItem::setStart(bool run) +{ + if (_qsensor) + _qsensor->setActive(run); +} + +/* + \property QSensorItem::id + Returns the sensor id of the sensor item +*/ +QString QSensorItem::id() +{ + return (_qsensor ? _qsensor->description() : ""); +} + +/* + Set the new value \a val to the QPropertyInfo object \a property +*/ +void QSensorItem::changePropertyValue(QPropertyInfo* property, const QString& val) +{ + if (_qsensor && _sensorProperties.contains(property)){ + if ( _qsensor->setProperty(property->name().toLatin1().constData(), QVariant(val))) + updateSensorPropertyValues(); + else + qWarning() << "new property value couldn't be set"; + } +} + +/* + Reading the meta-data and activates the sensor. +*/ +void QSensorItem::select() +{ + if (_sensorProperties.isEmpty()) { + // Probe the reading using Qt's meta-object facilities + //Read properties from reader + QSensorReading *reading = _qsensor->reading(); + const QMetaObject *mo = reading->metaObject(); + int firstProperty = QSensorReading::staticMetaObject.propertyOffset(); + + for (int i = firstProperty; i < mo->propertyCount(); ++i) { + QString typeName = QLatin1String(mo->property(i).typeName()); + int crap = typeName.lastIndexOf("::"); + if (crap != -1) + typeName = typeName.mid(crap + 2); + + QPropertyInfo* pi = new QPropertyInfo(mo->property(i).name() + , i + , isWriteable(mo->property(i).name()) + , typeName + , "-" + , this); + _readerProperties.append(pi); + } + + //Read properties from sensor + const QMetaObject *mo1 = _qsensor->metaObject(); + firstProperty = QSensorReading::staticMetaObject.propertyOffset(); + + for (int i = firstProperty; i < mo1->propertyCount(); ++i) { + QString propertyname = mo1->property(i).name(); + if (ignoreProperty(propertyname)) + continue; + + QString typeName = QLatin1String(mo1->property(i).typeName()); + int crap = typeName.lastIndexOf("::"); + if (crap != -1) + typeName = typeName.mid(crap + 2); + + QPropertyInfo* pi = new QPropertyInfo(propertyname + , i + , isWriteable(propertyname) + , typeName + , "-" + , this); + _sensorProperties.append(pi); + } + updateSensorPropertyValues(); + connect(_qsensor, SIGNAL(readingChanged()), this, SLOT(sensorReadingChanged())); + } + connect(_qsensor, SIGNAL(activeChanged()), SIGNAL(startChanged())); +} + +/* + Unselect the sensor by stopping the sensor. +*/ +void QSensorItem::unSelect() +{ + _qsensor->stop(); + disconnect(_qsensor, SIGNAL(activeChanged()), this , SIGNAL(startChanged())); +} + +/* + Updates the property values from QSensor +*/ +void QSensorItem::updateSensorPropertyValues() +{ + if (_qsensor){ + const QMetaObject *mo = _qsensor->metaObject(); + for (int i = 0; i < _sensorProperties.count(); i++){ + QVariant val = mo->property(_sensorProperties[i]->index()).read(_qsensor); + _sensorProperties[i]->setValue(convertValue(_sensorProperties[i]->typeName(), val)); + } + } +} + +/* + \fn QSensorItem::propertiesChanged() + Notifies the client if the list of the properties was changed +*/ + +/* + Updates the property values from the QSensorReader +*/ +void QSensorItem::sensorReadingChanged() +{ + QSensorReading *reading = _qsensor->reading(); + const QMetaObject *mo = reading->metaObject(); + for (int i = 0; i < _readerProperties.count(); i++){ + QVariant val = mo->property(_readerProperties[i]->index()).read(reading); + _readerProperties[i]->setValue(convertValue(_readerProperties[i]->typeName(), val)); + } +} + +/* + Returns true if the property with the name \a propertyname should be ignored +*/ +bool QSensorItem::ignoreProperty(const QString& propertyname) +{ + if (propertyname == "reading" || + propertyname == "active" || + propertyname == "identifier" || + propertyname == "connectedToBackend" || + propertyname == "busy") + return true; + + return false; +} + +/* + Returns true if the property with the name \a propertyname is writeable +*/ +bool QSensorItem::isWriteable(const QString& propertyname) +{ + if (_qsensor){ + const QMetaObject *mo = _qsensor->metaObject(); + int propertyindex = mo->indexOfProperty(propertyname.toLocal8Bit().constData()); + if (propertyindex >= 0){ + QMetaProperty prop = mo->property(propertyindex); + return prop.isWritable(); + } + else { + QSensorReading *reading = _qsensor->reading(); + const QMetaObject *moreader = reading->metaObject(); + propertyindex = moreader->indexOfProperty(propertyname.toLocal8Bit().constData()); + if (propertyindex >= 0){ + QMetaProperty prop = mo->property(propertyindex); + return prop.isWritable(); + } + } + } + + return false; +} + +/* + Convert the variant \a val dependent on the type \a type and returns the converted value as a QString +*/ +QString QSensorItem::convertValue(const QString& type, const QVariant& val) +{ + if (type == "LightLevel"){ + switch (val.toInt()) { + case 1: return "Dark"; + case 2: return "Twilight"; + case 3: return "Light"; + case 4: return "Bright"; + case 5: return "Sunny"; + default: return "Undefined"; + } + } + else if (type == "Orientation"){ + switch (val.toInt()) { + case 1: return "TopUp"; + case 2: return "TopDown"; + case 3: return "LeftUp"; + case 4: return "RightUp"; + case 5: return "FaceUp"; + case 6: return "FaceDown"; + default: return "Undefined"; + } + } + else if (type == "qrangelist"){ + qrangelist rangelist = val.value(); + QStringList ranges; + foreach (const qrange &r, rangelist) { + if (r.first == r.second) + ranges << QString("%1 Hz").arg(r.first); + else + ranges << QString("%1-%2 Hz").arg(r.first).arg(r.second); + } + if (ranges.count() > 0) + return ranges.join(", "); + return "-"; + } + else if (type == "qoutputrangelist") { + qoutputrangelist rangelist = val.value(); + QStringList ranges; + foreach (const qoutputrange &r, rangelist) { + ranges << QString("(%1, %2) += %3").arg(r.minimum).arg(r.maximum).arg(r.accuracy); + } + if (ranges.count() > 0) + return ranges.join(", "); + return "-"; + } + + return val.toString(); +} + +/* + \property QSensorItem::properties + Returns a list of all properties from the sensor +*/ +QQmlListProperty QSensorItem::properties() +{ + _properties.clear(); + _properties.append(_sensorProperties); + _properties.append(_readerProperties); + return QQmlListProperty (this, _properties); +} + +QT_END_NAMESPACE diff --git a/basicsuite/SensorExplorer/imports/sensoritem.h b/basicsuite/SensorExplorer/imports/sensoritem.h new file mode 100644 index 0000000..b17d8ed --- /dev/null +++ b/basicsuite/SensorExplorer/imports/sensoritem.h @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSENSORITEM_H +#define QSENSORITEM_H + +#include +#include +#include "propertyinfo.h" + +QT_BEGIN_NAMESPACE + +class QSensor; +class QSensorItem : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool start READ start WRITE setStart NOTIFY startChanged) + Q_PROPERTY(QString id READ id CONSTANT) + Q_PROPERTY(QQmlListProperty properties READ properties NOTIFY propertiesChanged) +public: + QSensorItem(QObject* parent = 0); + QSensorItem(QSensor* sensor, QObject* parent = 0); + virtual ~QSensorItem(); + +public slots: + void select(); + void unSelect(); + void changePropertyValue(QPropertyInfo* property, const QString& val); + +private slots: + void sensorReadingChanged(); + +private: + QString id(); + bool start(); + void setStart(bool run); + QQmlListProperty properties(); + QString convertValue(const QString& type, const QVariant& val); + bool isWriteable(const QString& propertyname); + bool ignoreProperty(const QString& propertyname); + void updateSensorPropertyValues(); + +Q_SIGNALS: + void propertiesChanged(); + void startChanged(); + +private: + QSensor* _qsensor; + QList _properties; + QList _readerProperties; + QList _sensorProperties; +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QSensorItem) + +#endif // QSENSORITEM_H diff --git a/basicsuite/SensorExplorer/main.qml b/basicsuite/SensorExplorer/main.qml new file mode 100644 index 0000000..7b71250 --- /dev/null +++ b/basicsuite/SensorExplorer/main.qml @@ -0,0 +1,224 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 1.0 +import QtSensors 5.0 + +//! [0] +import Explorer 1.0 +//! [0] + +Item { + id: root + width: 800 + height: 1280 + Rectangle { + id: main + width: root.height + height: root.width + anchors.centerIn: parent + rotation: -90 + + //! [1] + SensorExplorer { + id: explorer + } + //! [1] + + Column { + anchors.fill: parent + anchors.margins: 8 + spacing: 8 + + GroupBox { + id: topBox + title: qsTr("Available Sensors") + width: parent.width + height: main.height * 0.4 + + TableView { + id: sensorList + width: parent.width + height: parent.height * 0.80 + anchors.top: parent.top + anchors.topMargin: 22 + //! [2] + model: explorer.availableSensors + //! [2] + + TableViewColumn { role: "id"; title: qsTr("ID"); width: main.width * 0.7 } + TableViewColumn { role: "start"; title: qsTr("Running"); width: main.width * 0.15 } + + onClicked: { + explorer.selectedSensorItem = explorer.availableSensors[row] + //! [3] + propertyList.model = explorer.selectedSensorItem.properties + //! [3] + button.update() + } + } + + Button { + id: button + anchors.top: sensorList.bottom + anchors.right: parent.right + anchors.topMargin: 8 + text: qsTr("Start") + enabled: explorer.selectedSensorItem !== null + + function update() { + text = (explorer.selectedSensorItem !== null ? + (explorer.selectedSensorItem.start === true ? + qsTr("Stop") : qsTr("Start")) : qsTr("Start")) + } + + onClicked: { + if (explorer.selectedSensorItem !== null) { + //! [5] + if (text === "Start") { + explorer.selectedSensorItem.start = true; + text = "Stop"; + } + else { + explorer.selectedSensorItem.start = false; + text = "Start"; + } + //! [5] + } + } + } + + } + + GroupBox { + title: qsTr("Properties") + width: parent.width + height: main.height - topBox.height - 30 + enabled: explorer.selectedSensorItem != null + + TableView { + id: propertyList + property PropertyInfo selectedItem: null + + anchors.fill: parent + anchors.topMargin: 22 + + TableViewColumn { role: "name"; title: qsTr("Name"); width: 140 } + TableViewColumn { role: "value"; title: qsTr("Value"); width: 140 } + + onClicked: { + selectedItem = model[row] + } + + itemDelegate: { + if (selectedItem && selectedItem.isWriteable) + return editableDelegate; + return readOnlyDelegate; + } + + Component { + id: readOnlyDelegate + Item { + Text { + width: parent.width + anchors.margins: 4 + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + elide: styleData.elideMode + text: styleData.value + color: propertyList.model[styleData.row].isWriteable ? + styleData.textColor : Qt.lighter(styleData.textColor) + } + } + } + + Component { + id: editableDelegate + Item { + Text { + width: parent.width + anchors.margins: 4 + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + elide: styleData.elideMode + text: styleData.value + color: styleData.textColor + visible: !styleData.selected || styleData.column === 0 + } + Loader { // Initialize text editor lazily to improve performance + id: loaderEditor + anchors.margins: 4 + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + Connections { + target: loaderEditor.item + onAccepted: { + //! [4] + explorer.selectedSensorItem.changePropertyValue(propertyList.selectedItem, loaderEditor.item.text); + //! [4] + } + } + + // Load the editor for selected 'Value' cell + sourceComponent: (styleData.selected && styleData.column === 1) ? editor : null + + Component { + id: editor + TextInput { // ### TODO - this needs to utilize a virtual keyboard + id: textinput + color: styleData.textColor + text: styleData.value + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: true + onClicked: textinput.forceActiveFocus() + } + } + } + } + } + } + } + } + } + } +} diff --git a/basicsuite/SensorExplorer/preview_l.jpg b/basicsuite/SensorExplorer/preview_l.jpg new file mode 100644 index 0000000..eeb2282 Binary files /dev/null and b/basicsuite/SensorExplorer/preview_l.jpg differ diff --git a/basicsuite/SensorExplorer/title.txt b/basicsuite/SensorExplorer/title.txt new file mode 100644 index 0000000..c56fed8 --- /dev/null +++ b/basicsuite/SensorExplorer/title.txt @@ -0,0 +1 @@ +Sensor Explorer diff --git a/basicsuite/basicsuite.pro b/basicsuite/basicsuite.pro index 2729de4..672cb4c 100644 --- a/basicsuite/basicsuite.pro +++ b/basicsuite/basicsuite.pro @@ -1,4 +1,5 @@ TEMPLATE = subdirs SUBDIRS += \ Qt5Everywhere \ - Camera + Camera \ + SensorExplorer -- cgit v1.2.3 From b53eebc64f12b5d3b4982fdc741825c0cc3538dc Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 15 Oct 2013 07:51:30 +0200 Subject: Add screenshots for Media Player and Camera demos Change-Id: I2a63828c11738df8ba2647ee6a2f1055617a311c Reviewed-by: Eirik Aavitsland --- basicsuite/Camera/preview_l.jpg | Bin 0 -> 34718 bytes basicsuite/Media Player/preview_l.jpg | Bin 0 -> 28392 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 basicsuite/Camera/preview_l.jpg create mode 100644 basicsuite/Media Player/preview_l.jpg diff --git a/basicsuite/Camera/preview_l.jpg b/basicsuite/Camera/preview_l.jpg new file mode 100644 index 0000000..c2ab784 Binary files /dev/null and b/basicsuite/Camera/preview_l.jpg differ diff --git a/basicsuite/Media Player/preview_l.jpg b/basicsuite/Media Player/preview_l.jpg new file mode 100644 index 0000000..5ed632c Binary files /dev/null and b/basicsuite/Media Player/preview_l.jpg differ -- cgit v1.2.3 From 6482ef62f0068148d08b832384b6b9b9b7a5c41f Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 15 Oct 2013 18:17:57 +0200 Subject: Add black borders to match with other screenshots This improves edge rendering in the qtlauncher. Change-Id: I82557909e43c366b8dae736b77860d21884d4540 Reviewed-by: Gatis Paeglis --- basicsuite/Camera/preview_l.jpg | Bin 34718 -> 33458 bytes basicsuite/Media Player/preview_l.jpg | Bin 28392 -> 29015 bytes basicsuite/Qt5Everywhere/preview_l.jpg | Bin 33885 -> 34331 bytes basicsuite/SensorExplorer/preview_l.jpg | Bin 21818 -> 18734 bytes basicsuite/Sensors/preview_l.jpg | Bin 18384 -> 19464 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/basicsuite/Camera/preview_l.jpg b/basicsuite/Camera/preview_l.jpg index c2ab784..3f15310 100644 Binary files a/basicsuite/Camera/preview_l.jpg and b/basicsuite/Camera/preview_l.jpg differ diff --git a/basicsuite/Media Player/preview_l.jpg b/basicsuite/Media Player/preview_l.jpg index 5ed632c..0fff215 100644 Binary files a/basicsuite/Media Player/preview_l.jpg and b/basicsuite/Media Player/preview_l.jpg differ diff --git a/basicsuite/Qt5Everywhere/preview_l.jpg b/basicsuite/Qt5Everywhere/preview_l.jpg index 6bc9c97..1bb40bf 100644 Binary files a/basicsuite/Qt5Everywhere/preview_l.jpg and b/basicsuite/Qt5Everywhere/preview_l.jpg differ diff --git a/basicsuite/SensorExplorer/preview_l.jpg b/basicsuite/SensorExplorer/preview_l.jpg index eeb2282..118a151 100644 Binary files a/basicsuite/SensorExplorer/preview_l.jpg and b/basicsuite/SensorExplorer/preview_l.jpg differ diff --git a/basicsuite/Sensors/preview_l.jpg b/basicsuite/Sensors/preview_l.jpg index 3682cdf..7ce979d 100644 Binary files a/basicsuite/Sensors/preview_l.jpg and b/basicsuite/Sensors/preview_l.jpg differ -- cgit v1.2.3 From 61d6538beff04bcff148e491b01d5a06350db8b6 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 16 Oct 2013 13:57:19 +0200 Subject: Update About Boot to Qt demo Update the text displayed in the demo to discuss Boot to Qt for embedded Linux, and fix other minor issues. Task-number: QTRD-2456 Change-Id: Ic23d6b3ef772a4bfdd0c6fe650cbf0d555b31578 Reviewed-by: Rainer Keller Reviewed-by: Eirik Aavitsland --- basicsuite/About Boot to Qt/AboutBoot2Qt.qml | 22 +++++++++++++++------- basicsuite/About Boot to Qt/QtForAndroid.qml | 19 ++++++++++++------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/basicsuite/About Boot to Qt/AboutBoot2Qt.qml b/basicsuite/About Boot to Qt/AboutBoot2Qt.qml index 66346c1..7d8aa9a 100644 --- a/basicsuite/About Boot to Qt/AboutBoot2Qt.qml +++ b/basicsuite/About Boot to Qt/AboutBoot2Qt.qml @@ -16,12 +16,20 @@ Column { ContentText { id: brief width: parent.width - text: '

Boot to Qt is the working name for a light-weight UI stack for embedded linux, - based on the Qt Framework by Digia. Boot to Qt places Qt on top of an Android - kernel/baselayer and offers an elegant means of developing beautiful and - performant embedded devices. + text: '

Boot to Qt is a light-weight UI stack for embedded systems, based on the Qt Framework by Digia, + offering an elegant means of developing beautiful and performant embedded devices. It supports two different + operating systems: +

    +
  • Boot to Qt for embedded Android places Qt on top of an Android (version 4.1 or higher) + kernel/baselayer.
  • +
  • Boot to Qt for embedded Linux places Qt on top of an Linux kernel/baselayer, built using + Yocto 1.4 \'Dylan\' release.
  • +
+ Both versions have been tested and verified on a number of different hardware configurations. + Boot to Qt support is not limited to the devices used as reference platforms, it can be made to run on a + variety of hardware. -

Boot to Qt is a commercial-only SDK offering which includes a ready-made stack +

Boot to Qt is part of a commercial-only SDK offering which includes a ready-made stack with full Qt Creator integration. The SDK allows building and running on device with just a button. Embedded development has never been this easy!' } @@ -33,7 +41,7 @@ Column { anchors.horizontalCenter: parent.horizontalCenter Box { text: "Application"; accentColor: "coral" } Box { text: "Qt Framework"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } - Box { text: "Android Baselayer"; accentColor: "steelblue" } + Box { text: "Android/Linux Baselayer"; accentColor: "steelblue" } Box { text: "Embedded Hardware"; accentColor: "steelblue"} } @@ -42,7 +50,7 @@ Column { width: parent.width - text: '

Boot to Qt runs on top of Android 4.0 based kernels and has been tested and verified on + text: '

Boot to Qt has been tested and verified on a number of different hardware configurations, including:

  • Google Nexus 7 - NVIDIA Tegra3 Quad Core, 1 GB RAM
  • diff --git a/basicsuite/About Boot to Qt/QtForAndroid.qml b/basicsuite/About Boot to Qt/QtForAndroid.qml index 2eac080..565cd7d 100644 --- a/basicsuite/About Boot to Qt/QtForAndroid.qml +++ b/basicsuite/About Boot to Qt/QtForAndroid.qml @@ -8,7 +8,7 @@ Column { spacing: engine.smallFontSize() Title { - text: "Boot2Qt vs Qt for Android" + text: "Boot to Qt vs Qt for Android" } ContentText { @@ -19,12 +19,11 @@ Column { can run on Android devices. For developers writing applications for the Android ecosystem, Qt for Android is the right choice. -

    Boot2Qt tries to strip down the Android stack to the bare minimum, - relying only on basic Linux features. The majority of the Android stack, - such as SurfaceFlinger or DalvikVM is not running in - Boot2Qt, resulting in faster startup times, lower memory consumption - and overall better performance. - ' +

    Boot to Qt for embedded Android tries to strip down + the Android stack to the bare minimum, relying only on basic Linux features. + The majority of the Android stack, such as Dalvik virtual machine is + not running in Boot to Qt, resulting in faster startup times, lower memory consumption + and overall better performance.' } Column { @@ -45,4 +44,10 @@ Column { Box { text: "Embedded Hardware"; accentColor: "steelblue"} } + ContentText { + width: parent.width + text: '

    Boot to Qt for embedded Linux is build from scratch using + Yocto 1.4 tools to contain only components required in the embedded device, + resulting in smaller image sizes while keeping valuable development tools available.' + } } -- cgit v1.2.3 From f9d849d4af7a2098ad046e7394bf2bffbc4dbf63 Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 16 Oct 2013 15:17:20 +0200 Subject: no multimedia on beagleboard eAndroid Change-Id: Icb4175af124a43b0d2f85ab46fda3e612c4e4bc1 Reviewed-by: Gatis Paeglis --- basicsuite/Camera/exclude.txt | 1 + basicsuite/Media Player/exclude.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 basicsuite/Camera/exclude.txt create mode 100644 basicsuite/Media Player/exclude.txt diff --git a/basicsuite/Camera/exclude.txt b/basicsuite/Camera/exclude.txt new file mode 100644 index 0000000..12fca1d --- /dev/null +++ b/basicsuite/Camera/exclude.txt @@ -0,0 +1 @@ +android_beagleboard diff --git a/basicsuite/Media Player/exclude.txt b/basicsuite/Media Player/exclude.txt new file mode 100644 index 0000000..12fca1d --- /dev/null +++ b/basicsuite/Media Player/exclude.txt @@ -0,0 +1 @@ +android_beagleboard -- cgit v1.2.3 From 1fcbbfe859fba4d2eb55a6aad1677624c9b33460 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 16 Oct 2013 15:49:10 +0200 Subject: Show Sensor Explorer example in landscape Change-Id: I4925704922c94d3a6980d7f4745498a56ff5bce5 Reviewed-by: Eirik Aavitsland --- basicsuite/SensorExplorer/main.qml | 6 +++--- basicsuite/SensorExplorer/preview_l.jpg | Bin 18734 -> 21553 bytes 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basicsuite/SensorExplorer/main.qml b/basicsuite/SensorExplorer/main.qml index 7b71250..2a58709 100644 --- a/basicsuite/SensorExplorer/main.qml +++ b/basicsuite/SensorExplorer/main.qml @@ -50,12 +50,12 @@ Item { id: root width: 800 height: 1280 + Rectangle { id: main - width: root.height - height: root.width + width: root.width + height: root.height anchors.centerIn: parent - rotation: -90 //! [1] SensorExplorer { diff --git a/basicsuite/SensorExplorer/preview_l.jpg b/basicsuite/SensorExplorer/preview_l.jpg index 118a151..b0469e5 100644 Binary files a/basicsuite/SensorExplorer/preview_l.jpg and b/basicsuite/SensorExplorer/preview_l.jpg differ -- cgit v1.2.3 From 95fb782f1c91799fcff6f18aa5fc75292e834440 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 17 Oct 2013 12:34:20 +0200 Subject: Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I74c7d1493cb12b6fe4c460f353b3f914aafeae3c Reviewed-by: Topi Reiniö --- basicsuite/Text Input/description.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicsuite/Text Input/description.txt b/basicsuite/Text Input/description.txt index 7c3b780..0469b1b 100644 --- a/basicsuite/Text Input/description.txt +++ b/basicsuite/Text Input/description.txt @@ -2,5 +2,5 @@ This examples illustrates how Qt can handle input on touch devices. The launcher loads a custom platform input context plugin and contains a virtual keyboard. When a text control in Qt Quick gets focus, the input context will trigger the virtual keyboard to show on screen and clicks in the virtual keyboard are delegated to the text control. -Our demo virtual keyboard has support for english, finnish and arabic. The input context plugin API is plugin based and can be replaced with whatever the user desiers. Qt has a ready made plugin for Maliit, an open-source, cross-platform input method framework for mobile and embedded. +Our demo virtual keyboard has support for english, finnish and arabic. The input context plugin API is plugin based and can be replaced with whatever the user desires. Qt has a ready made plugin for Maliit, an open-source, cross-platform input method framework for mobile and embedded. -- cgit v1.2.3 From f1ea9ca56319ea463fa6d8d7eef6cff071ebb5b6 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 17 Oct 2013 13:34:46 +0200 Subject: Fix typos Change-Id: I1cfd32f4109a21270ac3bfa64b7494abb6a07adb Reviewed-by: Eirik Aavitsland --- basicsuite/About Boot to Qt/description.txt | 2 +- basicsuite/Graphical Effects/description.txt | 2 +- basicsuite/Photo Gallery/description.txt | 2 +- basicsuite/Qt5 Cinematic Demo/description.txt | 4 ++-- basicsuite/SensorExplorer/description.txt | 2 +- basicsuite/Text Input/description.txt | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/basicsuite/About Boot to Qt/description.txt b/basicsuite/About Boot to Qt/description.txt index f546387..676a166 100644 --- a/basicsuite/About Boot to Qt/description.txt +++ b/basicsuite/About Boot to Qt/description.txt @@ -1,3 +1,3 @@ The "About Boot to Qt" provides an introduction to what Boot to Qt is all about. -It talks briefly about how the software stack is built up, rough hardware requirements and how Boot to Qt from the more traditional Qt editions. +It talks briefly about how the software stack is built up, rough hardware requirements and how Boot to Qt differs from the more traditional Qt editions. diff --git a/basicsuite/Graphical Effects/description.txt b/basicsuite/Graphical Effects/description.txt index 8623c2c..e2d3acf 100644 --- a/basicsuite/Graphical Effects/description.txt +++ b/basicsuite/Graphical Effects/description.txt @@ -1,2 +1,2 @@ -This example shows the Qt Quick 2.0 ShaderEffect type and the QtGraphicalEffect module. Qt Quick 2.0 provides the ability to use inline GLSL in your Qt Quick applications to create stunning visual effects. However, as UIs typically reuse many of the same effects, the QtGraphicalEffects module provides a set of predefined, commonly used effects. This includes blur, drop-shadows, glow, blending, opacity maskes and more. +This example shows the Qt Quick 2.0 ShaderEffect type and the QtGraphicalEffect module. Qt Quick 2.0 provides the ability to use inline GLSL in your Qt Quick applications to create stunning visual effects. However, as UIs typically reuse many of the same effects, the QtGraphicalEffects module provides a set of predefined, commonly used effects. This includes blur, drop-shadows, glow, blending, opacity masks and more. diff --git a/basicsuite/Photo Gallery/description.txt b/basicsuite/Photo Gallery/description.txt index a619aee..f5e302c 100644 --- a/basicsuite/Photo Gallery/description.txt +++ b/basicsuite/Photo Gallery/description.txt @@ -1 +1 @@ -This is simple photo gallery, indexing images found in /data/images. +This is a simple photo gallery, showing images found in /data/images. diff --git a/basicsuite/Qt5 Cinematic Demo/description.txt b/basicsuite/Qt5 Cinematic Demo/description.txt index 449cc28..253d246 100644 --- a/basicsuite/Qt5 Cinematic Demo/description.txt +++ b/basicsuite/Qt5 Cinematic Demo/description.txt @@ -1,5 +1,5 @@ The Qt5 Cinematic Experience is a demo by "QUIt Coding", a small group of talented individuals enjoying software development with cutting edge technologies. They are official members of the Qt Ambassador Program. -The demo shows off a number features of Qt Quick 2.0. A nicely styled list control with movie covers with lighting effects. Particles and transitions. The information roll-down curvy curtain and is implemented using inline GLSL in the QML file. +The demo shows off a number features of Qt Quick 2.0. A nicely styled list control of movie covers with lighting effects, particles and transitions. The information roll-down curvy curtain is implemented using inline GLSL in the QML file. -The source code for this demo and more awesome looking Qt Quick stuff is available from quitcoding.com. +The source code for this demo and more awesome looking Qt Quick examples are available from quitcoding.com. diff --git a/basicsuite/SensorExplorer/description.txt b/basicsuite/SensorExplorer/description.txt index 9724112..606dc9b 100644 --- a/basicsuite/SensorExplorer/description.txt +++ b/basicsuite/SensorExplorer/description.txt @@ -1 +1 @@ -This example provides a list of all available sensors installed on the system for which Qt has a backend. Start a sensor to see how values changes depending from environment and user-device interaction. +This example provides a list of all available sensors installed on the system for which Qt has a backend. Start a sensor to see how values change depending from environment and user-device interaction. diff --git a/basicsuite/Text Input/description.txt b/basicsuite/Text Input/description.txt index 0469b1b..c60d036 100644 --- a/basicsuite/Text Input/description.txt +++ b/basicsuite/Text Input/description.txt @@ -2,5 +2,5 @@ This examples illustrates how Qt can handle input on touch devices. The launcher loads a custom platform input context plugin and contains a virtual keyboard. When a text control in Qt Quick gets focus, the input context will trigger the virtual keyboard to show on screen and clicks in the virtual keyboard are delegated to the text control. -Our demo virtual keyboard has support for english, finnish and arabic. The input context plugin API is plugin based and can be replaced with whatever the user desires. Qt has a ready made plugin for Maliit, an open-source, cross-platform input method framework for mobile and embedded. +Our demo virtual keyboard has support for english, finnish and arabic. The input context API is plugin based and users can replace existing plugins with whatever they desire. Qt has a ready made plugin for Maliit, an open-source, cross-platform input method framework for mobile and embedded. -- cgit v1.2.3 From 9cf579ea35e88f3ce551f519dd2c74a8819a7faa Mon Sep 17 00:00:00 2001 From: aavit Date: Thu, 17 Oct 2013 16:12:09 +0200 Subject: exclude Camera from linux_iMX6 (just shows black screen) Change-Id: I57063ed075eb7bf5b5c812a58297f47bc44babb9 Reviewed-by: Andy Nichols --- basicsuite/Camera/exclude.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicsuite/Camera/exclude.txt b/basicsuite/Camera/exclude.txt index 12fca1d..4b25872 100644 --- a/basicsuite/Camera/exclude.txt +++ b/basicsuite/Camera/exclude.txt @@ -1 +1 @@ -android_beagleboard +android_beagleboard:linux_iMX6 -- cgit v1.2.3 From 76c8520c206259d86298d40ac20afdb0c6a9199c Mon Sep 17 00:00:00 2001 From: aavit Date: Fri, 18 Oct 2013 13:57:13 +0200 Subject: Exclude some more demos (and fix syntax) Change-Id: Ieed04db9d4b331efff7cc8f6f047c95ccf6ebe39 Reviewed-by: Andy Nichols --- basicsuite/Camera/exclude.txt | 2 +- basicsuite/Media Player/exclude.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/basicsuite/Camera/exclude.txt b/basicsuite/Camera/exclude.txt index 4b25872..5716448 100644 --- a/basicsuite/Camera/exclude.txt +++ b/basicsuite/Camera/exclude.txt @@ -1 +1 @@ -android_beagleboard:linux_iMX6 +android-beagleboard:linux-iMX6:linux-raspberrypi: diff --git a/basicsuite/Media Player/exclude.txt b/basicsuite/Media Player/exclude.txt index 12fca1d..3af57ab 100644 --- a/basicsuite/Media Player/exclude.txt +++ b/basicsuite/Media Player/exclude.txt @@ -1 +1 @@ -android_beagleboard +android-beagleboard:linux-raspberrypi: -- cgit v1.2.3 From 3cc80bd7ffea5d4d36354299d6065c02cc6d5f4d Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 18 Nov 2013 10:24:26 +0200 Subject: include media player for raspberry pi Performance is not great, but at least videos work on raspberry pi. Change-Id: Iad71fa7421b1b18de7ed7f5415c2006ba2347553 Reviewed-by: Eirik Aavitsland --- basicsuite/Media Player/exclude.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicsuite/Media Player/exclude.txt b/basicsuite/Media Player/exclude.txt index 3af57ab..952c994 100644 --- a/basicsuite/Media Player/exclude.txt +++ b/basicsuite/Media Player/exclude.txt @@ -1 +1 @@ -android-beagleboard:linux-raspberrypi: +android-beagleboard: -- cgit v1.2.3 From 43adc2b571c8b7ac0cb233eced71f71fda61f74f Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 14 Nov 2013 12:00:53 +0100 Subject: Add Digia license headers Adds a BSD license header to example source (*.cpp, *.h, and *.qml) files that do not have a license already. Change-Id: If51883d2d1b76f84acce42ccd4e42b706c42431d Reviewed-by: Eirik Aavitsland --- basicsuite/About Boot to Qt/AboutBoot2Qt.qml | 40 ++++++++++++++++++++++ basicsuite/About Boot to Qt/Box.qml | 40 ++++++++++++++++++++++ basicsuite/About Boot to Qt/ContentText.qml | 40 ++++++++++++++++++++++ basicsuite/About Boot to Qt/QtForAndroid.qml | 40 ++++++++++++++++++++++ basicsuite/About Boot to Qt/QtFramework.qml | 40 ++++++++++++++++++++++ basicsuite/About Boot to Qt/Title.qml | 40 ++++++++++++++++++++++ basicsuite/About Boot to Qt/main.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/CameraControlButton.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/CameraSetting.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/CaptureControl.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/CapturePreview.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/Controls.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/FocusControl.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/Picker.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/RecordingTime.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/Slider.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/ZoomControl.qml | 40 ++++++++++++++++++++++ basicsuite/Camera/camerautils/camerautils.cpp | 40 ++++++++++++++++++++++ basicsuite/Camera/camerautils/camerautils.h | 40 ++++++++++++++++++++++ basicsuite/Camera/main.qml | 40 ++++++++++++++++++++++ basicsuite/Graphical Effects/Checkers.qml | 40 ++++++++++++++++++++++ .../effect_BrightnessContrast.qml | 40 ++++++++++++++++++++++ basicsuite/Graphical Effects/effect_Colorize.qml | 40 ++++++++++++++++++++++ .../Graphical Effects/effect_CustomDissolve.qml | 40 ++++++++++++++++++++++ basicsuite/Graphical Effects/effect_CustomWave.qml | 40 ++++++++++++++++++++++ .../Graphical Effects/effect_Displacement.qml | 40 ++++++++++++++++++++++ basicsuite/Graphical Effects/effect_DropShadow.qml | 40 ++++++++++++++++++++++ .../Graphical Effects/effect_GaussianBlur.qml | 40 ++++++++++++++++++++++ basicsuite/Graphical Effects/effect_Glow.qml | 40 ++++++++++++++++++++++ .../Graphical Effects/effect_HueSaturation.qml | 40 ++++++++++++++++++++++ .../Graphical Effects/effect_OpacityMask.qml | 40 ++++++++++++++++++++++ .../Graphical Effects/effect_ThresholdMask.qml | 40 ++++++++++++++++++++++ basicsuite/Graphical Effects/main.qml | 40 ++++++++++++++++++++++ .../Launcher Settings/BrightnessController.qml | 40 ++++++++++++++++++++++ basicsuite/Launcher Settings/NetworkController.qml | 40 ++++++++++++++++++++++ basicsuite/Launcher Settings/PoweroffAction.qml | 40 ++++++++++++++++++++++ basicsuite/Launcher Settings/RebootAction.qml | 40 ++++++++++++++++++++++ basicsuite/Launcher Settings/main.qml | 40 ++++++++++++++++++++++ basicsuite/Media Player/ControlBar.qml | 40 ++++++++++++++++++++++ basicsuite/Media Player/ImageButton.qml | 40 ++++++++++++++++++++++ basicsuite/Media Player/Intro.qml | 40 ++++++++++++++++++++++ basicsuite/Media Player/MetadataView.qml | 40 ++++++++++++++++++++++ basicsuite/Media Player/PlaybackControl.qml | 40 ++++++++++++++++++++++ basicsuite/Media Player/SeekControl.qml | 40 ++++++++++++++++++++++ basicsuite/Media Player/Slider.qml | 40 ++++++++++++++++++++++ basicsuite/Media Player/UrlBar.qml | 40 ++++++++++++++++++++++ basicsuite/Media Player/VolumeControl.qml | 40 ++++++++++++++++++++++ basicsuite/Photo Gallery/main.qml | 40 ++++++++++++++++++++++ .../Qt5 Launch Presentation/WebKitSlideContent.qml | 40 ++++++++++++++++++++++ basicsuite/Qt5 Launch Presentation/WebkitSlide.qml | 40 ++++++++++++++++++++++ .../Qt5Everywhere/demos/shaders/import/main.cpp | 40 ++++++++++++++++++++++ .../demos/shaders/import/shaderfilereader.cpp | 40 ++++++++++++++++++++++ .../demos/shaders/import/shaderfilereader.h | 40 ++++++++++++++++++++++ basicsuite/Sensors/Accelbubble.qml | 40 ++++++++++++++++++++++ basicsuite/Sensors/Light.qml | 40 ++++++++++++++++++++++ basicsuite/Sensors/main.qml | 40 ++++++++++++++++++++++ experimental/Overlay Tester/main.qml | 40 ++++++++++++++++++++++ experimental/Wifi/main.qml | 40 ++++++++++++++++++++++ .../qt5-intro-android/WebKitSlideContent.qml | 40 ++++++++++++++++++++++ experimental/qt5-intro-android/WebkitSlide.qml | 40 ++++++++++++++++++++++ experimental/qt5-intro-android/main.cpp | 40 ++++++++++++++++++++++ 61 files changed, 2440 insertions(+) diff --git a/basicsuite/About Boot to Qt/AboutBoot2Qt.qml b/basicsuite/About Boot to Qt/AboutBoot2Qt.qml index 7d8aa9a..b97ac3b 100644 --- a/basicsuite/About Boot to Qt/AboutBoot2Qt.qml +++ b/basicsuite/About Boot to Qt/AboutBoot2Qt.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Column { diff --git a/basicsuite/About Boot to Qt/Box.qml b/basicsuite/About Boot to Qt/Box.qml index cfbb995..283ed9f 100644 --- a/basicsuite/About Boot to Qt/Box.qml +++ b/basicsuite/About Boot to Qt/Box.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Rectangle { diff --git a/basicsuite/About Boot to Qt/ContentText.qml b/basicsuite/About Boot to Qt/ContentText.qml index ed95064..55d3e36 100644 --- a/basicsuite/About Boot to Qt/ContentText.qml +++ b/basicsuite/About Boot to Qt/ContentText.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Text { diff --git a/basicsuite/About Boot to Qt/QtForAndroid.qml b/basicsuite/About Boot to Qt/QtForAndroid.qml index 565cd7d..9c1aa38 100644 --- a/basicsuite/About Boot to Qt/QtForAndroid.qml +++ b/basicsuite/About Boot to Qt/QtForAndroid.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Column { diff --git a/basicsuite/About Boot to Qt/QtFramework.qml b/basicsuite/About Boot to Qt/QtFramework.qml index 3cb2f10..7085469 100644 --- a/basicsuite/About Boot to Qt/QtFramework.qml +++ b/basicsuite/About Boot to Qt/QtFramework.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Column { diff --git a/basicsuite/About Boot to Qt/Title.qml b/basicsuite/About Boot to Qt/Title.qml index 8fb13cc..62d0ba7 100644 --- a/basicsuite/About Boot to Qt/Title.qml +++ b/basicsuite/About Boot to Qt/Title.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Text { diff --git a/basicsuite/About Boot to Qt/main.qml b/basicsuite/About Boot to Qt/main.qml index 6586811..ba726d5 100644 --- a/basicsuite/About Boot to Qt/main.qml +++ b/basicsuite/About Boot to Qt/main.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtQuick.Particles 2.0 diff --git a/basicsuite/Camera/CameraControlButton.qml b/basicsuite/Camera/CameraControlButton.qml index dc82435..a740be7 100644 --- a/basicsuite/Camera/CameraControlButton.qml +++ b/basicsuite/Camera/CameraControlButton.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 MouseArea { diff --git a/basicsuite/Camera/CameraSetting.qml b/basicsuite/Camera/CameraSetting.qml index 224c70c..0912c38 100644 --- a/basicsuite/Camera/CameraSetting.qml +++ b/basicsuite/Camera/CameraSetting.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Item { diff --git a/basicsuite/Camera/CaptureControl.qml b/basicsuite/Camera/CaptureControl.qml index b8180f9..7d09151 100644 --- a/basicsuite/Camera/CaptureControl.qml +++ b/basicsuite/Camera/CaptureControl.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtMultimedia 5.0 diff --git a/basicsuite/Camera/CapturePreview.qml b/basicsuite/Camera/CapturePreview.qml index 611fa53..64c5f79 100644 --- a/basicsuite/Camera/CapturePreview.qml +++ b/basicsuite/Camera/CapturePreview.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Rectangle { diff --git a/basicsuite/Camera/Controls.qml b/basicsuite/Camera/Controls.qml index 7f5e82d..bd0db07 100644 --- a/basicsuite/Camera/Controls.qml +++ b/basicsuite/Camera/Controls.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtMultimedia 5.0 diff --git a/basicsuite/Camera/FocusControl.qml b/basicsuite/Camera/FocusControl.qml index f9b2f29..5245cfe 100644 --- a/basicsuite/Camera/FocusControl.qml +++ b/basicsuite/Camera/FocusControl.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtMultimedia 5.0 diff --git a/basicsuite/Camera/Picker.qml b/basicsuite/Camera/Picker.qml index 364fed7..9cbf27f 100644 --- a/basicsuite/Camera/Picker.qml +++ b/basicsuite/Camera/Picker.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 MouseArea { diff --git a/basicsuite/Camera/RecordingTime.qml b/basicsuite/Camera/RecordingTime.qml index 504d232..2156b74 100644 --- a/basicsuite/Camera/RecordingTime.qml +++ b/basicsuite/Camera/RecordingTime.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Rectangle { diff --git a/basicsuite/Camera/Slider.qml b/basicsuite/Camera/Slider.qml index 025d521..a9d3c10 100644 --- a/basicsuite/Camera/Slider.qml +++ b/basicsuite/Camera/Slider.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Item { diff --git a/basicsuite/Camera/ZoomControl.qml b/basicsuite/Camera/ZoomControl.qml index 493defe..15f2875 100644 --- a/basicsuite/Camera/ZoomControl.qml +++ b/basicsuite/Camera/ZoomControl.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Column { diff --git a/basicsuite/Camera/camerautils/camerautils.cpp b/basicsuite/Camera/camerautils/camerautils.cpp index 608bfaa..f6b6672 100644 --- a/basicsuite/Camera/camerautils/camerautils.cpp +++ b/basicsuite/Camera/camerautils/camerautils.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #include "camerautils.h" #include diff --git a/basicsuite/Camera/camerautils/camerautils.h b/basicsuite/Camera/camerautils/camerautils.h index 562b675..1f61c7c 100644 --- a/basicsuite/Camera/camerautils/camerautils.h +++ b/basicsuite/Camera/camerautils/camerautils.h @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #ifndef CAMERAUTILS_H #define CAMERAUTILS_H diff --git a/basicsuite/Camera/main.qml b/basicsuite/Camera/main.qml index 6a428e4..b7437de 100644 --- a/basicsuite/Camera/main.qml +++ b/basicsuite/Camera/main.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtMultimedia 5.0 //import QtSensors 5.0 diff --git a/basicsuite/Graphical Effects/Checkers.qml b/basicsuite/Graphical Effects/Checkers.qml index 9ebdcff..9e42b1c 100644 --- a/basicsuite/Graphical Effects/Checkers.qml +++ b/basicsuite/Graphical Effects/Checkers.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 diff --git a/basicsuite/Graphical Effects/effect_BrightnessContrast.qml b/basicsuite/Graphical Effects/effect_BrightnessContrast.qml index 97ccb48..fb8302d 100644 --- a/basicsuite/Graphical Effects/effect_BrightnessContrast.qml +++ b/basicsuite/Graphical Effects/effect_BrightnessContrast.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtGraphicalEffects 1.0 diff --git a/basicsuite/Graphical Effects/effect_Colorize.qml b/basicsuite/Graphical Effects/effect_Colorize.qml index 06c977e..4244f21 100644 --- a/basicsuite/Graphical Effects/effect_Colorize.qml +++ b/basicsuite/Graphical Effects/effect_Colorize.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtGraphicalEffects 1.0 diff --git a/basicsuite/Graphical Effects/effect_CustomDissolve.qml b/basicsuite/Graphical Effects/effect_CustomDissolve.qml index bd843bd..43be640 100644 --- a/basicsuite/Graphical Effects/effect_CustomDissolve.qml +++ b/basicsuite/Graphical Effects/effect_CustomDissolve.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Item { diff --git a/basicsuite/Graphical Effects/effect_CustomWave.qml b/basicsuite/Graphical Effects/effect_CustomWave.qml index 66e91be..5bde628 100644 --- a/basicsuite/Graphical Effects/effect_CustomWave.qml +++ b/basicsuite/Graphical Effects/effect_CustomWave.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Item { diff --git a/basicsuite/Graphical Effects/effect_Displacement.qml b/basicsuite/Graphical Effects/effect_Displacement.qml index c25827c..3c7b6d0 100644 --- a/basicsuite/Graphical Effects/effect_Displacement.qml +++ b/basicsuite/Graphical Effects/effect_Displacement.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtGraphicalEffects 1.0 diff --git a/basicsuite/Graphical Effects/effect_DropShadow.qml b/basicsuite/Graphical Effects/effect_DropShadow.qml index 125fe64..0dd3c48 100644 --- a/basicsuite/Graphical Effects/effect_DropShadow.qml +++ b/basicsuite/Graphical Effects/effect_DropShadow.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtGraphicalEffects 1.0 diff --git a/basicsuite/Graphical Effects/effect_GaussianBlur.qml b/basicsuite/Graphical Effects/effect_GaussianBlur.qml index f9a029c..7acfa3b 100644 --- a/basicsuite/Graphical Effects/effect_GaussianBlur.qml +++ b/basicsuite/Graphical Effects/effect_GaussianBlur.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtGraphicalEffects 1.0 diff --git a/basicsuite/Graphical Effects/effect_Glow.qml b/basicsuite/Graphical Effects/effect_Glow.qml index dd7a078..728f8cc 100644 --- a/basicsuite/Graphical Effects/effect_Glow.qml +++ b/basicsuite/Graphical Effects/effect_Glow.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtGraphicalEffects 1.0 diff --git a/basicsuite/Graphical Effects/effect_HueSaturation.qml b/basicsuite/Graphical Effects/effect_HueSaturation.qml index 4e3846a..e6ba039 100644 --- a/basicsuite/Graphical Effects/effect_HueSaturation.qml +++ b/basicsuite/Graphical Effects/effect_HueSaturation.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtGraphicalEffects 1.0 diff --git a/basicsuite/Graphical Effects/effect_OpacityMask.qml b/basicsuite/Graphical Effects/effect_OpacityMask.qml index e292ba4..47df139 100644 --- a/basicsuite/Graphical Effects/effect_OpacityMask.qml +++ b/basicsuite/Graphical Effects/effect_OpacityMask.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtGraphicalEffects 1.0 diff --git a/basicsuite/Graphical Effects/effect_ThresholdMask.qml b/basicsuite/Graphical Effects/effect_ThresholdMask.qml index 24b73fc..18cb07b 100644 --- a/basicsuite/Graphical Effects/effect_ThresholdMask.qml +++ b/basicsuite/Graphical Effects/effect_ThresholdMask.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtGraphicalEffects 1.0 diff --git a/basicsuite/Graphical Effects/main.qml b/basicsuite/Graphical Effects/main.qml index b4f148b..66c97ff 100644 --- a/basicsuite/Graphical Effects/main.qml +++ b/basicsuite/Graphical Effects/main.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Item { diff --git a/basicsuite/Launcher Settings/BrightnessController.qml b/basicsuite/Launcher Settings/BrightnessController.qml index 84eee8b..8ac6118 100644 --- a/basicsuite/Launcher Settings/BrightnessController.qml +++ b/basicsuite/Launcher Settings/BrightnessController.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtDroid.Utils 1.0 import QtQuick 2.0 diff --git a/basicsuite/Launcher Settings/NetworkController.qml b/basicsuite/Launcher Settings/NetworkController.qml index 3ec36ac..1962843 100644 --- a/basicsuite/Launcher Settings/NetworkController.qml +++ b/basicsuite/Launcher Settings/NetworkController.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtDroid.Utils 1.0 import QtQuick 2.0 diff --git a/basicsuite/Launcher Settings/PoweroffAction.qml b/basicsuite/Launcher Settings/PoweroffAction.qml index fd0e215..14c100d 100644 --- a/basicsuite/Launcher Settings/PoweroffAction.qml +++ b/basicsuite/Launcher Settings/PoweroffAction.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick.Controls 1.0 import QtDroid.Utils 1.0 diff --git a/basicsuite/Launcher Settings/RebootAction.qml b/basicsuite/Launcher Settings/RebootAction.qml index cdf84a5..476bdaf 100644 --- a/basicsuite/Launcher Settings/RebootAction.qml +++ b/basicsuite/Launcher Settings/RebootAction.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick.Controls 1.0 import QtDroid.Utils 1.0 diff --git a/basicsuite/Launcher Settings/main.qml b/basicsuite/Launcher Settings/main.qml index 140aebb..7cd510c 100644 --- a/basicsuite/Launcher Settings/main.qml +++ b/basicsuite/Launcher Settings/main.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtQuick.Controls 1.0 diff --git a/basicsuite/Media Player/ControlBar.qml b/basicsuite/Media Player/ControlBar.qml index 1778728..a3d0ae2 100755 --- a/basicsuite/Media Player/ControlBar.qml +++ b/basicsuite/Media Player/ControlBar.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtMultimedia 5.0 diff --git a/basicsuite/Media Player/ImageButton.qml b/basicsuite/Media Player/ImageButton.qml index 274efd5..3644f37 100755 --- a/basicsuite/Media Player/ImageButton.qml +++ b/basicsuite/Media Player/ImageButton.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 diff --git a/basicsuite/Media Player/Intro.qml b/basicsuite/Media Player/Intro.qml index a5dbb2a..5e1332f 100644 --- a/basicsuite/Media Player/Intro.qml +++ b/basicsuite/Media Player/Intro.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Rectangle { diff --git a/basicsuite/Media Player/MetadataView.qml b/basicsuite/Media Player/MetadataView.qml index b0b907b..4d45b75 100644 --- a/basicsuite/Media Player/MetadataView.qml +++ b/basicsuite/Media Player/MetadataView.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Rectangle { diff --git a/basicsuite/Media Player/PlaybackControl.qml b/basicsuite/Media Player/PlaybackControl.qml index 2dc609f..f83f358 100755 --- a/basicsuite/Media Player/PlaybackControl.qml +++ b/basicsuite/Media Player/PlaybackControl.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 diff --git a/basicsuite/Media Player/SeekControl.qml b/basicsuite/Media Player/SeekControl.qml index fa0842d..19a1fb7 100755 --- a/basicsuite/Media Player/SeekControl.qml +++ b/basicsuite/Media Player/SeekControl.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Item { diff --git a/basicsuite/Media Player/Slider.qml b/basicsuite/Media Player/Slider.qml index 17fd8cd..da9732f 100644 --- a/basicsuite/Media Player/Slider.qml +++ b/basicsuite/Media Player/Slider.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Item { diff --git a/basicsuite/Media Player/UrlBar.qml b/basicsuite/Media Player/UrlBar.qml index cfada41..c3cd648 100644 --- a/basicsuite/Media Player/UrlBar.qml +++ b/basicsuite/Media Player/UrlBar.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Rectangle { diff --git a/basicsuite/Media Player/VolumeControl.qml b/basicsuite/Media Player/VolumeControl.qml index e814b99..62375f1 100755 --- a/basicsuite/Media Player/VolumeControl.qml +++ b/basicsuite/Media Player/VolumeControl.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 diff --git a/basicsuite/Photo Gallery/main.qml b/basicsuite/Photo Gallery/main.qml index b2779e8..5fbab8a 100644 --- a/basicsuite/Photo Gallery/main.qml +++ b/basicsuite/Photo Gallery/main.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import Qt.labs.folderlistmodel 1.0 diff --git a/basicsuite/Qt5 Launch Presentation/WebKitSlideContent.qml b/basicsuite/Qt5 Launch Presentation/WebKitSlideContent.qml index ea5a364..b0a9c77 100644 --- a/basicsuite/Qt5 Launch Presentation/WebKitSlideContent.qml +++ b/basicsuite/Qt5 Launch Presentation/WebKitSlideContent.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtQuick.Particles 2.0 import QtWebKit 3.0 diff --git a/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml b/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml index edb8e4c..1873ab1 100644 --- a/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import "presentation" diff --git a/basicsuite/Qt5Everywhere/demos/shaders/import/main.cpp b/basicsuite/Qt5Everywhere/demos/shaders/import/main.cpp index 738a850..0475ea8 100644 --- a/basicsuite/Qt5Everywhere/demos/shaders/import/main.cpp +++ b/basicsuite/Qt5Everywhere/demos/shaders/import/main.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #include #include #include "shaderfilereader.h" diff --git a/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.cpp b/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.cpp index 985a28c..36a3632 100644 --- a/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.cpp +++ b/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #include "shaderfilereader.h" #include #include diff --git a/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.h b/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.h index 5731bbb..bfa82f7 100644 --- a/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.h +++ b/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.h @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #ifndef SHADERFILEREADER_H #define SHADERFILEREADER_H diff --git a/basicsuite/Sensors/Accelbubble.qml b/basicsuite/Sensors/Accelbubble.qml index c5b75ad..d0ab880 100644 --- a/basicsuite/Sensors/Accelbubble.qml +++ b/basicsuite/Sensors/Accelbubble.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtSensors 5.0 diff --git a/basicsuite/Sensors/Light.qml b/basicsuite/Sensors/Light.qml index fceecb7..fd71790 100644 --- a/basicsuite/Sensors/Light.qml +++ b/basicsuite/Sensors/Light.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtSensors 5.0 diff --git a/basicsuite/Sensors/main.qml b/basicsuite/Sensors/main.qml index 90d1dcd..359306c 100644 --- a/basicsuite/Sensors/main.qml +++ b/basicsuite/Sensors/main.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtSensors 5.0 import QtSensors 5.0 as Sensors diff --git a/experimental/Overlay Tester/main.qml b/experimental/Overlay Tester/main.qml index a764917..4503a67 100644 --- a/experimental/Overlay Tester/main.qml +++ b/experimental/Overlay Tester/main.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 Item { diff --git a/experimental/Wifi/main.qml b/experimental/Wifi/main.qml index 5c7bed9..0f4862c 100644 --- a/experimental/Wifi/main.qml +++ b/experimental/Wifi/main.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import Qt.labs.wifi 0.1 diff --git a/experimental/qt5-intro-android/WebKitSlideContent.qml b/experimental/qt5-intro-android/WebKitSlideContent.qml index ea5a364..b0a9c77 100644 --- a/experimental/qt5-intro-android/WebKitSlideContent.qml +++ b/experimental/qt5-intro-android/WebKitSlideContent.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import QtQuick.Particles 2.0 import QtWebKit 3.0 diff --git a/experimental/qt5-intro-android/WebkitSlide.qml b/experimental/qt5-intro-android/WebkitSlide.qml index edb8e4c..1873ab1 100644 --- a/experimental/qt5-intro-android/WebkitSlide.qml +++ b/experimental/qt5-intro-android/WebkitSlide.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 2.0 import "presentation" diff --git a/experimental/qt5-intro-android/main.cpp b/experimental/qt5-intro-android/main.cpp index f68e26c..1eeedd0 100644 --- a/experimental/qt5-intro-android/main.cpp +++ b/experimental/qt5-intro-android/main.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #include #include -- cgit v1.2.3 From 06ed12c66d7d8a58e37228c3d4785b4070be5d6a Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 13 Dec 2013 09:51:36 +0200 Subject: Add .export file to limit released sources codes Only basicsuite directory is added to released source codes Change-Id: I358b430e7f9e31d53bb7ba68e0b423abf7cf3eaa Reviewed-by: Kalle Viironen Reviewed-by: Eirik Aavitsland --- .export | 1 + 1 file changed, 1 insertion(+) create mode 100644 .export diff --git a/.export b/.export new file mode 100644 index 0000000..a8d1f44 --- /dev/null +++ b/.export @@ -0,0 +1 @@ +basicsuite -- cgit v1.2.3 From e80e8e67554708a69d74bab5c22c6644b419eae1 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 20 Dec 2013 14:56:35 +0100 Subject: Introduce documentation for Qt Enterprise Embedded Examples Create documentation structure for Qt Enterprise Embedded Examples and Demos, including the subprojects from the /basicsuite subdirectory. Task-number: QTEE-137 Change-Id: Ic6f9f9fa8cea8b7fa4821508fda93822c0b99ea3 Reviewed-by: Samuli Piippo Reviewed-by: Eirik Aavitsland --- b2qt-demos.pro | 3 +- .../About Boot to Qt/About Boot to Qt.qmlproject | 18 + .../Controls Layouts/Controls Layouts.qmlproject | 18 + .../Controls Touch/Controls Touch.qmlproject | 18 + .../Graphical Effects/Graphical Effects.qmlproject | 18 + basicsuite/Media Player/Media Player.qmlproject | 18 + basicsuite/Photo Gallery/Photo Gallery.qmlproject | 18 + .../Qt5 Cinematic Demo.qmlproject | 20 + .../Qt5_CinematicExperience.qmlproject | 20 - .../Qt5 Particles Demo.qmlproject | 18 + .../Qt5 Particles Demo/doc/src/emitters.qdoc | 18 +- .../SensorExplorer/doc/src/sensor_explorer.qdoc | 34 +- basicsuite/Sensors/Sensors.qmlproject | 18 + basicsuite/Text Input/Text Input.qmlproject | 18 + doc/b2qt-demos.qdoc | 111 ++++ doc/b2qt-demos.qdocconf | 47 ++ doc/doc.pro | 3 + doc/html-offline.qdocconf | 54 ++ doc/images/b2qt-demo.png | Bin 0 -> 5048 bytes doc/template/images/arrow_bc.png | Bin 0 -> 1071 bytes doc/template/images/bgrContent.png | Bin 0 -> 149 bytes doc/template/images/blu_dot.png | Bin 0 -> 168 bytes doc/template/images/btn_next.png | Bin 0 -> 689 bytes doc/template/images/btn_prev.png | Bin 0 -> 676 bytes doc/template/images/home.png | Bin 0 -> 1076 bytes doc/template/images/ico_note.png | Bin 0 -> 649 bytes doc/template/images/ico_note_attention.png | Bin 0 -> 529 bytes doc/template/images/ico_out.png | Bin 0 -> 362 bytes doc/template/style/offline.css | 628 +++++++++++++++++++++ 29 files changed, 1047 insertions(+), 53 deletions(-) create mode 100644 basicsuite/About Boot to Qt/About Boot to Qt.qmlproject create mode 100644 basicsuite/Controls Layouts/Controls Layouts.qmlproject create mode 100644 basicsuite/Controls Touch/Controls Touch.qmlproject create mode 100644 basicsuite/Graphical Effects/Graphical Effects.qmlproject create mode 100644 basicsuite/Media Player/Media Player.qmlproject create mode 100644 basicsuite/Photo Gallery/Photo Gallery.qmlproject create mode 100644 basicsuite/Qt5 Cinematic Demo/Qt5 Cinematic Demo.qmlproject delete mode 100644 basicsuite/Qt5 Cinematic Demo/Qt5_CinematicExperience.qmlproject create mode 100644 basicsuite/Qt5 Particles Demo/Qt5 Particles Demo.qmlproject create mode 100644 basicsuite/Sensors/Sensors.qmlproject create mode 100644 basicsuite/Text Input/Text Input.qmlproject create mode 100644 doc/b2qt-demos.qdoc create mode 100644 doc/b2qt-demos.qdocconf create mode 100644 doc/doc.pro create mode 100644 doc/html-offline.qdocconf create mode 100644 doc/images/b2qt-demo.png create mode 100644 doc/template/images/arrow_bc.png create mode 100644 doc/template/images/bgrContent.png create mode 100644 doc/template/images/blu_dot.png create mode 100644 doc/template/images/btn_next.png create mode 100644 doc/template/images/btn_prev.png create mode 100644 doc/template/images/home.png create mode 100644 doc/template/images/ico_note.png create mode 100644 doc/template/images/ico_note_attention.png create mode 100644 doc/template/images/ico_out.png create mode 100644 doc/template/style/offline.css diff --git a/b2qt-demos.pro b/b2qt-demos.pro index d5943bc..3adc812 100644 --- a/b2qt-demos.pro +++ b/b2qt-demos.pro @@ -1,3 +1,4 @@ TEMPLATE = subdirs SUBDIRS += \ - basicsuite + basicsuite \ + doc diff --git a/basicsuite/About Boot to Qt/About Boot to Qt.qmlproject b/basicsuite/About Boot to Qt/About Boot to Qt.qmlproject new file mode 100644 index 0000000..4d32f75 --- /dev/null +++ b/basicsuite/About Boot to Qt/About Boot to Qt.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/basicsuite/Controls Layouts/Controls Layouts.qmlproject b/basicsuite/Controls Layouts/Controls Layouts.qmlproject new file mode 100644 index 0000000..4d32f75 --- /dev/null +++ b/basicsuite/Controls Layouts/Controls Layouts.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/basicsuite/Controls Touch/Controls Touch.qmlproject b/basicsuite/Controls Touch/Controls Touch.qmlproject new file mode 100644 index 0000000..4d32f75 --- /dev/null +++ b/basicsuite/Controls Touch/Controls Touch.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/basicsuite/Graphical Effects/Graphical Effects.qmlproject b/basicsuite/Graphical Effects/Graphical Effects.qmlproject new file mode 100644 index 0000000..4d32f75 --- /dev/null +++ b/basicsuite/Graphical Effects/Graphical Effects.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/basicsuite/Media Player/Media Player.qmlproject b/basicsuite/Media Player/Media Player.qmlproject new file mode 100644 index 0000000..4d32f75 --- /dev/null +++ b/basicsuite/Media Player/Media Player.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/basicsuite/Photo Gallery/Photo Gallery.qmlproject b/basicsuite/Photo Gallery/Photo Gallery.qmlproject new file mode 100644 index 0000000..4d32f75 --- /dev/null +++ b/basicsuite/Photo Gallery/Photo Gallery.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/basicsuite/Qt5 Cinematic Demo/Qt5 Cinematic Demo.qmlproject b/basicsuite/Qt5 Cinematic Demo/Qt5 Cinematic Demo.qmlproject new file mode 100644 index 0000000..eabee43 --- /dev/null +++ b/basicsuite/Qt5 Cinematic Demo/Qt5 Cinematic Demo.qmlproject @@ -0,0 +1,20 @@ +/* File generated by Qt Creator, version 2.4.1 */ + +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/basicsuite/Qt5 Cinematic Demo/Qt5_CinematicExperience.qmlproject b/basicsuite/Qt5 Cinematic Demo/Qt5_CinematicExperience.qmlproject deleted file mode 100644 index fd24655..0000000 --- a/basicsuite/Qt5 Cinematic Demo/Qt5_CinematicExperience.qmlproject +++ /dev/null @@ -1,20 +0,0 @@ -/* File generated by Qt Creator, version 2.4.1 */ - -import QmlProject 1.1 - -Project { - mainFile: "Qt5_CinematicExperience.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/Qt5 Particles Demo/Qt5 Particles Demo.qmlproject b/basicsuite/Qt5 Particles Demo/Qt5 Particles Demo.qmlproject new file mode 100644 index 0000000..4d32f75 --- /dev/null +++ b/basicsuite/Qt5 Particles Demo/Qt5 Particles Demo.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/basicsuite/Qt5 Particles Demo/doc/src/emitters.qdoc b/basicsuite/Qt5 Particles Demo/doc/src/emitters.qdoc index 5644ab1..9577b06 100644 --- a/basicsuite/Qt5 Particles Demo/doc/src/emitters.qdoc +++ b/basicsuite/Qt5 Particles Demo/doc/src/emitters.qdoc @@ -25,36 +25,36 @@ ** ****************************************************************************/ /*! - \title QtQuick.Particles Examples - Emitters - \example quick/particles/emitters + \title QtQuick Particles Emitters + \example Qt5 Particles Demo + \ingroup b2qt-demos \brief This is a collection of examples using Emitters in the QML particle system. - \image qml-emitters-example.png This is a collection of small QML examples relating to using Emitters in the particle system. Each example is a small QML file emphasizing a particular element or feature. Velocity from motion gives the effect of strong particle motion through primarily moving the emitters: - \snippet quick/particles/emitters/content/velocityfrommotion.qml 0 + \snippet Qt5\ Particles\ Demo/content/velocityfrommotion.qml 0 Burst and pulse calls the burst and pulse methods on two idential emitters. - \snippet quick/particles/emitters/content/burstandpulse.qml 0 + \snippet Qt5\ Particles\ Demo/content/burstandpulse.qml 0 Note how burst takes an argument of number of particles to emit, and pulse takes an argument of number of milliseconds to emit for. This gives a slightly different behaviour, which is easy to see in this example. Custom Emitter connects to the emitParticles signal to set arbitrary values on particle data as they're emitted; - \snippet quick/particles/emitters/content/customemitter.qml 0 + \snippet Qt5\ Particles\ Demo/content/customemitter.qml 0 This is used to emit curving particles in six rotating spokes. Emit mask sets an image mask on the Emitter, to emit out of an arbitrary shape. - \snippet quick/particles/emitters/content/emitmask.qml 0 + \snippet Qt5\ Particles\ Demo/content/emitmask.qml 0 Maximum emitted emits no more than a certain number of particles at a time. This example makes it easy to see what happens when the limit is reached. Shape and Direction emits particles out of an unfilled Ellipse shape, using a TargetDirection - \snippet quick/particles/emitters/content/shapeanddirection.qml 0 + \snippet Qt5\ Particles\ Demo/content/shapeanddirection.qml 0 This sends the particles towards the center of the ellipse with proportional speed, keeping the ellipse outline as they move to the center. TrailEmitter uses that element to add smoke particles to trail the fire particles in the scene. - \snippet quick/particles/emitters/content/customemitter.qml 0 + \snippet Qt5\ Particles\ Demo/content/customemitter.qml 0 */ diff --git a/basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc b/basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc index be04215..001642f 100644 --- a/basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc +++ b/basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc @@ -26,18 +26,18 @@ ****************************************************************************/ /*! - \example sensor_explorer - \title Qt Sensors - Explorer QML example - \ingroup qtsensors-examples + \example SensorExplorer + \title Sensor Explorer + \brief The Sensor Explorer example demonstrates how to read the meta-data of available sensors. + \ingroup b2qt-demos \section2 Sensor Explorer in QML - \brief The Sensor Explorer example demonstrates how to read the meta-data of available sensors. This example is divided into two parts: \list - \li A \l{Sensor Explorer QML Import}{C++ plug-in} that provides QML alternatives for QSensorExplorer, QPropertyInfo and the QSensorItem classes. + \li A C++ plug-in that provides QML alternatives for QSensorExplorer, QPropertyInfo and the QSensorItem classes. \li A QML Application that uses the QML alternatives to read the sensors meta-data and present it. \endlist @@ -54,38 +54,26 @@ Import the Explorer 1.0 declarative plugin: - \snippet sensor_explorer/sensor_explorer.qml 0 + \snippet SensorExplorer/main.qml 0 Create a SensorExplorer QML item: - \snippet sensor_explorer/sensor_explorer.qml 1 + \snippet SensorExplorer/main.qml 1 You can retrieve a list of all available sensors using the SensorExplorer: - \snippet sensor_explorer/sensor_explorer.qml 2 + \snippet SensorExplorer/main.qml 2 To retrieve the properties of a SensorItem use: - \snippet sensor_explorer/sensor_explorer.qml 3 + \snippet SensorExplorer/main.qml 3 Changing a property value can be done like: - \snippet sensor_explorer/sensor_explorer.qml 4 + \snippet SensorExplorer/main.qml 4 Starting and stopping a sensor can be done like: - \snippet sensor_explorer/sensor_explorer.qml 5 -*/ - -/*! - \example sensor_explorer/import - \title Sensor Explorer QML Import - - \section2 Sensor Explorer Declarative Plugin - \brief The Sensor Explorer QML import exports the QSensorExplorer, QPropertyInfo and the QSensorItem class as a QML type. - - This example creates the \e {Explorer 1.0} import. - - \sa {Qt Sensors - Explorer QML example} + \snippet SensorExplorer/main.qml 5 */ diff --git a/basicsuite/Sensors/Sensors.qmlproject b/basicsuite/Sensors/Sensors.qmlproject new file mode 100644 index 0000000..4d32f75 --- /dev/null +++ b/basicsuite/Sensors/Sensors.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/basicsuite/Text Input/Text Input.qmlproject b/basicsuite/Text Input/Text Input.qmlproject new file mode 100644 index 0000000..4d32f75 --- /dev/null +++ b/basicsuite/Text Input/Text Input.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ "../exampleplugin" ] +} diff --git a/doc/b2qt-demos.qdoc b/doc/b2qt-demos.qdoc new file mode 100644 index 0000000..67fe0fa --- /dev/null +++ b/doc/b2qt-demos.qdoc @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ + +/*! + \contentspage{b2qt-demos.html}{Qt Enterprise Embedded Examples and Demos} + \group b2qt-demos + \title Qt Enterprise Embedded Examples and Demos + + \SDK has a number of examples and demos. These are included in the + \B2Q images, available in the launcher that is run by default at + startup. + + In Qt Creator, you can find and open them from \b Welcome > \b Examples + by selecting a \c {Boot2Qt} version of Qt from the drop-down list. +*/ + +/*! + \example About Boot to Qt + \title About Boot to Qt + \ingroup b2qt-demos + \brief Displays information about the Boot to Qt software stack. +*/ + +/*! + \example Camera + \title Camera + \ingroup b2qt-demos + \brief Demonstrates using camera in a QML application. +*/ + +/*! + \example Controls Layouts + \title Controls Layouts + \ingroup b2qt-demos + \brief Demonstrates using Qt Quick Controls Layouts. +*/ + +/*! + \example Controls Touch + \title Controls Touch + \ingroup b2qt-demos + \brief Demonstrates a touch UI implemented with Qt Quick Controls. +*/ + +/*! + \example Graphical Effects + \title Graphical Effects + \ingroup b2qt-demos + \brief Demonstrates the different graphical effects that can be used in a QML application. +*/ + +/*! + \example Media Player + \title Media Player + \ingroup b2qt-demos + \brief A media player implemented in QML. +*/ + +/*! + \example Photo Gallery + \title Photo Gallery + \ingroup b2qt-demos + \brief A photo gallery implemented in QML. +*/ + +/*! + \example Qt5 Cinematic Demo + \title Qt5 Cinematic Demo + \ingroup b2qt-demos + \brief A cool demonstration of the graphical prowess of Qt 5 and Qt Quick 2. +*/ + +/*! + \example Qt5Everywhere + \title Qt 5 Everywhere + \ingroup b2qt-demos + \brief Highlights the versatility and cross-platform capability of Qt + + The Qt 5 Everywhere demo shows how to use different user interface styles in several platforms and device types with one source code. +*/ + +/*! + \example Sensors + \title Sensors + \ingroup b2qt-demos + \brief Demostrates using the accelerometer and light sensors in a QML application. +*/ + +/*! + \example Text Input + \title Text Input + \ingroup b2qt-demos + \brief Demostrates text input capabilities and the virtual keyboard in a QML application. +*/ + diff --git a/doc/b2qt-demos.qdocconf b/doc/b2qt-demos.qdocconf new file mode 100644 index 0000000..068ed36 --- /dev/null +++ b/doc/b2qt-demos.qdocconf @@ -0,0 +1,47 @@ +include(html-offline.qdocconf) + +naturallanguage = en_US +outputencoding = UTF-8 +sourceencoding = UTF-8 + +project = QtEnterpriseEmbeddedDemos +description = Qt Enterprise Embedded Examples and Demos +version = 2.0.0 + +sourcedirs = . +imagedirs += images + +sources.fileextensions = "*.qdoc" + +examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.css" +examples.imageextensions = "*.png *.jpg *.gif" + +exampledirs = ../basicsuite +examplesinstallpath = ../../../../sources/b2qt-demos/basicsuite + +qhp.projects = QtEnterpriseEmbeddedDemos + +qhp.QtEnterpriseEmbeddedDemos.file = b2qt-demos.qhp +qhp.QtEnterpriseEmbeddedDemos.namespace = com.digia.b2qt-demos.200 +qhp.QtEnterpriseEmbeddedDemos.virtualFolder = b2qt-demos +qhp.QtEnterpriseEmbeddedDemos.indexTitle = Qt Enterprise Embedded Examples and Demos +qhp.QtEnterpriseEmbeddedDemos.indexRoot = + +qhp.QtEnterpriseEmbeddedDemos.subprojects = demos +qhp.QtEnterpriseEmbeddedDemos.subprojects.demos.title = Qt Enterprise Embedded Examples and Demos +qhp.QtEnterpriseEmbeddedDemos.subprojects.demos.indexTitle = Qt Enterprise Embedded Examples and Demos + +# Add a thumbnail for all examples +manifestmeta.filters = thumbnail +manifestmeta.thumbnail.attributes = "imageUrl:qthelp\://com.digia.b2qt-demos.200/b2qt-demos/images/b2qt-demo.png" +manifestmeta.thumbnail.tags = "b2qt,qtee" +manifestmeta.thumbnail.names = "QtEnterpriseEmbeddedDemos/*" + +# Add an image used in example manifests to qhp +HTML.extraimages += images/b2qt-demo.png +qhp.QtEnterpriseEmbeddedDemos.extraFiles += images/b2qt-demo.png + +macro.B2Q = "Boot to Qt" +macro.SDK = "Qt Enterprise Embedded" + +navigation.landingpage = "Qt Enterprise Embedded Examples and Demos" diff --git a/doc/doc.pro b/doc/doc.pro new file mode 100644 index 0000000..9c84012 --- /dev/null +++ b/doc/doc.pro @@ -0,0 +1,3 @@ +TEMPLATE = aux +QMAKE_DOCS = $$PWD/b2qt-demos.qdocconf + diff --git a/doc/html-offline.qdocconf b/doc/html-offline.qdocconf new file mode 100644 index 0000000..cd95334 --- /dev/null +++ b/doc/html-offline.qdocconf @@ -0,0 +1,54 @@ +HTML.nobreadcrumbs = "true" + +HTML.stylesheets = template/style/offline.css + +# Copy images used by the template to images folder in output directory +HTML.extraimages = template/images/bgrContent.png \ + template/images/blu_dot.png \ + template/images/btn_next.png \ + template/images/btn_prev.png \ + template/images/ico_note.png \ + template/images/ico_note_attention.png \ + template/images/ico_out.png \ + template/images/arrow_bc.png \ + template/images/home.png + +# Add style-related files into qch package +qhp.extraFiles += style/offline.css \ + images/bgrContent.png \ + images/blu_dot.png \ + images/btn_next.png \ + images/btn_prev.png \ + images/ico_note.png \ + images/ico_note_attention.png \ + images/ico_out.png \ + images/home.png \ + images/arrow_bc.png + +HTML.headerstyles = \ + " \n" + +HTML.endheader = \ + "\n" \ + "\n" + +HTML.footer = \ + "

    \n" \ + " \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "

    \n" \ + " © 2013 Digia Plc and/or its\n" \ + " subsidiaries.

    \n" \ + "

    \n" \ + " Licensees holding valid Qt Commercial licenses may use this document in\n" \ + " accordance with the Qt Commercial License Agreement provided with the\n" \ + " Software or, alternatively, in accordance with the terms contained in a\n" \ + " written agreement between you and Digia.<\p>\n" \ + "

    \n" \ + " Digia, Qt and their respective logos are trademarks of Digia Plc \n" \ + " in Finland and/or other countries worldwide. All other trademarks are property\n" \ + " of their respective owners. Privacy Policy

    \n" \ + "
    \n" diff --git a/doc/images/b2qt-demo.png b/doc/images/b2qt-demo.png new file mode 100644 index 0000000..e798ae2 Binary files /dev/null and b/doc/images/b2qt-demo.png differ diff --git a/doc/template/images/arrow_bc.png b/doc/template/images/arrow_bc.png new file mode 100644 index 0000000..f2a83a5 Binary files /dev/null and b/doc/template/images/arrow_bc.png differ diff --git a/doc/template/images/bgrContent.png b/doc/template/images/bgrContent.png new file mode 100644 index 0000000..1a81b03 Binary files /dev/null and b/doc/template/images/bgrContent.png differ diff --git a/doc/template/images/blu_dot.png b/doc/template/images/blu_dot.png new file mode 100644 index 0000000..c332148 Binary files /dev/null and b/doc/template/images/blu_dot.png differ diff --git a/doc/template/images/btn_next.png b/doc/template/images/btn_next.png new file mode 100644 index 0000000..f7bc2b7 Binary files /dev/null and b/doc/template/images/btn_next.png differ diff --git a/doc/template/images/btn_prev.png b/doc/template/images/btn_prev.png new file mode 100644 index 0000000..10a620c Binary files /dev/null and b/doc/template/images/btn_prev.png differ diff --git a/doc/template/images/home.png b/doc/template/images/home.png new file mode 100644 index 0000000..8de6d0c Binary files /dev/null and b/doc/template/images/home.png differ diff --git a/doc/template/images/ico_note.png b/doc/template/images/ico_note.png new file mode 100644 index 0000000..1379404 Binary files /dev/null and b/doc/template/images/ico_note.png differ diff --git a/doc/template/images/ico_note_attention.png b/doc/template/images/ico_note_attention.png new file mode 100644 index 0000000..b85b696 Binary files /dev/null and b/doc/template/images/ico_note_attention.png differ diff --git a/doc/template/images/ico_out.png b/doc/template/images/ico_out.png new file mode 100644 index 0000000..ff6e458 Binary files /dev/null and b/doc/template/images/ico_out.png differ diff --git a/doc/template/style/offline.css b/doc/template/style/offline.css new file mode 100644 index 0000000..3bab27b --- /dev/null +++ b/doc/template/style/offline.css @@ -0,0 +1,628 @@ +body{ +font: normal 400 14px/1.2 Arial; +margin-top:85px; +font-family: Arial, Helvetica; +color:#313131; +text-align:justify; +margin-left:5px; +margin-right:5px; +} + +img{ +-moz-box-shadow: 3px 3px 3px #ccc; +-webkit-box-shadow: 3px 3px 3px #ccc; +box-shadow: 3px 3px 3px #ccc; +border:#8E8D8D 2px solid; +margin-left:0px; +max-width: 800px; +height: auto +} + +b{ +font-weight:600; +} + +.content{} + +.descr{ +margin-top:35px; +/*max-width: 75%;*/ +margin-left:5px; +text-align:justify; +min-height:700px; +vertical-align:top; +} + +.name{ +max-width: 75%; +font-weight:100; +} + +tt{ +text-align:left;} + +/* +----------- +links +----------- +*/ + +a:link{ +color: #2C418D; +text-decoration: none; +text-align:left; +} + +a:hover{ +color: #869CD1; +text-decoration:underline; +text-align:left; +} + +a:visited{ +color: #869CD1; +text-decoration: none; +text-align:left; +} + +a:visited:hover{ +text-decoration:underline; +text-align:left; +} + +a[href*="http://"], a[href*="ftp://"],a[href*="https://"] +{ +text-decoration: none; +background-image:url(../images/ico_out.png); +background-repeat:no-repeat; +background-position:left; +padding-left:20px; +text-align:left; +} + +.flags{ +text-decoration:none; +text-height:24px; +} + +/* +------------------------------- +NOTE styles +------------------------------- +*/ +.notetitle, .tiptitle, .fastpathtitle{ +font-weight:bold; +} + +.attentiontitle,.cautiontitle,.dangertitle,.importanttitle,.remembertitle,.restrictiontitle{ +font-weight:bold; +} + +.note,.tip,.fastpath{ +background: #F2F2F2 url(../images/ico_note.png); +background-repeat: no-repeat; +background-position: top left; +padding:5px; +padding-left:40px; +padding-bottom:10px; +border:#999 1px dotted; +color:#666666; +margin:5px; +} + +.attention,.caution,.danger,.important,.remember,.restriction{ +background: #F2F2F2 url(../images/ico_note_attention.png); +background-repeat:no-repeat; +background-position:top left; +padding:5px; +padding-left:40px; +padding-bottom:10px; +border:#999 1px dotted; +color:#666666; +margin:5px; +} + +/* +------------------------------- +Top navigation +------------------------------- +*/ + +.header{ + +height:1px; +padding:0px; +margin:0px; +} + +.qtref{ +display: block; +position: relative; +top: -76px; +height:15px; +z-index: 1; +font-size:11px; +padding-right:10px; +float:right; +} + +.naviNextPrevious{ +display: block; +position: relative; +text-align: right; +top: -53px; +float:right; +height:20px; +z-index:1; +padding-right:10px; +padding-top:2px; +vertical-align:top; +margin:0px; +} + + +.naviNextPrevious > a.prevPage { +background-image:url(../images/btn_prev.png); +background-repeat:no-repeat; +background-position:left; +padding-left:20px; +height:20px; +padding-left:20px; +} + +.naviNextPrevious > a.nextPage { +background-image:url(../images/btn_next.png); +background-repeat:no-repeat; +background-position:right; +padding-right:20px; +height:20px; +margin-left:30px; +} + +.breadcrumb{ +display: block; +position: relative; +top:-20px; +/*border-top:2px solid #ffffff;*/ +border-bottom: 1px solid #cecece; +background-color:#F2F2F2; +z-index:1; +height:20px; +padding:0px; +margin:0px; +padding-left:10px; +padding-top:2px; +margin-left:-5px; +margin-right:-5px; +} + +.breadcrumb ul{ + margin:0px; + padding:0px; +} + +.breadcrumb ul li{ +background-color:#F2F2F2; +list-style-type:none; +padding:0; +margin:0; +height:20px; +} + +.breadcrumb li{ +float:left; +} + +.breadcrumb .first { +background:url(../images/home.png); +background-position:left; +background-repeat:no-repeat; +padding-left:20px; +} + + +.breadcrumb li a{ +color:#2C418D; +display:block; +text-decoration:none; +background:url(../images/arrow_bc.png); +background-repeat:no-repeat; +background-position:right; +padding-right:25px; +padding-left:10px; +} + +.breadcrumb li a:hover{ +color:#909090; +display:block; +text-decoration:none; +background:url(../images/arrow.png); +background-repeat:no-repeat; +background-position:right; +padding-right:20px; +padding-left:10px; +} + + +/* table of content +no display +*/ + +/* +----------- +headers +----------- +*/ + + +@media screen{ +.title{ +color:#313131; +font-size: 18px; +font-weight: normal; +left: 0; +padding-bottom: 20px; +padding-left: 10px; +padding-top: 20px; +position: absolute; +right: 0; +top: 0; +background-color:#E6E6E6; +border-bottom: 1px #CCC solid; +border-top: 2px #CCC solid; +font-weight:bold; +margin-left:0px; +margin-right:0px; +} +} + +h1 { +margin: 0; +} + +h2, p.h2 { +font: 500 16px/1.2 Arial; +font-weight:100; +background-color:#F2F3F4; +padding:4px; +padding-left: 14px; +margin-bottom:30px; +margin-top:30px; +margin-left: -10px; +margin-right: -5px; +border-top:#E0E0DE 1px solid; +border-bottom: #E0E0DE 1px solid; +} + +h3{ + +font: 500 14px/1.2 Arial; +font-weight:100; +text-decoration:underline; +margin-bottom:30px; +margin-top:30px; +} + +h3.fn,span.fn{ +border-width: 1px; +border-style: solid; +border-color: #E6E6E6; +-moz-border-radius: 7px 7px 7px 7px; +-webkit-border-radius: 7px 7px 7px 7px; +border-radius: 7px 7px 7px 7px; +background-color: #F6F6F6; +word-spacing: 3px; +padding: 5px 5px; +text-decoration:none; +font-weight:bold; +max-width:75%; +font-size:14px; +margin:0px; +margin-top:30px; + +} + +.name{ +color:#1A1A1A; +} +.type{ +color:#808080; +} + + + +@media print { +.title { +color:#0066CB; +font-family:Arial, Helvetica; +font-size: 32px; +font-weight: normal; +left: 0; +position: absolute; +right: 0; +top: 0; +} +} + + +/* +----------------- +table styles +----------------- +*/ +.table img { +border:none; +margin-left:0px; +-moz-box-shadow:0px 0px 0px #fff; +-webkit-box-shadow: 0px 0px 0px #fff; +box-shadow: 0px 0px 0px #fff; +} + +/* table with border alternative colors*/ + + table,pre{ +-moz-border-radius: 7px 7px 7px 7px; +-webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; +background-color: #F6F6F6; +border: 1px solid #E6E6E6; +border-collapse: separate; +font-size: 12px; +line-height: 1.2; +margin-bottom: 25px; +margin-left: 15px; +font-size: 12px; +line-height: 1.2; +margin-bottom: 25px; +margin-left: 15px; +} + + +table th{ +text-align:left; +padding-left:20px; +} + +table td { +padding: 3px 15px 3px 20px; +border-bottom:#CCC dotted 1px; +} +table p { margin:0px;} + +table tr.even { +background-color: white; +color: #66666E; +} + +table tr.odd { +background-color: #F6F6F6; +color: #66666E; +} + + +table thead { +text-align:left; +padding-left:20px; +background-color:#e1e0e0; +border-left:none; +border-right:none; +} + +table thead th { +padding-top:5px; +padding-left:10px; +padding-bottom:5px; +border-bottom: 2px solid #D1D1D1; +padding-right:10px; +} + + +/* table bodless & white*/ + +.borderless { +border-radius: 0px 0px 0px 0px; +background-color: #fff; +border: 1px solid #fff; +} + +.borderless tr { +background-color: #FFF; +color: #66666E; +} + +.borderless td { +border:none; +border-bottom:#fff dotted 1px; +} + +/* +----------- +List +----------- +*/ + +ul{ +padding-bottom:2px; +} + +li { +margin-bottom: 10px; +padding-left: 8px; +list-style:outside; +list-style-type:square; +text-align:left; +} + + +ol{ +margin:10px; +padding:0; +} + +ol > li{ +margin-left: 30px; +padding-left:8px; +list-style:decimal; +} + +.centerAlign{ +text-align: left; +} + +.cpp{ +display: block; +margin: 10; +overflow: hidden; +overflow-x: hidden; +overflow-y: hidden; +padding: 20px 0 20px 0; +} + +.footer{ +margin-top: 50px; +padding-left:5px; +margin-bottom: 10px; +font-size:10px; +border-top: 1px solid #999; +padding-top:11px; +} + +.footer a[href*="http://"], a[href*="ftp://"],a[href*="https://"]{ +background-size: 13px 11px; +padding-left: 16px; +} + +.footerNavi{ +width:auto; +text-align:right; +margin-top:50px; +z-index:1; +} + +.memItemLeft{ +padding-right: 3px; +} + +.memItemRight{ +padding: 3px 15px 3px 0; +} + +.qml{ +display: block; +margin: 10; +overflow: hidden; +overflow-x: hidden; +overflow-y: hidden; +padding: 20px 0 20px 0; +} + +.qmldefault{ +padding-left: 5px; +float: right; +color: red; +} + +.qmlreadonly{ +padding-left: 5px; +float: right; +color: #254117; +} + +.rightAlign{ +padding: 3px 5px 3px 10px; +text-align: right; +} + +/* +----------- +Content table +----------- +*/ + +@media print{ +.toc { +float: right; +padding-bottom: 10px; +padding-top: 50px; +width: 100%; +background-image:url(../images/bgrContent.png); +background-position:top; +background-repeat:no-repeat; +} +} + +@media screen{ +.toc{ +clear:both; +float:right; +vertical-align:top; +-moz-border-radius: 7px 7px 7px 7px; +-webkit-border-radius: 7px 7px 7px 7px; +border-radius: 7px 7px 7px 7px; + background:#FFF url(../images/bgrContent.png); +background-position:top; +background-repeat:repeat-x; +border: 1px solid #E6E6E6; +padding-left:5px; +padding-bottom:10px; +height: auto; +width: 200px; +text-align:left; +z-index:2; +margin-left:20px; +margin-right:20px; +margin-top:0px; +padding-top:0px; +} +} + +.toc h3{ +text-decoration:none; +} + +.toc h3{font: 500 14px/1.2 Arial; +font-weight:100; +padding:0px; +margin:0px; +padding-top:5px; +padding-left:5px; +} + + +.toc ul{ +width:160px; +padding-left:10px; +padding-right:5px; +padding-top:10px; +} + +.toc ul li{ +margin-left:20px; +list-style-image:url(../images/blu_dot.png); +list-style:outside; + +} + + +.toc ul li a:link{ +color: #2C418D; +text-decoration: none; +} + +.toc ul li a:hover{ +color: #869CD1; +text-decoration:underline; + +} + +.toc ul li a:visited{ +color: #869CD1; +font-weight: bold; +} + +.level1{ +border:none;} + +.clearfix{ +clear:both;} + -- cgit v1.2.3 From 1fe29f21f3d06d44ff5bdf22d68f1b52f0e25a1d Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Tue, 17 Dec 2013 15:41:47 +0100 Subject: Use new virtual keyboard Change-Id: I99c6658d5160a6b8fe0154813f75cba8e6a56fb1 Reviewed-by: Eirik Aavitsland --- basicsuite/Text Input/main.qml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/basicsuite/Text Input/main.qml b/basicsuite/Text Input/main.qml index 53593bf..5c068d9 100644 --- a/basicsuite/Text Input/main.qml +++ b/basicsuite/Text Input/main.qml @@ -48,11 +48,10 @@ Image { property real scrollMarginVertical: 20 - width: parent.width + anchors.fill: parent contentWidth: content.width contentHeight: content.height interactive: contentHeight > height - height: Qt.inputMethod.keyboardRectangle.y flickableDirection: Flickable.VerticalFlick children: ScrollBar {} @@ -62,10 +61,7 @@ Image { width: flickable.width height: textEditors.height + 24 - onClicked: { - if (Qt.inputMethod.inputItem) - Qt.inputMethod.inputItem.focus = false - } + onClicked: focus = true Column { id: textEditors -- cgit v1.2.3 From 5a362f80d9da6d2d36efc127588f3c427211f98c Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Tue, 17 Dec 2013 15:46:00 +0100 Subject: Remove background image of text input application The image does not scale well and looks horribly. Change-Id: I3c0b34588e74315623dfb68c260706151be2bade Reviewed-by: Eirik Aavitsland --- basicsuite/Text Input/background.png | Bin 34931 -> 0 bytes basicsuite/Text Input/main.qml | 118 +++++++++++++++++------------------ 2 files changed, 57 insertions(+), 61 deletions(-) delete mode 100644 basicsuite/Text Input/background.png diff --git a/basicsuite/Text Input/background.png b/basicsuite/Text Input/background.png deleted file mode 100644 index d85f6ee..0000000 Binary files a/basicsuite/Text Input/background.png and /dev/null differ diff --git a/basicsuite/Text Input/main.qml b/basicsuite/Text Input/main.qml index 5c068d9..b67d960 100644 --- a/basicsuite/Text Input/main.qml +++ b/basicsuite/Text Input/main.qml @@ -40,77 +40,73 @@ import QtQuick 2.0 -Image { - source: "background.png" +Flickable { + id: flickable - Flickable { - id: flickable + property real scrollMarginVertical: 20 - property real scrollMarginVertical: 20 + anchors.fill: parent + contentWidth: content.width + contentHeight: content.height + interactive: contentHeight > height + flickableDirection: Flickable.VerticalFlick + children: ScrollBar {} - anchors.fill: parent - contentWidth: content.width - contentHeight: content.height - interactive: contentHeight > height - flickableDirection: Flickable.VerticalFlick - children: ScrollBar {} + MouseArea { + id: content - MouseArea { - id: content + width: flickable.width + height: textEditors.height + 24 - width: flickable.width - height: textEditors.height + 24 + onClicked: focus = true - onClicked: focus = true + Column { + id: textEditors + spacing: 15 + x: 12; y: 12 + width: parent.width - 26 - Column { - id: textEditors - spacing: 15 - x: 12; y: 12 - width: parent.width - 26 - - Text { - color: "#EEEEEE" - text: "Tap fields to enter text" - anchors.horizontalCenter: parent.horizontalCenter - font.pixelSize: 22 - } - TextField { - width: parent.width - previewText: "One line field" - enterKeyText: "Next" - enterKeyEnabled: text.length > 0 - onEnterKeyClicked: passwordField.focus = true - } - TextField { - id: passwordField + Text { + color: "#EEEEEE" + text: "Tap fields to enter text" + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 22 + } + TextField { + width: parent.width + previewText: "One line field" + enterKeyText: "Next" + enterKeyEnabled: text.length > 0 + onEnterKeyClicked: passwordField.focus = true + } + TextField { + id: passwordField - width: parent.width - echoMode: TextInput.PasswordEchoOnEdit - previewText: "Password field" - inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText - enterKeyText: "Next" - enterKeyEnabled: text.length > 0 - onEnterKeyClicked: numberField.focus = true - } - TextField { - id: numberField + width: parent.width + echoMode: TextInput.PasswordEchoOnEdit + previewText: "Password field" + inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText + enterKeyText: "Next" + enterKeyEnabled: text.length > 0 + onEnterKeyClicked: numberField.focus = true + } + TextField { + id: numberField - validator: RegExpValidator { regExp: /^[0-9\+\-\#\*\ ]{6,}$/ } - width: parent.width - previewText: "Phone number field" - inputMethodHints: Qt.ImhDialableCharactersOnly - enterKeyText: "Next" - enterKeyEnabled: text.length > 0 - onEnterKeyClicked: textArea.focus = true - } - TextArea { - id: textArea + validator: RegExpValidator { regExp: /^[0-9\+\-\#\*\ ]{6,}$/ } + width: parent.width + previewText: "Phone number field" + inputMethodHints: Qt.ImhDialableCharactersOnly + enterKeyText: "Next" + enterKeyEnabled: text.length > 0 + onEnterKeyClicked: textArea.focus = true + } + TextArea { + id: textArea - width: parent.width - previewText: "Multiple lines field" - height: Math.max(206, implicitHeight) - } + width: parent.width + previewText: "Multiple lines field" + height: Math.max(206, implicitHeight) } } } -- cgit v1.2.3 From ca01d5f9f5e960337a044be6e00de58fd4fbdb05 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 24 Jan 2014 13:22:02 +0100 Subject: Make basicsuite demos run stand-alone This change will make the demos run standalone when built in Qt Creator. - Rename example directories to lowercase/non-whitespace to avoid build & deployment problems - Add title.txt files so titles remain displayed correctly in the launcher - Add a common shared source files used for the standalone apps, and .pro-files for each example - Remove .qmlproject files (not needed) - Adjust documentation to match the new directory structure Change-Id: Ib24e461952da3b2c88aab0363249115ea44ee0f2 Reviewed-by: Eirik Aavitsland --- .../About Boot to Qt/About Boot to Qt.qmlproject | 18 - basicsuite/About Boot to Qt/AboutBoot2Qt.qml | 109 ---- basicsuite/About Boot to Qt/Box.qml | 70 --- basicsuite/About Boot to Qt/ContentText.qml | 48 -- basicsuite/About Boot to Qt/QtForAndroid.qml | 93 ---- basicsuite/About Boot to Qt/QtFramework.qml | 75 --- basicsuite/About Boot to Qt/Title.qml | 48 -- basicsuite/About Boot to Qt/codeless.png | Bin 28581 -> 0 bytes basicsuite/About Boot to Qt/description.txt | 3 - basicsuite/About Boot to Qt/main.qml | 175 ------- basicsuite/About Boot to Qt/particle.png | Bin 861 -> 0 bytes basicsuite/About Boot to Qt/preview_l.jpg | Bin 28727 -> 0 bytes basicsuite/About Boot to Qt/qt-logo.png | Bin 21659 -> 0 bytes basicsuite/Camera/Camera.pro | 4 - basicsuite/Camera/CameraControlButton.qml | 94 ---- basicsuite/Camera/CameraSetting.qml | 68 --- basicsuite/Camera/CaptureControl.qml | 80 --- basicsuite/Camera/CapturePreview.qml | 85 --- basicsuite/Camera/Controls.qml | 199 ------- basicsuite/Camera/FocusControl.qml | 151 ------ basicsuite/Camera/Picker.qml | 129 ----- basicsuite/Camera/README | 2 - basicsuite/Camera/RecordingTime.qml | 110 ---- basicsuite/Camera/Slider.qml | 133 ----- basicsuite/Camera/ZoomControl.qml | 80 --- basicsuite/Camera/camerautils/camerautils.cpp | 229 -------- basicsuite/Camera/camerautils/camerautils.h | 127 ----- basicsuite/Camera/camerautils/camerautils.pro | 19 - basicsuite/Camera/camerautils/plugin.cpp | 60 --- basicsuite/Camera/camerautils/qmldir | 2 - basicsuite/Camera/description.txt | 5 - basicsuite/Camera/exclude.txt | 1 - basicsuite/Camera/main.qml | 263 ---------- basicsuite/Camera/preview_l.jpg | Bin 33458 -> 0 bytes .../Controls Layouts/Controls Layouts.qmlproject | 18 - basicsuite/Controls Layouts/description.txt | 3 - basicsuite/Controls Layouts/main.qml | 118 ----- basicsuite/Controls Layouts/preview_l.jpg | Bin 11273 -> 0 bytes .../Controls Touch/Controls Touch.qmlproject | 18 - .../Controls Touch/content/AndroidDelegate.qml | 92 ---- basicsuite/Controls Touch/content/ButtonPage.qml | 120 ----- .../Controls Touch/content/ProgressBarPage.qml | 114 ---- basicsuite/Controls Touch/content/SliderPage.qml | 106 ---- basicsuite/Controls Touch/content/TabBarPage.qml | 102 ---- .../Controls Touch/content/TextInputPage.qml | 106 ---- basicsuite/Controls Touch/description.txt | 3 - basicsuite/Controls Touch/images/NOTICE.txt | 2 - .../Controls Touch/images/button_default.png | Bin 1406 -> 0 bytes .../Controls Touch/images/button_pressed.png | Bin 1694 -> 0 bytes .../Controls Touch/images/navigation_next_item.png | Bin 1341 -> 0 bytes .../images/navigation_previous_item.png | Bin 1343 -> 0 bytes basicsuite/Controls Touch/images/tab_selected.png | Bin 217 -> 0 bytes basicsuite/Controls Touch/images/tabs_standard.png | Bin 1230 -> 0 bytes basicsuite/Controls Touch/images/textinput.png | Bin 4132 -> 0 bytes basicsuite/Controls Touch/images/toolbar.png | Bin 1643 -> 0 bytes basicsuite/Controls Touch/main.qml | 148 ------ basicsuite/Controls Touch/preview_l.jpg | Bin 11179 -> 0 bytes basicsuite/Graphical Effects/Checkers.qml | 68 --- .../Graphical Effects/Graphical Effects.qmlproject | 18 - basicsuite/Graphical Effects/description.txt | 2 - .../effect_BrightnessContrast.qml | 75 --- basicsuite/Graphical Effects/effect_Colorize.qml | 74 --- .../Graphical Effects/effect_CustomDissolve.qml | 165 ------ basicsuite/Graphical Effects/effect_CustomWave.qml | 158 ------ .../Graphical Effects/effect_Displacement.qml | 80 --- basicsuite/Graphical Effects/effect_DropShadow.qml | 83 --- .../Graphical Effects/effect_GaussianBlur.qml | 79 --- basicsuite/Graphical Effects/effect_Glow.qml | 79 --- .../Graphical Effects/effect_HueSaturation.qml | 74 --- .../Graphical Effects/effect_OpacityMask.qml | 70 --- .../Graphical Effects/effect_ThresholdMask.qml | 83 --- basicsuite/Graphical Effects/images/bug.jpg | Bin 376684 -> 0 bytes basicsuite/Graphical Effects/images/butterfly.png | Bin 36912 -> 0 bytes basicsuite/Graphical Effects/images/fog.png | Bin 225653 -> 0 bytes .../Graphical Effects/images/glass_normal.png | Bin 13489 -> 0 bytes basicsuite/Graphical Effects/main.qml | 231 -------- basicsuite/Graphical Effects/preview_l.jpg | Bin 33841 -> 0 bytes .../Launcher Settings/BrightnessController.qml | 49 -- basicsuite/Launcher Settings/NetworkController.qml | 61 --- basicsuite/Launcher Settings/PoweroffAction.qml | 48 -- basicsuite/Launcher Settings/RebootAction.qml | 48 -- basicsuite/Launcher Settings/description.txt | 1 - basicsuite/Launcher Settings/main.qml | 192 ------- basicsuite/Launcher Settings/preview_l.jpg | Bin 12642 -> 0 bytes basicsuite/Media Player/Content.qml | 124 ----- basicsuite/Media Player/ContentVideo.qml | 93 ---- basicsuite/Media Player/ControlBar.qml | 325 ------------ basicsuite/Media Player/EffectSelectionPanel.qml | 162 ------ basicsuite/Media Player/Effects/Effect.qml | 75 --- .../Media Player/Effects/EffectBillboard.qml | 89 ---- .../Media Player/Effects/EffectBlackAndWhite.qml | 74 --- basicsuite/Media Player/Effects/EffectEmboss.qml | 73 --- .../Media Player/Effects/EffectGaussianBlur.qml | 136 ----- basicsuite/Media Player/Effects/EffectGlow.qml | 74 --- basicsuite/Media Player/Effects/EffectIsolate.qml | 105 ---- basicsuite/Media Player/Effects/EffectMagnify.qml | 117 ----- basicsuite/Media Player/Effects/EffectPageCurl.qml | 196 ------- .../Media Player/Effects/EffectPassThrough.qml | 46 -- basicsuite/Media Player/Effects/EffectPixelate.qml | 76 --- .../Media Player/Effects/EffectPosterize.qml | 82 --- basicsuite/Media Player/Effects/EffectRipple.qml | 98 ---- basicsuite/Media Player/Effects/EffectSepia.qml | 61 --- basicsuite/Media Player/Effects/EffectSharpen.qml | 87 --- .../Media Player/Effects/EffectShockwave.qml | 109 ---- .../Effects/EffectSobelEdgeDetection1.qml | 98 ---- .../Effects/EffectSobelEdgeDetection2.qml | 89 ---- .../Media Player/Effects/EffectTiltShift.qml | 77 --- basicsuite/Media Player/Effects/EffectToon.qml | 111 ---- basicsuite/Media Player/Effects/EffectVignette.qml | 66 --- basicsuite/Media Player/Effects/EffectWarhol.qml | 68 --- basicsuite/Media Player/Effects/EffectWobble.qml | 79 --- basicsuite/Media Player/FileBrowser.qml | 415 --------------- basicsuite/Media Player/ImageButton.qml | 84 --- basicsuite/Media Player/Intro.qml | 88 ---- basicsuite/Media Player/Media Player.qmlproject | 18 - basicsuite/Media Player/MetadataView.qml | 213 -------- basicsuite/Media Player/ParameterPanel.qml | 110 ---- basicsuite/Media Player/PlaybackControl.qml | 100 ---- basicsuite/Media Player/SeekControl.qml | 123 ----- basicsuite/Media Player/Slider.qml | 138 ----- basicsuite/Media Player/UrlBar.qml | 120 ----- basicsuite/Media Player/VolumeControl.qml | 85 --- basicsuite/Media Player/description.txt | 3 - basicsuite/Media Player/exclude.txt | 1 - basicsuite/Media Player/images/CameraButton.png | Bin 237 -> 0 bytes basicsuite/Media Player/images/ControlBar.png | Bin 5081 -> 0 bytes basicsuite/Media Player/images/FXButton.png | Bin 1208 -> 0 bytes basicsuite/Media Player/images/FileButton.png | Bin 564 -> 0 bytes .../Media Player/images/FullscreenButton.png | Bin 4304 -> 0 bytes basicsuite/Media Player/images/PauseButton.png | Bin 762 -> 0 bytes basicsuite/Media Player/images/PlayButton.png | Bin 1679 -> 0 bytes basicsuite/Media Player/images/PlaybackSlider.png | Bin 435 -> 0 bytes .../Media Player/images/RateButtonForward.png | Bin 1387 -> 0 bytes .../Media Player/images/RateButtonReverse.png | Bin 1433 -> 0 bytes .../Media Player/images/SliderBackground.png | Bin 793 -> 0 bytes basicsuite/Media Player/images/SliderHandle.png | Bin 4459 -> 0 bytes basicsuite/Media Player/images/SliderProgress.png | Bin 4461 -> 0 bytes basicsuite/Media Player/images/UrlButton.png | Bin 1613 -> 0 bytes basicsuite/Media Player/images/VolumeDown.png | Bin 4130 -> 0 bytes basicsuite/Media Player/images/VolumeUp.png | Bin 4258 -> 0 bytes basicsuite/Media Player/images/folder.png | Bin 1841 -> 0 bytes basicsuite/Media Player/images/gradient.png | Bin 34302 -> 0 bytes basicsuite/Media Player/images/pattern.png | Bin 2627 -> 0 bytes basicsuite/Media Player/images/qt-logo.png | Bin 11465 -> 0 bytes basicsuite/Media Player/images/titlebar.png | Bin 1436 -> 0 bytes basicsuite/Media Player/images/titlebar.sci | 5 - basicsuite/Media Player/images/up.png | Bin 662 -> 0 bytes basicsuite/Media Player/main.qml | 289 ---------- basicsuite/Media Player/preview_l.jpg | Bin 29015 -> 0 bytes basicsuite/Photo Gallery/Photo Gallery.qmlproject | 18 - basicsuite/Photo Gallery/description.txt | 1 - basicsuite/Photo Gallery/main.qml | 295 ----------- basicsuite/Photo Gallery/preview_l.jpg | Bin 55274 -> 0 bytes .../Qt5 Cinematic Demo.qmlproject | 20 - .../Qt5 Cinematic Demo/Qt5_CinematicExperience.pro | 9 - basicsuite/Qt5 Cinematic Demo/README | 49 -- .../Qt5 Cinematic Demo/content/Background.qml | 39 -- basicsuite/Qt5 Cinematic Demo/content/Button.qml | 112 ---- .../Qt5 Cinematic Demo/content/CurtainEffect.qml | 53 -- .../Qt5 Cinematic Demo/content/DelegateItem.qml | 93 ---- .../Qt5 Cinematic Demo/content/DetailsView.qml | 190 ------- basicsuite/Qt5 Cinematic Demo/content/FpsItem.qml | 42 -- basicsuite/Qt5 Cinematic Demo/content/InfoView.qml | 264 ---------- .../Qt5 Cinematic Demo/content/InfoViewItem.qml | 30 -- basicsuite/Qt5 Cinematic Demo/content/MainView.qml | 232 -------- .../Qt5 Cinematic Demo/content/MoviesModel.qml | 187 ------- .../Qt5 Cinematic Demo/content/RatingsItem.qml | 32 -- .../Qt5 Cinematic Demo/content/SettingsView.qml | 138 ----- basicsuite/Qt5 Cinematic Demo/content/Switch.qml | 170 ------ basicsuite/Qt5 Cinematic Demo/content/images/1.png | Bin 92547 -> 0 bytes .../Qt5 Cinematic Demo/content/images/10.png | Bin 88497 -> 0 bytes .../Qt5 Cinematic Demo/content/images/11.png | Bin 106319 -> 0 bytes .../Qt5 Cinematic Demo/content/images/12.png | Bin 84964 -> 0 bytes .../Qt5 Cinematic Demo/content/images/13.png | Bin 62204 -> 0 bytes .../Qt5 Cinematic Demo/content/images/14.png | Bin 110188 -> 0 bytes .../Qt5 Cinematic Demo/content/images/15.png | Bin 100168 -> 0 bytes .../Qt5 Cinematic Demo/content/images/16.png | Bin 111695 -> 0 bytes .../Qt5 Cinematic Demo/content/images/17.png | Bin 98722 -> 0 bytes .../Qt5 Cinematic Demo/content/images/18.png | Bin 90229 -> 0 bytes .../Qt5 Cinematic Demo/content/images/19.png | Bin 49917 -> 0 bytes basicsuite/Qt5 Cinematic Demo/content/images/2.png | Bin 112159 -> 0 bytes .../Qt5 Cinematic Demo/content/images/20.png | Bin 113344 -> 0 bytes basicsuite/Qt5 Cinematic Demo/content/images/3.png | Bin 86693 -> 0 bytes basicsuite/Qt5 Cinematic Demo/content/images/4.png | Bin 69699 -> 0 bytes basicsuite/Qt5 Cinematic Demo/content/images/5.png | Bin 111629 -> 0 bytes basicsuite/Qt5 Cinematic Demo/content/images/6.png | Bin 72727 -> 0 bytes basicsuite/Qt5 Cinematic Demo/content/images/7.png | Bin 110085 -> 0 bytes basicsuite/Qt5 Cinematic Demo/content/images/8.png | Bin 128300 -> 0 bytes basicsuite/Qt5 Cinematic Demo/content/images/9.png | Bin 102555 -> 0 bytes .../content/images/background.png | Bin 77700 -> 0 bytes .../content/images/background3.png | Bin 174979 -> 0 bytes .../Qt5 Cinematic Demo/content/images/button.png | Bin 4441 -> 0 bytes .../content/images/cc-by_logo.png | Bin 4400 -> 0 bytes .../content/images/cover_nmap.png | Bin 10309 -> 0 bytes .../Qt5 Cinematic Demo/content/images/grip.png | Bin 5198 -> 0 bytes .../Qt5 Cinematic Demo/content/images/heading.png | Bin 58704 -> 0 bytes .../content/images/heading_big.png | Bin 58950 -> 0 bytes .../content/images/heading_big.xcf | Bin 120556 -> 0 bytes .../Qt5 Cinematic Demo/content/images/info.png | Bin 7452 -> 0 bytes .../Qt5 Cinematic Demo/content/images/panel_bg.png | Bin 1595 -> 0 bytes .../Qt5 Cinematic Demo/content/images/particle.png | Bin 861 -> 0 bytes .../content/images/planet_sprite.png | Bin 250266 -> 0 bytes .../content/images/qt_ambassador_logo.png | Bin 5291 -> 0 bytes .../Qt5 Cinematic Demo/content/images/qt_logo.png | Bin 28581 -> 0 bytes .../Qt5 Cinematic Demo/content/images/qt_logo2.png | Bin 21659 -> 0 bytes .../content/images/quit_logo.png | Bin 8316 -> 0 bytes .../Qt5 Cinematic Demo/content/images/sc1.png | Bin 48804 -> 0 bytes .../Qt5 Cinematic Demo/content/images/sc2.png | Bin 50629 -> 0 bytes .../Qt5 Cinematic Demo/content/images/sc3.png | Bin 50888 -> 0 bytes .../Qt5 Cinematic Demo/content/images/sc4.png | Bin 36904 -> 0 bytes .../Qt5 Cinematic Demo/content/images/sc5.png | Bin 38523 -> 0 bytes .../Qt5 Cinematic Demo/content/images/settings.png | Bin 7927 -> 0 bytes .../Qt5 Cinematic Demo/content/images/smoke.png | Bin 438 -> 0 bytes .../Qt5 Cinematic Demo/content/images/spinner.png | Bin 3470 -> 0 bytes .../Qt5 Cinematic Demo/content/images/star.png | Bin 1550 -> 0 bytes .../Qt5 Cinematic Demo/content/images/stars.png | Bin 2752 -> 0 bytes .../Qt5 Cinematic Demo/content/images/stars2.png | Bin 2600 -> 0 bytes .../content/images/switch_background.png | Bin 1734 -> 0 bytes .../content/images/switch_frame.png | Bin 5854 -> 0 bytes .../content/images/switch_on.png | Bin 2383 -> 0 bytes .../content/images/switch_thumb.png | Bin 3366 -> 0 bytes basicsuite/Qt5 Cinematic Demo/description.txt | 5 - basicsuite/Qt5 Cinematic Demo/main.cpp | 18 - basicsuite/Qt5 Cinematic Demo/main.qml | 48 -- basicsuite/Qt5 Cinematic Demo/preview_l.jpg | Bin 36830 -> 0 bytes basicsuite/Qt5 Launch Presentation/Button.qml | 78 --- basicsuite/Qt5 Launch Presentation/CameraSlide.qml | 92 ---- basicsuite/Qt5 Launch Presentation/CanvasSlide.qml | 161 ------ basicsuite/Qt5 Launch Presentation/DemoMain.qml | 139 ----- .../Qt5 Launch Presentation/EffectsSlide.qml | 203 ------- .../Qt5 Launch Presentation/ExamplesSlide.qml | 89 ---- basicsuite/Qt5 Launch Presentation/FontSlide.qml | 98 ---- .../Qt5 Launch Presentation/NoisyGradient.qml | 92 ---- .../Qt5 Launch Presentation/NormalMapGenerator.qml | 92 ---- .../OpacityTransitionPresentation.qml | 104 ---- .../Qt5 Launch Presentation/ParticleSlide.qml | 86 --- basicsuite/Qt5 Launch Presentation/README | 51 -- basicsuite/Qt5 Launch Presentation/ShaderSlide.qml | 197 ------- basicsuite/Qt5 Launch Presentation/SlideDeck.qml | 232 -------- basicsuite/Qt5 Launch Presentation/Swirl.qml | 116 ---- basicsuite/Qt5 Launch Presentation/VideoSlide.qml | 116 ---- .../Qt5 Launch Presentation/WebKitSlideContent.qml | 124 ----- basicsuite/Qt5 Launch Presentation/WebkitSlide.qml | 59 --- .../Qt5 Launch Presentation/WidgetsSlide.qml | 152 ------ .../Qt5 Launch Presentation/calqlatr/.DS_Store | Bin 6148 -> 0 bytes .../Qt5 Launch Presentation/calqlatr/Calqlatr.qml | 110 ---- .../calqlatr/content/Button.qml | 80 --- .../calqlatr/content/Display.qml | 124 ----- .../calqlatr/content/NumberPad.qml | 69 --- .../calqlatr/content/StyleLabel.qml | 50 -- .../calqlatr/content/audio/touch.wav | Bin 950 -> 0 bytes .../calqlatr/content/calculator.js | 143 ----- .../calqlatr/content/images/icon-back.png | Bin 328 -> 0 bytes .../calqlatr/content/images/icon-close.png | Bin 488 -> 0 bytes .../calqlatr/content/images/icon-settings.png | Bin 503 -> 0 bytes .../calqlatr/content/images/logo.png | Bin 5950 -> 0 bytes .../calqlatr/content/images/paper-edge-left.png | Bin 12401 -> 0 bytes .../calqlatr/content/images/paper-edge-right.png | Bin 12967 -> 0 bytes .../calqlatr/content/images/paper-grip.png | Bin 298 -> 0 bytes .../content/images/settings-selected-a.png | Bin 2326 -> 0 bytes .../content/images/settings-selected-b.png | Bin 2334 -> 0 bytes .../calqlatr/content/images/touch-green.png | Bin 4808 -> 0 bytes .../calqlatr/content/images/touch-white.png | Bin 4601 -> 0 bytes basicsuite/Qt5 Launch Presentation/demo.qmlproject | 18 - basicsuite/Qt5 Launch Presentation/description.txt | 6 - basicsuite/Qt5 Launch Presentation/images/ally.png | Bin 1907941 -> 0 bytes .../Qt5 Launch Presentation/images/butterfly.png | Bin 18668 -> 0 bytes .../Qt5 Launch Presentation/images/displace.png | Bin 20269 -> 0 bytes basicsuite/Qt5 Launch Presentation/images/fog.png | Bin 225653 -> 0 bytes .../Qt5 Launch Presentation/images/particle.png | Bin 861 -> 0 bytes .../Qt5 Launch Presentation/images/qt-logo.png | Bin 49656 -> 0 bytes .../images/widgets_boxes.png | Bin 589779 -> 0 bytes .../images/widgets_chips.png | Bin 211342 -> 0 bytes .../images/widgets_mainwindows.png | Bin 95685 -> 0 bytes .../images/widgets_styles_fusion.png | Bin 65678 -> 0 bytes .../images/widgets_styles_macstyle.png | Bin 70514 -> 0 bytes basicsuite/Qt5 Launch Presentation/main.qml | 63 --- basicsuite/Qt5 Launch Presentation/main_hifi.qml | 43 -- .../Qt5 Launch Presentation/maroon/.DS_Store | Bin 6148 -> 0 bytes .../Qt5 Launch Presentation/maroon/Maroon.qml | 233 --------- .../maroon/content/BuildButton.qml | 90 ---- .../maroon/content/GameCanvas.qml | 240 --------- .../maroon/content/GameOverScreen.qml | 115 ---- .../maroon/content/InfoBar.qml | 84 --- .../maroon/content/NewGameScreen.qml | 111 ---- .../maroon/content/SoundEffect.qml | 53 -- .../maroon/content/audio/bomb-action.wav | Bin 20972 -> 0 bytes .../maroon/content/audio/catch-action.wav | Bin 13274 -> 0 bytes .../maroon/content/audio/catch.wav | Bin 8638 -> 0 bytes .../maroon/content/audio/currency.wav | Bin 15790 -> 0 bytes .../maroon/content/audio/factory-action.wav | Bin 4936 -> 0 bytes .../maroon/content/audio/melee-action.wav | Bin 17798 -> 0 bytes .../maroon/content/audio/projectile-action.wav | Bin 2562 -> 0 bytes .../maroon/content/audio/shooter-action.wav | Bin 27554 -> 0 bytes .../maroon/content/gfx/background.png | Bin 5802 -> 0 bytes .../maroon/content/gfx/bomb-action.png | Bin 23974 -> 0 bytes .../maroon/content/gfx/bomb-idle.png | Bin 12238 -> 0 bytes .../maroon/content/gfx/bomb.png | Bin 4067 -> 0 bytes .../maroon/content/gfx/button-help.png | Bin 8916 -> 0 bytes .../maroon/content/gfx/button-play.png | Bin 13945 -> 0 bytes .../maroon/content/gfx/catch-action.png | Bin 6760 -> 0 bytes .../maroon/content/gfx/catch.png | Bin 4771 -> 0 bytes .../maroon/content/gfx/cloud.png | Bin 3398 -> 0 bytes .../maroon/content/gfx/currency.png | Bin 1889 -> 0 bytes .../maroon/content/gfx/dialog-bomb.png | Bin 3751 -> 0 bytes .../maroon/content/gfx/dialog-factory.png | Bin 3946 -> 0 bytes .../maroon/content/gfx/dialog-melee.png | Bin 4392 -> 0 bytes .../maroon/content/gfx/dialog-pointer.png | Bin 911 -> 0 bytes .../maroon/content/gfx/dialog-shooter.png | Bin 3737 -> 0 bytes .../maroon/content/gfx/dialog.png | Bin 3362 -> 0 bytes .../maroon/content/gfx/factory-action.png | Bin 22440 -> 0 bytes .../maroon/content/gfx/factory-idle.png | Bin 12729 -> 0 bytes .../maroon/content/gfx/factory.png | Bin 4138 -> 0 bytes .../maroon/content/gfx/grid.png | Bin 2830 -> 0 bytes .../maroon/content/gfx/help.png | Bin 38255 -> 0 bytes .../maroon/content/gfx/lifes.png | Bin 1675 -> 0 bytes .../maroon/content/gfx/logo-bubble.png | Bin 7706 -> 0 bytes .../maroon/content/gfx/logo-fish.png | Bin 3477 -> 0 bytes .../maroon/content/gfx/logo.png | Bin 18332 -> 0 bytes .../maroon/content/gfx/melee-action.png | Bin 7797 -> 0 bytes .../maroon/content/gfx/melee-idle.png | Bin 22832 -> 0 bytes .../maroon/content/gfx/melee.png | Bin 4046 -> 0 bytes .../maroon/content/gfx/mob-idle.png | Bin 6181 -> 0 bytes .../maroon/content/gfx/mob.png | Bin 2391 -> 0 bytes .../maroon/content/gfx/points.png | Bin 1561 -> 0 bytes .../maroon/content/gfx/projectile-action.png | Bin 6257 -> 0 bytes .../maroon/content/gfx/projectile.png | Bin 801 -> 0 bytes .../maroon/content/gfx/scores.png | Bin 1535 -> 0 bytes .../maroon/content/gfx/shooter-action.png | Bin 18121 -> 0 bytes .../maroon/content/gfx/shooter-idle.png | Bin 11929 -> 0 bytes .../maroon/content/gfx/shooter.png | Bin 4137 -> 0 bytes .../maroon/content/gfx/sunlight.png | Bin 248412 -> 0 bytes .../maroon/content/gfx/text-1.png | Bin 2777 -> 0 bytes .../maroon/content/gfx/text-2.png | Bin 4959 -> 0 bytes .../maroon/content/gfx/text-3.png | Bin 5063 -> 0 bytes .../maroon/content/gfx/text-blank.png | Bin 1326 -> 0 bytes .../maroon/content/gfx/text-gameover.png | Bin 1515 -> 0 bytes .../maroon/content/gfx/text-go.png | Bin 4230 -> 0 bytes .../maroon/content/gfx/wave.png | Bin 2763 -> 0 bytes .../maroon/content/logic.js | 264 ---------- .../maroon/content/mobs/MobBase.qml | 262 ---------- .../maroon/content/towers/Bomb.qml | 133 ----- .../maroon/content/towers/Factory.qml | 114 ---- .../maroon/content/towers/Melee.qml | 83 --- .../maroon/content/towers/Ranged.qml | 128 ----- .../maroon/content/towers/TowerBase.qml | 72 --- .../particles/customemitter.qml | 91 ---- .../Qt5 Launch Presentation/particles/emitmask.qml | 76 --- .../Qt5 Launch Presentation/particles/particle.png | Bin 861 -> 0 bytes .../particles/particle4.png | Bin 1799 -> 0 bytes .../Qt5 Launch Presentation/particles/star.png | Bin 1550 -> 0 bytes .../particles/starfish_mask.png | Bin 11301 -> 0 bytes .../particles/velocityfrommotion.qml | 305 ----------- .../Qt5 Launch Presentation/presentation/Clock.qml | 77 --- .../presentation/CodeSlide.qml | 162 ------ .../presentation/Presentation.qml | 196 ------- .../Qt5 Launch Presentation/presentation/Slide.qml | 186 ------- .../presentation/SlideCounter.qml | 61 --- basicsuite/Qt5 Launch Presentation/preview_l.jpg | Bin 16252 -> 0 bytes .../Qt5 Launch Presentation/samegame/.DS_Store | Bin 6148 -> 0 bytes .../Qt5 Launch Presentation/samegame/Samegame.qml | 371 ------------- .../samegame/content/Block.qml | 114 ---- .../samegame/content/BlockEmitter.qml | 57 -- .../samegame/content/Button.qml | 70 --- .../samegame/content/GameArea.qml | 226 -------- .../samegame/content/LogoAnimation.qml | 102 ---- .../samegame/content/MenuEmitter.qml | 53 -- .../samegame/content/PaintEmitter.qml | 98 ---- .../samegame/content/PrimaryPack.qml | 122 ----- .../samegame/content/PuzzleBlock.qml | 111 ---- .../samegame/content/SamegameText.qml | 49 -- .../samegame/content/SimpleBlock.qml | 108 ---- .../samegame/content/SmokeText.qml | 83 --- .../samegame/content/gfx/background-puzzle.png | Bin 86666 -> 0 bytes .../samegame/content/gfx/background.png | Bin 101018 -> 0 bytes .../samegame/content/gfx/bar.png | Bin 10970 -> 0 bytes .../samegame/content/gfx/blue-puzzle.png | Bin 2219 -> 0 bytes .../samegame/content/gfx/blue.png | Bin 1018 -> 0 bytes .../samegame/content/gfx/bubble-highscore.png | Bin 2276 -> 0 bytes .../samegame/content/gfx/bubble-puzzle.png | Bin 2811 -> 0 bytes .../samegame/content/gfx/but-game-1.png | Bin 2728 -> 0 bytes .../samegame/content/gfx/but-game-2.png | Bin 3378 -> 0 bytes .../samegame/content/gfx/but-game-3.png | Bin 1423 -> 0 bytes .../samegame/content/gfx/but-game-4.png | Bin 2096 -> 0 bytes .../samegame/content/gfx/but-game-new.png | Bin 3662 -> 0 bytes .../samegame/content/gfx/but-menu.png | Bin 2391 -> 0 bytes .../samegame/content/gfx/but-puzzle-next.png | Bin 3658 -> 0 bytes .../samegame/content/gfx/but-quit.png | Bin 2100 -> 0 bytes .../samegame/content/gfx/green-puzzle.png | Bin 2271 -> 0 bytes .../samegame/content/gfx/green.png | Bin 1024 -> 0 bytes .../samegame/content/gfx/icon-fail.png | Bin 6549 -> 0 bytes .../samegame/content/gfx/icon-ok.png | Bin 7190 -> 0 bytes .../samegame/content/gfx/icon-time.png | Bin 1159 -> 0 bytes .../samegame/content/gfx/logo-a.png | Bin 1814 -> 0 bytes .../samegame/content/gfx/logo-e.png | Bin 1725 -> 0 bytes .../samegame/content/gfx/logo-g.png | Bin 1765 -> 0 bytes .../samegame/content/gfx/logo-m.png | Bin 1743 -> 0 bytes .../samegame/content/gfx/logo-s.png | Bin 1791 -> 0 bytes .../samegame/content/gfx/logo.png | Bin 3608 -> 0 bytes .../samegame/content/gfx/particle-brick.png | Bin 861 -> 0 bytes .../samegame/content/gfx/particle-paint.png | Bin 714 -> 0 bytes .../samegame/content/gfx/particle-smoke.png | Bin 5409 -> 0 bytes .../samegame/content/gfx/red-puzzle.png | Bin 2218 -> 0 bytes .../samegame/content/gfx/red.png | Bin 1018 -> 0 bytes .../samegame/content/gfx/text-highscore-new.png | Bin 6767 -> 0 bytes .../samegame/content/gfx/text-highscore.png | Bin 3179 -> 0 bytes .../samegame/content/gfx/text-no-winner.png | Bin 6321 -> 0 bytes .../samegame/content/gfx/text-p1-go.png | Bin 5395 -> 0 bytes .../samegame/content/gfx/text-p1-won.png | Bin 5618 -> 0 bytes .../samegame/content/gfx/text-p1.png | Bin 1751 -> 0 bytes .../samegame/content/gfx/text-p2-go.png | Bin 5874 -> 0 bytes .../samegame/content/gfx/text-p2-won.png | Bin 6177 -> 0 bytes .../samegame/content/gfx/text-p2.png | Bin 2381 -> 0 bytes .../samegame/content/gfx/yellow-puzzle.png | Bin 2239 -> 0 bytes .../samegame/content/gfx/yellow.png | Bin 1008 -> 0 bytes .../samegame/content/levels/TemplateBase.qml | 70 --- .../samegame/content/levels/level0.qml | 59 --- .../samegame/content/levels/level1.qml | 59 --- .../samegame/content/levels/level2.qml | 61 --- .../samegame/content/levels/level3.qml | 60 --- .../samegame/content/levels/level4.qml | 58 -- .../samegame/content/levels/level5.qml | 59 --- .../samegame/content/levels/level6.qml | 60 --- .../samegame/content/levels/level7.qml | 58 -- .../samegame/content/levels/level8.qml | 59 --- .../samegame/content/levels/level9.qml | 62 --- .../samegame/content/samegame.js | 581 --------------------- .../Qt5 Launch Presentation/samegame/settings.js | 56 -- .../Qt5 Particles Demo.qmlproject | 18 - .../Qt5 Particles Demo/content/burstandpulse.qml | 110 ---- .../Qt5 Particles Demo/content/customemitter.qml | 96 ---- basicsuite/Qt5 Particles Demo/content/emitmask.qml | 74 --- .../Qt5 Particles Demo/content/maximumemitted.qml | 82 --- .../content/shapeanddirection.qml | 112 ---- .../Qt5 Particles Demo/content/trailemitter.qml | 176 ------- .../content/velocityfrommotion.qml | 312 ----------- basicsuite/Qt5 Particles Demo/description.txt | 1 - .../doc/images/qml-emitters-example.png | Bin 54749 -> 0 bytes .../Qt5 Particles Demo/doc/src/emitters.qdoc | 60 --- basicsuite/Qt5 Particles Demo/emitters.pro | 11 - basicsuite/Qt5 Particles Demo/emitters.qmlproject | 16 - basicsuite/Qt5 Particles Demo/emitters.qrc | 12 - basicsuite/Qt5 Particles Demo/images/_explo.png | Bin 81528 -> 0 bytes .../Qt5 Particles Demo/images/backgroundLeaves.jpg | Bin 78665 -> 0 bytes .../Qt5 Particles Demo/images/bear_tiles.png | Bin 40349 -> 0 bytes basicsuite/Qt5 Particles Demo/images/candle.png | Bin 1348 -> 0 bytes .../Qt5 Particles Demo/images/colortable.png | Bin 704 -> 0 bytes .../Qt5 Particles Demo/images/finalfrontier.png | Bin 695061 -> 0 bytes basicsuite/Qt5 Particles Demo/images/flower.png | Bin 4683 -> 0 bytes basicsuite/Qt5 Particles Demo/images/matchmask.png | Bin 2369 -> 0 bytes basicsuite/Qt5 Particles Demo/images/meteor.png | Bin 83169 -> 0 bytes .../Qt5 Particles Demo/images/meteor_explo.png | Bin 219946 -> 0 bytes basicsuite/Qt5 Particles Demo/images/meteors.png | Bin 132137 -> 0 bytes basicsuite/Qt5 Particles Demo/images/nullRock.png | Bin 140 -> 0 bytes basicsuite/Qt5 Particles Demo/images/particle.png | Bin 861 -> 0 bytes basicsuite/Qt5 Particles Demo/images/particle2.png | Bin 3909 -> 0 bytes basicsuite/Qt5 Particles Demo/images/particle3.png | Bin 3186 -> 0 bytes basicsuite/Qt5 Particles Demo/images/particle4.png | Bin 1799 -> 0 bytes basicsuite/Qt5 Particles Demo/images/particleA.png | Bin 3541 -> 0 bytes basicsuite/Qt5 Particles Demo/images/portal_bg.png | Bin 96858 -> 0 bytes basicsuite/Qt5 Particles Demo/images/realLeaf1.png | Bin 15625 -> 0 bytes basicsuite/Qt5 Particles Demo/images/realLeaf2.png | Bin 13660 -> 0 bytes basicsuite/Qt5 Particles Demo/images/realLeaf3.png | Bin 23809 -> 0 bytes basicsuite/Qt5 Particles Demo/images/realLeaf4.png | Bin 23655 -> 0 bytes basicsuite/Qt5 Particles Demo/images/rocket.png | Bin 7315 -> 0 bytes basicsuite/Qt5 Particles Demo/images/rocket2.png | Bin 1918 -> 0 bytes basicsuite/Qt5 Particles Demo/images/sizeInOut.png | Bin 251 -> 0 bytes basicsuite/Qt5 Particles Demo/images/snowflake.png | Bin 189327 -> 0 bytes .../Qt5 Particles Demo/images/sparkleSize.png | Bin 378 -> 0 bytes basicsuite/Qt5 Particles Demo/images/star.png | Bin 1550 -> 0 bytes .../Qt5 Particles Demo/images/starfish_0.png | Bin 15972 -> 0 bytes .../Qt5 Particles Demo/images/starfish_1.png | Bin 15746 -> 0 bytes .../Qt5 Particles Demo/images/starfish_2.png | Bin 16067 -> 0 bytes .../Qt5 Particles Demo/images/starfish_3.png | Bin 16201 -> 0 bytes .../Qt5 Particles Demo/images/starfish_4.png | Bin 14698 -> 0 bytes .../Qt5 Particles Demo/images/starfish_mask.png | Bin 11301 -> 0 bytes basicsuite/Qt5 Particles Demo/main.cpp | 41 -- basicsuite/Qt5 Particles Demo/main.qml | 60 --- basicsuite/Qt5 Particles Demo/preview_l.jpg | Bin 8889 -> 0 bytes basicsuite/Qt5 Particles Demo/shared/Button.qml | 91 ---- .../Qt5 Particles Demo/shared/LauncherList.qml | 148 ------ basicsuite/Qt5 Particles Demo/shared/README | 11 - .../shared/SimpleLauncherDelegate.qml | 89 ---- .../Qt5 Particles Demo/shared/images/back.png | Bin 1590 -> 0 bytes .../Qt5 Particles Demo/shared/images/next.png | Bin 1371 -> 0 bytes basicsuite/Qt5 Particles Demo/shared/qmldir | 3 - .../Qt5 Particles Demo/shared/quick_shared.qrc | 8 - basicsuite/Qt5 Particles Demo/shared/shared.h | 58 -- basicsuite/Qt5 Particles Demo/shared/shared.qrc | 8 - basicsuite/Qt5Everywhere/Button.qml | 72 --- basicsuite/Qt5Everywhere/Cloud.qml | 105 ---- basicsuite/Qt5Everywhere/DialogButton.qml | 66 --- basicsuite/Qt5Everywhere/Element.qml | 76 --- basicsuite/Qt5Everywhere/Group.qml | 81 --- basicsuite/Qt5Everywhere/HelpScreen.qml | 329 ------------ .../Qt5Everywhere/IslandElementContainer.qml | 158 ------ basicsuite/Qt5Everywhere/NavigationPanel.qml | 92 ---- basicsuite/Qt5Everywhere/Qt5Everywhere.pro | 3 - basicsuite/Qt5Everywhere/QtLogo.png | Bin 34605 -> 0 bytes basicsuite/Qt5Everywhere/QuitDialog.qml | 107 ---- basicsuite/Qt5Everywhere/Slide.qml | 252 --------- basicsuite/Qt5Everywhere/SplashScreen.qml | 105 ---- basicsuite/Qt5Everywhere/WorldCanvas.qml | 145 ----- basicsuite/Qt5Everywhere/WorldMouseArea.qml | 115 ---- .../Qt5Everywhere/demos/calqlatr/Calqlatr.qml | 107 ---- .../demos/calqlatr/content/Button.qml | 85 --- .../demos/calqlatr/content/Display.qml | 128 ----- .../demos/calqlatr/content/NumberPad.qml | 69 --- .../demos/calqlatr/content/StyleLabel.qml | 50 -- .../demos/calqlatr/content/audio/touch.wav | Bin 950 -> 0 bytes .../demos/calqlatr/content/calculator.js | 150 ------ .../demos/calqlatr/content/images/icon-back.png | Bin 328 -> 0 bytes .../demos/calqlatr/content/images/icon-close.png | Bin 488 -> 0 bytes .../calqlatr/content/images/icon-settings.png | Bin 503 -> 0 bytes .../demos/calqlatr/content/images/logo.png | Bin 5950 -> 0 bytes .../calqlatr/content/images/paper-edge-left.png | Bin 12401 -> 0 bytes .../calqlatr/content/images/paper-edge-right.png | Bin 12967 -> 0 bytes .../demos/calqlatr/content/images/paper-grip.png | Bin 298 -> 0 bytes .../content/images/settings-selected-a.png | Bin 2326 -> 0 bytes .../content/images/settings-selected-b.png | Bin 2334 -> 0 bytes .../demos/calqlatr/content/images/touch-green.png | Bin 4808 -> 0 bytes .../demos/calqlatr/content/images/touch-white.png | Bin 4601 -> 0 bytes .../demos/canvasclock/canvasClock.qml | 404 -------------- basicsuite/Qt5Everywhere/demos/demos.pro | 3 - .../demos/gridrssnews/RssDelegate.qml | 111 ---- .../Qt5Everywhere/demos/gridrssnews/ScrollBar.qml | 72 --- .../Qt5Everywhere/demos/gridrssnews/main.qml | 150 ------ .../Qt5Everywhere/demos/heartmonitor/HeartData.js | 50 -- .../Qt5Everywhere/demos/heartmonitor/heart.png | Bin 7021 -> 0 bytes .../Qt5Everywhere/demos/heartmonitor/main.qml | 266 ---------- basicsuite/Qt5Everywhere/demos/maroon/.DS_Store | Bin 6148 -> 0 bytes basicsuite/Qt5Everywhere/demos/maroon/Maroon.qml | 233 --------- .../demos/maroon/content/BuildButton.qml | 90 ---- .../demos/maroon/content/GameCanvas.qml | 240 --------- .../demos/maroon/content/GameOverScreen.qml | 115 ---- .../Qt5Everywhere/demos/maroon/content/InfoBar.qml | 84 --- .../demos/maroon/content/NewGameScreen.qml | 111 ---- .../demos/maroon/content/SoundEffect.qml | 52 -- .../demos/maroon/content/audio/bomb-action.wav | Bin 20972 -> 0 bytes .../demos/maroon/content/audio/catch-action.wav | Bin 13274 -> 0 bytes .../demos/maroon/content/audio/catch.wav | Bin 8638 -> 0 bytes .../demos/maroon/content/audio/currency.wav | Bin 15790 -> 0 bytes .../demos/maroon/content/audio/factory-action.wav | Bin 4936 -> 0 bytes .../demos/maroon/content/audio/melee-action.wav | Bin 17798 -> 0 bytes .../maroon/content/audio/projectile-action.wav | Bin 2562 -> 0 bytes .../demos/maroon/content/audio/shooter-action.wav | Bin 27554 -> 0 bytes .../demos/maroon/content/gfx/background.png | Bin 5802 -> 0 bytes .../demos/maroon/content/gfx/bomb-action.png | Bin 23974 -> 0 bytes .../demos/maroon/content/gfx/bomb-idle.png | Bin 12238 -> 0 bytes .../demos/maroon/content/gfx/bomb.png | Bin 4067 -> 0 bytes .../demos/maroon/content/gfx/button-help.png | Bin 8916 -> 0 bytes .../demos/maroon/content/gfx/button-play.png | Bin 13945 -> 0 bytes .../demos/maroon/content/gfx/catch-action.png | Bin 6760 -> 0 bytes .../demos/maroon/content/gfx/catch.png | Bin 4771 -> 0 bytes .../demos/maroon/content/gfx/cloud.png | Bin 3398 -> 0 bytes .../demos/maroon/content/gfx/currency.png | Bin 1889 -> 0 bytes .../demos/maroon/content/gfx/dialog-bomb.png | Bin 3751 -> 0 bytes .../demos/maroon/content/gfx/dialog-factory.png | Bin 3946 -> 0 bytes .../demos/maroon/content/gfx/dialog-melee.png | Bin 4392 -> 0 bytes .../demos/maroon/content/gfx/dialog-pointer.png | Bin 911 -> 0 bytes .../demos/maroon/content/gfx/dialog-shooter.png | Bin 3737 -> 0 bytes .../demos/maroon/content/gfx/dialog.png | Bin 3362 -> 0 bytes .../demos/maroon/content/gfx/factory-action.png | Bin 22440 -> 0 bytes .../demos/maroon/content/gfx/factory-idle.png | Bin 12729 -> 0 bytes .../demos/maroon/content/gfx/factory.png | Bin 4138 -> 0 bytes .../demos/maroon/content/gfx/grid.png | Bin 2830 -> 0 bytes .../demos/maroon/content/gfx/help.png | Bin 38255 -> 0 bytes .../demos/maroon/content/gfx/lifes.png | Bin 1675 -> 0 bytes .../demos/maroon/content/gfx/logo-bubble.png | Bin 7706 -> 0 bytes .../demos/maroon/content/gfx/logo-fish.png | Bin 3477 -> 0 bytes .../demos/maroon/content/gfx/logo.png | Bin 18332 -> 0 bytes .../demos/maroon/content/gfx/melee-action.png | Bin 7797 -> 0 bytes .../demos/maroon/content/gfx/melee-idle.png | Bin 22832 -> 0 bytes .../demos/maroon/content/gfx/melee.png | Bin 4046 -> 0 bytes .../demos/maroon/content/gfx/mob-idle.png | Bin 6181 -> 0 bytes .../Qt5Everywhere/demos/maroon/content/gfx/mob.png | Bin 2391 -> 0 bytes .../demos/maroon/content/gfx/points.png | Bin 1561 -> 0 bytes .../demos/maroon/content/gfx/projectile-action.png | Bin 6257 -> 0 bytes .../demos/maroon/content/gfx/projectile.png | Bin 801 -> 0 bytes .../demos/maroon/content/gfx/scores.png | Bin 1535 -> 0 bytes .../demos/maroon/content/gfx/shooter-action.png | Bin 18121 -> 0 bytes .../demos/maroon/content/gfx/shooter-idle.png | Bin 11929 -> 0 bytes .../demos/maroon/content/gfx/shooter.png | Bin 4137 -> 0 bytes .../demos/maroon/content/gfx/sunlight.png | Bin 248412 -> 0 bytes .../demos/maroon/content/gfx/text-1.png | Bin 2777 -> 0 bytes .../demos/maroon/content/gfx/text-2.png | Bin 4959 -> 0 bytes .../demos/maroon/content/gfx/text-3.png | Bin 5063 -> 0 bytes .../demos/maroon/content/gfx/text-blank.png | Bin 1326 -> 0 bytes .../demos/maroon/content/gfx/text-gameover.png | Bin 1515 -> 0 bytes .../demos/maroon/content/gfx/text-go.png | Bin 4230 -> 0 bytes .../demos/maroon/content/gfx/wave.png | Bin 2763 -> 0 bytes .../Qt5Everywhere/demos/maroon/content/logic.js | 264 ---------- .../demos/maroon/content/mobs/MobBase.qml | 262 ---------- .../demos/maroon/content/towers/Bomb.qml | 133 ----- .../demos/maroon/content/towers/Factory.qml | 114 ---- .../demos/maroon/content/towers/Melee.qml | 83 --- .../demos/maroon/content/towers/Ranged.qml | 128 ----- .../demos/maroon/content/towers/TowerBase.qml | 72 --- .../demos/particledemo/BootScreenDemo.qml | 181 ------- .../demos/particledemo/ParticleSysComponent.qml | 108 ---- .../demos/particledemo/images/particle.png | Bin 1257 -> 0 bytes .../demos/particledemo/images/particle_star.png | Bin 1696 -> 0 bytes .../particledemo/images/qt-logo-green-mask.png | Bin 10597 -> 0 bytes .../particledemo/images/qt-logo-white-mask.png | Bin 17247 -> 0 bytes .../Qt5Everywhere/demos/particledemo/particle.png | Bin 861 -> 0 bytes .../demos/particledemo/particledemo.qml | 213 -------- .../demos/photosurface/images/image0.png | Bin 249779 -> 0 bytes .../demos/photosurface/images/image1.png | Bin 264663 -> 0 bytes .../demos/photosurface/images/image2.png | Bin 264621 -> 0 bytes .../demos/photosurface/images/image3.png | Bin 215134 -> 0 bytes .../demos/photosurface/images/image4.png | Bin 225879 -> 0 bytes .../images/qml-photosurface-example-small.png | Bin 47271 -> 0 bytes .../demos/photosurface/photosurface.qml | 131 ----- .../Qt5Everywhere/demos/radio/VolumeButton.qml | 185 ------- .../Qt5Everywhere/demos/radio/VolumePoint.qml | 64 --- basicsuite/Qt5Everywhere/demos/radio/channels.xml | 27 - .../demos/radio/images/radio_btn_pause.png | Bin 1573 -> 0 bytes .../demos/radio/images/radio_btn_play.png | Bin 5402 -> 0 bytes .../demos/radio/images/radio_btn_stop.png | Bin 1388 -> 0 bytes .../demos/radio/images/radio_sound_icon.png | Bin 1972 -> 0 bytes .../Qt5Everywhere/demos/radio/images/volume.png | Bin 749 -> 0 bytes basicsuite/Qt5Everywhere/demos/radio/radio.qml | 261 --------- .../demos/rssnews/content/BusyIndicator.qml | 53 -- .../demos/rssnews/content/CategoryDelegate.qml | 84 --- .../demos/rssnews/content/NewsDelegate.qml | 75 --- .../demos/rssnews/content/RssFeeds.qml | 58 -- .../demos/rssnews/content/ScrollBar.qml | 107 ---- .../demos/rssnews/content/images/busy.png | Bin 2629 -> 0 bytes .../demos/rssnews/content/images/scrollbar.png | Bin 161 -> 0 bytes basicsuite/Qt5Everywhere/demos/rssnews/rssnews.qml | 101 ---- .../Qt5Everywhere/demos/rssnews/rssnews.qmlproject | 16 - .../Qt5Everywhere/demos/samegame/content/Block.qml | 114 ---- .../demos/samegame/content/BlockEmitter.qml | 57 -- .../demos/samegame/content/Button.qml | 70 --- .../demos/samegame/content/GameArea.qml | 226 -------- .../demos/samegame/content/LogoAnimation.qml | 102 ---- .../demos/samegame/content/MenuEmitter.qml | 53 -- .../demos/samegame/content/PaintEmitter.qml | 98 ---- .../demos/samegame/content/PrimaryPack.qml | 122 ----- .../demos/samegame/content/PuzzleBlock.qml | 111 ---- .../demos/samegame/content/SamegameText.qml | 49 -- .../demos/samegame/content/SimpleBlock.qml | 108 ---- .../demos/samegame/content/SmokeText.qml | 83 --- .../samegame/content/gfx/background-puzzle.png | Bin 86666 -> 0 bytes .../demos/samegame/content/gfx/background.png | Bin 101018 -> 0 bytes .../demos/samegame/content/gfx/bar.png | Bin 10970 -> 0 bytes .../demos/samegame/content/gfx/blue-puzzle.png | Bin 2219 -> 0 bytes .../demos/samegame/content/gfx/blue.png | Bin 1018 -> 0 bytes .../samegame/content/gfx/bubble-highscore.png | Bin 2276 -> 0 bytes .../demos/samegame/content/gfx/bubble-puzzle.png | Bin 2811 -> 0 bytes .../demos/samegame/content/gfx/but-game-1.png | Bin 2728 -> 0 bytes .../demos/samegame/content/gfx/but-game-2.png | Bin 3378 -> 0 bytes .../demos/samegame/content/gfx/but-game-3.png | Bin 1423 -> 0 bytes .../demos/samegame/content/gfx/but-game-4.png | Bin 2096 -> 0 bytes .../demos/samegame/content/gfx/but-game-new.png | Bin 3662 -> 0 bytes .../demos/samegame/content/gfx/but-menu.png | Bin 2391 -> 0 bytes .../demos/samegame/content/gfx/but-puzzle-next.png | Bin 3658 -> 0 bytes .../demos/samegame/content/gfx/but-quit.png | Bin 2100 -> 0 bytes .../demos/samegame/content/gfx/green-puzzle.png | Bin 2271 -> 0 bytes .../demos/samegame/content/gfx/green.png | Bin 1024 -> 0 bytes .../demos/samegame/content/gfx/icon-fail.png | Bin 6549 -> 0 bytes .../demos/samegame/content/gfx/icon-ok.png | Bin 7190 -> 0 bytes .../demos/samegame/content/gfx/icon-time.png | Bin 1159 -> 0 bytes .../demos/samegame/content/gfx/logo-a.png | Bin 1814 -> 0 bytes .../demos/samegame/content/gfx/logo-e.png | Bin 1725 -> 0 bytes .../demos/samegame/content/gfx/logo-g.png | Bin 1765 -> 0 bytes .../demos/samegame/content/gfx/logo-m.png | Bin 1743 -> 0 bytes .../demos/samegame/content/gfx/logo-s.png | Bin 1791 -> 0 bytes .../demos/samegame/content/gfx/logo.png | Bin 3608 -> 0 bytes .../demos/samegame/content/gfx/particle-brick.png | Bin 861 -> 0 bytes .../demos/samegame/content/gfx/particle-paint.png | Bin 714 -> 0 bytes .../demos/samegame/content/gfx/particle-smoke.png | Bin 5409 -> 0 bytes .../demos/samegame/content/gfx/red-puzzle.png | Bin 2218 -> 0 bytes .../demos/samegame/content/gfx/red.png | Bin 1018 -> 0 bytes .../samegame/content/gfx/text-highscore-new.png | Bin 6767 -> 0 bytes .../demos/samegame/content/gfx/text-highscore.png | Bin 3179 -> 0 bytes .../demos/samegame/content/gfx/text-no-winner.png | Bin 6321 -> 0 bytes .../demos/samegame/content/gfx/text-p1-go.png | Bin 5395 -> 0 bytes .../demos/samegame/content/gfx/text-p1-won.png | Bin 5618 -> 0 bytes .../demos/samegame/content/gfx/text-p1.png | Bin 1751 -> 0 bytes .../demos/samegame/content/gfx/text-p2-go.png | Bin 5874 -> 0 bytes .../demos/samegame/content/gfx/text-p2-won.png | Bin 6177 -> 0 bytes .../demos/samegame/content/gfx/text-p2.png | Bin 2381 -> 0 bytes .../demos/samegame/content/gfx/yellow-puzzle.png | Bin 2239 -> 0 bytes .../demos/samegame/content/gfx/yellow.png | Bin 1008 -> 0 bytes .../demos/samegame/content/levels/TemplateBase.qml | 70 --- .../demos/samegame/content/levels/level0.qml | 59 --- .../demos/samegame/content/levels/level1.qml | 59 --- .../demos/samegame/content/levels/level2.qml | 61 --- .../demos/samegame/content/levels/level3.qml | 60 --- .../demos/samegame/content/levels/level4.qml | 58 -- .../demos/samegame/content/levels/level5.qml | 59 --- .../demos/samegame/content/levels/level6.qml | 60 --- .../demos/samegame/content/levels/level7.qml | 58 -- .../demos/samegame/content/levels/level8.qml | 59 --- .../demos/samegame/content/levels/level9.qml | 62 --- .../demos/samegame/content/samegame.js | 581 --------------------- .../Qt5Everywhere/demos/samegame/samegame.qml | 371 ------------- .../Qt5Everywhere/demos/samegame/samegame.qrc | 72 --- .../Qt5Everywhere/demos/samegame/settings.js | 56 -- basicsuite/Qt5Everywhere/demos/shaders/Content.qml | 99 ---- .../demos/shaders/EffectSelectionPanel.qml | 156 ------ .../Qt5Everywhere/demos/shaders/Effects/Effect.qml | 90 ---- .../demos/shaders/Effects/EffectBillboard.qml | 59 --- .../demos/shaders/Effects/EffectBlackAndWhite.qml | 56 -- .../demos/shaders/Effects/EffectEmboss.qml | 46 -- .../demos/shaders/Effects/EffectGaussianBlur.qml | 85 --- .../demos/shaders/Effects/EffectGlow.qml | 46 -- .../demos/shaders/Effects/EffectIsolate.qml | 61 --- .../demos/shaders/Effects/EffectPassThrough.qml | 46 -- .../demos/shaders/Effects/EffectPixelate.qml | 56 -- .../demos/shaders/Effects/EffectPosterize.qml | 58 -- .../demos/shaders/Effects/EffectRipple.qml | 64 --- .../demos/shaders/Effects/EffectSepia.qml | 46 -- .../demos/shaders/Effects/EffectSharpen.qml | 56 -- .../demos/shaders/Effects/EffectShockwave.qml | 80 --- .../shaders/Effects/EffectSobelEdgeDetection1.qml | 59 --- .../demos/shaders/Effects/EffectToon.qml | 63 --- .../demos/shaders/Effects/EffectVignette.qml | 46 -- .../demos/shaders/Effects/EffectWarhol.qml | 46 -- .../demos/shaders/Effects/EffectWobble.qml | 61 --- basicsuite/Qt5Everywhere/demos/shaders/Logo.qml | 191 ------- .../Qt5Everywhere/demos/shaders/LogoContainer.qml | 87 --- .../Qt5Everywhere/demos/shaders/ParameterPanel.qml | 107 ---- basicsuite/Qt5Everywhere/demos/shaders/Slider.qml | 138 ----- .../demos/shaders/images/particle-smoke.png | Bin 5409 -> 0 bytes .../Qt5Everywhere/demos/shaders/images/qt-logo.png | Bin 11465 -> 0 bytes .../demos/shaders/images/wallpaper.png | Bin 225879 -> 0 bytes .../Qt5Everywhere/demos/shaders/import/import.pro | 13 - .../Qt5Everywhere/demos/shaders/import/main.cpp | 62 --- .../Qt5Everywhere/demos/shaders/import/plugin.json | 0 .../Qt5Everywhere/demos/shaders/import/qmldir | 2 - .../demos/shaders/import/shaderfilereader.cpp | 90 ---- .../demos/shaders/import/shaderfilereader.h | 84 --- basicsuite/Qt5Everywhere/demos/shaders/main.qml | 116 ---- basicsuite/Qt5Everywhere/demos/shaders/shaders.pro | 3 - .../demos/shaders/shaders/billboard.fsh | 74 --- .../demos/shaders/shaders/blackandwhite.fsh | 62 --- .../Qt5Everywhere/demos/shaders/shaders/emboss.fsh | 71 --- .../demos/shaders/shaders/gaussianblur_h.fsh | 67 --- .../demos/shaders/shaders/gaussianblur_v.fsh | 68 --- .../Qt5Everywhere/demos/shaders/shaders/glow.fsh | 72 --- .../demos/shaders/shaders/isolate.fsh | 88 ---- .../demos/shaders/shaders/pixelate.fsh | 64 --- .../demos/shaders/shaders/posterize.fsh | 68 --- .../Qt5Everywhere/demos/shaders/shaders/ripple.fsh | 78 --- .../demos/shaders/shaders/selectionpanel.fsh | 41 -- .../Qt5Everywhere/demos/shaders/shaders/sepia.fsh | 59 --- .../demos/shaders/shaders/sharpen.fsh | 75 --- .../demos/shaders/shaders/shockwave.fsh | 73 --- .../demos/shaders/shaders/sobeledgedetection1.fsh | 83 --- .../Qt5Everywhere/demos/shaders/shaders/toon.fsh | 92 ---- .../demos/shaders/shaders/vignette.fsh | 64 --- .../Qt5Everywhere/demos/shaders/shaders/warhol.fsh | 66 --- .../Qt5Everywhere/demos/shaders/shaders/wobble.fsh | 62 --- .../demos/touchgallery/content/AndroidDelegate.qml | 94 ---- .../demos/touchgallery/content/ButtonPage.qml | 121 ----- .../demos/touchgallery/content/CustomAppWindow.qml | 181 ------- .../demos/touchgallery/content/ProgressBarPage.qml | 114 ---- .../demos/touchgallery/content/SliderPage.qml | 102 ---- .../demos/touchgallery/content/TabBarPage.qml | 102 ---- .../demos/touchgallery/content/TextInputPage.qml | 106 ---- .../demos/touchgallery/images/NOTICE.txt | 2 - .../demos/touchgallery/images/button_default.png | Bin 1406 -> 0 bytes .../demos/touchgallery/images/button_pressed.png | Bin 1694 -> 0 bytes .../touchgallery/images/navigation_next_item.png | Bin 1341 -> 0 bytes .../images/navigation_previous_item.png | Bin 1343 -> 0 bytes .../demos/touchgallery/images/tab_selected.png | Bin 217 -> 0 bytes .../demos/touchgallery/images/tabs_standard.png | Bin 1230 -> 0 bytes .../demos/touchgallery/images/textinput.png | Bin 4132 -> 0 bytes .../demos/touchgallery/images/toolbar.png | Bin 1643 -> 0 bytes .../Qt5Everywhere/demos/touchgallery/main.qml | 135 ----- basicsuite/Qt5Everywhere/demos/video/Content.qml | 67 --- .../Qt5Everywhere/demos/video/ContentVideo.qml | 71 --- .../Qt5Everywhere/demos/video/ControlBar.qml | 290 ---------- .../Qt5Everywhere/demos/video/ImageButton.qml | 77 --- .../Qt5Everywhere/demos/video/PlaybackControl.qml | 61 --- basicsuite/Qt5Everywhere/demos/video/ScrollBar.qml | 69 --- .../Qt5Everywhere/demos/video/SeekControl.qml | 125 ----- basicsuite/Qt5Everywhere/demos/video/Slider.qml | 140 ----- .../Qt5Everywhere/demos/video/VideoDelegate.qml | 111 ---- .../Qt5Everywhere/demos/video/VideoSelector.qml | 158 ------ .../Qt5Everywhere/demos/video/VolumeControl.qml | 80 --- .../demos/video/images/CloseButton.png | Bin 534 -> 0 bytes .../demos/video/images/PauseButton.png | Bin 681 -> 0 bytes .../demos/video/images/PlayButton.png | Bin 1617 -> 0 bytes .../demos/video/images/RateButtonForward.png | Bin 3175 -> 0 bytes .../demos/video/images/RateButtonReverse.png | Bin 3289 -> 0 bytes .../demos/video/images/StopButton.png | Bin 534 -> 0 bytes .../demos/video/images/VolumeDown.png | Bin 814 -> 0 bytes .../Qt5Everywhere/demos/video/images/VolumeUp.png | Bin 1972 -> 0 bytes basicsuite/Qt5Everywhere/demos/video/main.qml | 161 ------ .../Qt5Everywhere/demos/video/qt5_video_jens.png | Bin 34519 -> 0 bytes .../demos/video/qt5_video_kenneth.png | Bin 42023 -> 0 bytes .../Qt5Everywhere/demos/video/qt5_video_lars.png | Bin 52829 -> 0 bytes .../Qt5Everywhere/demos/video/qt5_video_samuel.png | Bin 27869 -> 0 bytes .../Qt5Everywhere/demos/video/qt5_video_simon.png | Bin 33733 -> 0 bytes .../Qt5Everywhere/demos/video/qt5_video_thiago.png | Bin 31894 -> 0 bytes .../Qt5Everywhere/demos/video/qt5_videos.xml | 33 -- basicsuite/Qt5Everywhere/description.txt | 1 - basicsuite/Qt5Everywhere/engine.js | 302 ----------- basicsuite/Qt5Everywhere/fonts/OFL.txt | 92 ---- .../Qt5Everywhere/fonts/PatrickHandSC-Regular.ttf | Bin 152608 -> 0 bytes basicsuite/Qt5Everywhere/images/box.png | Bin 4666 -> 0 bytes basicsuite/Qt5Everywhere/images/box_open.png | Bin 5722 -> 0 bytes basicsuite/Qt5Everywhere/images/btn_help.png | Bin 2587 -> 0 bytes basicsuite/Qt5Everywhere/images/btn_home.png | Bin 3354 -> 0 bytes basicsuite/Qt5Everywhere/images/btn_next.png | Bin 3374 -> 0 bytes basicsuite/Qt5Everywhere/images/btn_previous.png | Bin 3325 -> 0 bytes basicsuite/Qt5Everywhere/images/car_device.png | Bin 8356 -> 0 bytes basicsuite/Qt5Everywhere/images/character0.png | Bin 13119 -> 0 bytes basicsuite/Qt5Everywhere/images/character1.png | Bin 15654 -> 0 bytes basicsuite/Qt5Everywhere/images/character10.png | Bin 15243 -> 0 bytes basicsuite/Qt5Everywhere/images/character2.png | Bin 12270 -> 0 bytes basicsuite/Qt5Everywhere/images/character3.png | Bin 14991 -> 0 bytes basicsuite/Qt5Everywhere/images/character4.png | Bin 15077 -> 0 bytes basicsuite/Qt5Everywhere/images/character5.png | Bin 13011 -> 0 bytes basicsuite/Qt5Everywhere/images/character6.png | Bin 15671 -> 0 bytes basicsuite/Qt5Everywhere/images/character7.png | Bin 13589 -> 0 bytes basicsuite/Qt5Everywhere/images/character8.png | Bin 12914 -> 0 bytes basicsuite/Qt5Everywhere/images/character9.png | Bin 18085 -> 0 bytes basicsuite/Qt5Everywhere/images/cloud1.png | Bin 2860 -> 0 bytes basicsuite/Qt5Everywhere/images/cloud2.png | Bin 3043 -> 0 bytes basicsuite/Qt5Everywhere/images/hand.png | Bin 32258 -> 0 bytes basicsuite/Qt5Everywhere/images/highlight_mask.png | Bin 10666 -> 0 bytes basicsuite/Qt5Everywhere/images/island.png | Bin 50597 -> 0 bytes basicsuite/Qt5Everywhere/images/laptop1.png | Bin 12899 -> 0 bytes basicsuite/Qt5Everywhere/images/laptop2.png | Bin 12448 -> 0 bytes basicsuite/Qt5Everywhere/images/man1.png | Bin 12878 -> 0 bytes basicsuite/Qt5Everywhere/images/medical_device.png | Bin 23780 -> 0 bytes basicsuite/Qt5Everywhere/images/mountain.png | Bin 5304 -> 0 bytes basicsuite/Qt5Everywhere/images/particle-smoke.png | Bin 5409 -> 0 bytes basicsuite/Qt5Everywhere/images/phone1.png | Bin 19454 -> 0 bytes basicsuite/Qt5Everywhere/images/phone2.png | Bin 10535 -> 0 bytes basicsuite/Qt5Everywhere/images/phone3.png | Bin 11835 -> 0 bytes basicsuite/Qt5Everywhere/images/stones.png | Bin 3041 -> 0 bytes basicsuite/Qt5Everywhere/images/tablet1.png | Bin 18363 -> 0 bytes basicsuite/Qt5Everywhere/images/tree1.png | Bin 2128 -> 0 bytes basicsuite/Qt5Everywhere/images/tree2.png | Bin 1747 -> 0 bytes basicsuite/Qt5Everywhere/images/tv.png | Bin 18685 -> 0 bytes basicsuite/Qt5Everywhere/main.qml | 242 --------- basicsuite/Qt5Everywhere/preview_l.jpg | Bin 34331 -> 0 bytes basicsuite/Qt5Everywhere/style.js | 49 -- basicsuite/Qt5Everywhere/title.txt | 1 - basicsuite/SensorExplorer/SensorExplorer.pro | 4 - basicsuite/SensorExplorer/description.txt | 1 - .../SensorExplorer/doc/src/sensor_explorer.qdoc | 79 --- basicsuite/SensorExplorer/imports/explorer.cpp | 136 ----- basicsuite/SensorExplorer/imports/explorer.h | 79 --- basicsuite/SensorExplorer/imports/imports.pro | 17 - basicsuite/SensorExplorer/imports/main.cpp | 63 --- basicsuite/SensorExplorer/imports/plugin.json | 1 - basicsuite/SensorExplorer/imports/propertyinfo.cpp | 140 ----- basicsuite/SensorExplorer/imports/propertyinfo.h | 83 --- basicsuite/SensorExplorer/imports/qmldir | 2 - basicsuite/SensorExplorer/imports/sensoritem.cpp | 322 ------------ basicsuite/SensorExplorer/imports/sensoritem.h | 96 ---- basicsuite/SensorExplorer/main.qml | 224 -------- basicsuite/SensorExplorer/preview_l.jpg | Bin 21553 -> 0 bytes basicsuite/SensorExplorer/title.txt | 1 - basicsuite/Sensors/1.png | Bin 33675 -> 0 bytes basicsuite/Sensors/2.png | Bin 27754 -> 0 bytes basicsuite/Sensors/3.png | Bin 27841 -> 0 bytes basicsuite/Sensors/Accelbubble.qml | 108 ---- basicsuite/Sensors/Light.qml | 90 ---- basicsuite/Sensors/Sensors.qmlproject | 18 - basicsuite/Sensors/bluebubble.png | Bin 12815 -> 0 bytes basicsuite/Sensors/description.txt | 4 - basicsuite/Sensors/main.qml | 105 ---- basicsuite/Sensors/preview_l.jpg | Bin 19464 -> 0 bytes basicsuite/Text Input/ScrollBar.qml | 66 --- basicsuite/Text Input/Text Input.qmlproject | 18 - basicsuite/Text Input/TextArea.qml | 88 ---- basicsuite/Text Input/TextBase.qml | 95 ---- basicsuite/Text Input/TextField.qml | 93 ---- basicsuite/Text Input/description.txt | 6 - basicsuite/Text Input/main.qml | 113 ---- basicsuite/Text Input/preview_l.jpg | Bin 16465 -> 0 bytes basicsuite/about-b2qt/AboutBoot2Qt.qml | 109 ++++ basicsuite/about-b2qt/Box.qml | 70 +++ basicsuite/about-b2qt/ContentText.qml | 48 ++ basicsuite/about-b2qt/QtForAndroid.qml | 93 ++++ basicsuite/about-b2qt/QtFramework.qml | 75 +++ basicsuite/about-b2qt/Title.qml | 48 ++ basicsuite/about-b2qt/about-b2qt.pro | 12 + basicsuite/about-b2qt/codeless.png | Bin 0 -> 28581 bytes basicsuite/about-b2qt/description.txt | 3 + basicsuite/about-b2qt/dummy.cpp | 0 basicsuite/about-b2qt/main.qml | 175 +++++++ basicsuite/about-b2qt/particle.png | Bin 0 -> 861 bytes basicsuite/about-b2qt/preview_l.jpg | Bin 0 -> 28727 bytes basicsuite/about-b2qt/qt-logo.png | Bin 0 -> 21659 bytes basicsuite/about-b2qt/title.txt | 1 + basicsuite/basicsuite.pro | 6 +- basicsuite/camera/CameraControlButton.qml | 94 ++++ basicsuite/camera/CameraSetting.qml | 68 +++ basicsuite/camera/CaptureControl.qml | 80 +++ basicsuite/camera/CapturePreview.qml | 85 +++ basicsuite/camera/Controls.qml | 199 +++++++ basicsuite/camera/FocusControl.qml | 151 ++++++ basicsuite/camera/Picker.qml | 129 +++++ basicsuite/camera/README | 2 + basicsuite/camera/RecordingTime.qml | 110 ++++ basicsuite/camera/Slider.qml | 133 +++++ basicsuite/camera/ZoomControl.qml | 80 +++ basicsuite/camera/app.pro | 12 + basicsuite/camera/camera.pro | 7 + basicsuite/camera/camerautils/camerautils.cpp | 229 ++++++++ basicsuite/camera/camerautils/camerautils.h | 127 +++++ basicsuite/camera/camerautils/camerautils.pro | 19 + basicsuite/camera/camerautils/plugin.cpp | 60 +++ basicsuite/camera/camerautils/qmldir | 2 + basicsuite/camera/description.txt | 5 + basicsuite/camera/exclude.txt | 1 + basicsuite/camera/main.qml | 263 ++++++++++ basicsuite/camera/preview_l.jpg | Bin 0 -> 33458 bytes basicsuite/camera/title.txt | 1 + basicsuite/controls-layouts/controls-layouts.pro | 10 + basicsuite/controls-layouts/description.txt | 3 + basicsuite/controls-layouts/main.qml | 118 +++++ basicsuite/controls-layouts/preview_l.jpg | Bin 0 -> 11273 bytes basicsuite/controls-layouts/title.txt | 1 + .../controls-touch/content/AndroidDelegate.qml | 92 ++++ basicsuite/controls-touch/content/ButtonPage.qml | 120 +++++ .../controls-touch/content/ProgressBarPage.qml | 114 ++++ basicsuite/controls-touch/content/SliderPage.qml | 106 ++++ basicsuite/controls-touch/content/TabBarPage.qml | 102 ++++ .../controls-touch/content/TextInputPage.qml | 106 ++++ basicsuite/controls-touch/controls-touch.pro | 13 + basicsuite/controls-touch/description.txt | 3 + basicsuite/controls-touch/images/NOTICE.txt | 2 + .../controls-touch/images/button_default.png | Bin 0 -> 1406 bytes .../controls-touch/images/button_pressed.png | Bin 0 -> 1694 bytes .../controls-touch/images/navigation_next_item.png | Bin 0 -> 1341 bytes .../images/navigation_previous_item.png | Bin 0 -> 1343 bytes basicsuite/controls-touch/images/tab_selected.png | Bin 0 -> 217 bytes basicsuite/controls-touch/images/tabs_standard.png | Bin 0 -> 1230 bytes basicsuite/controls-touch/images/textinput.png | Bin 0 -> 4132 bytes basicsuite/controls-touch/images/toolbar.png | Bin 0 -> 1643 bytes basicsuite/controls-touch/main.qml | 148 ++++++ basicsuite/controls-touch/preview_l.jpg | Bin 0 -> 11179 bytes basicsuite/controls-touch/title.txt | 1 + basicsuite/graphicaleffects/Checkers.qml | 68 +++ basicsuite/graphicaleffects/description.txt | 2 + .../graphicaleffects/effect_BrightnessContrast.qml | 75 +++ basicsuite/graphicaleffects/effect_Colorize.qml | 74 +++ .../graphicaleffects/effect_CustomDissolve.qml | 165 ++++++ basicsuite/graphicaleffects/effect_CustomWave.qml | 158 ++++++ .../graphicaleffects/effect_Displacement.qml | 80 +++ basicsuite/graphicaleffects/effect_DropShadow.qml | 83 +++ .../graphicaleffects/effect_GaussianBlur.qml | 79 +++ basicsuite/graphicaleffects/effect_Glow.qml | 79 +++ .../graphicaleffects/effect_HueSaturation.qml | 74 +++ basicsuite/graphicaleffects/effect_OpacityMask.qml | 70 +++ .../graphicaleffects/effect_ThresholdMask.qml | 83 +++ basicsuite/graphicaleffects/graphicaleffects.pro | 12 + basicsuite/graphicaleffects/images/bug.jpg | Bin 0 -> 376684 bytes basicsuite/graphicaleffects/images/butterfly.png | Bin 0 -> 36912 bytes basicsuite/graphicaleffects/images/fog.png | Bin 0 -> 225653 bytes .../graphicaleffects/images/glass_normal.png | Bin 0 -> 13489 bytes basicsuite/graphicaleffects/main.qml | 231 ++++++++ basicsuite/graphicaleffects/preview_l.jpg | Bin 0 -> 33841 bytes basicsuite/graphicaleffects/title.txt | 1 + .../launchersettings/BrightnessController.qml | 49 ++ basicsuite/launchersettings/NetworkController.qml | 61 +++ basicsuite/launchersettings/PoweroffAction.qml | 48 ++ basicsuite/launchersettings/RebootAction.qml | 48 ++ basicsuite/launchersettings/description.txt | 1 + basicsuite/launchersettings/launchersettings.pro | 10 + basicsuite/launchersettings/main.qml | 192 +++++++ basicsuite/launchersettings/preview_l.jpg | Bin 0 -> 12642 bytes basicsuite/launchersettings/title.txt | 1 + basicsuite/mediaplayer/Content.qml | 124 +++++ basicsuite/mediaplayer/ContentVideo.qml | 93 ++++ basicsuite/mediaplayer/ControlBar.qml | 325 ++++++++++++ basicsuite/mediaplayer/EffectSelectionPanel.qml | 162 ++++++ basicsuite/mediaplayer/Effects/Effect.qml | 75 +++ basicsuite/mediaplayer/Effects/EffectBillboard.qml | 89 ++++ .../mediaplayer/Effects/EffectBlackAndWhite.qml | 74 +++ basicsuite/mediaplayer/Effects/EffectEmboss.qml | 73 +++ .../mediaplayer/Effects/EffectGaussianBlur.qml | 136 +++++ basicsuite/mediaplayer/Effects/EffectGlow.qml | 74 +++ basicsuite/mediaplayer/Effects/EffectIsolate.qml | 105 ++++ basicsuite/mediaplayer/Effects/EffectMagnify.qml | 117 +++++ basicsuite/mediaplayer/Effects/EffectPageCurl.qml | 196 +++++++ .../mediaplayer/Effects/EffectPassThrough.qml | 46 ++ basicsuite/mediaplayer/Effects/EffectPixelate.qml | 76 +++ basicsuite/mediaplayer/Effects/EffectPosterize.qml | 82 +++ basicsuite/mediaplayer/Effects/EffectRipple.qml | 98 ++++ basicsuite/mediaplayer/Effects/EffectSepia.qml | 61 +++ basicsuite/mediaplayer/Effects/EffectSharpen.qml | 87 +++ basicsuite/mediaplayer/Effects/EffectShockwave.qml | 109 ++++ .../Effects/EffectSobelEdgeDetection1.qml | 98 ++++ .../Effects/EffectSobelEdgeDetection2.qml | 89 ++++ basicsuite/mediaplayer/Effects/EffectTiltShift.qml | 77 +++ basicsuite/mediaplayer/Effects/EffectToon.qml | 111 ++++ basicsuite/mediaplayer/Effects/EffectVignette.qml | 66 +++ basicsuite/mediaplayer/Effects/EffectWarhol.qml | 68 +++ basicsuite/mediaplayer/Effects/EffectWobble.qml | 79 +++ basicsuite/mediaplayer/FileBrowser.qml | 415 +++++++++++++++ basicsuite/mediaplayer/ImageButton.qml | 84 +++ basicsuite/mediaplayer/Intro.qml | 88 ++++ basicsuite/mediaplayer/MetadataView.qml | 213 ++++++++ basicsuite/mediaplayer/ParameterPanel.qml | 110 ++++ basicsuite/mediaplayer/PlaybackControl.qml | 100 ++++ basicsuite/mediaplayer/SeekControl.qml | 123 +++++ basicsuite/mediaplayer/Slider.qml | 138 +++++ basicsuite/mediaplayer/UrlBar.qml | 120 +++++ basicsuite/mediaplayer/VolumeControl.qml | 85 +++ basicsuite/mediaplayer/description.txt | 3 + basicsuite/mediaplayer/exclude.txt | 1 + basicsuite/mediaplayer/images/CameraButton.png | Bin 0 -> 237 bytes basicsuite/mediaplayer/images/ControlBar.png | Bin 0 -> 5081 bytes basicsuite/mediaplayer/images/FXButton.png | Bin 0 -> 1208 bytes basicsuite/mediaplayer/images/FileButton.png | Bin 0 -> 564 bytes basicsuite/mediaplayer/images/FullscreenButton.png | Bin 0 -> 4304 bytes basicsuite/mediaplayer/images/PauseButton.png | Bin 0 -> 762 bytes basicsuite/mediaplayer/images/PlayButton.png | Bin 0 -> 1679 bytes basicsuite/mediaplayer/images/PlaybackSlider.png | Bin 0 -> 435 bytes .../mediaplayer/images/RateButtonForward.png | Bin 0 -> 1387 bytes .../mediaplayer/images/RateButtonReverse.png | Bin 0 -> 1433 bytes basicsuite/mediaplayer/images/SliderBackground.png | Bin 0 -> 793 bytes basicsuite/mediaplayer/images/SliderHandle.png | Bin 0 -> 4459 bytes basicsuite/mediaplayer/images/SliderProgress.png | Bin 0 -> 4461 bytes basicsuite/mediaplayer/images/UrlButton.png | Bin 0 -> 1613 bytes basicsuite/mediaplayer/images/VolumeDown.png | Bin 0 -> 4130 bytes basicsuite/mediaplayer/images/VolumeUp.png | Bin 0 -> 4258 bytes basicsuite/mediaplayer/images/folder.png | Bin 0 -> 1841 bytes basicsuite/mediaplayer/images/gradient.png | Bin 0 -> 34302 bytes basicsuite/mediaplayer/images/pattern.png | Bin 0 -> 2627 bytes basicsuite/mediaplayer/images/qt-logo.png | Bin 0 -> 11465 bytes basicsuite/mediaplayer/images/titlebar.png | Bin 0 -> 1436 bytes basicsuite/mediaplayer/images/titlebar.sci | 5 + basicsuite/mediaplayer/images/up.png | Bin 0 -> 662 bytes basicsuite/mediaplayer/main.qml | 289 ++++++++++ basicsuite/mediaplayer/mediaplayer.pro | 13 + basicsuite/mediaplayer/preview_l.jpg | Bin 0 -> 29015 bytes basicsuite/mediaplayer/title.txt | 1 + basicsuite/photogallery/description.txt | 1 + basicsuite/photogallery/main.qml | 295 +++++++++++ basicsuite/photogallery/photogallery.pro | 12 + basicsuite/photogallery/preview_l.jpg | Bin 0 -> 55274 bytes basicsuite/photogallery/title.txt | 1 + .../qt5-cinematicdemo/Qt5_CinematicExperience.pro | 9 + basicsuite/qt5-cinematicdemo/README | 49 ++ .../qt5-cinematicdemo/content/Background.qml | 39 ++ basicsuite/qt5-cinematicdemo/content/Button.qml | 112 ++++ .../qt5-cinematicdemo/content/CurtainEffect.qml | 53 ++ .../qt5-cinematicdemo/content/DelegateItem.qml | 93 ++++ .../qt5-cinematicdemo/content/DetailsView.qml | 190 +++++++ basicsuite/qt5-cinematicdemo/content/FpsItem.qml | 42 ++ basicsuite/qt5-cinematicdemo/content/InfoView.qml | 264 ++++++++++ .../qt5-cinematicdemo/content/InfoViewItem.qml | 30 ++ basicsuite/qt5-cinematicdemo/content/MainView.qml | 232 ++++++++ .../qt5-cinematicdemo/content/MoviesModel.qml | 187 +++++++ .../qt5-cinematicdemo/content/RatingsItem.qml | 32 ++ .../qt5-cinematicdemo/content/SettingsView.qml | 138 +++++ basicsuite/qt5-cinematicdemo/content/Switch.qml | 170 ++++++ basicsuite/qt5-cinematicdemo/content/images/1.png | Bin 0 -> 92547 bytes basicsuite/qt5-cinematicdemo/content/images/10.png | Bin 0 -> 88497 bytes basicsuite/qt5-cinematicdemo/content/images/11.png | Bin 0 -> 106319 bytes basicsuite/qt5-cinematicdemo/content/images/12.png | Bin 0 -> 84964 bytes basicsuite/qt5-cinematicdemo/content/images/13.png | Bin 0 -> 62204 bytes basicsuite/qt5-cinematicdemo/content/images/14.png | Bin 0 -> 110188 bytes basicsuite/qt5-cinematicdemo/content/images/15.png | Bin 0 -> 100168 bytes basicsuite/qt5-cinematicdemo/content/images/16.png | Bin 0 -> 111695 bytes basicsuite/qt5-cinematicdemo/content/images/17.png | Bin 0 -> 98722 bytes basicsuite/qt5-cinematicdemo/content/images/18.png | Bin 0 -> 90229 bytes basicsuite/qt5-cinematicdemo/content/images/19.png | Bin 0 -> 49917 bytes basicsuite/qt5-cinematicdemo/content/images/2.png | Bin 0 -> 112159 bytes basicsuite/qt5-cinematicdemo/content/images/20.png | Bin 0 -> 113344 bytes basicsuite/qt5-cinematicdemo/content/images/3.png | Bin 0 -> 86693 bytes basicsuite/qt5-cinematicdemo/content/images/4.png | Bin 0 -> 69699 bytes basicsuite/qt5-cinematicdemo/content/images/5.png | Bin 0 -> 111629 bytes basicsuite/qt5-cinematicdemo/content/images/6.png | Bin 0 -> 72727 bytes basicsuite/qt5-cinematicdemo/content/images/7.png | Bin 0 -> 110085 bytes basicsuite/qt5-cinematicdemo/content/images/8.png | Bin 0 -> 128300 bytes basicsuite/qt5-cinematicdemo/content/images/9.png | Bin 0 -> 102555 bytes .../content/images/background.png | Bin 0 -> 77700 bytes .../content/images/background3.png | Bin 0 -> 174979 bytes .../qt5-cinematicdemo/content/images/button.png | Bin 0 -> 4441 bytes .../content/images/cc-by_logo.png | Bin 0 -> 4400 bytes .../content/images/cover_nmap.png | Bin 0 -> 10309 bytes .../qt5-cinematicdemo/content/images/grip.png | Bin 0 -> 5198 bytes .../qt5-cinematicdemo/content/images/heading.png | Bin 0 -> 58704 bytes .../content/images/heading_big.png | Bin 0 -> 58950 bytes .../content/images/heading_big.xcf | Bin 0 -> 120556 bytes .../qt5-cinematicdemo/content/images/info.png | Bin 0 -> 7452 bytes .../qt5-cinematicdemo/content/images/panel_bg.png | Bin 0 -> 1595 bytes .../qt5-cinematicdemo/content/images/particle.png | Bin 0 -> 861 bytes .../content/images/planet_sprite.png | Bin 0 -> 250266 bytes .../content/images/qt_ambassador_logo.png | Bin 0 -> 5291 bytes .../qt5-cinematicdemo/content/images/qt_logo.png | Bin 0 -> 28581 bytes .../qt5-cinematicdemo/content/images/qt_logo2.png | Bin 0 -> 21659 bytes .../qt5-cinematicdemo/content/images/quit_logo.png | Bin 0 -> 8316 bytes .../qt5-cinematicdemo/content/images/sc1.png | Bin 0 -> 48804 bytes .../qt5-cinematicdemo/content/images/sc2.png | Bin 0 -> 50629 bytes .../qt5-cinematicdemo/content/images/sc3.png | Bin 0 -> 50888 bytes .../qt5-cinematicdemo/content/images/sc4.png | Bin 0 -> 36904 bytes .../qt5-cinematicdemo/content/images/sc5.png | Bin 0 -> 38523 bytes .../qt5-cinematicdemo/content/images/settings.png | Bin 0 -> 7927 bytes .../qt5-cinematicdemo/content/images/smoke.png | Bin 0 -> 438 bytes .../qt5-cinematicdemo/content/images/spinner.png | Bin 0 -> 3470 bytes .../qt5-cinematicdemo/content/images/star.png | Bin 0 -> 1550 bytes .../qt5-cinematicdemo/content/images/stars.png | Bin 0 -> 2752 bytes .../qt5-cinematicdemo/content/images/stars2.png | Bin 0 -> 2600 bytes .../content/images/switch_background.png | Bin 0 -> 1734 bytes .../content/images/switch_frame.png | Bin 0 -> 5854 bytes .../qt5-cinematicdemo/content/images/switch_on.png | Bin 0 -> 2383 bytes .../content/images/switch_thumb.png | Bin 0 -> 3366 bytes basicsuite/qt5-cinematicdemo/description.txt | 5 + basicsuite/qt5-cinematicdemo/main.cpp | 18 + basicsuite/qt5-cinematicdemo/main.qml | 48 ++ basicsuite/qt5-cinematicdemo/preview_l.jpg | Bin 0 -> 36830 bytes basicsuite/qt5-cinematicdemo/qt5-cinematicdemo.pro | 13 + basicsuite/qt5-cinematicdemo/title.txt | 1 + basicsuite/qt5-everywhere/Button.qml | 72 +++ basicsuite/qt5-everywhere/Cloud.qml | 105 ++++ basicsuite/qt5-everywhere/DialogButton.qml | 66 +++ basicsuite/qt5-everywhere/Element.qml | 76 +++ basicsuite/qt5-everywhere/Group.qml | 81 +++ basicsuite/qt5-everywhere/HelpScreen.qml | 329 ++++++++++++ .../qt5-everywhere/IslandElementContainer.qml | 158 ++++++ basicsuite/qt5-everywhere/NavigationPanel.qml | 92 ++++ basicsuite/qt5-everywhere/QtLogo.png | Bin 0 -> 34605 bytes basicsuite/qt5-everywhere/QuitDialog.qml | 107 ++++ basicsuite/qt5-everywhere/Slide.qml | 252 +++++++++ basicsuite/qt5-everywhere/SplashScreen.qml | 105 ++++ basicsuite/qt5-everywhere/WorldCanvas.qml | 145 +++++ basicsuite/qt5-everywhere/WorldMouseArea.qml | 115 ++++ basicsuite/qt5-everywhere/app.pro | 15 + .../qt5-everywhere/demos/calqlatr/Calqlatr.qml | 107 ++++ .../demos/calqlatr/content/Button.qml | 85 +++ .../demos/calqlatr/content/Display.qml | 128 +++++ .../demos/calqlatr/content/NumberPad.qml | 69 +++ .../demos/calqlatr/content/StyleLabel.qml | 50 ++ .../demos/calqlatr/content/audio/touch.wav | Bin 0 -> 950 bytes .../demos/calqlatr/content/calculator.js | 150 ++++++ .../demos/calqlatr/content/images/icon-back.png | Bin 0 -> 328 bytes .../demos/calqlatr/content/images/icon-close.png | Bin 0 -> 488 bytes .../calqlatr/content/images/icon-settings.png | Bin 0 -> 503 bytes .../demos/calqlatr/content/images/logo.png | Bin 0 -> 5950 bytes .../calqlatr/content/images/paper-edge-left.png | Bin 0 -> 12401 bytes .../calqlatr/content/images/paper-edge-right.png | Bin 0 -> 12967 bytes .../demos/calqlatr/content/images/paper-grip.png | Bin 0 -> 298 bytes .../content/images/settings-selected-a.png | Bin 0 -> 2326 bytes .../content/images/settings-selected-b.png | Bin 0 -> 2334 bytes .../demos/calqlatr/content/images/touch-green.png | Bin 0 -> 4808 bytes .../demos/calqlatr/content/images/touch-white.png | Bin 0 -> 4601 bytes .../demos/canvasclock/canvasClock.qml | 404 ++++++++++++++ basicsuite/qt5-everywhere/demos/demos.pro | 3 + .../demos/gridrssnews/RssDelegate.qml | 111 ++++ .../qt5-everywhere/demos/gridrssnews/ScrollBar.qml | 72 +++ .../qt5-everywhere/demos/gridrssnews/main.qml | 150 ++++++ .../qt5-everywhere/demos/heartmonitor/HeartData.js | 50 ++ .../qt5-everywhere/demos/heartmonitor/heart.png | Bin 0 -> 7021 bytes .../qt5-everywhere/demos/heartmonitor/main.qml | 266 ++++++++++ basicsuite/qt5-everywhere/demos/maroon/.DS_Store | Bin 0 -> 6148 bytes basicsuite/qt5-everywhere/demos/maroon/Maroon.qml | 233 +++++++++ .../demos/maroon/content/BuildButton.qml | 90 ++++ .../demos/maroon/content/GameCanvas.qml | 240 +++++++++ .../demos/maroon/content/GameOverScreen.qml | 115 ++++ .../demos/maroon/content/InfoBar.qml | 84 +++ .../demos/maroon/content/NewGameScreen.qml | 111 ++++ .../demos/maroon/content/SoundEffect.qml | 52 ++ .../demos/maroon/content/audio/bomb-action.wav | Bin 0 -> 20972 bytes .../demos/maroon/content/audio/catch-action.wav | Bin 0 -> 13274 bytes .../demos/maroon/content/audio/catch.wav | Bin 0 -> 8638 bytes .../demos/maroon/content/audio/currency.wav | Bin 0 -> 15790 bytes .../demos/maroon/content/audio/factory-action.wav | Bin 0 -> 4936 bytes .../demos/maroon/content/audio/melee-action.wav | Bin 0 -> 17798 bytes .../maroon/content/audio/projectile-action.wav | Bin 0 -> 2562 bytes .../demos/maroon/content/audio/shooter-action.wav | Bin 0 -> 27554 bytes .../demos/maroon/content/gfx/background.png | Bin 0 -> 5802 bytes .../demos/maroon/content/gfx/bomb-action.png | Bin 0 -> 23974 bytes .../demos/maroon/content/gfx/bomb-idle.png | Bin 0 -> 12238 bytes .../demos/maroon/content/gfx/bomb.png | Bin 0 -> 4067 bytes .../demos/maroon/content/gfx/button-help.png | Bin 0 -> 8916 bytes .../demos/maroon/content/gfx/button-play.png | Bin 0 -> 13945 bytes .../demos/maroon/content/gfx/catch-action.png | Bin 0 -> 6760 bytes .../demos/maroon/content/gfx/catch.png | Bin 0 -> 4771 bytes .../demos/maroon/content/gfx/cloud.png | Bin 0 -> 3398 bytes .../demos/maroon/content/gfx/currency.png | Bin 0 -> 1889 bytes .../demos/maroon/content/gfx/dialog-bomb.png | Bin 0 -> 3751 bytes .../demos/maroon/content/gfx/dialog-factory.png | Bin 0 -> 3946 bytes .../demos/maroon/content/gfx/dialog-melee.png | Bin 0 -> 4392 bytes .../demos/maroon/content/gfx/dialog-pointer.png | Bin 0 -> 911 bytes .../demos/maroon/content/gfx/dialog-shooter.png | Bin 0 -> 3737 bytes .../demos/maroon/content/gfx/dialog.png | Bin 0 -> 3362 bytes .../demos/maroon/content/gfx/factory-action.png | Bin 0 -> 22440 bytes .../demos/maroon/content/gfx/factory-idle.png | Bin 0 -> 12729 bytes .../demos/maroon/content/gfx/factory.png | Bin 0 -> 4138 bytes .../demos/maroon/content/gfx/grid.png | Bin 0 -> 2830 bytes .../demos/maroon/content/gfx/help.png | Bin 0 -> 38255 bytes .../demos/maroon/content/gfx/lifes.png | Bin 0 -> 1675 bytes .../demos/maroon/content/gfx/logo-bubble.png | Bin 0 -> 7706 bytes .../demos/maroon/content/gfx/logo-fish.png | Bin 0 -> 3477 bytes .../demos/maroon/content/gfx/logo.png | Bin 0 -> 18332 bytes .../demos/maroon/content/gfx/melee-action.png | Bin 0 -> 7797 bytes .../demos/maroon/content/gfx/melee-idle.png | Bin 0 -> 22832 bytes .../demos/maroon/content/gfx/melee.png | Bin 0 -> 4046 bytes .../demos/maroon/content/gfx/mob-idle.png | Bin 0 -> 6181 bytes .../demos/maroon/content/gfx/mob.png | Bin 0 -> 2391 bytes .../demos/maroon/content/gfx/points.png | Bin 0 -> 1561 bytes .../demos/maroon/content/gfx/projectile-action.png | Bin 0 -> 6257 bytes .../demos/maroon/content/gfx/projectile.png | Bin 0 -> 801 bytes .../demos/maroon/content/gfx/scores.png | Bin 0 -> 1535 bytes .../demos/maroon/content/gfx/shooter-action.png | Bin 0 -> 18121 bytes .../demos/maroon/content/gfx/shooter-idle.png | Bin 0 -> 11929 bytes .../demos/maroon/content/gfx/shooter.png | Bin 0 -> 4137 bytes .../demos/maroon/content/gfx/sunlight.png | Bin 0 -> 248412 bytes .../demos/maroon/content/gfx/text-1.png | Bin 0 -> 2777 bytes .../demos/maroon/content/gfx/text-2.png | Bin 0 -> 4959 bytes .../demos/maroon/content/gfx/text-3.png | Bin 0 -> 5063 bytes .../demos/maroon/content/gfx/text-blank.png | Bin 0 -> 1326 bytes .../demos/maroon/content/gfx/text-gameover.png | Bin 0 -> 1515 bytes .../demos/maroon/content/gfx/text-go.png | Bin 0 -> 4230 bytes .../demos/maroon/content/gfx/wave.png | Bin 0 -> 2763 bytes .../qt5-everywhere/demos/maroon/content/logic.js | 264 ++++++++++ .../demos/maroon/content/mobs/MobBase.qml | 262 ++++++++++ .../demos/maroon/content/towers/Bomb.qml | 133 +++++ .../demos/maroon/content/towers/Factory.qml | 114 ++++ .../demos/maroon/content/towers/Melee.qml | 83 +++ .../demos/maroon/content/towers/Ranged.qml | 128 +++++ .../demos/maroon/content/towers/TowerBase.qml | 72 +++ .../demos/particledemo/BootScreenDemo.qml | 181 +++++++ .../demos/particledemo/ParticleSysComponent.qml | 108 ++++ .../demos/particledemo/images/particle.png | Bin 0 -> 1257 bytes .../demos/particledemo/images/particle_star.png | Bin 0 -> 1696 bytes .../particledemo/images/qt-logo-green-mask.png | Bin 0 -> 10597 bytes .../particledemo/images/qt-logo-white-mask.png | Bin 0 -> 17247 bytes .../qt5-everywhere/demos/particledemo/particle.png | Bin 0 -> 861 bytes .../demos/particledemo/particledemo.qml | 213 ++++++++ .../demos/photosurface/images/image0.png | Bin 0 -> 249779 bytes .../demos/photosurface/images/image1.png | Bin 0 -> 264663 bytes .../demos/photosurface/images/image2.png | Bin 0 -> 264621 bytes .../demos/photosurface/images/image3.png | Bin 0 -> 215134 bytes .../demos/photosurface/images/image4.png | Bin 0 -> 225879 bytes .../images/qml-photosurface-example-small.png | Bin 0 -> 47271 bytes .../demos/photosurface/photosurface.qml | 131 +++++ .../qt5-everywhere/demos/radio/VolumeButton.qml | 185 +++++++ .../qt5-everywhere/demos/radio/VolumePoint.qml | 64 +++ basicsuite/qt5-everywhere/demos/radio/channels.xml | 27 + .../demos/radio/images/radio_btn_pause.png | Bin 0 -> 1573 bytes .../demos/radio/images/radio_btn_play.png | Bin 0 -> 5402 bytes .../demos/radio/images/radio_btn_stop.png | Bin 0 -> 1388 bytes .../demos/radio/images/radio_sound_icon.png | Bin 0 -> 1972 bytes .../qt5-everywhere/demos/radio/images/volume.png | Bin 0 -> 749 bytes basicsuite/qt5-everywhere/demos/radio/radio.qml | 261 +++++++++ .../demos/rssnews/content/BusyIndicator.qml | 53 ++ .../demos/rssnews/content/CategoryDelegate.qml | 84 +++ .../demos/rssnews/content/NewsDelegate.qml | 75 +++ .../demos/rssnews/content/RssFeeds.qml | 58 ++ .../demos/rssnews/content/ScrollBar.qml | 107 ++++ .../demos/rssnews/content/images/busy.png | Bin 0 -> 2629 bytes .../demos/rssnews/content/images/scrollbar.png | Bin 0 -> 161 bytes .../qt5-everywhere/demos/rssnews/rssnews.qml | 101 ++++ .../demos/rssnews/rssnews.qmlproject | 16 + .../demos/samegame/content/Block.qml | 114 ++++ .../demos/samegame/content/BlockEmitter.qml | 57 ++ .../demos/samegame/content/Button.qml | 70 +++ .../demos/samegame/content/GameArea.qml | 226 ++++++++ .../demos/samegame/content/LogoAnimation.qml | 102 ++++ .../demos/samegame/content/MenuEmitter.qml | 53 ++ .../demos/samegame/content/PaintEmitter.qml | 98 ++++ .../demos/samegame/content/PrimaryPack.qml | 122 +++++ .../demos/samegame/content/PuzzleBlock.qml | 111 ++++ .../demos/samegame/content/SamegameText.qml | 49 ++ .../demos/samegame/content/SimpleBlock.qml | 108 ++++ .../demos/samegame/content/SmokeText.qml | 83 +++ .../samegame/content/gfx/background-puzzle.png | Bin 0 -> 86666 bytes .../demos/samegame/content/gfx/background.png | Bin 0 -> 101018 bytes .../demos/samegame/content/gfx/bar.png | Bin 0 -> 10970 bytes .../demos/samegame/content/gfx/blue-puzzle.png | Bin 0 -> 2219 bytes .../demos/samegame/content/gfx/blue.png | Bin 0 -> 1018 bytes .../samegame/content/gfx/bubble-highscore.png | Bin 0 -> 2276 bytes .../demos/samegame/content/gfx/bubble-puzzle.png | Bin 0 -> 2811 bytes .../demos/samegame/content/gfx/but-game-1.png | Bin 0 -> 2728 bytes .../demos/samegame/content/gfx/but-game-2.png | Bin 0 -> 3378 bytes .../demos/samegame/content/gfx/but-game-3.png | Bin 0 -> 1423 bytes .../demos/samegame/content/gfx/but-game-4.png | Bin 0 -> 2096 bytes .../demos/samegame/content/gfx/but-game-new.png | Bin 0 -> 3662 bytes .../demos/samegame/content/gfx/but-menu.png | Bin 0 -> 2391 bytes .../demos/samegame/content/gfx/but-puzzle-next.png | Bin 0 -> 3658 bytes .../demos/samegame/content/gfx/but-quit.png | Bin 0 -> 2100 bytes .../demos/samegame/content/gfx/green-puzzle.png | Bin 0 -> 2271 bytes .../demos/samegame/content/gfx/green.png | Bin 0 -> 1024 bytes .../demos/samegame/content/gfx/icon-fail.png | Bin 0 -> 6549 bytes .../demos/samegame/content/gfx/icon-ok.png | Bin 0 -> 7190 bytes .../demos/samegame/content/gfx/icon-time.png | Bin 0 -> 1159 bytes .../demos/samegame/content/gfx/logo-a.png | Bin 0 -> 1814 bytes .../demos/samegame/content/gfx/logo-e.png | Bin 0 -> 1725 bytes .../demos/samegame/content/gfx/logo-g.png | Bin 0 -> 1765 bytes .../demos/samegame/content/gfx/logo-m.png | Bin 0 -> 1743 bytes .../demos/samegame/content/gfx/logo-s.png | Bin 0 -> 1791 bytes .../demos/samegame/content/gfx/logo.png | Bin 0 -> 3608 bytes .../demos/samegame/content/gfx/particle-brick.png | Bin 0 -> 861 bytes .../demos/samegame/content/gfx/particle-paint.png | Bin 0 -> 714 bytes .../demos/samegame/content/gfx/particle-smoke.png | Bin 0 -> 5409 bytes .../demos/samegame/content/gfx/red-puzzle.png | Bin 0 -> 2218 bytes .../demos/samegame/content/gfx/red.png | Bin 0 -> 1018 bytes .../samegame/content/gfx/text-highscore-new.png | Bin 0 -> 6767 bytes .../demos/samegame/content/gfx/text-highscore.png | Bin 0 -> 3179 bytes .../demos/samegame/content/gfx/text-no-winner.png | Bin 0 -> 6321 bytes .../demos/samegame/content/gfx/text-p1-go.png | Bin 0 -> 5395 bytes .../demos/samegame/content/gfx/text-p1-won.png | Bin 0 -> 5618 bytes .../demos/samegame/content/gfx/text-p1.png | Bin 0 -> 1751 bytes .../demos/samegame/content/gfx/text-p2-go.png | Bin 0 -> 5874 bytes .../demos/samegame/content/gfx/text-p2-won.png | Bin 0 -> 6177 bytes .../demos/samegame/content/gfx/text-p2.png | Bin 0 -> 2381 bytes .../demos/samegame/content/gfx/yellow-puzzle.png | Bin 0 -> 2239 bytes .../demos/samegame/content/gfx/yellow.png | Bin 0 -> 1008 bytes .../demos/samegame/content/levels/TemplateBase.qml | 70 +++ .../demos/samegame/content/levels/level0.qml | 59 +++ .../demos/samegame/content/levels/level1.qml | 59 +++ .../demos/samegame/content/levels/level2.qml | 61 +++ .../demos/samegame/content/levels/level3.qml | 60 +++ .../demos/samegame/content/levels/level4.qml | 58 ++ .../demos/samegame/content/levels/level5.qml | 59 +++ .../demos/samegame/content/levels/level6.qml | 60 +++ .../demos/samegame/content/levels/level7.qml | 58 ++ .../demos/samegame/content/levels/level8.qml | 59 +++ .../demos/samegame/content/levels/level9.qml | 62 +++ .../demos/samegame/content/samegame.js | 581 +++++++++++++++++++++ .../qt5-everywhere/demos/samegame/samegame.qml | 371 +++++++++++++ .../qt5-everywhere/demos/samegame/samegame.qrc | 72 +++ .../qt5-everywhere/demos/samegame/settings.js | 56 ++ .../qt5-everywhere/demos/shaders/Content.qml | 99 ++++ .../demos/shaders/EffectSelectionPanel.qml | 156 ++++++ .../demos/shaders/Effects/Effect.qml | 90 ++++ .../demos/shaders/Effects/EffectBillboard.qml | 59 +++ .../demos/shaders/Effects/EffectBlackAndWhite.qml | 56 ++ .../demos/shaders/Effects/EffectEmboss.qml | 46 ++ .../demos/shaders/Effects/EffectGaussianBlur.qml | 85 +++ .../demos/shaders/Effects/EffectGlow.qml | 46 ++ .../demos/shaders/Effects/EffectIsolate.qml | 61 +++ .../demos/shaders/Effects/EffectPassThrough.qml | 46 ++ .../demos/shaders/Effects/EffectPixelate.qml | 56 ++ .../demos/shaders/Effects/EffectPosterize.qml | 58 ++ .../demos/shaders/Effects/EffectRipple.qml | 64 +++ .../demos/shaders/Effects/EffectSepia.qml | 46 ++ .../demos/shaders/Effects/EffectSharpen.qml | 56 ++ .../demos/shaders/Effects/EffectShockwave.qml | 80 +++ .../shaders/Effects/EffectSobelEdgeDetection1.qml | 59 +++ .../demos/shaders/Effects/EffectToon.qml | 63 +++ .../demos/shaders/Effects/EffectVignette.qml | 46 ++ .../demos/shaders/Effects/EffectWarhol.qml | 46 ++ .../demos/shaders/Effects/EffectWobble.qml | 61 +++ basicsuite/qt5-everywhere/demos/shaders/Logo.qml | 191 +++++++ .../qt5-everywhere/demos/shaders/LogoContainer.qml | 87 +++ .../demos/shaders/ParameterPanel.qml | 107 ++++ basicsuite/qt5-everywhere/demos/shaders/Slider.qml | 138 +++++ .../demos/shaders/images/particle-smoke.png | Bin 0 -> 5409 bytes .../demos/shaders/images/qt-logo.png | Bin 0 -> 11465 bytes .../demos/shaders/images/wallpaper.png | Bin 0 -> 225879 bytes .../qt5-everywhere/demos/shaders/import/import.pro | 13 + .../qt5-everywhere/demos/shaders/import/main.cpp | 62 +++ .../demos/shaders/import/plugin.json | 0 .../qt5-everywhere/demos/shaders/import/qmldir | 2 + .../demos/shaders/import/shaderfilereader.cpp | 90 ++++ .../demos/shaders/import/shaderfilereader.h | 84 +++ basicsuite/qt5-everywhere/demos/shaders/main.qml | 116 ++++ .../qt5-everywhere/demos/shaders/shaders.pro | 3 + .../demos/shaders/shaders/billboard.fsh | 74 +++ .../demos/shaders/shaders/blackandwhite.fsh | 62 +++ .../demos/shaders/shaders/emboss.fsh | 71 +++ .../demos/shaders/shaders/gaussianblur_h.fsh | 67 +++ .../demos/shaders/shaders/gaussianblur_v.fsh | 68 +++ .../qt5-everywhere/demos/shaders/shaders/glow.fsh | 72 +++ .../demos/shaders/shaders/isolate.fsh | 88 ++++ .../demos/shaders/shaders/pixelate.fsh | 64 +++ .../demos/shaders/shaders/posterize.fsh | 68 +++ .../demos/shaders/shaders/ripple.fsh | 78 +++ .../demos/shaders/shaders/selectionpanel.fsh | 41 ++ .../qt5-everywhere/demos/shaders/shaders/sepia.fsh | 59 +++ .../demos/shaders/shaders/sharpen.fsh | 75 +++ .../demos/shaders/shaders/shockwave.fsh | 73 +++ .../demos/shaders/shaders/sobeledgedetection1.fsh | 83 +++ .../qt5-everywhere/demos/shaders/shaders/toon.fsh | 92 ++++ .../demos/shaders/shaders/vignette.fsh | 64 +++ .../demos/shaders/shaders/warhol.fsh | 66 +++ .../demos/shaders/shaders/wobble.fsh | 62 +++ .../demos/touchgallery/content/AndroidDelegate.qml | 94 ++++ .../demos/touchgallery/content/ButtonPage.qml | 121 +++++ .../demos/touchgallery/content/CustomAppWindow.qml | 181 +++++++ .../demos/touchgallery/content/ProgressBarPage.qml | 114 ++++ .../demos/touchgallery/content/SliderPage.qml | 102 ++++ .../demos/touchgallery/content/TabBarPage.qml | 102 ++++ .../demos/touchgallery/content/TextInputPage.qml | 106 ++++ .../demos/touchgallery/images/NOTICE.txt | 2 + .../demos/touchgallery/images/button_default.png | Bin 0 -> 1406 bytes .../demos/touchgallery/images/button_pressed.png | Bin 0 -> 1694 bytes .../touchgallery/images/navigation_next_item.png | Bin 0 -> 1341 bytes .../images/navigation_previous_item.png | Bin 0 -> 1343 bytes .../demos/touchgallery/images/tab_selected.png | Bin 0 -> 217 bytes .../demos/touchgallery/images/tabs_standard.png | Bin 0 -> 1230 bytes .../demos/touchgallery/images/textinput.png | Bin 0 -> 4132 bytes .../demos/touchgallery/images/toolbar.png | Bin 0 -> 1643 bytes .../qt5-everywhere/demos/touchgallery/main.qml | 135 +++++ basicsuite/qt5-everywhere/demos/video/Content.qml | 67 +++ .../qt5-everywhere/demos/video/ContentVideo.qml | 71 +++ .../qt5-everywhere/demos/video/ControlBar.qml | 290 ++++++++++ .../qt5-everywhere/demos/video/ImageButton.qml | 77 +++ .../qt5-everywhere/demos/video/PlaybackControl.qml | 61 +++ .../qt5-everywhere/demos/video/ScrollBar.qml | 69 +++ .../qt5-everywhere/demos/video/SeekControl.qml | 125 +++++ basicsuite/qt5-everywhere/demos/video/Slider.qml | 140 +++++ .../qt5-everywhere/demos/video/VideoDelegate.qml | 111 ++++ .../qt5-everywhere/demos/video/VideoSelector.qml | 158 ++++++ .../qt5-everywhere/demos/video/VolumeControl.qml | 80 +++ .../demos/video/images/CloseButton.png | Bin 0 -> 534 bytes .../demos/video/images/PauseButton.png | Bin 0 -> 681 bytes .../demos/video/images/PlayButton.png | Bin 0 -> 1617 bytes .../demos/video/images/RateButtonForward.png | Bin 0 -> 3175 bytes .../demos/video/images/RateButtonReverse.png | Bin 0 -> 3289 bytes .../demos/video/images/StopButton.png | Bin 0 -> 534 bytes .../demos/video/images/VolumeDown.png | Bin 0 -> 814 bytes .../qt5-everywhere/demos/video/images/VolumeUp.png | Bin 0 -> 1972 bytes basicsuite/qt5-everywhere/demos/video/main.qml | 161 ++++++ .../qt5-everywhere/demos/video/qt5_video_jens.png | Bin 0 -> 34519 bytes .../demos/video/qt5_video_kenneth.png | Bin 0 -> 42023 bytes .../qt5-everywhere/demos/video/qt5_video_lars.png | Bin 0 -> 52829 bytes .../demos/video/qt5_video_samuel.png | Bin 0 -> 27869 bytes .../qt5-everywhere/demos/video/qt5_video_simon.png | Bin 0 -> 33733 bytes .../demos/video/qt5_video_thiago.png | Bin 0 -> 31894 bytes .../qt5-everywhere/demos/video/qt5_videos.xml | 33 ++ basicsuite/qt5-everywhere/description.txt | 1 + basicsuite/qt5-everywhere/engine.js | 302 +++++++++++ basicsuite/qt5-everywhere/fonts/OFL.txt | 92 ++++ .../qt5-everywhere/fonts/PatrickHandSC-Regular.ttf | Bin 0 -> 152608 bytes basicsuite/qt5-everywhere/images/box.png | Bin 0 -> 4666 bytes basicsuite/qt5-everywhere/images/box_open.png | Bin 0 -> 5722 bytes basicsuite/qt5-everywhere/images/btn_help.png | Bin 0 -> 2587 bytes basicsuite/qt5-everywhere/images/btn_home.png | Bin 0 -> 3354 bytes basicsuite/qt5-everywhere/images/btn_next.png | Bin 0 -> 3374 bytes basicsuite/qt5-everywhere/images/btn_previous.png | Bin 0 -> 3325 bytes basicsuite/qt5-everywhere/images/car_device.png | Bin 0 -> 8356 bytes basicsuite/qt5-everywhere/images/character0.png | Bin 0 -> 13119 bytes basicsuite/qt5-everywhere/images/character1.png | Bin 0 -> 15654 bytes basicsuite/qt5-everywhere/images/character10.png | Bin 0 -> 15243 bytes basicsuite/qt5-everywhere/images/character2.png | Bin 0 -> 12270 bytes basicsuite/qt5-everywhere/images/character3.png | Bin 0 -> 14991 bytes basicsuite/qt5-everywhere/images/character4.png | Bin 0 -> 15077 bytes basicsuite/qt5-everywhere/images/character5.png | Bin 0 -> 13011 bytes basicsuite/qt5-everywhere/images/character6.png | Bin 0 -> 15671 bytes basicsuite/qt5-everywhere/images/character7.png | Bin 0 -> 13589 bytes basicsuite/qt5-everywhere/images/character8.png | Bin 0 -> 12914 bytes basicsuite/qt5-everywhere/images/character9.png | Bin 0 -> 18085 bytes basicsuite/qt5-everywhere/images/cloud1.png | Bin 0 -> 2860 bytes basicsuite/qt5-everywhere/images/cloud2.png | Bin 0 -> 3043 bytes basicsuite/qt5-everywhere/images/hand.png | Bin 0 -> 32258 bytes .../qt5-everywhere/images/highlight_mask.png | Bin 0 -> 10666 bytes basicsuite/qt5-everywhere/images/island.png | Bin 0 -> 50597 bytes basicsuite/qt5-everywhere/images/laptop1.png | Bin 0 -> 12899 bytes basicsuite/qt5-everywhere/images/laptop2.png | Bin 0 -> 12448 bytes basicsuite/qt5-everywhere/images/man1.png | Bin 0 -> 12878 bytes .../qt5-everywhere/images/medical_device.png | Bin 0 -> 23780 bytes basicsuite/qt5-everywhere/images/mountain.png | Bin 0 -> 5304 bytes .../qt5-everywhere/images/particle-smoke.png | Bin 0 -> 5409 bytes basicsuite/qt5-everywhere/images/phone1.png | Bin 0 -> 19454 bytes basicsuite/qt5-everywhere/images/phone2.png | Bin 0 -> 10535 bytes basicsuite/qt5-everywhere/images/phone3.png | Bin 0 -> 11835 bytes basicsuite/qt5-everywhere/images/stones.png | Bin 0 -> 3041 bytes basicsuite/qt5-everywhere/images/tablet1.png | Bin 0 -> 18363 bytes basicsuite/qt5-everywhere/images/tree1.png | Bin 0 -> 2128 bytes basicsuite/qt5-everywhere/images/tree2.png | Bin 0 -> 1747 bytes basicsuite/qt5-everywhere/images/tv.png | Bin 0 -> 18685 bytes basicsuite/qt5-everywhere/main.qml | 242 +++++++++ basicsuite/qt5-everywhere/preview_l.jpg | Bin 0 -> 34331 bytes basicsuite/qt5-everywhere/qt5-everywhere.pro | 5 + basicsuite/qt5-everywhere/style.js | 49 ++ basicsuite/qt5-everywhere/title.txt | 1 + basicsuite/qt5-launchpresentation/Button.qml | 78 +++ basicsuite/qt5-launchpresentation/CameraSlide.qml | 92 ++++ basicsuite/qt5-launchpresentation/CanvasSlide.qml | 161 ++++++ basicsuite/qt5-launchpresentation/DemoMain.qml | 139 +++++ basicsuite/qt5-launchpresentation/EffectsSlide.qml | 203 +++++++ .../qt5-launchpresentation/ExamplesSlide.qml | 89 ++++ basicsuite/qt5-launchpresentation/FontSlide.qml | 98 ++++ .../qt5-launchpresentation/NoisyGradient.qml | 92 ++++ .../qt5-launchpresentation/NormalMapGenerator.qml | 92 ++++ .../OpacityTransitionPresentation.qml | 104 ++++ .../qt5-launchpresentation/ParticleSlide.qml | 86 +++ basicsuite/qt5-launchpresentation/README | 51 ++ basicsuite/qt5-launchpresentation/ShaderSlide.qml | 197 +++++++ basicsuite/qt5-launchpresentation/SlideDeck.qml | 232 ++++++++ basicsuite/qt5-launchpresentation/Swirl.qml | 116 ++++ basicsuite/qt5-launchpresentation/VideoSlide.qml | 116 ++++ .../qt5-launchpresentation/WebKitSlideContent.qml | 124 +++++ basicsuite/qt5-launchpresentation/WebkitSlide.qml | 59 +++ basicsuite/qt5-launchpresentation/WidgetsSlide.qml | 152 ++++++ .../qt5-launchpresentation/calqlatr/.DS_Store | Bin 0 -> 6148 bytes .../qt5-launchpresentation/calqlatr/Calqlatr.qml | 110 ++++ .../calqlatr/content/Button.qml | 80 +++ .../calqlatr/content/Display.qml | 124 +++++ .../calqlatr/content/NumberPad.qml | 69 +++ .../calqlatr/content/StyleLabel.qml | 50 ++ .../calqlatr/content/audio/touch.wav | Bin 0 -> 950 bytes .../calqlatr/content/calculator.js | 143 +++++ .../calqlatr/content/images/icon-back.png | Bin 0 -> 328 bytes .../calqlatr/content/images/icon-close.png | Bin 0 -> 488 bytes .../calqlatr/content/images/icon-settings.png | Bin 0 -> 503 bytes .../calqlatr/content/images/logo.png | Bin 0 -> 5950 bytes .../calqlatr/content/images/paper-edge-left.png | Bin 0 -> 12401 bytes .../calqlatr/content/images/paper-edge-right.png | Bin 0 -> 12967 bytes .../calqlatr/content/images/paper-grip.png | Bin 0 -> 298 bytes .../content/images/settings-selected-a.png | Bin 0 -> 2326 bytes .../content/images/settings-selected-b.png | Bin 0 -> 2334 bytes .../calqlatr/content/images/touch-green.png | Bin 0 -> 4808 bytes .../calqlatr/content/images/touch-white.png | Bin 0 -> 4601 bytes basicsuite/qt5-launchpresentation/demo.qmlproject | 18 + basicsuite/qt5-launchpresentation/description.txt | 6 + basicsuite/qt5-launchpresentation/images/ally.png | Bin 0 -> 1907941 bytes .../qt5-launchpresentation/images/butterfly.png | Bin 0 -> 18668 bytes .../qt5-launchpresentation/images/displace.png | Bin 0 -> 20269 bytes basicsuite/qt5-launchpresentation/images/fog.png | Bin 0 -> 225653 bytes .../qt5-launchpresentation/images/particle.png | Bin 0 -> 861 bytes .../qt5-launchpresentation/images/qt-logo.png | Bin 0 -> 49656 bytes .../images/widgets_boxes.png | Bin 0 -> 589779 bytes .../images/widgets_chips.png | Bin 0 -> 211342 bytes .../images/widgets_mainwindows.png | Bin 0 -> 95685 bytes .../images/widgets_styles_fusion.png | Bin 0 -> 65678 bytes .../images/widgets_styles_macstyle.png | Bin 0 -> 70514 bytes basicsuite/qt5-launchpresentation/main.qml | 63 +++ basicsuite/qt5-launchpresentation/main_hifi.qml | 43 ++ basicsuite/qt5-launchpresentation/maroon/.DS_Store | Bin 0 -> 6148 bytes .../qt5-launchpresentation/maroon/Maroon.qml | 233 +++++++++ .../maroon/content/BuildButton.qml | 90 ++++ .../maroon/content/GameCanvas.qml | 240 +++++++++ .../maroon/content/GameOverScreen.qml | 115 ++++ .../maroon/content/InfoBar.qml | 84 +++ .../maroon/content/NewGameScreen.qml | 111 ++++ .../maroon/content/SoundEffect.qml | 53 ++ .../maroon/content/audio/bomb-action.wav | Bin 0 -> 20972 bytes .../maroon/content/audio/catch-action.wav | Bin 0 -> 13274 bytes .../maroon/content/audio/catch.wav | Bin 0 -> 8638 bytes .../maroon/content/audio/currency.wav | Bin 0 -> 15790 bytes .../maroon/content/audio/factory-action.wav | Bin 0 -> 4936 bytes .../maroon/content/audio/melee-action.wav | Bin 0 -> 17798 bytes .../maroon/content/audio/projectile-action.wav | Bin 0 -> 2562 bytes .../maroon/content/audio/shooter-action.wav | Bin 0 -> 27554 bytes .../maroon/content/gfx/background.png | Bin 0 -> 5802 bytes .../maroon/content/gfx/bomb-action.png | Bin 0 -> 23974 bytes .../maroon/content/gfx/bomb-idle.png | Bin 0 -> 12238 bytes .../maroon/content/gfx/bomb.png | Bin 0 -> 4067 bytes .../maroon/content/gfx/button-help.png | Bin 0 -> 8916 bytes .../maroon/content/gfx/button-play.png | Bin 0 -> 13945 bytes .../maroon/content/gfx/catch-action.png | Bin 0 -> 6760 bytes .../maroon/content/gfx/catch.png | Bin 0 -> 4771 bytes .../maroon/content/gfx/cloud.png | Bin 0 -> 3398 bytes .../maroon/content/gfx/currency.png | Bin 0 -> 1889 bytes .../maroon/content/gfx/dialog-bomb.png | Bin 0 -> 3751 bytes .../maroon/content/gfx/dialog-factory.png | Bin 0 -> 3946 bytes .../maroon/content/gfx/dialog-melee.png | Bin 0 -> 4392 bytes .../maroon/content/gfx/dialog-pointer.png | Bin 0 -> 911 bytes .../maroon/content/gfx/dialog-shooter.png | Bin 0 -> 3737 bytes .../maroon/content/gfx/dialog.png | Bin 0 -> 3362 bytes .../maroon/content/gfx/factory-action.png | Bin 0 -> 22440 bytes .../maroon/content/gfx/factory-idle.png | Bin 0 -> 12729 bytes .../maroon/content/gfx/factory.png | Bin 0 -> 4138 bytes .../maroon/content/gfx/grid.png | Bin 0 -> 2830 bytes .../maroon/content/gfx/help.png | Bin 0 -> 38255 bytes .../maroon/content/gfx/lifes.png | Bin 0 -> 1675 bytes .../maroon/content/gfx/logo-bubble.png | Bin 0 -> 7706 bytes .../maroon/content/gfx/logo-fish.png | Bin 0 -> 3477 bytes .../maroon/content/gfx/logo.png | Bin 0 -> 18332 bytes .../maroon/content/gfx/melee-action.png | Bin 0 -> 7797 bytes .../maroon/content/gfx/melee-idle.png | Bin 0 -> 22832 bytes .../maroon/content/gfx/melee.png | Bin 0 -> 4046 bytes .../maroon/content/gfx/mob-idle.png | Bin 0 -> 6181 bytes .../maroon/content/gfx/mob.png | Bin 0 -> 2391 bytes .../maroon/content/gfx/points.png | Bin 0 -> 1561 bytes .../maroon/content/gfx/projectile-action.png | Bin 0 -> 6257 bytes .../maroon/content/gfx/projectile.png | Bin 0 -> 801 bytes .../maroon/content/gfx/scores.png | Bin 0 -> 1535 bytes .../maroon/content/gfx/shooter-action.png | Bin 0 -> 18121 bytes .../maroon/content/gfx/shooter-idle.png | Bin 0 -> 11929 bytes .../maroon/content/gfx/shooter.png | Bin 0 -> 4137 bytes .../maroon/content/gfx/sunlight.png | Bin 0 -> 248412 bytes .../maroon/content/gfx/text-1.png | Bin 0 -> 2777 bytes .../maroon/content/gfx/text-2.png | Bin 0 -> 4959 bytes .../maroon/content/gfx/text-3.png | Bin 0 -> 5063 bytes .../maroon/content/gfx/text-blank.png | Bin 0 -> 1326 bytes .../maroon/content/gfx/text-gameover.png | Bin 0 -> 1515 bytes .../maroon/content/gfx/text-go.png | Bin 0 -> 4230 bytes .../maroon/content/gfx/wave.png | Bin 0 -> 2763 bytes .../qt5-launchpresentation/maroon/content/logic.js | 264 ++++++++++ .../maroon/content/mobs/MobBase.qml | 262 ++++++++++ .../maroon/content/towers/Bomb.qml | 133 +++++ .../maroon/content/towers/Factory.qml | 114 ++++ .../maroon/content/towers/Melee.qml | 83 +++ .../maroon/content/towers/Ranged.qml | 128 +++++ .../maroon/content/towers/TowerBase.qml | 72 +++ .../particles/customemitter.qml | 91 ++++ .../qt5-launchpresentation/particles/emitmask.qml | 76 +++ .../qt5-launchpresentation/particles/particle.png | Bin 0 -> 861 bytes .../qt5-launchpresentation/particles/particle4.png | Bin 0 -> 1799 bytes .../qt5-launchpresentation/particles/star.png | Bin 0 -> 1550 bytes .../particles/starfish_mask.png | Bin 0 -> 11301 bytes .../particles/velocityfrommotion.qml | 305 +++++++++++ .../qt5-launchpresentation/presentation/Clock.qml | 77 +++ .../presentation/CodeSlide.qml | 162 ++++++ .../presentation/Presentation.qml | 196 +++++++ .../qt5-launchpresentation/presentation/Slide.qml | 186 +++++++ .../presentation/SlideCounter.qml | 61 +++ basicsuite/qt5-launchpresentation/preview_l.jpg | Bin 0 -> 16252 bytes .../qt5-lauchpresentation.pro | 17 + .../qt5-launchpresentation/samegame/.DS_Store | Bin 0 -> 6148 bytes .../qt5-launchpresentation/samegame/Samegame.qml | 371 +++++++++++++ .../samegame/content/Block.qml | 114 ++++ .../samegame/content/BlockEmitter.qml | 57 ++ .../samegame/content/Button.qml | 70 +++ .../samegame/content/GameArea.qml | 226 ++++++++ .../samegame/content/LogoAnimation.qml | 102 ++++ .../samegame/content/MenuEmitter.qml | 53 ++ .../samegame/content/PaintEmitter.qml | 98 ++++ .../samegame/content/PrimaryPack.qml | 122 +++++ .../samegame/content/PuzzleBlock.qml | 111 ++++ .../samegame/content/SamegameText.qml | 49 ++ .../samegame/content/SimpleBlock.qml | 108 ++++ .../samegame/content/SmokeText.qml | 83 +++ .../samegame/content/gfx/background-puzzle.png | Bin 0 -> 86666 bytes .../samegame/content/gfx/background.png | Bin 0 -> 101018 bytes .../samegame/content/gfx/bar.png | Bin 0 -> 10970 bytes .../samegame/content/gfx/blue-puzzle.png | Bin 0 -> 2219 bytes .../samegame/content/gfx/blue.png | Bin 0 -> 1018 bytes .../samegame/content/gfx/bubble-highscore.png | Bin 0 -> 2276 bytes .../samegame/content/gfx/bubble-puzzle.png | Bin 0 -> 2811 bytes .../samegame/content/gfx/but-game-1.png | Bin 0 -> 2728 bytes .../samegame/content/gfx/but-game-2.png | Bin 0 -> 3378 bytes .../samegame/content/gfx/but-game-3.png | Bin 0 -> 1423 bytes .../samegame/content/gfx/but-game-4.png | Bin 0 -> 2096 bytes .../samegame/content/gfx/but-game-new.png | Bin 0 -> 3662 bytes .../samegame/content/gfx/but-menu.png | Bin 0 -> 2391 bytes .../samegame/content/gfx/but-puzzle-next.png | Bin 0 -> 3658 bytes .../samegame/content/gfx/but-quit.png | Bin 0 -> 2100 bytes .../samegame/content/gfx/green-puzzle.png | Bin 0 -> 2271 bytes .../samegame/content/gfx/green.png | Bin 0 -> 1024 bytes .../samegame/content/gfx/icon-fail.png | Bin 0 -> 6549 bytes .../samegame/content/gfx/icon-ok.png | Bin 0 -> 7190 bytes .../samegame/content/gfx/icon-time.png | Bin 0 -> 1159 bytes .../samegame/content/gfx/logo-a.png | Bin 0 -> 1814 bytes .../samegame/content/gfx/logo-e.png | Bin 0 -> 1725 bytes .../samegame/content/gfx/logo-g.png | Bin 0 -> 1765 bytes .../samegame/content/gfx/logo-m.png | Bin 0 -> 1743 bytes .../samegame/content/gfx/logo-s.png | Bin 0 -> 1791 bytes .../samegame/content/gfx/logo.png | Bin 0 -> 3608 bytes .../samegame/content/gfx/particle-brick.png | Bin 0 -> 861 bytes .../samegame/content/gfx/particle-paint.png | Bin 0 -> 714 bytes .../samegame/content/gfx/particle-smoke.png | Bin 0 -> 5409 bytes .../samegame/content/gfx/red-puzzle.png | Bin 0 -> 2218 bytes .../samegame/content/gfx/red.png | Bin 0 -> 1018 bytes .../samegame/content/gfx/text-highscore-new.png | Bin 0 -> 6767 bytes .../samegame/content/gfx/text-highscore.png | Bin 0 -> 3179 bytes .../samegame/content/gfx/text-no-winner.png | Bin 0 -> 6321 bytes .../samegame/content/gfx/text-p1-go.png | Bin 0 -> 5395 bytes .../samegame/content/gfx/text-p1-won.png | Bin 0 -> 5618 bytes .../samegame/content/gfx/text-p1.png | Bin 0 -> 1751 bytes .../samegame/content/gfx/text-p2-go.png | Bin 0 -> 5874 bytes .../samegame/content/gfx/text-p2-won.png | Bin 0 -> 6177 bytes .../samegame/content/gfx/text-p2.png | Bin 0 -> 2381 bytes .../samegame/content/gfx/yellow-puzzle.png | Bin 0 -> 2239 bytes .../samegame/content/gfx/yellow.png | Bin 0 -> 1008 bytes .../samegame/content/levels/TemplateBase.qml | 70 +++ .../samegame/content/levels/level0.qml | 59 +++ .../samegame/content/levels/level1.qml | 59 +++ .../samegame/content/levels/level2.qml | 61 +++ .../samegame/content/levels/level3.qml | 60 +++ .../samegame/content/levels/level4.qml | 58 ++ .../samegame/content/levels/level5.qml | 59 +++ .../samegame/content/levels/level6.qml | 60 +++ .../samegame/content/levels/level7.qml | 58 ++ .../samegame/content/levels/level8.qml | 59 +++ .../samegame/content/levels/level9.qml | 62 +++ .../samegame/content/samegame.js | 581 +++++++++++++++++++++ .../qt5-launchpresentation/samegame/settings.js | 56 ++ basicsuite/qt5-launchpresentation/title.txt | 1 + .../qt5-particlesdemo/content/burstandpulse.qml | 110 ++++ .../qt5-particlesdemo/content/customemitter.qml | 96 ++++ basicsuite/qt5-particlesdemo/content/emitmask.qml | 74 +++ .../qt5-particlesdemo/content/maximumemitted.qml | 82 +++ .../content/shapeanddirection.qml | 112 ++++ .../qt5-particlesdemo/content/trailemitter.qml | 176 +++++++ .../content/velocityfrommotion.qml | 312 +++++++++++ basicsuite/qt5-particlesdemo/description.txt | 1 + .../doc/images/qml-emitters-example.png | Bin 0 -> 54749 bytes basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc | 60 +++ basicsuite/qt5-particlesdemo/emitters.pro | 11 + basicsuite/qt5-particlesdemo/emitters.qmlproject | 16 + basicsuite/qt5-particlesdemo/emitters.qrc | 12 + basicsuite/qt5-particlesdemo/images/_explo.png | Bin 0 -> 81528 bytes .../qt5-particlesdemo/images/backgroundLeaves.jpg | Bin 0 -> 78665 bytes basicsuite/qt5-particlesdemo/images/bear_tiles.png | Bin 0 -> 40349 bytes basicsuite/qt5-particlesdemo/images/candle.png | Bin 0 -> 1348 bytes basicsuite/qt5-particlesdemo/images/colortable.png | Bin 0 -> 704 bytes .../qt5-particlesdemo/images/finalfrontier.png | Bin 0 -> 695061 bytes basicsuite/qt5-particlesdemo/images/flower.png | Bin 0 -> 4683 bytes basicsuite/qt5-particlesdemo/images/matchmask.png | Bin 0 -> 2369 bytes basicsuite/qt5-particlesdemo/images/meteor.png | Bin 0 -> 83169 bytes .../qt5-particlesdemo/images/meteor_explo.png | Bin 0 -> 219946 bytes basicsuite/qt5-particlesdemo/images/meteors.png | Bin 0 -> 132137 bytes basicsuite/qt5-particlesdemo/images/nullRock.png | Bin 0 -> 140 bytes basicsuite/qt5-particlesdemo/images/particle.png | Bin 0 -> 861 bytes basicsuite/qt5-particlesdemo/images/particle2.png | Bin 0 -> 3909 bytes basicsuite/qt5-particlesdemo/images/particle3.png | Bin 0 -> 3186 bytes basicsuite/qt5-particlesdemo/images/particle4.png | Bin 0 -> 1799 bytes basicsuite/qt5-particlesdemo/images/particleA.png | Bin 0 -> 3541 bytes basicsuite/qt5-particlesdemo/images/portal_bg.png | Bin 0 -> 96858 bytes basicsuite/qt5-particlesdemo/images/realLeaf1.png | Bin 0 -> 15625 bytes basicsuite/qt5-particlesdemo/images/realLeaf2.png | Bin 0 -> 13660 bytes basicsuite/qt5-particlesdemo/images/realLeaf3.png | Bin 0 -> 23809 bytes basicsuite/qt5-particlesdemo/images/realLeaf4.png | Bin 0 -> 23655 bytes basicsuite/qt5-particlesdemo/images/rocket.png | Bin 0 -> 7315 bytes basicsuite/qt5-particlesdemo/images/rocket2.png | Bin 0 -> 1918 bytes basicsuite/qt5-particlesdemo/images/sizeInOut.png | Bin 0 -> 251 bytes basicsuite/qt5-particlesdemo/images/snowflake.png | Bin 0 -> 189327 bytes .../qt5-particlesdemo/images/sparkleSize.png | Bin 0 -> 378 bytes basicsuite/qt5-particlesdemo/images/star.png | Bin 0 -> 1550 bytes basicsuite/qt5-particlesdemo/images/starfish_0.png | Bin 0 -> 15972 bytes basicsuite/qt5-particlesdemo/images/starfish_1.png | Bin 0 -> 15746 bytes basicsuite/qt5-particlesdemo/images/starfish_2.png | Bin 0 -> 16067 bytes basicsuite/qt5-particlesdemo/images/starfish_3.png | Bin 0 -> 16201 bytes basicsuite/qt5-particlesdemo/images/starfish_4.png | Bin 0 -> 14698 bytes .../qt5-particlesdemo/images/starfish_mask.png | Bin 0 -> 11301 bytes basicsuite/qt5-particlesdemo/main.cpp | 41 ++ basicsuite/qt5-particlesdemo/main.qml | 60 +++ basicsuite/qt5-particlesdemo/preview_l.jpg | Bin 0 -> 8889 bytes basicsuite/qt5-particlesdemo/qt5-particlesdemo.pro | 14 + basicsuite/qt5-particlesdemo/shared/Button.qml | 91 ++++ .../qt5-particlesdemo/shared/LauncherList.qml | 148 ++++++ basicsuite/qt5-particlesdemo/shared/README | 11 + .../shared/SimpleLauncherDelegate.qml | 89 ++++ .../qt5-particlesdemo/shared/images/back.png | Bin 0 -> 1590 bytes .../qt5-particlesdemo/shared/images/next.png | Bin 0 -> 1371 bytes basicsuite/qt5-particlesdemo/shared/qmldir | 3 + .../qt5-particlesdemo/shared/quick_shared.qrc | 8 + basicsuite/qt5-particlesdemo/shared/shared.h | 58 ++ basicsuite/qt5-particlesdemo/shared/shared.qrc | 8 + basicsuite/qt5-particlesdemo/title.txt | 1 + basicsuite/sensorexplorer/app.pro | 10 + basicsuite/sensorexplorer/description.txt | 1 + .../sensorexplorer/doc/src/sensor_explorer.qdoc | 79 +++ basicsuite/sensorexplorer/imports/explorer.cpp | 136 +++++ basicsuite/sensorexplorer/imports/explorer.h | 79 +++ basicsuite/sensorexplorer/imports/imports.pro | 17 + basicsuite/sensorexplorer/imports/main.cpp | 63 +++ basicsuite/sensorexplorer/imports/plugin.json | 1 + basicsuite/sensorexplorer/imports/propertyinfo.cpp | 140 +++++ basicsuite/sensorexplorer/imports/propertyinfo.h | 83 +++ basicsuite/sensorexplorer/imports/qmldir | 2 + basicsuite/sensorexplorer/imports/sensoritem.cpp | 322 ++++++++++++ basicsuite/sensorexplorer/imports/sensoritem.h | 96 ++++ basicsuite/sensorexplorer/main.qml | 224 ++++++++ basicsuite/sensorexplorer/preview_l.jpg | Bin 0 -> 21553 bytes basicsuite/sensorexplorer/sensorexplorer.pro | 6 + basicsuite/sensorexplorer/title.txt | 1 + basicsuite/sensors/1.png | Bin 0 -> 33675 bytes basicsuite/sensors/2.png | Bin 0 -> 27754 bytes basicsuite/sensors/3.png | Bin 0 -> 27841 bytes basicsuite/sensors/Accelbubble.qml | 108 ++++ basicsuite/sensors/Light.qml | 90 ++++ basicsuite/sensors/bluebubble.png | Bin 0 -> 12815 bytes basicsuite/sensors/description.txt | 4 + basicsuite/sensors/main.qml | 105 ++++ basicsuite/sensors/preview_l.jpg | Bin 0 -> 19464 bytes basicsuite/sensors/sensors.pro | 12 + basicsuite/sensors/title.txt | 1 + basicsuite/shared/engine.cpp | 35 ++ basicsuite/shared/engine.h | 49 ++ basicsuite/shared/main.cpp | 80 +++ basicsuite/shared/shared.pri | 13 + basicsuite/textinput/ScrollBar.qml | 66 +++ basicsuite/textinput/TextArea.qml | 88 ++++ basicsuite/textinput/TextBase.qml | 95 ++++ basicsuite/textinput/TextField.qml | 93 ++++ basicsuite/textinput/description.txt | 6 + basicsuite/textinput/main.qml | 113 ++++ basicsuite/textinput/preview_l.jpg | Bin 0 -> 16465 bytes basicsuite/textinput/textinput.pro | 12 + basicsuite/textinput/title.txt | 1 + doc/b2qt-demos.qdoc | 28 +- doc/b2qt-demos.qdocconf | 2 +- 1782 files changed, 41276 insertions(+), 41068 deletions(-) delete mode 100644 basicsuite/About Boot to Qt/About Boot to Qt.qmlproject delete mode 100644 basicsuite/About Boot to Qt/AboutBoot2Qt.qml delete mode 100644 basicsuite/About Boot to Qt/Box.qml delete mode 100644 basicsuite/About Boot to Qt/ContentText.qml delete mode 100644 basicsuite/About Boot to Qt/QtForAndroid.qml delete mode 100644 basicsuite/About Boot to Qt/QtFramework.qml delete mode 100644 basicsuite/About Boot to Qt/Title.qml delete mode 100644 basicsuite/About Boot to Qt/codeless.png delete mode 100644 basicsuite/About Boot to Qt/description.txt delete mode 100644 basicsuite/About Boot to Qt/main.qml delete mode 100644 basicsuite/About Boot to Qt/particle.png delete mode 100644 basicsuite/About Boot to Qt/preview_l.jpg delete mode 100644 basicsuite/About Boot to Qt/qt-logo.png delete mode 100644 basicsuite/Camera/Camera.pro delete mode 100644 basicsuite/Camera/CameraControlButton.qml delete mode 100644 basicsuite/Camera/CameraSetting.qml delete mode 100644 basicsuite/Camera/CaptureControl.qml delete mode 100644 basicsuite/Camera/CapturePreview.qml delete mode 100644 basicsuite/Camera/Controls.qml delete mode 100644 basicsuite/Camera/FocusControl.qml delete mode 100644 basicsuite/Camera/Picker.qml delete mode 100644 basicsuite/Camera/README delete mode 100644 basicsuite/Camera/RecordingTime.qml delete mode 100644 basicsuite/Camera/Slider.qml delete mode 100644 basicsuite/Camera/ZoomControl.qml delete mode 100644 basicsuite/Camera/camerautils/camerautils.cpp delete mode 100644 basicsuite/Camera/camerautils/camerautils.h delete mode 100644 basicsuite/Camera/camerautils/camerautils.pro delete mode 100644 basicsuite/Camera/camerautils/plugin.cpp delete mode 100644 basicsuite/Camera/camerautils/qmldir delete mode 100644 basicsuite/Camera/description.txt delete mode 100644 basicsuite/Camera/exclude.txt delete mode 100644 basicsuite/Camera/main.qml delete mode 100644 basicsuite/Camera/preview_l.jpg delete mode 100644 basicsuite/Controls Layouts/Controls Layouts.qmlproject delete mode 100644 basicsuite/Controls Layouts/description.txt delete mode 100644 basicsuite/Controls Layouts/main.qml delete mode 100644 basicsuite/Controls Layouts/preview_l.jpg delete mode 100644 basicsuite/Controls Touch/Controls Touch.qmlproject delete mode 100644 basicsuite/Controls Touch/content/AndroidDelegate.qml delete mode 100644 basicsuite/Controls Touch/content/ButtonPage.qml delete mode 100644 basicsuite/Controls Touch/content/ProgressBarPage.qml delete mode 100644 basicsuite/Controls Touch/content/SliderPage.qml delete mode 100644 basicsuite/Controls Touch/content/TabBarPage.qml delete mode 100644 basicsuite/Controls Touch/content/TextInputPage.qml delete mode 100644 basicsuite/Controls Touch/description.txt delete mode 100644 basicsuite/Controls Touch/images/NOTICE.txt delete mode 100644 basicsuite/Controls Touch/images/button_default.png delete mode 100644 basicsuite/Controls Touch/images/button_pressed.png delete mode 100644 basicsuite/Controls Touch/images/navigation_next_item.png delete mode 100644 basicsuite/Controls Touch/images/navigation_previous_item.png delete mode 100644 basicsuite/Controls Touch/images/tab_selected.png delete mode 100644 basicsuite/Controls Touch/images/tabs_standard.png delete mode 100644 basicsuite/Controls Touch/images/textinput.png delete mode 100644 basicsuite/Controls Touch/images/toolbar.png delete mode 100644 basicsuite/Controls Touch/main.qml delete mode 100644 basicsuite/Controls Touch/preview_l.jpg delete mode 100644 basicsuite/Graphical Effects/Checkers.qml delete mode 100644 basicsuite/Graphical Effects/Graphical Effects.qmlproject delete mode 100644 basicsuite/Graphical Effects/description.txt delete mode 100644 basicsuite/Graphical Effects/effect_BrightnessContrast.qml delete mode 100644 basicsuite/Graphical Effects/effect_Colorize.qml delete mode 100644 basicsuite/Graphical Effects/effect_CustomDissolve.qml delete mode 100644 basicsuite/Graphical Effects/effect_CustomWave.qml delete mode 100644 basicsuite/Graphical Effects/effect_Displacement.qml delete mode 100644 basicsuite/Graphical Effects/effect_DropShadow.qml delete mode 100644 basicsuite/Graphical Effects/effect_GaussianBlur.qml delete mode 100644 basicsuite/Graphical Effects/effect_Glow.qml delete mode 100644 basicsuite/Graphical Effects/effect_HueSaturation.qml delete mode 100644 basicsuite/Graphical Effects/effect_OpacityMask.qml delete mode 100644 basicsuite/Graphical Effects/effect_ThresholdMask.qml delete mode 100755 basicsuite/Graphical Effects/images/bug.jpg delete mode 100644 basicsuite/Graphical Effects/images/butterfly.png delete mode 100644 basicsuite/Graphical Effects/images/fog.png delete mode 100755 basicsuite/Graphical Effects/images/glass_normal.png delete mode 100644 basicsuite/Graphical Effects/main.qml delete mode 100644 basicsuite/Graphical Effects/preview_l.jpg delete mode 100644 basicsuite/Launcher Settings/BrightnessController.qml delete mode 100644 basicsuite/Launcher Settings/NetworkController.qml delete mode 100644 basicsuite/Launcher Settings/PoweroffAction.qml delete mode 100644 basicsuite/Launcher Settings/RebootAction.qml delete mode 100644 basicsuite/Launcher Settings/description.txt delete mode 100644 basicsuite/Launcher Settings/main.qml delete mode 100644 basicsuite/Launcher Settings/preview_l.jpg delete mode 100755 basicsuite/Media Player/Content.qml delete mode 100755 basicsuite/Media Player/ContentVideo.qml delete mode 100755 basicsuite/Media Player/ControlBar.qml delete mode 100755 basicsuite/Media Player/EffectSelectionPanel.qml delete mode 100755 basicsuite/Media Player/Effects/Effect.qml delete mode 100755 basicsuite/Media Player/Effects/EffectBillboard.qml delete mode 100755 basicsuite/Media Player/Effects/EffectBlackAndWhite.qml delete mode 100755 basicsuite/Media Player/Effects/EffectEmboss.qml delete mode 100755 basicsuite/Media Player/Effects/EffectGaussianBlur.qml delete mode 100755 basicsuite/Media Player/Effects/EffectGlow.qml delete mode 100755 basicsuite/Media Player/Effects/EffectIsolate.qml delete mode 100755 basicsuite/Media Player/Effects/EffectMagnify.qml delete mode 100755 basicsuite/Media Player/Effects/EffectPageCurl.qml delete mode 100755 basicsuite/Media Player/Effects/EffectPassThrough.qml delete mode 100755 basicsuite/Media Player/Effects/EffectPixelate.qml delete mode 100755 basicsuite/Media Player/Effects/EffectPosterize.qml delete mode 100755 basicsuite/Media Player/Effects/EffectRipple.qml delete mode 100755 basicsuite/Media Player/Effects/EffectSepia.qml delete mode 100755 basicsuite/Media Player/Effects/EffectSharpen.qml delete mode 100755 basicsuite/Media Player/Effects/EffectShockwave.qml delete mode 100755 basicsuite/Media Player/Effects/EffectSobelEdgeDetection1.qml delete mode 100755 basicsuite/Media Player/Effects/EffectSobelEdgeDetection2.qml delete mode 100755 basicsuite/Media Player/Effects/EffectTiltShift.qml delete mode 100755 basicsuite/Media Player/Effects/EffectToon.qml delete mode 100755 basicsuite/Media Player/Effects/EffectVignette.qml delete mode 100755 basicsuite/Media Player/Effects/EffectWarhol.qml delete mode 100755 basicsuite/Media Player/Effects/EffectWobble.qml delete mode 100644 basicsuite/Media Player/FileBrowser.qml delete mode 100755 basicsuite/Media Player/ImageButton.qml delete mode 100644 basicsuite/Media Player/Intro.qml delete mode 100644 basicsuite/Media Player/Media Player.qmlproject delete mode 100644 basicsuite/Media Player/MetadataView.qml delete mode 100644 basicsuite/Media Player/ParameterPanel.qml delete mode 100755 basicsuite/Media Player/PlaybackControl.qml delete mode 100755 basicsuite/Media Player/SeekControl.qml delete mode 100644 basicsuite/Media Player/Slider.qml delete mode 100644 basicsuite/Media Player/UrlBar.qml delete mode 100755 basicsuite/Media Player/VolumeControl.qml delete mode 100644 basicsuite/Media Player/description.txt delete mode 100644 basicsuite/Media Player/exclude.txt delete mode 100644 basicsuite/Media Player/images/CameraButton.png delete mode 100644 basicsuite/Media Player/images/ControlBar.png delete mode 100644 basicsuite/Media Player/images/FXButton.png delete mode 100644 basicsuite/Media Player/images/FileButton.png delete mode 100755 basicsuite/Media Player/images/FullscreenButton.png delete mode 100644 basicsuite/Media Player/images/PauseButton.png delete mode 100644 basicsuite/Media Player/images/PlayButton.png delete mode 100755 basicsuite/Media Player/images/PlaybackSlider.png delete mode 100644 basicsuite/Media Player/images/RateButtonForward.png delete mode 100644 basicsuite/Media Player/images/RateButtonReverse.png delete mode 100644 basicsuite/Media Player/images/SliderBackground.png delete mode 100755 basicsuite/Media Player/images/SliderHandle.png delete mode 100755 basicsuite/Media Player/images/SliderProgress.png delete mode 100644 basicsuite/Media Player/images/UrlButton.png delete mode 100755 basicsuite/Media Player/images/VolumeDown.png delete mode 100755 basicsuite/Media Player/images/VolumeUp.png delete mode 100644 basicsuite/Media Player/images/folder.png delete mode 100644 basicsuite/Media Player/images/gradient.png delete mode 100644 basicsuite/Media Player/images/pattern.png delete mode 100755 basicsuite/Media Player/images/qt-logo.png delete mode 100644 basicsuite/Media Player/images/titlebar.png delete mode 100755 basicsuite/Media Player/images/titlebar.sci delete mode 100644 basicsuite/Media Player/images/up.png delete mode 100755 basicsuite/Media Player/main.qml delete mode 100644 basicsuite/Media Player/preview_l.jpg delete mode 100644 basicsuite/Photo Gallery/Photo Gallery.qmlproject delete mode 100644 basicsuite/Photo Gallery/description.txt delete mode 100644 basicsuite/Photo Gallery/main.qml delete mode 100644 basicsuite/Photo Gallery/preview_l.jpg delete mode 100644 basicsuite/Qt5 Cinematic Demo/Qt5 Cinematic Demo.qmlproject delete mode 100644 basicsuite/Qt5 Cinematic Demo/Qt5_CinematicExperience.pro delete mode 100644 basicsuite/Qt5 Cinematic Demo/README delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/Background.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/Button.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/CurtainEffect.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/DelegateItem.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/DetailsView.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/FpsItem.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/InfoView.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/InfoViewItem.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/MainView.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/MoviesModel.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/RatingsItem.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/SettingsView.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/Switch.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/1.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/10.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/11.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/12.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/13.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/14.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/15.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/16.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/17.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/18.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/19.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/2.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/20.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/3.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/4.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/5.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/6.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/7.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/8.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/9.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/background.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/background3.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/button.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/cc-by_logo.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/cover_nmap.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/grip.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/heading.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/heading_big.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/heading_big.xcf delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/info.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/panel_bg.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/particle.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/planet_sprite.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/qt_ambassador_logo.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/qt_logo.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/qt_logo2.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/quit_logo.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/sc1.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/sc2.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/sc3.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/sc4.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/sc5.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/settings.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/smoke.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/spinner.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/star.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/stars.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/stars2.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/switch_background.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/switch_frame.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/switch_on.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/content/images/switch_thumb.png delete mode 100644 basicsuite/Qt5 Cinematic Demo/description.txt delete mode 100644 basicsuite/Qt5 Cinematic Demo/main.cpp delete mode 100644 basicsuite/Qt5 Cinematic Demo/main.qml delete mode 100644 basicsuite/Qt5 Cinematic Demo/preview_l.jpg delete mode 100644 basicsuite/Qt5 Launch Presentation/Button.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/CameraSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/CanvasSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/DemoMain.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/EffectsSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/ExamplesSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/FontSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/NoisyGradient.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/NormalMapGenerator.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/OpacityTransitionPresentation.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/ParticleSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/README delete mode 100644 basicsuite/Qt5 Launch Presentation/ShaderSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/SlideDeck.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/Swirl.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/VideoSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/WebKitSlideContent.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/WebkitSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/WidgetsSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/.DS_Store delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/Calqlatr.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/Button.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/Display.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/NumberPad.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/StyleLabel.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/audio/touch.wav delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/calculator.js delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-back.png delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-close.png delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-settings.png delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/logo.png delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-edge-left.png delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-edge-right.png delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-grip.png delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/settings-selected-a.png delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/settings-selected-b.png delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/touch-green.png delete mode 100644 basicsuite/Qt5 Launch Presentation/calqlatr/content/images/touch-white.png delete mode 100644 basicsuite/Qt5 Launch Presentation/demo.qmlproject delete mode 100644 basicsuite/Qt5 Launch Presentation/description.txt delete mode 100644 basicsuite/Qt5 Launch Presentation/images/ally.png delete mode 100644 basicsuite/Qt5 Launch Presentation/images/butterfly.png delete mode 100644 basicsuite/Qt5 Launch Presentation/images/displace.png delete mode 100644 basicsuite/Qt5 Launch Presentation/images/fog.png delete mode 100644 basicsuite/Qt5 Launch Presentation/images/particle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/images/qt-logo.png delete mode 100644 basicsuite/Qt5 Launch Presentation/images/widgets_boxes.png delete mode 100644 basicsuite/Qt5 Launch Presentation/images/widgets_chips.png delete mode 100644 basicsuite/Qt5 Launch Presentation/images/widgets_mainwindows.png delete mode 100644 basicsuite/Qt5 Launch Presentation/images/widgets_styles_fusion.png delete mode 100644 basicsuite/Qt5 Launch Presentation/images/widgets_styles_macstyle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/main.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/main_hifi.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/.DS_Store delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/Maroon.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/BuildButton.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/GameCanvas.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/GameOverScreen.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/InfoBar.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/NewGameScreen.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/SoundEffect.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/audio/bomb-action.wav delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/audio/catch-action.wav delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/audio/catch.wav delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/audio/currency.wav delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/audio/factory-action.wav delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/audio/melee-action.wav delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/audio/projectile-action.wav delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/audio/shooter-action.wav delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/background.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb-action.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb-idle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/button-help.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/button-play.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/catch-action.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/catch.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/cloud.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/currency.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-bomb.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-factory.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-melee.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-pointer.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-shooter.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory-action.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory-idle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/grid.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/help.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/lifes.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo-bubble.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo-fish.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee-action.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee-idle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/mob-idle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/mob.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/points.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/projectile-action.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/projectile.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/scores.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter-action.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter-idle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/sunlight.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-1.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-2.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-3.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-blank.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-gameover.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-go.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/gfx/wave.png delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/logic.js delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/mobs/MobBase.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/towers/Bomb.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/towers/Factory.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/towers/Melee.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/towers/Ranged.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/maroon/content/towers/TowerBase.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/particles/customemitter.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/particles/emitmask.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/particles/particle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/particles/particle4.png delete mode 100644 basicsuite/Qt5 Launch Presentation/particles/star.png delete mode 100644 basicsuite/Qt5 Launch Presentation/particles/starfish_mask.png delete mode 100644 basicsuite/Qt5 Launch Presentation/particles/velocityfrommotion.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/presentation/Clock.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/presentation/CodeSlide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/presentation/Presentation.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/presentation/Slide.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/presentation/SlideCounter.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/preview_l.jpg delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/.DS_Store delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/Samegame.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/Block.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/BlockEmitter.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/Button.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/GameArea.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/LogoAnimation.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/MenuEmitter.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/PaintEmitter.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/PrimaryPack.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/PuzzleBlock.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/SamegameText.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/SimpleBlock.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/SmokeText.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/background-puzzle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/background.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/bar.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/blue-puzzle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/blue.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/bubble-highscore.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/bubble-puzzle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/but-game-1.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/but-game-2.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/but-game-3.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/but-game-4.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/but-game-new.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/but-menu.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/but-puzzle-next.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/but-quit.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/green-puzzle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/green.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/icon-fail.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/icon-ok.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/icon-time.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/logo-a.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/logo-e.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/logo-g.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/logo-m.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/logo-s.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/logo.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/particle-brick.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/particle-paint.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/particle-smoke.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/red-puzzle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/red.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/text-highscore-new.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/text-highscore.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/text-no-winner.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/text-p1-go.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/text-p1-won.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/text-p1.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/text-p2-go.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/text-p2-won.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/text-p2.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/yellow-puzzle.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/gfx/yellow.png delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/TemplateBase.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/level0.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/level1.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/level2.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/level3.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/level4.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/level5.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/level6.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/level7.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/level8.qml delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/content/levels/level9.qml delete mode 100755 basicsuite/Qt5 Launch Presentation/samegame/content/samegame.js delete mode 100644 basicsuite/Qt5 Launch Presentation/samegame/settings.js delete mode 100644 basicsuite/Qt5 Particles Demo/Qt5 Particles Demo.qmlproject delete mode 100644 basicsuite/Qt5 Particles Demo/content/burstandpulse.qml delete mode 100644 basicsuite/Qt5 Particles Demo/content/customemitter.qml delete mode 100644 basicsuite/Qt5 Particles Demo/content/emitmask.qml delete mode 100644 basicsuite/Qt5 Particles Demo/content/maximumemitted.qml delete mode 100644 basicsuite/Qt5 Particles Demo/content/shapeanddirection.qml delete mode 100644 basicsuite/Qt5 Particles Demo/content/trailemitter.qml delete mode 100644 basicsuite/Qt5 Particles Demo/content/velocityfrommotion.qml delete mode 100644 basicsuite/Qt5 Particles Demo/description.txt delete mode 100644 basicsuite/Qt5 Particles Demo/doc/images/qml-emitters-example.png delete mode 100644 basicsuite/Qt5 Particles Demo/doc/src/emitters.qdoc delete mode 100644 basicsuite/Qt5 Particles Demo/emitters.pro delete mode 100644 basicsuite/Qt5 Particles Demo/emitters.qmlproject delete mode 100644 basicsuite/Qt5 Particles Demo/emitters.qrc delete mode 100644 basicsuite/Qt5 Particles Demo/images/_explo.png delete mode 100755 basicsuite/Qt5 Particles Demo/images/backgroundLeaves.jpg delete mode 100644 basicsuite/Qt5 Particles Demo/images/bear_tiles.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/candle.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/colortable.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/finalfrontier.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/flower.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/matchmask.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/meteor.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/meteor_explo.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/meteors.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/nullRock.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/particle.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/particle2.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/particle3.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/particle4.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/particleA.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/portal_bg.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/realLeaf1.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/realLeaf2.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/realLeaf3.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/realLeaf4.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/rocket.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/rocket2.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/sizeInOut.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/snowflake.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/sparkleSize.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/star.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/starfish_0.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/starfish_1.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/starfish_2.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/starfish_3.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/starfish_4.png delete mode 100644 basicsuite/Qt5 Particles Demo/images/starfish_mask.png delete mode 100644 basicsuite/Qt5 Particles Demo/main.cpp delete mode 100644 basicsuite/Qt5 Particles Demo/main.qml delete mode 100644 basicsuite/Qt5 Particles Demo/preview_l.jpg delete mode 100644 basicsuite/Qt5 Particles Demo/shared/Button.qml delete mode 100644 basicsuite/Qt5 Particles Demo/shared/LauncherList.qml delete mode 100644 basicsuite/Qt5 Particles Demo/shared/README delete mode 100644 basicsuite/Qt5 Particles Demo/shared/SimpleLauncherDelegate.qml delete mode 100644 basicsuite/Qt5 Particles Demo/shared/images/back.png delete mode 100644 basicsuite/Qt5 Particles Demo/shared/images/next.png delete mode 100644 basicsuite/Qt5 Particles Demo/shared/qmldir delete mode 100644 basicsuite/Qt5 Particles Demo/shared/quick_shared.qrc delete mode 100644 basicsuite/Qt5 Particles Demo/shared/shared.h delete mode 100644 basicsuite/Qt5 Particles Demo/shared/shared.qrc delete mode 100644 basicsuite/Qt5Everywhere/Button.qml delete mode 100644 basicsuite/Qt5Everywhere/Cloud.qml delete mode 100644 basicsuite/Qt5Everywhere/DialogButton.qml delete mode 100644 basicsuite/Qt5Everywhere/Element.qml delete mode 100644 basicsuite/Qt5Everywhere/Group.qml delete mode 100644 basicsuite/Qt5Everywhere/HelpScreen.qml delete mode 100644 basicsuite/Qt5Everywhere/IslandElementContainer.qml delete mode 100644 basicsuite/Qt5Everywhere/NavigationPanel.qml delete mode 100644 basicsuite/Qt5Everywhere/Qt5Everywhere.pro delete mode 100644 basicsuite/Qt5Everywhere/QtLogo.png delete mode 100644 basicsuite/Qt5Everywhere/QuitDialog.qml delete mode 100644 basicsuite/Qt5Everywhere/Slide.qml delete mode 100644 basicsuite/Qt5Everywhere/SplashScreen.qml delete mode 100644 basicsuite/Qt5Everywhere/WorldCanvas.qml delete mode 100644 basicsuite/Qt5Everywhere/WorldMouseArea.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/Calqlatr.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/Button.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/Display.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/NumberPad.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/StyleLabel.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/audio/touch.wav delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/calculator.js delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-back.png delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-close.png delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-settings.png delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/logo.png delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-edge-left.png delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-edge-right.png delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-grip.png delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/settings-selected-a.png delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/settings-selected-b.png delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/touch-green.png delete mode 100644 basicsuite/Qt5Everywhere/demos/calqlatr/content/images/touch-white.png delete mode 100644 basicsuite/Qt5Everywhere/demos/canvasclock/canvasClock.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/demos.pro delete mode 100644 basicsuite/Qt5Everywhere/demos/gridrssnews/RssDelegate.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/gridrssnews/ScrollBar.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/gridrssnews/main.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/heartmonitor/HeartData.js delete mode 100644 basicsuite/Qt5Everywhere/demos/heartmonitor/heart.png delete mode 100644 basicsuite/Qt5Everywhere/demos/heartmonitor/main.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/.DS_Store delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/Maroon.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/BuildButton.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/GameCanvas.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/GameOverScreen.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/InfoBar.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/NewGameScreen.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/SoundEffect.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/audio/bomb-action.wav delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/audio/catch-action.wav delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/audio/catch.wav delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/audio/currency.wav delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/audio/factory-action.wav delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/audio/melee-action.wav delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/audio/projectile-action.wav delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/audio/shooter-action.wav delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/background.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb-action.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb-idle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/button-help.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/button-play.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/catch-action.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/catch.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/cloud.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/currency.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-bomb.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-factory.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-melee.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-pointer.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-shooter.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory-action.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory-idle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/grid.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/help.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/lifes.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo-bubble.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo-fish.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee-action.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee-idle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/mob-idle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/mob.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/points.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/projectile-action.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/projectile.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/scores.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter-action.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter-idle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/sunlight.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-1.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-2.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-3.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-blank.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-gameover.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-go.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/gfx/wave.png delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/logic.js delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/mobs/MobBase.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/towers/Bomb.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/towers/Factory.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/towers/Melee.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/towers/Ranged.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/maroon/content/towers/TowerBase.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/particledemo/BootScreenDemo.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/particledemo/ParticleSysComponent.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/particledemo/images/particle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/particledemo/images/particle_star.png delete mode 100644 basicsuite/Qt5Everywhere/demos/particledemo/images/qt-logo-green-mask.png delete mode 100644 basicsuite/Qt5Everywhere/demos/particledemo/images/qt-logo-white-mask.png delete mode 100644 basicsuite/Qt5Everywhere/demos/particledemo/particle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/particledemo/particledemo.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/photosurface/images/image0.png delete mode 100644 basicsuite/Qt5Everywhere/demos/photosurface/images/image1.png delete mode 100644 basicsuite/Qt5Everywhere/demos/photosurface/images/image2.png delete mode 100644 basicsuite/Qt5Everywhere/demos/photosurface/images/image3.png delete mode 100644 basicsuite/Qt5Everywhere/demos/photosurface/images/image4.png delete mode 100644 basicsuite/Qt5Everywhere/demos/photosurface/images/qml-photosurface-example-small.png delete mode 100644 basicsuite/Qt5Everywhere/demos/photosurface/photosurface.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/radio/VolumeButton.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/radio/VolumePoint.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/radio/channels.xml delete mode 100644 basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_pause.png delete mode 100644 basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_play.png delete mode 100644 basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_stop.png delete mode 100644 basicsuite/Qt5Everywhere/demos/radio/images/radio_sound_icon.png delete mode 100644 basicsuite/Qt5Everywhere/demos/radio/images/volume.png delete mode 100644 basicsuite/Qt5Everywhere/demos/radio/radio.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/rssnews/content/BusyIndicator.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/rssnews/content/CategoryDelegate.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/rssnews/content/NewsDelegate.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/rssnews/content/RssFeeds.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/rssnews/content/ScrollBar.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/rssnews/content/images/busy.png delete mode 100644 basicsuite/Qt5Everywhere/demos/rssnews/content/images/scrollbar.png delete mode 100644 basicsuite/Qt5Everywhere/demos/rssnews/rssnews.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/rssnews/rssnews.qmlproject delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/Block.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/BlockEmitter.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/Button.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/GameArea.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/LogoAnimation.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/MenuEmitter.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/PaintEmitter.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/PrimaryPack.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/PuzzleBlock.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/SamegameText.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/SimpleBlock.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/SmokeText.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/background-puzzle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/background.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/bar.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/blue-puzzle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/blue.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/bubble-highscore.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/bubble-puzzle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/but-game-1.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/but-game-2.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/but-game-3.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/but-game-4.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/but-game-new.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/but-menu.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/but-puzzle-next.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/but-quit.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/green-puzzle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/green.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/icon-fail.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/icon-ok.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/icon-time.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/logo-a.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/logo-e.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/logo-g.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/logo-m.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/logo-s.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/logo.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/particle-brick.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/particle-paint.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/particle-smoke.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/red-puzzle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/red.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/text-highscore-new.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/text-highscore.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/text-no-winner.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/text-p1-go.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/text-p1-won.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/text-p1.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/text-p2-go.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/text-p2-won.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/text-p2.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/yellow-puzzle.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/gfx/yellow.png delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/TemplateBase.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/level0.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/level1.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/level2.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/level3.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/level4.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/level5.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/level6.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/level7.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/level8.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/levels/level9.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/content/samegame.js delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/samegame.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/samegame.qrc delete mode 100644 basicsuite/Qt5Everywhere/demos/samegame/settings.js delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Content.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/EffectSelectionPanel.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/Effect.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectBillboard.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectEmboss.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectGaussianBlur.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectGlow.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectIsolate.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPassThrough.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPixelate.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPosterize.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectRipple.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSepia.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSharpen.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectShockwave.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectToon.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectVignette.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectWarhol.qml delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectWobble.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/Logo.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/LogoContainer.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/ParameterPanel.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/Slider.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/images/particle-smoke.png delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/images/qt-logo.png delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/images/wallpaper.png delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/import/import.pro delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/import/main.cpp delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/import/plugin.json delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/import/qmldir delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.cpp delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.h delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/main.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/shaders/shaders.pro delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/billboard.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/blackandwhite.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/emboss.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/gaussianblur_h.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/gaussianblur_v.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/glow.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/isolate.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/pixelate.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/posterize.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/ripple.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/selectionpanel.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/sepia.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/sharpen.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/shockwave.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/sobeledgedetection1.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/toon.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/vignette.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/warhol.fsh delete mode 100755 basicsuite/Qt5Everywhere/demos/shaders/shaders/wobble.fsh delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/content/AndroidDelegate.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/content/ButtonPage.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/content/CustomAppWindow.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/content/ProgressBarPage.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/content/SliderPage.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/content/TabBarPage.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/content/TextInputPage.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/images/NOTICE.txt delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/images/button_default.png delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/images/button_pressed.png delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/images/navigation_next_item.png delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/images/navigation_previous_item.png delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/images/tab_selected.png delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/images/tabs_standard.png delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/images/textinput.png delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/images/toolbar.png delete mode 100644 basicsuite/Qt5Everywhere/demos/touchgallery/main.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/Content.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/ContentVideo.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/ControlBar.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/ImageButton.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/PlaybackControl.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/ScrollBar.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/SeekControl.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/Slider.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/VideoDelegate.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/VideoSelector.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/VolumeControl.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/images/CloseButton.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/images/PauseButton.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/images/PlayButton.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/images/RateButtonForward.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/images/RateButtonReverse.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/images/StopButton.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/images/VolumeDown.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/images/VolumeUp.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/main.qml delete mode 100644 basicsuite/Qt5Everywhere/demos/video/qt5_video_jens.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/qt5_video_kenneth.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/qt5_video_lars.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/qt5_video_samuel.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/qt5_video_simon.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/qt5_video_thiago.png delete mode 100644 basicsuite/Qt5Everywhere/demos/video/qt5_videos.xml delete mode 100644 basicsuite/Qt5Everywhere/description.txt delete mode 100644 basicsuite/Qt5Everywhere/engine.js delete mode 100644 basicsuite/Qt5Everywhere/fonts/OFL.txt delete mode 100644 basicsuite/Qt5Everywhere/fonts/PatrickHandSC-Regular.ttf delete mode 100644 basicsuite/Qt5Everywhere/images/box.png delete mode 100644 basicsuite/Qt5Everywhere/images/box_open.png delete mode 100644 basicsuite/Qt5Everywhere/images/btn_help.png delete mode 100644 basicsuite/Qt5Everywhere/images/btn_home.png delete mode 100644 basicsuite/Qt5Everywhere/images/btn_next.png delete mode 100644 basicsuite/Qt5Everywhere/images/btn_previous.png delete mode 100644 basicsuite/Qt5Everywhere/images/car_device.png delete mode 100644 basicsuite/Qt5Everywhere/images/character0.png delete mode 100644 basicsuite/Qt5Everywhere/images/character1.png delete mode 100644 basicsuite/Qt5Everywhere/images/character10.png delete mode 100644 basicsuite/Qt5Everywhere/images/character2.png delete mode 100644 basicsuite/Qt5Everywhere/images/character3.png delete mode 100644 basicsuite/Qt5Everywhere/images/character4.png delete mode 100644 basicsuite/Qt5Everywhere/images/character5.png delete mode 100644 basicsuite/Qt5Everywhere/images/character6.png delete mode 100644 basicsuite/Qt5Everywhere/images/character7.png delete mode 100644 basicsuite/Qt5Everywhere/images/character8.png delete mode 100644 basicsuite/Qt5Everywhere/images/character9.png delete mode 100644 basicsuite/Qt5Everywhere/images/cloud1.png delete mode 100644 basicsuite/Qt5Everywhere/images/cloud2.png delete mode 100644 basicsuite/Qt5Everywhere/images/hand.png delete mode 100644 basicsuite/Qt5Everywhere/images/highlight_mask.png delete mode 100644 basicsuite/Qt5Everywhere/images/island.png delete mode 100644 basicsuite/Qt5Everywhere/images/laptop1.png delete mode 100644 basicsuite/Qt5Everywhere/images/laptop2.png delete mode 100644 basicsuite/Qt5Everywhere/images/man1.png delete mode 100644 basicsuite/Qt5Everywhere/images/medical_device.png delete mode 100644 basicsuite/Qt5Everywhere/images/mountain.png delete mode 100644 basicsuite/Qt5Everywhere/images/particle-smoke.png delete mode 100644 basicsuite/Qt5Everywhere/images/phone1.png delete mode 100644 basicsuite/Qt5Everywhere/images/phone2.png delete mode 100644 basicsuite/Qt5Everywhere/images/phone3.png delete mode 100644 basicsuite/Qt5Everywhere/images/stones.png delete mode 100644 basicsuite/Qt5Everywhere/images/tablet1.png delete mode 100644 basicsuite/Qt5Everywhere/images/tree1.png delete mode 100644 basicsuite/Qt5Everywhere/images/tree2.png delete mode 100644 basicsuite/Qt5Everywhere/images/tv.png delete mode 100644 basicsuite/Qt5Everywhere/main.qml delete mode 100644 basicsuite/Qt5Everywhere/preview_l.jpg delete mode 100644 basicsuite/Qt5Everywhere/style.js delete mode 100644 basicsuite/Qt5Everywhere/title.txt delete mode 100644 basicsuite/SensorExplorer/SensorExplorer.pro delete mode 100644 basicsuite/SensorExplorer/description.txt delete mode 100644 basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc delete mode 100644 basicsuite/SensorExplorer/imports/explorer.cpp delete mode 100644 basicsuite/SensorExplorer/imports/explorer.h delete mode 100644 basicsuite/SensorExplorer/imports/imports.pro delete mode 100644 basicsuite/SensorExplorer/imports/main.cpp delete mode 100644 basicsuite/SensorExplorer/imports/plugin.json delete mode 100644 basicsuite/SensorExplorer/imports/propertyinfo.cpp delete mode 100644 basicsuite/SensorExplorer/imports/propertyinfo.h delete mode 100644 basicsuite/SensorExplorer/imports/qmldir delete mode 100644 basicsuite/SensorExplorer/imports/sensoritem.cpp delete mode 100644 basicsuite/SensorExplorer/imports/sensoritem.h delete mode 100644 basicsuite/SensorExplorer/main.qml delete mode 100644 basicsuite/SensorExplorer/preview_l.jpg delete mode 100644 basicsuite/SensorExplorer/title.txt delete mode 100644 basicsuite/Sensors/1.png delete mode 100644 basicsuite/Sensors/2.png delete mode 100644 basicsuite/Sensors/3.png delete mode 100644 basicsuite/Sensors/Accelbubble.qml delete mode 100644 basicsuite/Sensors/Light.qml delete mode 100644 basicsuite/Sensors/Sensors.qmlproject delete mode 100644 basicsuite/Sensors/bluebubble.png delete mode 100644 basicsuite/Sensors/description.txt delete mode 100644 basicsuite/Sensors/main.qml delete mode 100644 basicsuite/Sensors/preview_l.jpg delete mode 100644 basicsuite/Text Input/ScrollBar.qml delete mode 100644 basicsuite/Text Input/Text Input.qmlproject delete mode 100644 basicsuite/Text Input/TextArea.qml delete mode 100644 basicsuite/Text Input/TextBase.qml delete mode 100644 basicsuite/Text Input/TextField.qml delete mode 100644 basicsuite/Text Input/description.txt delete mode 100644 basicsuite/Text Input/main.qml delete mode 100644 basicsuite/Text Input/preview_l.jpg create mode 100644 basicsuite/about-b2qt/AboutBoot2Qt.qml create mode 100644 basicsuite/about-b2qt/Box.qml create mode 100644 basicsuite/about-b2qt/ContentText.qml create mode 100644 basicsuite/about-b2qt/QtForAndroid.qml create mode 100644 basicsuite/about-b2qt/QtFramework.qml create mode 100644 basicsuite/about-b2qt/Title.qml create mode 100644 basicsuite/about-b2qt/about-b2qt.pro create mode 100644 basicsuite/about-b2qt/codeless.png create mode 100644 basicsuite/about-b2qt/description.txt create mode 100644 basicsuite/about-b2qt/dummy.cpp create mode 100644 basicsuite/about-b2qt/main.qml create mode 100644 basicsuite/about-b2qt/particle.png create mode 100644 basicsuite/about-b2qt/preview_l.jpg create mode 100644 basicsuite/about-b2qt/qt-logo.png create mode 100644 basicsuite/about-b2qt/title.txt create mode 100644 basicsuite/camera/CameraControlButton.qml create mode 100644 basicsuite/camera/CameraSetting.qml create mode 100644 basicsuite/camera/CaptureControl.qml create mode 100644 basicsuite/camera/CapturePreview.qml create mode 100644 basicsuite/camera/Controls.qml create mode 100644 basicsuite/camera/FocusControl.qml create mode 100644 basicsuite/camera/Picker.qml create mode 100644 basicsuite/camera/README create mode 100644 basicsuite/camera/RecordingTime.qml create mode 100644 basicsuite/camera/Slider.qml create mode 100644 basicsuite/camera/ZoomControl.qml create mode 100644 basicsuite/camera/app.pro create mode 100644 basicsuite/camera/camera.pro create mode 100644 basicsuite/camera/camerautils/camerautils.cpp create mode 100644 basicsuite/camera/camerautils/camerautils.h create mode 100644 basicsuite/camera/camerautils/camerautils.pro create mode 100644 basicsuite/camera/camerautils/plugin.cpp create mode 100644 basicsuite/camera/camerautils/qmldir create mode 100644 basicsuite/camera/description.txt create mode 100644 basicsuite/camera/exclude.txt create mode 100644 basicsuite/camera/main.qml create mode 100644 basicsuite/camera/preview_l.jpg create mode 100644 basicsuite/camera/title.txt create mode 100644 basicsuite/controls-layouts/controls-layouts.pro create mode 100644 basicsuite/controls-layouts/description.txt create mode 100644 basicsuite/controls-layouts/main.qml create mode 100644 basicsuite/controls-layouts/preview_l.jpg create mode 100644 basicsuite/controls-layouts/title.txt create mode 100644 basicsuite/controls-touch/content/AndroidDelegate.qml create mode 100644 basicsuite/controls-touch/content/ButtonPage.qml create mode 100644 basicsuite/controls-touch/content/ProgressBarPage.qml create mode 100644 basicsuite/controls-touch/content/SliderPage.qml create mode 100644 basicsuite/controls-touch/content/TabBarPage.qml create mode 100644 basicsuite/controls-touch/content/TextInputPage.qml create mode 100644 basicsuite/controls-touch/controls-touch.pro create mode 100644 basicsuite/controls-touch/description.txt create mode 100644 basicsuite/controls-touch/images/NOTICE.txt create mode 100644 basicsuite/controls-touch/images/button_default.png create mode 100644 basicsuite/controls-touch/images/button_pressed.png create mode 100644 basicsuite/controls-touch/images/navigation_next_item.png create mode 100644 basicsuite/controls-touch/images/navigation_previous_item.png create mode 100644 basicsuite/controls-touch/images/tab_selected.png create mode 100644 basicsuite/controls-touch/images/tabs_standard.png create mode 100644 basicsuite/controls-touch/images/textinput.png create mode 100644 basicsuite/controls-touch/images/toolbar.png create mode 100644 basicsuite/controls-touch/main.qml create mode 100644 basicsuite/controls-touch/preview_l.jpg create mode 100644 basicsuite/controls-touch/title.txt create mode 100644 basicsuite/graphicaleffects/Checkers.qml create mode 100644 basicsuite/graphicaleffects/description.txt create mode 100644 basicsuite/graphicaleffects/effect_BrightnessContrast.qml create mode 100644 basicsuite/graphicaleffects/effect_Colorize.qml create mode 100644 basicsuite/graphicaleffects/effect_CustomDissolve.qml create mode 100644 basicsuite/graphicaleffects/effect_CustomWave.qml create mode 100644 basicsuite/graphicaleffects/effect_Displacement.qml create mode 100644 basicsuite/graphicaleffects/effect_DropShadow.qml create mode 100644 basicsuite/graphicaleffects/effect_GaussianBlur.qml create mode 100644 basicsuite/graphicaleffects/effect_Glow.qml create mode 100644 basicsuite/graphicaleffects/effect_HueSaturation.qml create mode 100644 basicsuite/graphicaleffects/effect_OpacityMask.qml create mode 100644 basicsuite/graphicaleffects/effect_ThresholdMask.qml create mode 100644 basicsuite/graphicaleffects/graphicaleffects.pro create mode 100755 basicsuite/graphicaleffects/images/bug.jpg create mode 100644 basicsuite/graphicaleffects/images/butterfly.png create mode 100644 basicsuite/graphicaleffects/images/fog.png create mode 100755 basicsuite/graphicaleffects/images/glass_normal.png create mode 100644 basicsuite/graphicaleffects/main.qml create mode 100644 basicsuite/graphicaleffects/preview_l.jpg create mode 100644 basicsuite/graphicaleffects/title.txt create mode 100644 basicsuite/launchersettings/BrightnessController.qml create mode 100644 basicsuite/launchersettings/NetworkController.qml create mode 100644 basicsuite/launchersettings/PoweroffAction.qml create mode 100644 basicsuite/launchersettings/RebootAction.qml create mode 100644 basicsuite/launchersettings/description.txt create mode 100644 basicsuite/launchersettings/launchersettings.pro create mode 100644 basicsuite/launchersettings/main.qml create mode 100644 basicsuite/launchersettings/preview_l.jpg create mode 100644 basicsuite/launchersettings/title.txt create mode 100755 basicsuite/mediaplayer/Content.qml create mode 100755 basicsuite/mediaplayer/ContentVideo.qml create mode 100755 basicsuite/mediaplayer/ControlBar.qml create mode 100755 basicsuite/mediaplayer/EffectSelectionPanel.qml create mode 100755 basicsuite/mediaplayer/Effects/Effect.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectBillboard.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectBlackAndWhite.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectEmboss.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectGaussianBlur.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectGlow.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectIsolate.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectMagnify.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectPageCurl.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectPassThrough.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectPixelate.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectPosterize.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectRipple.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectSepia.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectSharpen.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectShockwave.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectSobelEdgeDetection1.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectSobelEdgeDetection2.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectTiltShift.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectToon.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectVignette.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectWarhol.qml create mode 100755 basicsuite/mediaplayer/Effects/EffectWobble.qml create mode 100644 basicsuite/mediaplayer/FileBrowser.qml create mode 100755 basicsuite/mediaplayer/ImageButton.qml create mode 100644 basicsuite/mediaplayer/Intro.qml create mode 100644 basicsuite/mediaplayer/MetadataView.qml create mode 100644 basicsuite/mediaplayer/ParameterPanel.qml create mode 100755 basicsuite/mediaplayer/PlaybackControl.qml create mode 100755 basicsuite/mediaplayer/SeekControl.qml create mode 100644 basicsuite/mediaplayer/Slider.qml create mode 100644 basicsuite/mediaplayer/UrlBar.qml create mode 100755 basicsuite/mediaplayer/VolumeControl.qml create mode 100644 basicsuite/mediaplayer/description.txt create mode 100644 basicsuite/mediaplayer/exclude.txt create mode 100644 basicsuite/mediaplayer/images/CameraButton.png create mode 100644 basicsuite/mediaplayer/images/ControlBar.png create mode 100644 basicsuite/mediaplayer/images/FXButton.png create mode 100644 basicsuite/mediaplayer/images/FileButton.png create mode 100755 basicsuite/mediaplayer/images/FullscreenButton.png create mode 100644 basicsuite/mediaplayer/images/PauseButton.png create mode 100644 basicsuite/mediaplayer/images/PlayButton.png create mode 100755 basicsuite/mediaplayer/images/PlaybackSlider.png create mode 100644 basicsuite/mediaplayer/images/RateButtonForward.png create mode 100644 basicsuite/mediaplayer/images/RateButtonReverse.png create mode 100644 basicsuite/mediaplayer/images/SliderBackground.png create mode 100755 basicsuite/mediaplayer/images/SliderHandle.png create mode 100755 basicsuite/mediaplayer/images/SliderProgress.png create mode 100644 basicsuite/mediaplayer/images/UrlButton.png create mode 100755 basicsuite/mediaplayer/images/VolumeDown.png create mode 100755 basicsuite/mediaplayer/images/VolumeUp.png create mode 100644 basicsuite/mediaplayer/images/folder.png create mode 100644 basicsuite/mediaplayer/images/gradient.png create mode 100644 basicsuite/mediaplayer/images/pattern.png create mode 100755 basicsuite/mediaplayer/images/qt-logo.png create mode 100644 basicsuite/mediaplayer/images/titlebar.png create mode 100755 basicsuite/mediaplayer/images/titlebar.sci create mode 100644 basicsuite/mediaplayer/images/up.png create mode 100755 basicsuite/mediaplayer/main.qml create mode 100644 basicsuite/mediaplayer/mediaplayer.pro create mode 100644 basicsuite/mediaplayer/preview_l.jpg create mode 100644 basicsuite/mediaplayer/title.txt create mode 100644 basicsuite/photogallery/description.txt create mode 100644 basicsuite/photogallery/main.qml create mode 100644 basicsuite/photogallery/photogallery.pro create mode 100644 basicsuite/photogallery/preview_l.jpg create mode 100644 basicsuite/photogallery/title.txt create mode 100644 basicsuite/qt5-cinematicdemo/Qt5_CinematicExperience.pro create mode 100644 basicsuite/qt5-cinematicdemo/README create mode 100644 basicsuite/qt5-cinematicdemo/content/Background.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/Button.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/CurtainEffect.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/DelegateItem.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/DetailsView.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/FpsItem.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/InfoView.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/InfoViewItem.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/MainView.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/MoviesModel.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/RatingsItem.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/SettingsView.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/Switch.qml create mode 100644 basicsuite/qt5-cinematicdemo/content/images/1.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/10.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/11.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/12.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/13.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/14.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/15.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/16.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/17.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/18.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/19.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/2.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/20.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/3.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/4.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/5.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/6.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/7.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/8.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/9.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/background.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/background3.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/button.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/cc-by_logo.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/cover_nmap.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/grip.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/heading.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/heading_big.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/heading_big.xcf create mode 100644 basicsuite/qt5-cinematicdemo/content/images/info.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/panel_bg.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/particle.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/planet_sprite.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/qt_ambassador_logo.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/qt_logo.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/qt_logo2.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/quit_logo.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/sc1.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/sc2.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/sc3.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/sc4.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/sc5.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/settings.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/smoke.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/spinner.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/star.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/stars.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/stars2.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/switch_background.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/switch_frame.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/switch_on.png create mode 100644 basicsuite/qt5-cinematicdemo/content/images/switch_thumb.png create mode 100644 basicsuite/qt5-cinematicdemo/description.txt create mode 100644 basicsuite/qt5-cinematicdemo/main.cpp create mode 100644 basicsuite/qt5-cinematicdemo/main.qml create mode 100644 basicsuite/qt5-cinematicdemo/preview_l.jpg create mode 100644 basicsuite/qt5-cinematicdemo/qt5-cinematicdemo.pro create mode 100644 basicsuite/qt5-cinematicdemo/title.txt create mode 100644 basicsuite/qt5-everywhere/Button.qml create mode 100644 basicsuite/qt5-everywhere/Cloud.qml create mode 100644 basicsuite/qt5-everywhere/DialogButton.qml create mode 100644 basicsuite/qt5-everywhere/Element.qml create mode 100644 basicsuite/qt5-everywhere/Group.qml create mode 100644 basicsuite/qt5-everywhere/HelpScreen.qml create mode 100644 basicsuite/qt5-everywhere/IslandElementContainer.qml create mode 100644 basicsuite/qt5-everywhere/NavigationPanel.qml create mode 100644 basicsuite/qt5-everywhere/QtLogo.png create mode 100644 basicsuite/qt5-everywhere/QuitDialog.qml create mode 100644 basicsuite/qt5-everywhere/Slide.qml create mode 100644 basicsuite/qt5-everywhere/SplashScreen.qml create mode 100644 basicsuite/qt5-everywhere/WorldCanvas.qml create mode 100644 basicsuite/qt5-everywhere/WorldMouseArea.qml create mode 100644 basicsuite/qt5-everywhere/app.pro create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wav create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.png create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.png create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.png create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.png create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.png create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.png create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.png create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.png create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.png create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.png create mode 100644 basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.png create mode 100644 basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml create mode 100644 basicsuite/qt5-everywhere/demos/demos.pro create mode 100644 basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml create mode 100644 basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml create mode 100644 basicsuite/qt5-everywhere/demos/gridrssnews/main.qml create mode 100644 basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js create mode 100644 basicsuite/qt5-everywhere/demos/heartmonitor/heart.png create mode 100644 basicsuite/qt5-everywhere/demos/heartmonitor/main.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/.DS_Store create mode 100644 basicsuite/qt5-everywhere/demos/maroon/Maroon.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/BuildButton.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/GameCanvas.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/GameOverScreen.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/InfoBar.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/NewGameScreen.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/SoundEffect.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/audio/bomb-action.wav create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/audio/catch-action.wav create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/audio/catch.wav create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/audio/currency.wav create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/audio/factory-action.wav create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/audio/melee-action.wav create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/audio/projectile-action.wav create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/audio/shooter-action.wav create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/background.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-action.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-idle.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-help.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-play.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch-action.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/cloud.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/currency.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-bomb.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-factory.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-melee.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-pointer.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-shooter.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-action.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-idle.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/grid.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/help.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/lifes.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-bubble.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-fish.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-action.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-idle.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob-idle.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/points.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile-action.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/scores.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-action.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-idle.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/sunlight.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-1.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-2.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-3.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-blank.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-gameover.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-go.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/gfx/wave.png create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/logic.js create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/mobs/MobBase.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/towers/Bomb.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/towers/Factory.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/towers/Melee.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/towers/Ranged.qml create mode 100644 basicsuite/qt5-everywhere/demos/maroon/content/towers/TowerBase.qml create mode 100644 basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml create mode 100644 basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml create mode 100644 basicsuite/qt5-everywhere/demos/particledemo/images/particle.png create mode 100644 basicsuite/qt5-everywhere/demos/particledemo/images/particle_star.png create mode 100644 basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-green-mask.png create mode 100644 basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-white-mask.png create mode 100644 basicsuite/qt5-everywhere/demos/particledemo/particle.png create mode 100644 basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml create mode 100644 basicsuite/qt5-everywhere/demos/photosurface/images/image0.png create mode 100644 basicsuite/qt5-everywhere/demos/photosurface/images/image1.png create mode 100644 basicsuite/qt5-everywhere/demos/photosurface/images/image2.png create mode 100644 basicsuite/qt5-everywhere/demos/photosurface/images/image3.png create mode 100644 basicsuite/qt5-everywhere/demos/photosurface/images/image4.png create mode 100644 basicsuite/qt5-everywhere/demos/photosurface/images/qml-photosurface-example-small.png create mode 100644 basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml create mode 100644 basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml create mode 100644 basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml create mode 100644 basicsuite/qt5-everywhere/demos/radio/channels.xml create mode 100644 basicsuite/qt5-everywhere/demos/radio/images/radio_btn_pause.png create mode 100644 basicsuite/qt5-everywhere/demos/radio/images/radio_btn_play.png create mode 100644 basicsuite/qt5-everywhere/demos/radio/images/radio_btn_stop.png create mode 100644 basicsuite/qt5-everywhere/demos/radio/images/radio_sound_icon.png create mode 100644 basicsuite/qt5-everywhere/demos/radio/images/volume.png create mode 100644 basicsuite/qt5-everywhere/demos/radio/radio.qml create mode 100644 basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml create mode 100644 basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml create mode 100644 basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml create mode 100644 basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml create mode 100644 basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml create mode 100644 basicsuite/qt5-everywhere/demos/rssnews/content/images/busy.png create mode 100644 basicsuite/qt5-everywhere/demos/rssnews/content/images/scrollbar.png create mode 100644 basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml create mode 100644 basicsuite/qt5-everywhere/demos/rssnews/rssnews.qmlproject create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/Block.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/Button.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/PrimaryPack.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/PuzzleBlock.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/SamegameText.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/SimpleBlock.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/SmokeText.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/background-puzzle.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/background.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/bar.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/blue-puzzle.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/blue.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/bubble-highscore.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/bubble-puzzle.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-1.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-2.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-3.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-4.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-game-new.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-menu.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-puzzle-next.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/but-quit.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/green-puzzle.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/green.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-fail.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-ok.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/icon-time.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-a.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-e.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-g.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-m.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo-s.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/logo.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-brick.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-paint.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/particle-smoke.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/red-puzzle.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/red.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-highscore-new.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-highscore.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-no-winner.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1-go.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1-won.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p1.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2-go.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2-won.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/text-p2.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/yellow-puzzle.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/gfx/yellow.png create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/TemplateBase.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/level0.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/content/samegame.js create mode 100644 basicsuite/qt5-everywhere/demos/samegame/samegame.qml create mode 100644 basicsuite/qt5-everywhere/demos/samegame/samegame.qrc create mode 100644 basicsuite/qt5-everywhere/demos/samegame/settings.js create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Content.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/EffectSelectionPanel.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/Effect.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBillboard.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectEmboss.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGaussianBlur.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGlow.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectIsolate.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPassThrough.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPixelate.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPosterize.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectRipple.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSepia.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSharpen.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectShockwave.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectToon.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectVignette.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWarhol.qml create mode 100755 basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWobble.qml create mode 100644 basicsuite/qt5-everywhere/demos/shaders/Logo.qml create mode 100644 basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml create mode 100644 basicsuite/qt5-everywhere/demos/shaders/ParameterPanel.qml create mode 100644 basicsuite/qt5-everywhere/demos/shaders/Slider.qml create mode 100644 basicsuite/qt5-everywhere/demos/shaders/images/particle-smoke.png create mode 100755 basicsuite/qt5-everywhere/demos/shaders/images/qt-logo.png create mode 100644 basicsuite/qt5-everywhere/demos/shaders/images/wallpaper.png create mode 100644 basicsuite/qt5-everywhere/demos/shaders/import/import.pro create mode 100644 basicsuite/qt5-everywhere/demos/shaders/import/main.cpp create mode 100644 basicsuite/qt5-everywhere/demos/shaders/import/plugin.json create mode 100644 basicsuite/qt5-everywhere/demos/shaders/import/qmldir create mode 100644 basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp create mode 100644 basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h create mode 100755 basicsuite/qt5-everywhere/demos/shaders/main.qml create mode 100644 basicsuite/qt5-everywhere/demos/shaders/shaders.pro create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/billboard.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/blackandwhite.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/emboss.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_h.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_v.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/glow.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/isolate.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/pixelate.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/posterize.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/ripple.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/selectionpanel.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/sepia.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/sharpen.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/shockwave.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/sobeledgedetection1.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/toon.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/vignette.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/warhol.fsh create mode 100755 basicsuite/qt5-everywhere/demos/shaders/shaders/wobble.fsh create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/content/AndroidDelegate.qml create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/content/CustomAppWindow.qml create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/images/NOTICE.txt create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/images/button_default.png create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/images/button_pressed.png create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/images/navigation_next_item.png create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/images/navigation_previous_item.png create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/images/tab_selected.png create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/images/tabs_standard.png create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/images/textinput.png create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/images/toolbar.png create mode 100644 basicsuite/qt5-everywhere/demos/touchgallery/main.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/Content.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/ContentVideo.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/ControlBar.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/ImageButton.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/PlaybackControl.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/ScrollBar.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/SeekControl.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/Slider.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/VideoDelegate.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/VideoSelector.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/VolumeControl.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/images/CloseButton.png create mode 100644 basicsuite/qt5-everywhere/demos/video/images/PauseButton.png create mode 100644 basicsuite/qt5-everywhere/demos/video/images/PlayButton.png create mode 100644 basicsuite/qt5-everywhere/demos/video/images/RateButtonForward.png create mode 100644 basicsuite/qt5-everywhere/demos/video/images/RateButtonReverse.png create mode 100644 basicsuite/qt5-everywhere/demos/video/images/StopButton.png create mode 100644 basicsuite/qt5-everywhere/demos/video/images/VolumeDown.png create mode 100644 basicsuite/qt5-everywhere/demos/video/images/VolumeUp.png create mode 100644 basicsuite/qt5-everywhere/demos/video/main.qml create mode 100644 basicsuite/qt5-everywhere/demos/video/qt5_video_jens.png create mode 100644 basicsuite/qt5-everywhere/demos/video/qt5_video_kenneth.png create mode 100644 basicsuite/qt5-everywhere/demos/video/qt5_video_lars.png create mode 100644 basicsuite/qt5-everywhere/demos/video/qt5_video_samuel.png create mode 100644 basicsuite/qt5-everywhere/demos/video/qt5_video_simon.png create mode 100644 basicsuite/qt5-everywhere/demos/video/qt5_video_thiago.png create mode 100644 basicsuite/qt5-everywhere/demos/video/qt5_videos.xml create mode 100644 basicsuite/qt5-everywhere/description.txt create mode 100644 basicsuite/qt5-everywhere/engine.js create mode 100644 basicsuite/qt5-everywhere/fonts/OFL.txt create mode 100644 basicsuite/qt5-everywhere/fonts/PatrickHandSC-Regular.ttf create mode 100644 basicsuite/qt5-everywhere/images/box.png create mode 100644 basicsuite/qt5-everywhere/images/box_open.png create mode 100644 basicsuite/qt5-everywhere/images/btn_help.png create mode 100644 basicsuite/qt5-everywhere/images/btn_home.png create mode 100644 basicsuite/qt5-everywhere/images/btn_next.png create mode 100644 basicsuite/qt5-everywhere/images/btn_previous.png create mode 100644 basicsuite/qt5-everywhere/images/car_device.png create mode 100644 basicsuite/qt5-everywhere/images/character0.png create mode 100644 basicsuite/qt5-everywhere/images/character1.png create mode 100644 basicsuite/qt5-everywhere/images/character10.png create mode 100644 basicsuite/qt5-everywhere/images/character2.png create mode 100644 basicsuite/qt5-everywhere/images/character3.png create mode 100644 basicsuite/qt5-everywhere/images/character4.png create mode 100644 basicsuite/qt5-everywhere/images/character5.png create mode 100644 basicsuite/qt5-everywhere/images/character6.png create mode 100644 basicsuite/qt5-everywhere/images/character7.png create mode 100644 basicsuite/qt5-everywhere/images/character8.png create mode 100644 basicsuite/qt5-everywhere/images/character9.png create mode 100644 basicsuite/qt5-everywhere/images/cloud1.png create mode 100644 basicsuite/qt5-everywhere/images/cloud2.png create mode 100644 basicsuite/qt5-everywhere/images/hand.png create mode 100644 basicsuite/qt5-everywhere/images/highlight_mask.png create mode 100644 basicsuite/qt5-everywhere/images/island.png create mode 100644 basicsuite/qt5-everywhere/images/laptop1.png create mode 100644 basicsuite/qt5-everywhere/images/laptop2.png create mode 100644 basicsuite/qt5-everywhere/images/man1.png create mode 100644 basicsuite/qt5-everywhere/images/medical_device.png create mode 100644 basicsuite/qt5-everywhere/images/mountain.png create mode 100644 basicsuite/qt5-everywhere/images/particle-smoke.png create mode 100644 basicsuite/qt5-everywhere/images/phone1.png create mode 100644 basicsuite/qt5-everywhere/images/phone2.png create mode 100644 basicsuite/qt5-everywhere/images/phone3.png create mode 100644 basicsuite/qt5-everywhere/images/stones.png create mode 100644 basicsuite/qt5-everywhere/images/tablet1.png create mode 100644 basicsuite/qt5-everywhere/images/tree1.png create mode 100644 basicsuite/qt5-everywhere/images/tree2.png create mode 100644 basicsuite/qt5-everywhere/images/tv.png create mode 100644 basicsuite/qt5-everywhere/main.qml create mode 100644 basicsuite/qt5-everywhere/preview_l.jpg create mode 100644 basicsuite/qt5-everywhere/qt5-everywhere.pro create mode 100644 basicsuite/qt5-everywhere/style.js create mode 100644 basicsuite/qt5-everywhere/title.txt create mode 100644 basicsuite/qt5-launchpresentation/Button.qml create mode 100644 basicsuite/qt5-launchpresentation/CameraSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/CanvasSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/DemoMain.qml create mode 100644 basicsuite/qt5-launchpresentation/EffectsSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/ExamplesSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/FontSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/NoisyGradient.qml create mode 100644 basicsuite/qt5-launchpresentation/NormalMapGenerator.qml create mode 100644 basicsuite/qt5-launchpresentation/OpacityTransitionPresentation.qml create mode 100644 basicsuite/qt5-launchpresentation/ParticleSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/README create mode 100644 basicsuite/qt5-launchpresentation/ShaderSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/SlideDeck.qml create mode 100644 basicsuite/qt5-launchpresentation/Swirl.qml create mode 100644 basicsuite/qt5-launchpresentation/VideoSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/WebKitSlideContent.qml create mode 100644 basicsuite/qt5-launchpresentation/WebkitSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/WidgetsSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/.DS_Store create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/Calqlatr.qml create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/Button.qml create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/Display.qml create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/NumberPad.qml create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/StyleLabel.qml create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/audio/touch.wav create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/calculator.js create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-back.png create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-close.png create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-settings.png create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/logo.png create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-edge-left.png create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-edge-right.png create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-grip.png create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/settings-selected-a.png create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/settings-selected-b.png create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/touch-green.png create mode 100644 basicsuite/qt5-launchpresentation/calqlatr/content/images/touch-white.png create mode 100644 basicsuite/qt5-launchpresentation/demo.qmlproject create mode 100644 basicsuite/qt5-launchpresentation/description.txt create mode 100644 basicsuite/qt5-launchpresentation/images/ally.png create mode 100644 basicsuite/qt5-launchpresentation/images/butterfly.png create mode 100644 basicsuite/qt5-launchpresentation/images/displace.png create mode 100644 basicsuite/qt5-launchpresentation/images/fog.png create mode 100644 basicsuite/qt5-launchpresentation/images/particle.png create mode 100644 basicsuite/qt5-launchpresentation/images/qt-logo.png create mode 100644 basicsuite/qt5-launchpresentation/images/widgets_boxes.png create mode 100644 basicsuite/qt5-launchpresentation/images/widgets_chips.png create mode 100644 basicsuite/qt5-launchpresentation/images/widgets_mainwindows.png create mode 100644 basicsuite/qt5-launchpresentation/images/widgets_styles_fusion.png create mode 100644 basicsuite/qt5-launchpresentation/images/widgets_styles_macstyle.png create mode 100644 basicsuite/qt5-launchpresentation/main.qml create mode 100644 basicsuite/qt5-launchpresentation/main_hifi.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/.DS_Store create mode 100644 basicsuite/qt5-launchpresentation/maroon/Maroon.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/BuildButton.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/GameCanvas.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/GameOverScreen.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/InfoBar.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/NewGameScreen.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/SoundEffect.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/audio/bomb-action.wav create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/audio/catch-action.wav create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/audio/catch.wav create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/audio/currency.wav create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/audio/factory-action.wav create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/audio/melee-action.wav create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/audio/projectile-action.wav create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/audio/shooter-action.wav create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/background.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb-action.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb-idle.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/button-help.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/button-play.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/catch-action.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/catch.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/cloud.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/currency.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-bomb.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-factory.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-melee.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-pointer.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-shooter.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/factory-action.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/factory-idle.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/factory.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/grid.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/help.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/lifes.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/logo-bubble.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/logo-fish.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/logo.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/melee-action.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/melee-idle.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/melee.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/mob-idle.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/mob.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/points.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/projectile-action.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/projectile.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/scores.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter-action.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter-idle.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/sunlight.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/text-1.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/text-2.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/text-3.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/text-blank.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/text-gameover.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/text-go.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/gfx/wave.png create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/logic.js create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/mobs/MobBase.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/towers/Bomb.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/towers/Factory.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/towers/Melee.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/towers/Ranged.qml create mode 100644 basicsuite/qt5-launchpresentation/maroon/content/towers/TowerBase.qml create mode 100644 basicsuite/qt5-launchpresentation/particles/customemitter.qml create mode 100644 basicsuite/qt5-launchpresentation/particles/emitmask.qml create mode 100644 basicsuite/qt5-launchpresentation/particles/particle.png create mode 100644 basicsuite/qt5-launchpresentation/particles/particle4.png create mode 100644 basicsuite/qt5-launchpresentation/particles/star.png create mode 100644 basicsuite/qt5-launchpresentation/particles/starfish_mask.png create mode 100644 basicsuite/qt5-launchpresentation/particles/velocityfrommotion.qml create mode 100644 basicsuite/qt5-launchpresentation/presentation/Clock.qml create mode 100644 basicsuite/qt5-launchpresentation/presentation/CodeSlide.qml create mode 100644 basicsuite/qt5-launchpresentation/presentation/Presentation.qml create mode 100644 basicsuite/qt5-launchpresentation/presentation/Slide.qml create mode 100644 basicsuite/qt5-launchpresentation/presentation/SlideCounter.qml create mode 100644 basicsuite/qt5-launchpresentation/preview_l.jpg create mode 100644 basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro create mode 100644 basicsuite/qt5-launchpresentation/samegame/.DS_Store create mode 100644 basicsuite/qt5-launchpresentation/samegame/Samegame.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/Block.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/BlockEmitter.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/Button.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/GameArea.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/LogoAnimation.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/MenuEmitter.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/PaintEmitter.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/PrimaryPack.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/PuzzleBlock.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/SamegameText.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/SimpleBlock.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/SmokeText.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/background-puzzle.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/background.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/bar.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/blue-puzzle.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/blue.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/bubble-highscore.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/bubble-puzzle.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/but-game-1.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/but-game-2.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/but-game-3.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/but-game-4.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/but-game-new.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/but-menu.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/but-puzzle-next.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/but-quit.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/green-puzzle.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/green.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/icon-fail.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/icon-ok.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/icon-time.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/logo-a.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/logo-e.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/logo-g.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/logo-m.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/logo-s.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/logo.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/particle-brick.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/particle-paint.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/particle-smoke.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/red-puzzle.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/red.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/text-highscore-new.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/text-highscore.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/text-no-winner.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/text-p1-go.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/text-p1-won.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/text-p1.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/text-p2-go.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/text-p2-won.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/text-p2.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/yellow-puzzle.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/gfx/yellow.png create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/TemplateBase.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/level0.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/level1.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/level2.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/level3.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/level4.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/level5.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/level6.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/level7.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/level8.qml create mode 100644 basicsuite/qt5-launchpresentation/samegame/content/levels/level9.qml create mode 100755 basicsuite/qt5-launchpresentation/samegame/content/samegame.js create mode 100644 basicsuite/qt5-launchpresentation/samegame/settings.js create mode 100644 basicsuite/qt5-launchpresentation/title.txt create mode 100644 basicsuite/qt5-particlesdemo/content/burstandpulse.qml create mode 100644 basicsuite/qt5-particlesdemo/content/customemitter.qml create mode 100644 basicsuite/qt5-particlesdemo/content/emitmask.qml create mode 100644 basicsuite/qt5-particlesdemo/content/maximumemitted.qml create mode 100644 basicsuite/qt5-particlesdemo/content/shapeanddirection.qml create mode 100644 basicsuite/qt5-particlesdemo/content/trailemitter.qml create mode 100644 basicsuite/qt5-particlesdemo/content/velocityfrommotion.qml create mode 100644 basicsuite/qt5-particlesdemo/description.txt create mode 100644 basicsuite/qt5-particlesdemo/doc/images/qml-emitters-example.png create mode 100644 basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc create mode 100644 basicsuite/qt5-particlesdemo/emitters.pro create mode 100644 basicsuite/qt5-particlesdemo/emitters.qmlproject create mode 100644 basicsuite/qt5-particlesdemo/emitters.qrc create mode 100644 basicsuite/qt5-particlesdemo/images/_explo.png create mode 100755 basicsuite/qt5-particlesdemo/images/backgroundLeaves.jpg create mode 100644 basicsuite/qt5-particlesdemo/images/bear_tiles.png create mode 100644 basicsuite/qt5-particlesdemo/images/candle.png create mode 100644 basicsuite/qt5-particlesdemo/images/colortable.png create mode 100644 basicsuite/qt5-particlesdemo/images/finalfrontier.png create mode 100644 basicsuite/qt5-particlesdemo/images/flower.png create mode 100644 basicsuite/qt5-particlesdemo/images/matchmask.png create mode 100644 basicsuite/qt5-particlesdemo/images/meteor.png create mode 100644 basicsuite/qt5-particlesdemo/images/meteor_explo.png create mode 100644 basicsuite/qt5-particlesdemo/images/meteors.png create mode 100644 basicsuite/qt5-particlesdemo/images/nullRock.png create mode 100644 basicsuite/qt5-particlesdemo/images/particle.png create mode 100644 basicsuite/qt5-particlesdemo/images/particle2.png create mode 100644 basicsuite/qt5-particlesdemo/images/particle3.png create mode 100644 basicsuite/qt5-particlesdemo/images/particle4.png create mode 100644 basicsuite/qt5-particlesdemo/images/particleA.png create mode 100644 basicsuite/qt5-particlesdemo/images/portal_bg.png create mode 100644 basicsuite/qt5-particlesdemo/images/realLeaf1.png create mode 100644 basicsuite/qt5-particlesdemo/images/realLeaf2.png create mode 100644 basicsuite/qt5-particlesdemo/images/realLeaf3.png create mode 100644 basicsuite/qt5-particlesdemo/images/realLeaf4.png create mode 100644 basicsuite/qt5-particlesdemo/images/rocket.png create mode 100644 basicsuite/qt5-particlesdemo/images/rocket2.png create mode 100644 basicsuite/qt5-particlesdemo/images/sizeInOut.png create mode 100644 basicsuite/qt5-particlesdemo/images/snowflake.png create mode 100644 basicsuite/qt5-particlesdemo/images/sparkleSize.png create mode 100644 basicsuite/qt5-particlesdemo/images/star.png create mode 100644 basicsuite/qt5-particlesdemo/images/starfish_0.png create mode 100644 basicsuite/qt5-particlesdemo/images/starfish_1.png create mode 100644 basicsuite/qt5-particlesdemo/images/starfish_2.png create mode 100644 basicsuite/qt5-particlesdemo/images/starfish_3.png create mode 100644 basicsuite/qt5-particlesdemo/images/starfish_4.png create mode 100644 basicsuite/qt5-particlesdemo/images/starfish_mask.png create mode 100644 basicsuite/qt5-particlesdemo/main.cpp create mode 100644 basicsuite/qt5-particlesdemo/main.qml create mode 100644 basicsuite/qt5-particlesdemo/preview_l.jpg create mode 100644 basicsuite/qt5-particlesdemo/qt5-particlesdemo.pro create mode 100644 basicsuite/qt5-particlesdemo/shared/Button.qml create mode 100644 basicsuite/qt5-particlesdemo/shared/LauncherList.qml create mode 100644 basicsuite/qt5-particlesdemo/shared/README create mode 100644 basicsuite/qt5-particlesdemo/shared/SimpleLauncherDelegate.qml create mode 100644 basicsuite/qt5-particlesdemo/shared/images/back.png create mode 100644 basicsuite/qt5-particlesdemo/shared/images/next.png create mode 100644 basicsuite/qt5-particlesdemo/shared/qmldir create mode 100644 basicsuite/qt5-particlesdemo/shared/quick_shared.qrc create mode 100644 basicsuite/qt5-particlesdemo/shared/shared.h create mode 100644 basicsuite/qt5-particlesdemo/shared/shared.qrc create mode 100644 basicsuite/qt5-particlesdemo/title.txt create mode 100644 basicsuite/sensorexplorer/app.pro create mode 100644 basicsuite/sensorexplorer/description.txt create mode 100644 basicsuite/sensorexplorer/doc/src/sensor_explorer.qdoc create mode 100644 basicsuite/sensorexplorer/imports/explorer.cpp create mode 100644 basicsuite/sensorexplorer/imports/explorer.h create mode 100644 basicsuite/sensorexplorer/imports/imports.pro create mode 100644 basicsuite/sensorexplorer/imports/main.cpp create mode 100644 basicsuite/sensorexplorer/imports/plugin.json create mode 100644 basicsuite/sensorexplorer/imports/propertyinfo.cpp create mode 100644 basicsuite/sensorexplorer/imports/propertyinfo.h create mode 100644 basicsuite/sensorexplorer/imports/qmldir create mode 100644 basicsuite/sensorexplorer/imports/sensoritem.cpp create mode 100644 basicsuite/sensorexplorer/imports/sensoritem.h create mode 100644 basicsuite/sensorexplorer/main.qml create mode 100644 basicsuite/sensorexplorer/preview_l.jpg create mode 100644 basicsuite/sensorexplorer/sensorexplorer.pro create mode 100644 basicsuite/sensorexplorer/title.txt create mode 100644 basicsuite/sensors/1.png create mode 100644 basicsuite/sensors/2.png create mode 100644 basicsuite/sensors/3.png create mode 100644 basicsuite/sensors/Accelbubble.qml create mode 100644 basicsuite/sensors/Light.qml create mode 100644 basicsuite/sensors/bluebubble.png create mode 100644 basicsuite/sensors/description.txt create mode 100644 basicsuite/sensors/main.qml create mode 100644 basicsuite/sensors/preview_l.jpg create mode 100644 basicsuite/sensors/sensors.pro create mode 100644 basicsuite/sensors/title.txt create mode 100644 basicsuite/shared/engine.cpp create mode 100644 basicsuite/shared/engine.h create mode 100644 basicsuite/shared/main.cpp create mode 100644 basicsuite/shared/shared.pri create mode 100644 basicsuite/textinput/ScrollBar.qml create mode 100644 basicsuite/textinput/TextArea.qml create mode 100644 basicsuite/textinput/TextBase.qml create mode 100644 basicsuite/textinput/TextField.qml create mode 100644 basicsuite/textinput/description.txt create mode 100644 basicsuite/textinput/main.qml create mode 100644 basicsuite/textinput/preview_l.jpg create mode 100644 basicsuite/textinput/textinput.pro create mode 100644 basicsuite/textinput/title.txt diff --git a/basicsuite/About Boot to Qt/About Boot to Qt.qmlproject b/basicsuite/About Boot to Qt/About Boot to Qt.qmlproject deleted file mode 100644 index 4d32f75..0000000 --- a/basicsuite/About Boot to Qt/About Boot to Qt.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/About Boot to Qt/AboutBoot2Qt.qml b/basicsuite/About Boot to Qt/AboutBoot2Qt.qml deleted file mode 100644 index b97ac3b..0000000 --- a/basicsuite/About Boot to Qt/AboutBoot2Qt.qml +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Column { - - id: root - - width: parent.width - - spacing: engine.smallFontSize() - - Title { - id: title - text: "Boot to Qt" - } - - ContentText { - id: brief - width: parent.width - text: '

    Boot to Qt is a light-weight UI stack for embedded systems, based on the Qt Framework by Digia, - offering an elegant means of developing beautiful and performant embedded devices. It supports two different - operating systems: -

      -
    • Boot to Qt for embedded Android places Qt on top of an Android (version 4.1 or higher) - kernel/baselayer.
    • -
    • Boot to Qt for embedded Linux places Qt on top of an Linux kernel/baselayer, built using - Yocto 1.4 \'Dylan\' release.
    • -
    - Both versions have been tested and verified on a number of different hardware configurations. - Boot to Qt support is not limited to the devices used as reference platforms, it can be made to run on a - variety of hardware. - -

    Boot to Qt is part of a commercial-only SDK offering which includes a ready-made stack - with full Qt Creator integration. The SDK allows building and running on device - with just a button. Embedded development has never been this easy!' - } - - Column { - id: diagram - spacing: 1 - width: parent.width * 0.5 - anchors.horizontalCenter: parent.horizontalCenter - Box { text: "Application"; accentColor: "coral" } - Box { text: "Qt Framework"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } - Box { text: "Android/Linux Baselayer"; accentColor: "steelblue" } - Box { text: "Embedded Hardware"; accentColor: "steelblue"} - } - - ContentText { - id: description - - width: parent.width - - text: '

    Boot to Qt has been tested and verified on - a number of different hardware configurations, including: -

      -
    • Google Nexus 7 - NVIDIA Tegra3 Quad Core, 1 GB RAM
    • -
    • Beagle Board xM - ARM Coretex A8 1GHz, 512 MB RAM, PowerVR SGX 530
    • -
    • Freescale i.MX 6 - ARM Cortex A9 1.2GHz, 1 GB RAM, Vivante GC2000
    • -
    - Rough minimal requirements for running Boot to Qt are: -
      -
    • 256Mb of RAM
    • -
    • 500Mhz CPU, 1Ghz preferred for 60 FPS velvet UIs
    • -
    • OpenGL ES 2.0 support
    • -
    • Android 4.0+ compatible hardware
    • -
    - ' - } -} diff --git a/basicsuite/About Boot to Qt/Box.qml b/basicsuite/About Boot to Qt/Box.qml deleted file mode 100644 index 283ed9f..0000000 --- a/basicsuite/About Boot to Qt/Box.qml +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: root - - width: parent.width - height: label.font.pixelSize * 3 - - radius: 4 - - antialiasing: true - - property alias text: label.text; - - property color accentColor: "palegreen" - - gradient: Gradient { - GradientStop { position: 0; color: root.accentColor; } - GradientStop { position: 1; color: "black"; } - } - - Text { - id: label - font.pixelSize: engine.smallFontSize() - font.bold: true; - color: "white" - anchors.centerIn: parent - } - -} diff --git a/basicsuite/About Boot to Qt/ContentText.qml b/basicsuite/About Boot to Qt/ContentText.qml deleted file mode 100644 index 55d3e36..0000000 --- a/basicsuite/About Boot to Qt/ContentText.qml +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Text { - color: "white" - font.pixelSize: engine.smallFontSize() - textFormat: Text.RichText - wrapMode: Text.WordWrap -} diff --git a/basicsuite/About Boot to Qt/QtForAndroid.qml b/basicsuite/About Boot to Qt/QtForAndroid.qml deleted file mode 100644 index 9c1aa38..0000000 --- a/basicsuite/About Boot to Qt/QtForAndroid.qml +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Column { - id: root - - width: parent.width - - spacing: engine.smallFontSize() - - Title { - text: "Boot to Qt vs Qt for Android" - } - - ContentText { - width: parent.width - text: '

    Qt for Android is a port of the Qt Framework to be used - for application development on the Android platform. Its - purpose is to enable development of applications that - can run on Android devices. For developers writing applications - for the Android ecosystem, Qt for Android is the right choice. - -

    Boot to Qt for embedded Android tries to strip down - the Android stack to the bare minimum, relying only on basic Linux features. - The majority of the Android stack, such as Dalvik virtual machine is - not running in Boot to Qt, resulting in faster startup times, lower memory consumption - and overall better performance.' - } - - Column { - id: diagram - spacing: 1 - width: parent.width * 0.66 - anchors.horizontalCenter: parent.horizontalCenter - Box { text: "Application"; accentColor: "coral" } - Box { text: "Qt for Android"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } - Row { - width: parent.width - height: b.height - Box { id: b; width: parent.width / 2; text: "Qt Framework"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } - Box { width: parent.width / 2; text: "Android (Dalvik)"; accentColor: "steelblue" } - } - - Box { text: "Android Baselayer"; accentColor: "steelblue" } - Box { text: "Embedded Hardware"; accentColor: "steelblue"} - } - - ContentText { - width: parent.width - text: '

    Boot to Qt for embedded Linux is build from scratch using - Yocto 1.4 tools to contain only components required in the embedded device, - resulting in smaller image sizes while keeping valuable development tools available.' - } -} diff --git a/basicsuite/About Boot to Qt/QtFramework.qml b/basicsuite/About Boot to Qt/QtFramework.qml deleted file mode 100644 index 7085469..0000000 --- a/basicsuite/About Boot to Qt/QtFramework.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Column { - id: root - - width: parent.width - - spacing: engine.smallFontSize() - - Title { - text: "Qt Framework" - } - - ContentText { - id: brief - width: parent.width - text: '

    Qt is a full development framework with tools designed to streamline - the creation of applications and user interfaces for desktop, embedded - and mobile platforms. -

      -
    • Qt Framework - intuitive APIs for C++ and CSS/JavaScript-like - programming with Qt Quick for rapid UI creation<\li> -
    • Qt Creator IDE - powerful cross-platform integrated - development environment, including UI designer tools and on-device debugging
    • -
    • Tools and toolchains - internationalization support, embedded toolchains - and more.
    • -
    -

    With Qt, you can reuse code efficiently to target multiple platforms - with one code base. The modular C++ class library and developer tools - easily enables developers to create applications for one platform and - easily build and run to deploy on another platform.' - } - - -} diff --git a/basicsuite/About Boot to Qt/Title.qml b/basicsuite/About Boot to Qt/Title.qml deleted file mode 100644 index 62d0ba7..0000000 --- a/basicsuite/About Boot to Qt/Title.qml +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Text { - font.pixelSize: engine.titleFontSize() - font.italic: true - color: "white" - anchors.horizontalCenter: parent.horizontalCenter -} diff --git a/basicsuite/About Boot to Qt/codeless.png b/basicsuite/About Boot to Qt/codeless.png deleted file mode 100644 index 53e4806..0000000 Binary files a/basicsuite/About Boot to Qt/codeless.png and /dev/null differ diff --git a/basicsuite/About Boot to Qt/description.txt b/basicsuite/About Boot to Qt/description.txt deleted file mode 100644 index 676a166..0000000 --- a/basicsuite/About Boot to Qt/description.txt +++ /dev/null @@ -1,3 +0,0 @@ -The "About Boot to Qt" provides an introduction to what Boot to Qt is all about. - -It talks briefly about how the software stack is built up, rough hardware requirements and how Boot to Qt differs from the more traditional Qt editions. diff --git a/basicsuite/About Boot to Qt/main.qml b/basicsuite/About Boot to Qt/main.qml deleted file mode 100644 index ba726d5..0000000 --- a/basicsuite/About Boot to Qt/main.qml +++ /dev/null @@ -1,175 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: root - - width: 1280 - height: 800 - -// Rectangle { -// anchors.fill: parent -// color: "black" -// } - - Flickable { - id: flick - property real inertia: 0.4 - - property real cellWidth; - property real cellHeight; - - width: parent.width - height: parent.height - anchors.horizontalCenter: parent.horizontalCenter - - contentHeight: content.height - - flickableDirection: Flickable.VerticalFlick - - property real topOvershoot: Math.max(0, contentItem.y); - property real bottomOvershoot: Math.max(0, root.height - (contentItem.height + contentItem.y)); -// onTopOvershootChanged: print("Top Overshoot:", topOvershoot); -// onBottomOvershootChanged: print("Bottom Overshoot:", bottomOvershoot); - - Item { - id: shiftTrickery - - width: flick.width - height: content.height - - Column { - id: content; - - y: -flick.contentItem.y + offsetY; - width: flick.width * 2 / 3 - anchors.horizontalCenter: parent.horizontalCenter - - property real offsetY: 0; - property real inertia: flick.inertia; - property real t; - NumberAnimation on t { - id: animation; - from: 0; - to: 1; - duration: 1000; - loops: Animation.Infinite - running: Math.abs(content.y) > 0.001 || Math.abs(content.x) > 0.001 - } - - onTChanged: { - offsetY += (flick.contentItem.y - offsetY) * inertia - } - - - spacing: engine.smallFontSize() * 2 - - Item { width: 1; height: engine.smallFontSize() } - AboutBoot2Qt { } - QtFramework { } - QtForAndroid { } - Image { - id: codeLessImage - source: "codeless.png" - anchors.horizontalCenter: parent.horizontalCenter - } - Item { width: 1; height: engine.smallFontSize() } - } - - } - } - - ParticleSystem { - - anchors.fill: parent - - ImageParticle { - id: imageParticle - source: "particle.png" - color: "#80c342" - alpha: 0 - colorVariation: 0.3 - entryEffect: ImageParticle.None - } - - Emitter { - id: topEmitter - width: root.width - height: 1 - x: 0 - y: -1 - shape: EllipseShape { fill: true } - - emitRate: 300 - lifeSpan: 1000 - size: 20 - sizeVariation: 4 - endSize: 0 - - enabled: flick.topOvershoot > 0 - - velocity: PointDirection { xVariation: 10; yVariation: 50; y: Math.sqrt(flick.topOvershoot) * 10; } - acceleration: PointDirection { y: 50 } - } - - Emitter { - id: bottomEmitter - width: root.width - height: 1 - x: 0 - y: root.height + 1 - shape: EllipseShape { fill: true } - - emitRate: 300 - lifeSpan: 1000 - size: 20 - sizeVariation: 4 - endSize: 0 - - enabled: flick.bottomOvershoot > 0 - - velocity: PointDirection { xVariation: 10; yVariation: -50; y: Math.sqrt(flick.bottomOvershoot) * -10; } - acceleration: PointDirection { y: -50 } - } - } -} diff --git a/basicsuite/About Boot to Qt/particle.png b/basicsuite/About Boot to Qt/particle.png deleted file mode 100644 index 5c83896..0000000 Binary files a/basicsuite/About Boot to Qt/particle.png and /dev/null differ diff --git a/basicsuite/About Boot to Qt/preview_l.jpg b/basicsuite/About Boot to Qt/preview_l.jpg deleted file mode 100644 index f2eb2e0..0000000 Binary files a/basicsuite/About Boot to Qt/preview_l.jpg and /dev/null differ diff --git a/basicsuite/About Boot to Qt/qt-logo.png b/basicsuite/About Boot to Qt/qt-logo.png deleted file mode 100644 index 748392d..0000000 Binary files a/basicsuite/About Boot to Qt/qt-logo.png and /dev/null differ diff --git a/basicsuite/Camera/Camera.pro b/basicsuite/Camera/Camera.pro deleted file mode 100644 index d8e46c6..0000000 --- a/basicsuite/Camera/Camera.pro +++ /dev/null @@ -1,4 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS += \ - camerautils - diff --git a/basicsuite/Camera/CameraControlButton.qml b/basicsuite/Camera/CameraControlButton.qml deleted file mode 100644 index a740be7..0000000 --- a/basicsuite/Camera/CameraControlButton.qml +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -MouseArea { - id: buttonRoot - property alias title: titleTxt.text - property alias subtitle: valueTxt.text - property bool toggled: false - - width: 78 * root.contentScale - height: 78 * root.contentScale - opacity: pressed ? 0.3 : 1.0 - rotation: root.contentRotation - Behavior on rotation { NumberAnimation { } } - - Rectangle { - anchors.fill: parent - color: toggled ? "#8898c66c" : "#77333333" - radius: 5 * root.contentScale - } - - Column { - id: expModeControls - spacing: 2 * root.contentScale - anchors.centerIn: parent - - Text { - id: titleTxt - anchors.horizontalCenter: expModeControls.horizontalCenter - font.pixelSize: 22 * root.contentScale - font.letterSpacing: -1 - color: "white" - font.bold: true - } - - Text { - id: valueTxt - anchors.horizontalCenter: expModeControls.horizontalCenter - height: 22 * root.contentScale - verticalAlignment: Text.AlignVCenter - color: "white" - - Connections { - target: root - onContentScaleChanged: valueTxt.font.pixelSize = Math.round(18 * root.contentScale) - } - - onTextChanged: font.pixelSize = Math.round(18 * root.contentScale) - onPaintedWidthChanged: { - if (paintedWidth > buttonRoot.width - (8 * root.contentScale)) - font.pixelSize -= Math.round(2 * root.contentScale); - } - } - } -} diff --git a/basicsuite/Camera/CameraSetting.qml b/basicsuite/Camera/CameraSetting.qml deleted file mode 100644 index 0912c38..0000000 --- a/basicsuite/Camera/CameraSetting.qml +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Item { - width: button.width - height: button.height - visible: enabled && picker.count > 1 - - property alias title: button.title - property alias selectedValue: picker.value - property alias currentIndex: picker.currentIndex - property alias model: picker.model - property alias count: picker.count - - CameraControlButton { - id: button - anchors.centerIn: parent - - subtitle: picker.name - toggled: picker.visible - - onClicked: picker.visible = true - } - - Picker { - id: picker - } - -} diff --git a/basicsuite/Camera/CaptureControl.qml b/basicsuite/Camera/CaptureControl.qml deleted file mode 100644 index 7d09151..0000000 --- a/basicsuite/Camera/CaptureControl.qml +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtMultimedia 5.0 - -Rectangle { - id: controlRoot - - signal clicked - - property bool videoMode: camera.captureMode === Camera.CaptureVideo - - width: 180 * root.contentScale - height: width - radius: width / 2 - color: mouser.pressed ? (controlRoot.videoMode ? "#77fa334f" : "#7798c66c") : "#77333333" - visible: enabled - - Rectangle { - id: center - anchors.centerIn: parent - width: parent.width * 0.45 - height: width - radius: width / 2 - opacity: mouser.pressed ? 0.7 : 1 - color: controlRoot.videoMode ? "#fa334f" : "#98c66c" - } - - Rectangle { - anchors.centerIn: parent - color: "white" - visible: camera.videoRecorder.recorderStatus === CameraRecorder.RecordingStatus - width: center.width * 0.3 - height: width - } - - MouseArea { - id: mouser - anchors.fill: parent - onClicked: controlRoot.clicked() - } -} diff --git a/basicsuite/Camera/CapturePreview.qml b/basicsuite/Camera/CapturePreview.qml deleted file mode 100644 index 64c5f79..0000000 --- a/basicsuite/Camera/CapturePreview.qml +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: root - anchors.fill: parent - color: "black" - opacity: 0 - enabled: opacity !== 0 - - property string previewSrc: "" - - onOpacityChanged: { - if (opacity === 1 && previewSrc !== "") { - previewImage.source = previewSrc; - previewSrc = ""; - } - } - - Behavior on opacity { NumberAnimation { duration: 100 } } - - function show() { - previewImage.source = ""; - opacity = 1; - } - - function setPreview(preview) { - if (root.opacity === 1) - previewImage.source = preview; - else - root.previewSrc = preview; - } - - Image { - id: previewImage - anchors.fill: parent - fillMode: Image.PreserveAspectFit - } - - MouseArea { - anchors.fill: parent - onClicked: { - root.opacity = 0; - } - } -} diff --git a/basicsuite/Camera/Controls.qml b/basicsuite/Camera/Controls.qml deleted file mode 100644 index bd0db07..0000000 --- a/basicsuite/Camera/Controls.qml +++ /dev/null @@ -1,199 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtMultimedia 5.0 - -Item { - id: controlsRoot - anchors.fill: parent - -// property alias cameraMode: cameraModeControl.selectedValue - - property alias requestedZoom: zoomControl.requestedZoom - property alias actualZoom: zoomControl.actualZoom - property alias maximumZoom: zoomControl.maximumZoom - - property alias flashMode: flashControl.selectedValue - property alias focusMode: focusModeControl.selectedValue - property alias exposureMode: expModeControl.selectedValue - property alias exposureCompensation: expCompControl.selectedValue - property alias whiteBalanceMode: wbControl.selectedValue - property alias resolution: resControl.selectedValue - - property bool captureReady: false - - signal capture - signal searchAndLock - - FocusControl { - id: focusControl - anchors.fill: parent - onSearchAndLock: controlsRoot.searchAndLock() - enabled: camera.captureMode === Camera.CaptureStillImage - } - - ZoomControl { - id: zoomControl - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: 50 - } - -// CameraSetting { -// id: cameraModeControl -// anchors.right: parent.right -// anchors.rightMargin: 20 -// anchors.bottom: parent.bottom -// anchors.bottomMargin: 20 -// title: "MODE" -// model: ListModel { -// ListElement { -// name: "Picture" -// value: Camera.CaptureStillImage -// } -// ListElement { -// name: "Video" -// value: Camera.CaptureVideo -// } -// } -// onCountChanged: currentIndex = 0 -// enabled: controlsRoot.captureReady -// } - - RecordingTime { - anchors.right: parent.right - anchors.rightMargin: 40 - anchors.bottom: parent.bottom - anchors.bottomMargin: 60 * root.contentScale - visible: camera.videoRecorder.recorderStatus === CameraRecorder.RecordingStatus - } - - Row { - anchors.left: parent.left - anchors.leftMargin: 20 - anchors.top: parent.top - anchors.topMargin: 20 - height: 84 - spacing: 20 - - CameraSetting { - id: flashControl - title: "FLASH" - model: cameraUtils.supportedFlashModes - } - - CameraSetting { - id: focusModeControl - title: "FOCUS" - model: cameraUtils.supportedFocusModes - enabled: camera.captureMode === Camera.CaptureStillImage - } - - CameraSetting { - id: expModeControl - title: "SCENE" - model: cameraUtils.supportedSceneModes - } - - CameraSetting { - id: expCompControl - title: "EV" - model: ListModel { - ListElement { - name: "+2" - value: 2 - } - ListElement { - name: "+1" - value: 1 - } - ListElement { - name: "0" - value: 0 - } - ListElement { - name: "-1" - value: -1 - } - ListElement { - name: "-2" - value: -2 - } - } - } - - CameraSetting { - id: wbControl - title: "WB" - model: cameraUtils.supportedWhiteBalanceModes - } - - CameraSetting { - id: resControl - title: "SIZE" - model: cameraUtils.supportedCaptureResolutions -// onCountChanged: currentIndex = 1 - - Component.onCompleted: currentIndex = 1 - - Connections { - target: camera - onCaptureModeChanged: { - if (camera.captureMode === Camera.CaptureStillImage) { - resControl.model = cameraUtils.supportedCaptureResolutions; - } else { - resControl.model = cameraUtils.supportedVideoResolutions; - } - } - } - } - } - - CaptureControl { - id: captureControl - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: -30 - enabled: controlsRoot.captureReady || camera.videoRecorder.recorderStatus === CameraRecorder.RecordingStatus - - onClicked: controlsRoot.capture() - } -} diff --git a/basicsuite/Camera/FocusControl.qml b/basicsuite/Camera/FocusControl.qml deleted file mode 100644 index 5245cfe..0000000 --- a/basicsuite/Camera/FocusControl.qml +++ /dev/null @@ -1,151 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtMultimedia 5.0 - -MouseArea { - id: focusRoot - - signal searchAndLock - - onClicked: { - camera.focus.focusPointMode = Camera.FocusPointCustom - camera.focus.customFocusPoint = viewfinder.mapPointToSourceNormalized(Qt.point(mouse.x, mouse.y)) - focusRoot.searchAndLock() - } - - Item { - id: zones - anchors.fill: parent - - property color focusAreaColor - property real focusAreaScale: 1 - - Repeater { - model: camera.focus.focusZones - - Rectangle { - border { - width: Math.round(2 * root.contentScale) - color: zones.focusAreaColor - } - radius: 8 * root.contentScale - color: "transparent" - scale: zones.focusAreaScale - - // Map from the relative, normalized frame coordinates - property rect mappedRect: viewfinder.mapNormalizedRectToItem(area); - - Connections { - target: viewfinder - onContentRectChanged: { - mappedRect = viewfinder.mapNormalizedRectToItem(area); - } - } - - x: mappedRect.x - (width - mappedRect.width) / 2 - y: mappedRect.y - (height - mappedRect.height) / 2 - width: Math.round(120 * root.contentScale) - height: width - - Rectangle { - anchors.fill: parent - anchors.margins: -1.5 - color: "transparent" - border.width: 1 - border.color: "black" - radius: parent.radius + 2 - } - - Rectangle { - anchors.fill: parent - anchors.margins: 1 + parent.border.width / 2 + 0.5 - color: "transparent" - border.width: 1 - border.color: "black" - radius: parent.radius - 3 - } - } - } - - states: [ - State { - name: "unlocked"; when: camera.lockStatus === Camera.Unlocked - PropertyChanges { target: zones; opacity: 0; focusAreaColor: "red" } - }, - State { - name: "searching"; when: camera.lockStatus === Camera.Searching - PropertyChanges { target: zones; opacity: 1; focusAreaColor: "white" } - }, - State { - name: "locked"; when: camera.lockStatus === Camera.Locked - PropertyChanges { target: zones; opacity: 0; focusAreaColor: "green" } - } - ] - - transitions: [ - Transition { - to: "searching" - NumberAnimation { properties: "opacity"; duration: 60 } - SequentialAnimation { - NumberAnimation { - target: zones; property: "focusAreaScale"; from: 1; to: 1.3; duration: 150 - } - PauseAnimation { duration: 20 } - NumberAnimation { - target: zones; property: "focusAreaScale"; easing.period: 1; easing.amplitude: 1.4 - easing.type: Easing.OutElastic; from: 1.3; to: 1 - duration: 450 - } - } - }, - Transition { - from: "searching" - SequentialAnimation { - PauseAnimation { duration: 1500 } - NumberAnimation { properties: "opacity"; duration: 60 } - } - } - - ] - } - -} diff --git a/basicsuite/Camera/Picker.qml b/basicsuite/Camera/Picker.qml deleted file mode 100644 index 9cbf27f..0000000 --- a/basicsuite/Camera/Picker.qml +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -MouseArea { - id: pickerRoot - - parent: root - anchors.fill: parent - - onClicked: visible = false - visible: false - - property alias contentWidth: back.width - property real contentHeight: 350 * root.contentScale - property alias model: list.model - property variant value: null - property string name: "" - property alias currentIndex: list.currentIndex - property alias count: list.count - - onValueChanged: { - for (var i = 0; i < list.count; ++i) { - var data = list.model[i]; - if (data === undefined) - data = list.model.get(i); - if (data.value === pickerRoot.value) { - list.currentIndex = i; - return; - } - } - list.currentIndex = -1; - } - - Rectangle { - id: back - color: "#77333333" - width: 200 * root.contentScale - height: Math.min(pickerRoot.contentHeight, list.contentHeight + list.anchors.margins * 2) - anchors.centerIn: parent - property int itemHeight: 25 * root.contentScale - rotation: root.contentRotation - Behavior on rotation { NumberAnimation { } } - - ListView { - id: list - anchors.fill: parent - clip: true - anchors.margins: 14 * root.contentScale - - currentIndex: -1 - - onCurrentIndexChanged: { - if (list.currentIndex >= 0) { - var data = list.model[list.currentIndex]; - if (data === undefined) - data = list.model.get(list.currentIndex); - pickerRoot.value = data.value; - pickerRoot.name = data.name; - } else { - pickerRoot.value = null - pickerRoot.name = "" - } - } - - delegate: Item { - height: 40 * root.contentScale - width: parent.width - Rectangle { - anchors.fill: parent - border.color: index == list.currentIndex ? "#44ffffff" : "transparent" - color: index == list.currentIndex ? "#22ffffff" : "transparent" - radius: 3 * root.contentScale - Text { - color: "white" - text: (typeof modelData === 'undefined' ? name : modelData.name) - anchors.centerIn: parent - font.pixelSize: Math.round(20 * root.contentScale) - } - MouseArea { - anchors.fill: parent - onClicked: { - list.currentIndex = index; - } - } - } - } - } - } -} - diff --git a/basicsuite/Camera/README b/basicsuite/Camera/README deleted file mode 100644 index e249fae..0000000 --- a/basicsuite/Camera/README +++ /dev/null @@ -1,2 +0,0 @@ -You need to compile and intall the included qml plugin for this demo to work. - diff --git a/basicsuite/Camera/RecordingTime.qml b/basicsuite/Camera/RecordingTime.qml deleted file mode 100644 index 2156b74..0000000 --- a/basicsuite/Camera/RecordingTime.qml +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: recRoot - width: row.width + 14 * root.contentScale - height: circle.height + 14 * root.contentScale - color: "#77333333" - radius: 5 * root.contentScale - rotation: root.contentRotation - Behavior on rotation { NumberAnimation { } } - - Row { - id: row - anchors.centerIn: parent - spacing: 10 * root.contentScale - - Item { - anchors.verticalCenter: timeText.verticalCenter - width: 18 * root.contentScale - height: width - - Rectangle { - id: circle - width: parent.width - height: parent.height - radius: width / 2 - color: "#fa334f" - - SequentialAnimation { - loops: Animation.Infinite - running: recRoot.visible - PropertyAction { target: circle; property: "visible"; value: true } - PauseAnimation { duration: 1000 } - PropertyAction { target: circle; property: "visible"; value: false } - PauseAnimation { duration: 1000 } - } - } - } - - Text { - id: timeText - color: "white" - font.pixelSize: 24 * root.contentScale - text: formatTime(camera.videoRecorder.duration) - } - } - - function formatTime(time) { - time = time / 1000 - var hours = Math.floor(time / 3600); - time = time - hours * 3600; - var minutes = Math.floor(time / 60); - var seconds = Math.floor(time - minutes * 60); - - if (hours > 0) - return formatTimeBlock(hours) + ":" + formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); - else - return formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); - - } - - function formatTimeBlock(time) { - if (time === 0) - return "00" - if (time < 10) - return "0" + time; - else - return time.toString(); - } -} diff --git a/basicsuite/Camera/Slider.qml b/basicsuite/Camera/Slider.qml deleted file mode 100644 index a9d3c10..0000000 --- a/basicsuite/Camera/Slider.qml +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Item { - id: slider - - height: handleBack.height - // value is read/write. - property real value: 0 - property real maximum: 1 - property real minimum: 0 - property int xMax: width - handle.width - onXMaxChanged: updatePos() - onMinimumChanged: updatePos() - onValueChanged: if (!pressed) updatePos() - property bool mutable: true - property alias pressed : backgroundMouse.pressed - - signal valueChangedByHandle(int newValue) - - function updatePos() { - if (maximum > minimum) { - var pos = 0 + (value - minimum) * slider.xMax / (maximum - minimum); - pos = Math.min(pos, width - handle.width - 0); - pos = Math.max(pos, 0); - handle.x = pos; - } else { - handle.x = 0; - } - } - - Rectangle { - id: background - width: slider.width - anchors.verticalCenter: slider.verticalCenter - height: 4 * root.contentScale - color: "#666666" - - MouseArea { - id: backgroundMouse - anchors.fill: parent - anchors.topMargin: -24 * root.contentScale - anchors.bottomMargin: -24 * root.contentScale - enabled: slider.mutable - drag.target: handle - drag.axis: Drag.XAxis - drag.minimumX: 0 - drag.maximumX: slider.xMax - onPressedChanged: { - value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); - valueChangedByHandle(value); - updatePos(); - } - onPositionChanged: { - value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); - valueChangedByHandle(value); - } - } - } - - Rectangle { - id: progress - height: 8 * root.contentScale - anchors.verticalCenter: background.verticalCenter - anchors.left: background.left - anchors.right: handle.right - anchors.rightMargin: handle.width / 2 - visible: slider.enabled - color: "#98c66c" - } - - Rectangle { - id: handleBack - width: 40 * root.contentScale - height: width - radius: width / 2 - color: "#8898c66c" - antialiasing: true - anchors.centerIn: handle - visible: handle.visible - } - - Rectangle { - id: handle - width: 14 * root.contentScale - height: width - radius: width / 2 - antialiasing: true - color: "#98c66c" - anchors.verticalCenter: background.verticalCenter - visible: slider.enabled - } -} - diff --git a/basicsuite/Camera/ZoomControl.qml b/basicsuite/Camera/ZoomControl.qml deleted file mode 100644 index 15f2875..0000000 --- a/basicsuite/Camera/ZoomControl.qml +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Column { - width: 400 * root.contentScale - spacing: 20 * root.contentScale - visible: maximumZoom > 1 - - property alias maximumZoom: zoomSlider.maximum - property alias requestedZoom: zoomSlider.value - property real actualZoom: 1 - - Rectangle { - anchors.horizontalCenter: zoomSlider.horizontalCenter - width: zoomText.width + 10 * root.contentScale - height: zoomText.height + 10 * root.contentScale - color: "#77333333" - radius: 5 * root.contentScale - rotation: root.contentRotation - Behavior on rotation { NumberAnimation { } } - - Text { - id: zoomText - anchors.centerIn: parent - font.pixelSize: Math.round(24 * root.contentScale) - color: "white" - font.bold: true - text: (Math.round(actualZoom * 100) / 100) + "x" - } - } - - Slider { - id: zoomSlider - width: parent.width - rotation: root.contentRotation === -90 ? 180 : (root.contentRotation === 90 ? 0 : root.contentRotation) - - minimum: 1 - maximum: 1 - value: 1 - } -} diff --git a/basicsuite/Camera/camerautils/camerautils.cpp b/basicsuite/Camera/camerautils/camerautils.cpp deleted file mode 100644 index f6b6672..0000000 --- a/basicsuite/Camera/camerautils/camerautils.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include "camerautils.h" - -#include -#include -#include -#include -#include -#include - -static QList g_commonResolutions; -static QList g_commonVideoResolutions; -static QList g_whiteBalanceModes; -static QList g_sceneModes; -static QList g_flashModes; -static QList g_focusModes; - -QDebug operator<<(QDebug dbg, const CameraSettingsValue &r) { - dbg.nospace() << "CameraSettingsValue(" << r.name() << ", " << r.value() << ')'; - return dbg.space(); -} - -CameraUtils::CameraUtils(QObject *parent) - : QObject(parent) - , m_camera(0) -{ - if (g_commonResolutions.isEmpty()) { - g_commonResolutions << new CameraSettingsValue(QStringLiteral("QVGA"), QSize(320, 240)) - << new CameraSettingsValue(QStringLiteral("0.3M"), QSize(640, 480)) - << new CameraSettingsValue(QStringLiteral("0.8M"), QSize(1024, 768)) - << new CameraSettingsValue(QStringLiteral("1.2M"), QSize(1280, 960)) - << new CameraSettingsValue(QStringLiteral("2M"), QSize(1600, 1200)) - << new CameraSettingsValue(QStringLiteral("5M"), QSize(2560, 1920)) - << new CameraSettingsValue(QStringLiteral("8M"), QSize(3264, 2448)); - - g_commonVideoResolutions << new CameraSettingsValue(QStringLiteral("1080p (16:9)"), QSize(1920, 1080)) - << new CameraSettingsValue(QStringLiteral("1080p (16:9)"), QSize(1920, 1088)) - << new CameraSettingsValue(QStringLiteral("1080p (4:3)"), QSize(1440, 1080)) - << new CameraSettingsValue(QStringLiteral("1080p (4:3)"), QSize(1440, 1088)) - << new CameraSettingsValue(QStringLiteral("720p (16:9)"), QSize(1280, 720)) - << new CameraSettingsValue(QStringLiteral("720p (4:3)"), QSize(960, 720)) - << new CameraSettingsValue(QStringLiteral("480p (16:9)"), QSize(720, 480)) - << new CameraSettingsValue(QStringLiteral("480p (4:3)"), QSize(640, 480)) - << new CameraSettingsValue(QStringLiteral("QVGA"), QSize(320, 240)); - - g_whiteBalanceModes << new CameraSettingsValue(QStringLiteral("Auto"), QCameraImageProcessing::WhiteBalanceAuto) - << new CameraSettingsValue(QStringLiteral("Manual"), QCameraImageProcessing::WhiteBalanceManual) - << new CameraSettingsValue(QStringLiteral("Sunlight"), QCameraImageProcessing::WhiteBalanceSunlight) - << new CameraSettingsValue(QStringLiteral("Cloudy"), QCameraImageProcessing::WhiteBalanceCloudy) - << new CameraSettingsValue(QStringLiteral("Shade"), QCameraImageProcessing::WhiteBalanceShade) - << new CameraSettingsValue(QStringLiteral("Tungsten"), QCameraImageProcessing::WhiteBalanceTungsten) - << new CameraSettingsValue(QStringLiteral("Fluorescent"), QCameraImageProcessing::WhiteBalanceFluorescent) - << new CameraSettingsValue(QStringLiteral("Flash"), QCameraImageProcessing::WhiteBalanceFlash) - << new CameraSettingsValue(QStringLiteral("Sunset"), QCameraImageProcessing::WhiteBalanceSunset); - - g_sceneModes << new CameraSettingsValue(QStringLiteral("Auto"), QCameraExposure::ExposureAuto) - << new CameraSettingsValue(QStringLiteral("Manual"), QCameraExposure::ExposureManual) - << new CameraSettingsValue(QStringLiteral("Portrait"), QCameraExposure::ExposurePortrait) - << new CameraSettingsValue(QStringLiteral("Night"), QCameraExposure::ExposureNight) - << new CameraSettingsValue(QStringLiteral("Backlight"), QCameraExposure::ExposureBacklight) - << new CameraSettingsValue(QStringLiteral("Spotlight"), QCameraExposure::ExposureSpotlight) - << new CameraSettingsValue(QStringLiteral("Sports"), QCameraExposure::ExposureSports) - << new CameraSettingsValue(QStringLiteral("Snow"), QCameraExposure::ExposureSnow) - << new CameraSettingsValue(QStringLiteral("Beach"), QCameraExposure::ExposureBeach) - << new CameraSettingsValue(QStringLiteral("Large Aperture"), QCameraExposure::ExposureLargeAperture) - << new CameraSettingsValue(QStringLiteral("Small Aperture"), QCameraExposure::ExposureSmallAperture); - - g_flashModes << new CameraSettingsValue(QStringLiteral("Auto"), QCameraExposure::FlashAuto) - << new CameraSettingsValue(QStringLiteral("Off"), QCameraExposure::FlashOff) - << new CameraSettingsValue(QStringLiteral("On"), QCameraExposure::FlashOn) - << new CameraSettingsValue(QStringLiteral("Red-Eye"), QCameraExposure::FlashRedEyeReduction) - << new CameraSettingsValue(QStringLiteral("Torch"), QCameraExposure::FlashVideoLight); - - g_focusModes << new CameraSettingsValue(QStringLiteral("Auto"), QCameraFocus::AutoFocus) - << new CameraSettingsValue(QStringLiteral("Continuous"), QCameraFocus::ContinuousFocus) - << new CameraSettingsValue(QStringLiteral("Hyperfocal"), QCameraFocus::HyperfocalFocus) - << new CameraSettingsValue(QStringLiteral("Infinity"), QCameraFocus::InfinityFocus) - << new CameraSettingsValue(QStringLiteral("Macro"), QCameraFocus::MacroFocus) - << new CameraSettingsValue(QStringLiteral("Off"), QCameraFocus::ManualFocus); - } - -} - -CameraUtils::~CameraUtils() -{ -} - -void CameraUtils::init() -{ - m_camera = new QCamera; - connect(m_camera, SIGNAL(statusChanged(QCamera::Status)), this, SLOT(onCameraStatusChanged())); - connect(m_camera, SIGNAL(error(QCamera::Error)), this, SLOT(onError())); - m_camera->load(); -} - -void CameraUtils::setCamera(QObject *obj) -{ - QObject *mediaObject = qvariant_cast(obj->property("mediaObject")); - if (!mediaObject) - return; - - m_camera = qobject_cast(mediaObject); - if (!m_camera) - return; - - if (m_camera->status() >= QCamera::LoadedStatus) - onCameraStatusChanged(); - else - connect(m_camera, SIGNAL(statusChanged(QCamera::Status)), this, SLOT(onCameraStatusChanged())); -} - -void CameraUtils::onError() -{ - if (m_camera && m_camera->status() == QCamera::UnavailableStatus) { - delete m_camera; - m_camera = 0; - - emit done(); - } -} - -void CameraUtils::onCameraStatusChanged() -{ - if (!m_camera || m_camera->status() < QCamera::LoadedStatus) - return; - - disconnect(m_camera, SIGNAL(statusChanged(QCamera::Status)), this, SLOT(onCameraStatusChanged())); - - QCameraImageCapture *imageCapture = new QCameraImageCapture(m_camera); - QCameraImageProcessing *imageProc = m_camera->imageProcessing(); - QCameraExposure *exposure = m_camera->exposure(); - QCameraFocus *focus = m_camera->focus(); - QMediaRecorder rec(m_camera); - - // Supported image resolutions - QList resolutions = imageCapture->supportedResolutions(); - for (int i = resolutions.size() - 1; i >= 0; --i) { - QSize reso = resolutions.at(i); - int mp = reso.width() * reso.height(); - CameraSettingsValue *r = new CameraSettingsValue(QString::number(mp / double(1000000), 'f', 1) + QLatin1String("M"), reso); - m_supportedResolutions.append(r); - } - - // Supported video resolutions - QList suppRes = rec.supportedResolutions(); - for (int i = 0; i < g_commonVideoResolutions.size(); ++i) { - CameraSettingsValue *r = g_commonVideoResolutions.at(i); - if (suppRes.contains(r->value().toSize())) - m_supportedVideoResolutions.append(r); - } - - - // Supported white balance modes - for (int i = 0; i < g_whiteBalanceModes.size(); ++i) { - CameraSettingsValue *m = g_whiteBalanceModes.at(i); - if (imageProc->isWhiteBalanceModeSupported(QCameraImageProcessing::WhiteBalanceMode(m->value().toInt()))) - m_supportedWhiteBalanceModes.append(m); - } - - // Supported scene modes - for (int i = 0; i < g_sceneModes.size(); ++i) { - CameraSettingsValue *sm = g_sceneModes.at(i); - if (exposure->isExposureModeSupported(QCameraExposure::ExposureMode(sm->value().toInt()))) - m_supportedSceneModes.append(sm); - } - - // Supported flash modes - for (int i = 0; i < g_flashModes.size(); ++i) { - CameraSettingsValue *sm = g_flashModes.at(i); - if (exposure->isFlashModeSupported(QCameraExposure::FlashModes(sm->value().toInt()))) - m_supportedFlashModes.append(sm); - } - - // Supported focus modes - for (int i = 0; i < g_focusModes.size(); ++i) { - CameraSettingsValue *sm = g_focusModes.at(i); - if (focus->isFocusModeSupported(QCameraFocus::FocusModes(sm->value().toInt()))) - m_supportedFocusModes.append(sm); - } - - delete imageCapture; - - emit supportedCaptureResolutionsChanged(); - emit supportedVideoResolutionsChanged(); - emit supportedWhiteBalanceModesChanged(); - emit supportedSceneModesChanged(); - emit supportedFlashModesChanged(); -} - - diff --git a/basicsuite/Camera/camerautils/camerautils.h b/basicsuite/Camera/camerautils/camerautils.h deleted file mode 100644 index 1f61c7c..0000000 --- a/basicsuite/Camera/camerautils/camerautils.h +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef CAMERAUTILS_H -#define CAMERAUTILS_H - -#include -#include - -class QCamera; - -class CameraSettingsValue : public QObject -{ - Q_OBJECT - Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) - Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged) - -public: - CameraSettingsValue(const QString &n, const QVariant &v) - : QObject() - , m_name(n) - , m_value(v) - { } - - QString name() const { return m_name; } - void setName(const QString &n) { m_name = n; emit nameChanged(); } - - QVariant value() const { return m_value; } - void setValue(const QVariant &v) { m_value = v; emit valueChanged(); } - -Q_SIGNALS: - void nameChanged(); - void valueChanged(); - -private: - QString m_name; - QVariant m_value; -}; - -QDebug operator<<(QDebug, const CameraSettingsValue &); - -class CameraUtils : public QObject -{ - Q_OBJECT - Q_PROPERTY(QList supportedCaptureResolutions READ supportedCaptureResolutions NOTIFY supportedCaptureResolutionsChanged) - Q_PROPERTY(QList supportedWhiteBalanceModes READ supportedWhiteBalanceModes NOTIFY supportedWhiteBalanceModesChanged) - Q_PROPERTY(QList supportedSceneModes READ supportedSceneModes NOTIFY supportedSceneModesChanged) - Q_PROPERTY(QList supportedFlashModes READ supportedFlashModes NOTIFY supportedFlashModesChanged) - Q_PROPERTY(QList supportedFocusModes READ supportedFocusModes NOTIFY supportedFocusModesChanged) - Q_PROPERTY(QList supportedVideoResolutions READ supportedVideoResolutions NOTIFY supportedVideoResolutionsChanged) -public: - explicit CameraUtils(QObject *parent = 0); - ~CameraUtils(); - - Q_INVOKABLE void init(); - Q_INVOKABLE void setCamera(QObject *cam); - - QList supportedCaptureResolutions() const { return m_supportedResolutions; } - QList supportedVideoResolutions() const { return m_supportedVideoResolutions; } - QList supportedWhiteBalanceModes() const { return m_supportedWhiteBalanceModes; } - QList supportedSceneModes() const { return m_supportedSceneModes; } - QList supportedFlashModes() const { return m_supportedFlashModes; } - QList supportedFocusModes() const { return m_supportedFocusModes; } - -Q_SIGNALS: - void supportedCaptureResolutionsChanged(); - void supportedWhiteBalanceModesChanged(); - void supportedSceneModesChanged(); - void supportedFlashModesChanged(); - void supportedFocusModesChanged(); - void supportedVideoResolutionsChanged(); - - void done(); - -private Q_SLOTS: - void onCameraStatusChanged(); - void onError(); - -private: - QCamera *m_camera; - - QList m_supportedResolutions; - QList m_supportedVideoResolutions; - QList m_supportedWhiteBalanceModes; - QList m_supportedSceneModes; - QList m_supportedFlashModes; - QList m_supportedFocusModes; -}; - -#endif // CAMERAUTILS_H diff --git a/basicsuite/Camera/camerautils/camerautils.pro b/basicsuite/Camera/camerautils/camerautils.pro deleted file mode 100644 index 938a0a9..0000000 --- a/basicsuite/Camera/camerautils/camerautils.pro +++ /dev/null @@ -1,19 +0,0 @@ -TEMPLATE = lib -CONFIG += plugin -QT += qml multimedia - -TARGET = camerautilsplugin - -SOURCES += plugin.cpp \ - camerautils.cpp - -HEADERS += camerautils.h - -pluginfiles.files += \ - qmldir \ - -target.path += $$[QT_INSTALL_QML]/CameraUtils -pluginfiles.path += $$[QT_INSTALL_QML]/CameraUtils - -INSTALLS += target pluginfiles - diff --git a/basicsuite/Camera/camerautils/plugin.cpp b/basicsuite/Camera/camerautils/plugin.cpp deleted file mode 100644 index 2a8c3ea..0000000 --- a/basicsuite/Camera/camerautils/plugin.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - -#include "camerautils.h" - -class QExampleQmlPlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") - -public: - void registerTypes(const char *uri) - { - qmlRegisterType(uri, 1, 0, "CameraUtils"); - } -}; - - -#include "plugin.moc" diff --git a/basicsuite/Camera/camerautils/qmldir b/basicsuite/Camera/camerautils/qmldir deleted file mode 100644 index a5ab412..0000000 --- a/basicsuite/Camera/camerautils/qmldir +++ /dev/null @@ -1,2 +0,0 @@ -module CameraUtils -plugin camerautilsplugin diff --git a/basicsuite/Camera/description.txt b/basicsuite/Camera/description.txt deleted file mode 100644 index 71c3c44..0000000 --- a/basicsuite/Camera/description.txt +++ /dev/null @@ -1,5 +0,0 @@ -This example demonstrates the use of the camera features of Qt Multimedia with Qt Quick. - -Demo can be used to take pictures. Files are saved inside the /data/images/ folder and can be viewed with the "Photo Gallery" application. - -Camera parameters such as flash mode, scene mode or white balance can be changed. The availability of parameters depends on what the camera driver provides. diff --git a/basicsuite/Camera/exclude.txt b/basicsuite/Camera/exclude.txt deleted file mode 100644 index 5716448..0000000 --- a/basicsuite/Camera/exclude.txt +++ /dev/null @@ -1 +0,0 @@ -android-beagleboard:linux-iMX6:linux-raspberrypi: diff --git a/basicsuite/Camera/main.qml b/basicsuite/Camera/main.qml deleted file mode 100644 index b7437de..0000000 --- a/basicsuite/Camera/main.qml +++ /dev/null @@ -1,263 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtMultimedia 5.0 -//import QtSensors 5.0 -import CameraUtils 1.0 - -Rectangle { - id: root - color: "black" - - property real contentScale: root.width / 1280 - property int contentRotation: 0 - - Text { - anchors.centerIn: parent - color: "white" - font.pixelSize: 30 - text: "Camera service is not available..." - visible: camera.cameraStatus === Camera.UnavailableStatus - } - - CameraUtils { - id: cameraUtils - } - - Camera { - id: camera - property bool updateFocusPointMode: true - property bool captureWhenLocked: false - - Component.onCompleted: cameraUtils.setCamera(camera) - - digitalZoom: controls.requestedZoom - captureMode: Camera.CaptureStillImage - - onCaptureModeChanged: { - if (camera.captureMode === Camera.CaptureVideo) { - controls.focusMode = Camera.FocusContinuous; - camera.unlock(); - } else { - controls.focusMode = Camera.FocusAuto; - } - } - - onLockStatusChanged: { - if (camera.lockStatus === Camera.Locked && captureWhenLocked) { - camera.imageCapture.captureToLocation("/data/images/"); - captureWhenLocked = false; - } - } - - focus { - onFocusModeChanged: { - camera.unlock(); - if (camera.updateFocusPointMode) - camera.focus.focusPointMode = Camera.FocusPointAuto - } - onCustomFocusPointChanged: { - if (camera.focus.focusPointMode === Camera.FocusPointCustom - && camera.focus.focusMode !== Camera.FocusAuto - && camera.focus.focusMode !== Camera.FocusMacro) { - camera.updateFocusPointMode = false; - camera.focus.focusMode = Camera.FocusAuto - controls.focusMode = Camera.FocusAuto - camera.updateFocusPointMode = true; - } - } - } - - onCameraStatusChanged: { - if (cameraStatus === Camera.ActiveStatus) { - controls.exposureMode = camera.exposure.exposureMode - controls.exposureCompensation = camera.exposure.exposureCompensation - controls.whiteBalanceMode = camera.imageProcessing.whiteBalanceMode - controls.flashMode = Camera.FlashAuto - if (camera.captureMode === Camera.CaptureStillImage) - controls.focusMode = camera.focus.focusMode - else - camera.focus.focusMode = Camera.FocusContinuous - } - } - - imageCapture { - onImageExposed: capturePreview.show() - onImageCaptured: { - camera.unlock(); - capturePreview.setPreview(preview); - } - onCaptureFailed: print(requestId + " " + message) - } - - videoRecorder { - // mediaContainer: "mp4" - // audioCodec: "aac" - // audioSampleRate: 48000 - // audioBitRate: 192000 - // audioChannels: 2 - // videoCodec: "h264" - // resolution: Qt.size(960, 720) - onResolutionChanged: { - if (camera.videoRecorder.resolution == Qt.size(1920, 1080)) - camera.videoRecorder.videoBitRate = 20000000; - else if (camera.videoRecorderresolution == Qt.size(1280, 720)) - camera.videoRecorder.videoBitRate = 10000000; - else - camera.videoRecorder.videoBitRate = 5000000; - } - } - - } - - VideoOutput { - id: viewfinder - source: camera - anchors.fill: parent - fillMode: VideoOutput.PreserveAspectFit - } - - // OrientationSensor { - // active: true - // onReadingChanged: { - // if (reading.orientation === OrientationReading.TopUp) - // root.contentRotation = -90; - // else if (reading.orientation === OrientationReading.RightUp) - // root.contentRotation = 0; - // else if (reading.orientation === OrientationReading.LeftUp) - // root.contentRotation = 180; - // else if (reading.orientation === OrientationReading.TopDown) - // root.contentRotation = 90; - // } - // } - - // RotationSensor { - // active: (camera.cameraStatus === Camera.ActiveStatus) - // dataRate: 20 - // property real lastxvalue: 0 - // property real lastyvalue: 0 - // property real lastzvalue: 0 - - // onActiveChanged: { - // lastxvalue = 0 - // lastyvalue = 0 - // lastzvalue = 0 - // } - - // onReadingChanged: { - // if (lastxvalue != 0 && camera.focus.focusMode === Camera.FocusContinuous && camera.lockStatus === Camera.Locked && camera.imageCapture.ready) { - // if (Math.abs(reading.x - lastxvalue) > 3 || Math.abs(reading.y - lastyvalue) > 3 || Math.abs(reading.z - lastzvalue) > 3) - // camera.unlock(); - // } - // lastxvalue = reading.x; - // lastyvalue = reading.y; - // lastzvalue = reading.z; - // } - // } - - Controls { - id: controls - visible: camera.cameraStatus === Camera.ActiveStatus - - actualZoom: camera.digitalZoom - maximumZoom: camera.maximumDigitalZoom - - //onCameraModeChanged: camera.captureMode = controls.cameraMode - - onFlashModeChanged: if (visible) camera.flash.mode = controls.flashMode - onFocusModeChanged: if (visible) camera.focus.focusMode = controls.focusMode - onExposureModeChanged: if (visible) camera.exposure.exposureMode = controls.exposureMode - onExposureCompensationChanged: if (visible) camera.exposure.exposureCompensation = controls.exposureCompensation - onWhiteBalanceModeChanged: if (visible) camera.imageProcessing.whiteBalanceMode = controls.whiteBalanceMode - onResolutionChanged: { - if (controls.resolution != null) { - if (camera.captureMode === Camera.CaptureStillImage) - camera.imageCapture.resolution = controls.resolution; - else - camera.videoRecorder.resolution = controls.resolution; - } - } - - onSearchAndLock: { - camera.searchAndLock(); - } - - captureReady: camera.imageCapture.ready - onCapture: { - if (camera.captureMode === Camera.CaptureVideo) { - if (camera.videoRecorder.recorderState === CameraRecorder.RecordingState) { - camera.videoRecorder.stop(); - } else { - camera.videoRecorder.record(); - } - } else { - if ((camera.focus.focusMode === Camera.FocusAuto || camera.focus.focusMode === Camera.FocusMacro) - && camera.focus.focusPointMode === Camera.FocusPointAuto - && camera.lockStatus === Camera.Unlocked) { - camera.captureWhenLocked = true; - camera.searchAndLock(); - } else { - camera.imageCapture.captureToLocation("/data/images/"); - } - } - } - } - - // CameraControlButton { - // anchors.left: parent.left - // anchors.leftMargin: 30 - // anchors.bottom: parent.bottom - // anchors.bottomMargin: 20 - // title: camera.cameraStatus === Camera.ActiveStatus ? "Stop" : "Start" - - // onClicked: { - // if (camera.cameraStatus === Camera.ActiveStatus) - // camera.cameraState = Camera.UnloadedState - // else - // camera.start(); - // } - // } - - CapturePreview { - id: capturePreview - } - -} diff --git a/basicsuite/Camera/preview_l.jpg b/basicsuite/Camera/preview_l.jpg deleted file mode 100644 index 3f15310..0000000 Binary files a/basicsuite/Camera/preview_l.jpg and /dev/null differ diff --git a/basicsuite/Controls Layouts/Controls Layouts.qmlproject b/basicsuite/Controls Layouts/Controls Layouts.qmlproject deleted file mode 100644 index 4d32f75..0000000 --- a/basicsuite/Controls Layouts/Controls Layouts.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/Controls Layouts/description.txt b/basicsuite/Controls Layouts/description.txt deleted file mode 100644 index 393f0dd..0000000 --- a/basicsuite/Controls Layouts/description.txt +++ /dev/null @@ -1,3 +0,0 @@ -The "Controls Layout" demonstration aims to show some of the features available in the layout system of the Qt Quick Controls. The layout system in Qt Quick Controls adds GridLayout, RowLayout and ColumnLayout which interact with size-hints from individual controls, making it possible to create interfaces that adapt to various dimensions and still look good. - -The example has been adapted slightly to run inside this launcher, the original is available in the Qt Quick Controls repository. diff --git a/basicsuite/Controls Layouts/main.qml b/basicsuite/Controls Layouts/main.qml deleted file mode 100644 index b12b6c8..0000000 --- a/basicsuite/Controls Layouts/main.qml +++ /dev/null @@ -1,118 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Layouts 1.0 - -Rectangle { - - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 1; color: "lightgray" } - } - - property int margin: 11 - width: 1280 - height: 720 - - ColumnLayout { - id: mainLayout - anchors.fill: parent - anchors.margins: margin - GroupBox { - id: rowBox - title: "Row layout" - Layout.fillWidth: true - - RowLayout { - id: rowLayout - anchors.fill: parent - TextField { - placeholderText: "This wants to grow horizontally" - Layout.fillWidth: true - } - Button { - text: "Button" - } - } - } - - GroupBox { - id: gridBox - title: "Grid layout" - Layout.fillWidth: true - - GridLayout { - id: gridLayout - rows: 3 - flow: GridLayout.TopToBottom - anchors.fill: parent - - Label { text: "Line 1" } - Label { text: "Line 2" } - Label { text: "Line 3" } - - TextField { } - TextField { } - TextField { } - - TextArea { - text: "This widget spans over three rows in the GridLayout.\n" - + "All items in the GridLayout are implicitly positioned from top to bottom." - Layout.rowSpan: 3 - Layout.fillHeight: true - Layout.fillWidth: true - } - } - } - TextArea { - id: t3 - text: "This fills the whole cell" - Layout.minimumHeight: 30 - Layout.fillHeight: true - Layout.fillWidth: true - } - } -} diff --git a/basicsuite/Controls Layouts/preview_l.jpg b/basicsuite/Controls Layouts/preview_l.jpg deleted file mode 100644 index 03df43a..0000000 Binary files a/basicsuite/Controls Layouts/preview_l.jpg and /dev/null differ diff --git a/basicsuite/Controls Touch/Controls Touch.qmlproject b/basicsuite/Controls Touch/Controls Touch.qmlproject deleted file mode 100644 index 4d32f75..0000000 --- a/basicsuite/Controls Touch/Controls Touch.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/Controls Touch/content/AndroidDelegate.qml b/basicsuite/Controls Touch/content/AndroidDelegate.qml deleted file mode 100644 index 36a439a..0000000 --- a/basicsuite/Controls Touch/content/AndroidDelegate.qml +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 - -Item { - id: root - width: parent.width - height: 88 - - property alias text: textitem.text - signal clicked - - Rectangle { - anchors.fill: parent - color: "#11ffffff" - visible: mouse.pressed - } - - Text { - id: textitem - color: "white" - font.pixelSize: 32 - text: modelData - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: 30 - } - - Rectangle { - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: 15 - height: 1 - color: "#424246" - } - - Image { - anchors.right: parent.right - anchors.rightMargin: 20 - anchors.verticalCenter: parent.verticalCenter - source: "../images/navigation_next_item.png" - } - - MouseArea { - id: mouse - anchors.fill: parent - onClicked: root.clicked() - - } -} diff --git a/basicsuite/Controls Touch/content/ButtonPage.qml b/basicsuite/Controls Touch/content/ButtonPage.qml deleted file mode 100644 index f431a52..0000000 --- a/basicsuite/Controls Touch/content/ButtonPage.qml +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - width: parent.width - height: parent.height - - property real progress: 0 - SequentialAnimation on progress { - loops: Animation.Infinite - running: true - NumberAnimation { - from: 0 - to: 1 - duration: 3000 - } - NumberAnimation { - from: 1 - to: 0 - duration: 3000 - } - } - - Column { - spacing: 40 - anchors.centerIn: parent - - Button { - anchors.margins: 20 - text: "Press me" - style: touchStyle - } - - Button { - anchors.margins: 20 - style: touchStyle - text: "Press me too" - } - - Button { - anchors.margins: 20 - style: touchStyle - text: "Dont press me" - onClicked: if (stackView) stackView.pop() - } - - } - - Component { - id: touchStyle - ButtonStyle { - panel: Item { - implicitHeight: 50 - implicitWidth: 320 - BorderImage { - anchors.fill: parent - antialiasing: true - border.bottom: 8 - border.top: 8 - border.left: 8 - border.right: 8 - anchors.margins: control.pressed ? -4 : 0 - source: control.pressed ? "../images/button_pressed.png" : "../images/button_default.png" - Text { - text: control.text - anchors.centerIn: parent - color: "white" - font.pixelSize: 23 - renderType: Text.NativeRendering - } - } - } - } - } -} diff --git a/basicsuite/Controls Touch/content/ProgressBarPage.qml b/basicsuite/Controls Touch/content/ProgressBarPage.qml deleted file mode 100644 index dc0f552..0000000 --- a/basicsuite/Controls Touch/content/ProgressBarPage.qml +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - width: parent.width - height: parent.height - - property real progress: 0 - SequentialAnimation on progress { - loops: Animation.Infinite - running: true - NumberAnimation { - from: 0 - to: 1 - duration: 3000 - } - NumberAnimation { - from: 1 - to: 0 - duration: 3000 - } - } - - Column { - spacing: 40 - anchors.centerIn: parent - - ProgressBar { - anchors.margins: 20 - style: touchStyle - width: 400 - value: progress - } - - ProgressBar { - anchors.margins: 20 - style: touchStyle - width: 400 - value: 1 - progress - } - - ProgressBar { - anchors.margins: 20 - style: touchStyle - value: 1 - width: 400 - } - - } - - Component { - id: touchStyle - ProgressBarStyle { - panel: Rectangle { - implicitHeight: 15 - implicitWidth: 400 - color: "#444" - opacity: 0.8 - Rectangle { - antialiasing: true - radius: 1 - color: "#468bb7" - height: parent.height - width: parent.width * control.value / control.maximumValue - } - } - } - } -} diff --git a/basicsuite/Controls Touch/content/SliderPage.qml b/basicsuite/Controls Touch/content/SliderPage.qml deleted file mode 100644 index 8eb9190..0000000 --- a/basicsuite/Controls Touch/content/SliderPage.qml +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - width: parent.width - height: parent.height - - Column { - spacing: 12 - anchors.centerIn: parent - - Slider { - anchors.margins: 20 - style: touchStyle - value: 0 - } - Slider { - anchors.margins: 20 - style: touchStyle - value: 0.5 - } - Slider { - anchors.margins: 20 - style: touchStyle - value: 1.0 - } - - } - - Component { - id: touchStyle - SliderStyle { - handle: Rectangle { - width: 30 - height: 30 - radius: height - antialiasing: true - color: Qt.lighter("#468bb7", 1.2) - } - - groove: Item { - implicitHeight: 50 - implicitWidth: 400 - Rectangle { - height: 8 - width: parent.width - anchors.verticalCenter: parent.verticalCenter - color: "#444" - opacity: 0.8 - Rectangle { - antialiasing: true - radius: 1 - color: "#468bb7" - height: parent.height - width: parent.width * control.value / control.maximumValue - } - } - } - } - } -} diff --git a/basicsuite/Controls Touch/content/TabBarPage.qml b/basicsuite/Controls Touch/content/TabBarPage.qml deleted file mode 100644 index 7651a3c..0000000 --- a/basicsuite/Controls Touch/content/TabBarPage.qml +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - width: parent.width - height: parent.height - - TabView { - anchors.fill: parent - style: touchStyle - Tab { - title: "Buttons" - ButtonPage{ visible: true } - } - Tab { - title: "Sliders" - SliderPage{ visible: true } - } - Tab { - title: "Progress" - ProgressBarPage{ visible: true } - } - } - - Component { - id: touchStyle - TabViewStyle { - tabsAlignment: Qt.AlignVCenter - tabOverlap: 0 - frame: Item { } - tab: Item { - implicitWidth: control.width/control.count - implicitHeight: 50 - BorderImage { - anchors.fill: parent - border.bottom: 8 - border.top: 8 - source: styleData.selected ? "../images/tab_selected.png":"../images/tabs_standard.png" - Text { - anchors.centerIn: parent - color: "white" - text: styleData.title.toUpperCase() - font.pixelSize: 16 - } - Rectangle { - visible: index > 0 - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.margins: 10 - width:1 - color: "#3a3a3a" - } - } - } - } - } -} diff --git a/basicsuite/Controls Touch/content/TextInputPage.qml b/basicsuite/Controls Touch/content/TextInputPage.qml deleted file mode 100644 index 605afef..0000000 --- a/basicsuite/Controls Touch/content/TextInputPage.qml +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - width: parent.width - height: parent.height - - property real progress: 0 - SequentialAnimation on progress { - loops: Animation.Infinite - running: true - NumberAnimation { - from: 0 - to: 1 - duration: 3000 - } - NumberAnimation { - from: 1 - to: 0 - duration: 3000 - } - } - - Column { - spacing: 40 - anchors.centerIn: parent - - TextField { - anchors.margins: 20 - text: "Text input" - style: touchStyle - } - - TextField { - anchors.margins: 20 - text: "Readonly Text input" - style: touchStyle - readOnly: true - } - } - Component { - id: touchStyle - - TextFieldStyle { - textColor: "white" - font.pixelSize: 28 - background: Item { - implicitHeight: 50 - implicitWidth: 320 - BorderImage { - source: "../images/textinput.png" - border.left: 8 - border.right: 8 - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - } - } - } - } -} diff --git a/basicsuite/Controls Touch/description.txt b/basicsuite/Controls Touch/description.txt deleted file mode 100644 index 5106dff..0000000 --- a/basicsuite/Controls Touch/description.txt +++ /dev/null @@ -1,3 +0,0 @@ -The purpose of this example is to show Qt Quick Controls in practice. The example uses a StackView to navigate between pages and illustrates the use of many of the controls provided by Qt Quick Control, including Button, Slider, ProgressBar, TabBar and TextInput types. The style in the example is a custom style made to look like the Android theme, it is written purely in QML. - -The example has been adapted slightly to run inside this launcher, the original is available in the Qt Quick Controls repository. diff --git a/basicsuite/Controls Touch/images/NOTICE.txt b/basicsuite/Controls Touch/images/NOTICE.txt deleted file mode 100644 index 93a9afc..0000000 --- a/basicsuite/Controls Touch/images/NOTICE.txt +++ /dev/null @@ -1,2 +0,0 @@ -Notice some of these images are derived from Google applications resources. They were provided under the following license: -You may use the materials in this directory without restriction to develop your apps and to use in your apps. diff --git a/basicsuite/Controls Touch/images/button_default.png b/basicsuite/Controls Touch/images/button_default.png deleted file mode 100644 index 6d6cfd9..0000000 Binary files a/basicsuite/Controls Touch/images/button_default.png and /dev/null differ diff --git a/basicsuite/Controls Touch/images/button_pressed.png b/basicsuite/Controls Touch/images/button_pressed.png deleted file mode 100644 index ab78b6e..0000000 Binary files a/basicsuite/Controls Touch/images/button_pressed.png and /dev/null differ diff --git a/basicsuite/Controls Touch/images/navigation_next_item.png b/basicsuite/Controls Touch/images/navigation_next_item.png deleted file mode 100644 index 6665c9d..0000000 Binary files a/basicsuite/Controls Touch/images/navigation_next_item.png and /dev/null differ diff --git a/basicsuite/Controls Touch/images/navigation_previous_item.png b/basicsuite/Controls Touch/images/navigation_previous_item.png deleted file mode 100644 index f8be011..0000000 Binary files a/basicsuite/Controls Touch/images/navigation_previous_item.png and /dev/null differ diff --git a/basicsuite/Controls Touch/images/tab_selected.png b/basicsuite/Controls Touch/images/tab_selected.png deleted file mode 100644 index 2345f7a..0000000 Binary files a/basicsuite/Controls Touch/images/tab_selected.png and /dev/null differ diff --git a/basicsuite/Controls Touch/images/tabs_standard.png b/basicsuite/Controls Touch/images/tabs_standard.png deleted file mode 100644 index 7140ab7..0000000 Binary files a/basicsuite/Controls Touch/images/tabs_standard.png and /dev/null differ diff --git a/basicsuite/Controls Touch/images/textinput.png b/basicsuite/Controls Touch/images/textinput.png deleted file mode 100644 index b0256db..0000000 Binary files a/basicsuite/Controls Touch/images/textinput.png and /dev/null differ diff --git a/basicsuite/Controls Touch/images/toolbar.png b/basicsuite/Controls Touch/images/toolbar.png deleted file mode 100644 index e9eba4c..0000000 Binary files a/basicsuite/Controls Touch/images/toolbar.png and /dev/null differ diff --git a/basicsuite/Controls Touch/main.qml b/basicsuite/Controls Touch/main.qml deleted file mode 100644 index e4d2562..0000000 --- a/basicsuite/Controls Touch/main.qml +++ /dev/null @@ -1,148 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import "content" - -Item { - width: 800 - height: 1280 - - Rectangle { - color: "#212126" - anchors.fill: parent - } - - // Implements back key navigation - Keys.onReleased: { - if (event.key === Qt.Key_Back) { - if (stackView.depth > 1) { - stackView.pop(); - event.accepted = true; - } else { Qt.quit(); } - } - } - - BorderImage { - id: toolbar - border.bottom: 8 - source: "images/toolbar.png" - width: parent.width - height: 100 - - Rectangle { - id: backButton - width: opacity ? 60 : 0 - anchors.left: parent.left - anchors.leftMargin: 20 - opacity: stackView.depth > 1 ? 1 : 0 - anchors.verticalCenter: parent.verticalCenter - antialiasing: true - height: 60 - radius: 4 - color: backmouse.pressed ? "#222" : "transparent" - Behavior on opacity { NumberAnimation{} } - Image { - anchors.verticalCenter: parent.verticalCenter - source: "images/navigation_previous_item.png" - } - MouseArea { - id: backmouse - anchors.fill: parent - anchors.margins: -10 - onClicked: stackView.pop() - } - } - - Text { - font.pixelSize: 42 - Behavior on x { NumberAnimation{ easing.type: Easing.OutCubic} } - x: backButton.x + backButton.width + 20 - anchors.verticalCenter: parent.verticalCenter - color: "white" - text: "Widget Gallery" - } - } - - ListModel { - id: pageModel - ListElement { - title: "Buttons" - page: "content/ButtonPage.qml" - } - ListElement { - title: "Sliders" - page: "content/SliderPage.qml" - } - ListElement { - title: "ProgressBar" - page: "content/ProgressBarPage.qml" - } - ListElement { - title: "Tabs" - page: "content/TabBarPage.qml" - } - ListElement { - title: "TextInput" - page: "content/TextInputPage.qml" - } - } - - StackView { - id: stackView - anchors.fill: parent - anchors.topMargin: toolbar.height - - initialItem: Item { - width: parent.width - height: parent.height - ListView { - model: pageModel - anchors.fill: parent - delegate: AndroidDelegate { - text: title - onClicked: stackView.push(Qt.resolvedUrl(page)) - } - } - } - } - -} diff --git a/basicsuite/Controls Touch/preview_l.jpg b/basicsuite/Controls Touch/preview_l.jpg deleted file mode 100644 index c57eac3..0000000 Binary files a/basicsuite/Controls Touch/preview_l.jpg and /dev/null differ diff --git a/basicsuite/Graphical Effects/Checkers.qml b/basicsuite/Graphical Effects/Checkers.qml deleted file mode 100644 index 9e42b1c..0000000 --- a/basicsuite/Graphical Effects/Checkers.qml +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - - -// The checkers background -ShaderEffect { - - property real tileSize: 16 - property color color1: Qt.rgba(0.7, 0.7, 0.7, 1); - property color color2: Qt.rgba(0.6, 0.6, 0.6, 1); - - property size _pixelSize: Qt.size(Math.PI * width / tileSize, Math.PI * height / tileSize); - - fragmentShader: - " - uniform lowp vec4 color1; - uniform lowp vec4 color2; - uniform lowp float qt_Opacity; - uniform highp vec2 _pixelSize; - varying highp vec2 qt_TexCoord0; - void main() { - highp vec2 tc = sign(sin(qt_TexCoord0 * _pixelSize)); - if (tc.x != tc.y) - gl_FragColor = color1 * qt_Opacity; - else - gl_FragColor = color2 * qt_Opacity; - } - " -} diff --git a/basicsuite/Graphical Effects/Graphical Effects.qmlproject b/basicsuite/Graphical Effects/Graphical Effects.qmlproject deleted file mode 100644 index 4d32f75..0000000 --- a/basicsuite/Graphical Effects/Graphical Effects.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/Graphical Effects/description.txt b/basicsuite/Graphical Effects/description.txt deleted file mode 100644 index e2d3acf..0000000 --- a/basicsuite/Graphical Effects/description.txt +++ /dev/null @@ -1,2 +0,0 @@ -This example shows the Qt Quick 2.0 ShaderEffect type and the QtGraphicalEffect module. Qt Quick 2.0 provides the ability to use inline GLSL in your Qt Quick applications to create stunning visual effects. However, as UIs typically reuse many of the same effects, the QtGraphicalEffects module provides a set of predefined, commonly used effects. This includes blur, drop-shadows, glow, blending, opacity masks and more. - diff --git a/basicsuite/Graphical Effects/effect_BrightnessContrast.qml b/basicsuite/Graphical Effects/effect_BrightnessContrast.qml deleted file mode 100644 index fb8302d..0000000 --- a/basicsuite/Graphical Effects/effect_BrightnessContrast.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -Item { - - id: root - - property real inputX: 0.7; - property real feedbackX: effect.brightness - property string nameX: "Brightness" - - property real inputY: 0.8; - property real feedbackY: effect.contrast - property string nameY: "Contrast" - - Image { - id: image - source: "images/bug.jpg" - anchors.centerIn: parent - visible: false - } - - BrightnessContrast { - id: effect; - - source: image - anchors.fill: source - - scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; - - brightness: inputX * 2 - 1; - contrast: inputY * 2 - 1; - } - -} diff --git a/basicsuite/Graphical Effects/effect_Colorize.qml b/basicsuite/Graphical Effects/effect_Colorize.qml deleted file mode 100644 index 4244f21..0000000 --- a/basicsuite/Graphical Effects/effect_Colorize.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -Item { - id: root - - property real inputX: 0.6; - property real feedbackX: effect.hue - property string nameX: "Hue" - - property real inputY: 0.7 - property real feedbackY: effect.saturation - property string nameY: "Saturation" - - Image { - id: image - source: "images/bug.jpg" - width: Math.min(root.width, root.height) * 0.8; - height: width - sourceSize: Qt.size(width, height); - anchors.centerIn: parent - } - - Colorize { - id: effect; - - source: image - anchors.fill: source - scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; - - hue: root.inputX * 2 - 1; - saturation: root.inputY - } -} diff --git a/basicsuite/Graphical Effects/effect_CustomDissolve.qml b/basicsuite/Graphical Effects/effect_CustomDissolve.qml deleted file mode 100644 index 43be640..0000000 --- a/basicsuite/Graphical Effects/effect_CustomDissolve.qml +++ /dev/null @@ -1,165 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Item { - - - width: 700 - height: 600 - id: root - - property real inputX: 0.5; - property real feedbackX: inputX - property string nameX: "Dissolution" - - property real inputY: 0.5; - property real feedbackY: effect.amplitude - property string nameY: "Amplitude" - - Rectangle { - id: sourceItem - anchors.centerIn: parent - width: text.width + 50 - height: text.height + 20 - gradient: Gradient { - GradientStop { position: 0; color: "steelblue" } - GradientStop { position: 1; color: "black" } - } - border.color: "lightsteelblue" - border.width: 2 - -//? color: "transparent" - - radius: 10 - - layer.enabled: true - layer.smooth: true - layer.sourceRect: Qt.rect(-1, -1, width + 2, height + 2); - - visible: false - - Text { - id: text - font.pixelSize: root.height * 0.08 - anchors.centerIn: parent; - text: "Code Less, Create More!" - color: "lightsteelblue" - style: Text.Raised - - } - } - - ShaderEffect { - - id: effect - - anchors.fill: sourceItem; - - property variant source: sourceItem; - - property real t: (1 + tlength) * (1 - root.inputX) - tlength; - property real tlength: 1.0 - property real amplitude: 2.0 * height * root.inputY; - - mesh: "40x4" - - vertexShader: - " - uniform highp mat4 qt_Matrix; - uniform lowp float t; - uniform lowp float tlength; - uniform highp float amplitude; - - attribute highp vec4 qt_Vertex; - attribute highp vec2 qt_MultiTexCoord0; - - varying highp vec2 vTexCoord; - varying lowp float vOpacity; - - void main() { - vTexCoord = qt_MultiTexCoord0; - - vec4 pos = qt_Vertex; - - lowp float tt = smoothstep(t, t+tlength, qt_MultiTexCoord0.x); - - vOpacity = 1.0 - tt; - - pos.y += (amplitude * (qt_MultiTexCoord0.y * 2.0 - 1.0) * (-2.0 * tt) - + 3.0 * amplitude * (qt_MultiTexCoord0.y * 2.0 - 1.0) - + amplitude * sin(0.0 + tt * 2.14152 * qt_MultiTexCoord0.x) - + amplitude * sin(0.0 + tt * 7.4567) - ) * tt; - - pos.x += amplitude * sin(6.0 + tt * 4.4567) * tt; - - gl_Position = qt_Matrix * pos; - } - " - fragmentShader: - " - uniform sampler2D source; - - uniform lowp float t; - uniform lowp float tlength; - uniform lowp float qt_Opacity; - - varying highp vec2 vTexCoord; - varying lowp float vOpacity; - - // Noise function from: http://stackoverflow.com/questions/4200224/random-noise-functions-for-glsl - highp float rand(vec2 n) { - return fract(sin(dot(n.xy, vec2(12.9898, 78.233))) * 43758.5453); - } - - void main() { - lowp vec4 tex = texture2D(source, vTexCoord); - lowp float opacity = 1.0 - smoothstep(0.9, 1.0, vOpacity); - lowp float particlify = smoothstep(1.0 - vOpacity, 1.0, rand(vTexCoord)) * vOpacity; - gl_FragColor = tex * mix(vOpacity, particlify, opacity) * qt_Opacity; - } - - " - - } - -} diff --git a/basicsuite/Graphical Effects/effect_CustomWave.qml b/basicsuite/Graphical Effects/effect_CustomWave.qml deleted file mode 100644 index 5bde628..0000000 --- a/basicsuite/Graphical Effects/effect_CustomWave.qml +++ /dev/null @@ -1,158 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Item { - id: root - - property real inputX: 0.9; - property real feedbackX: shader.zrot - property string nameX: "Rotation" - - property real inputY: 0.7 - property real feedbackY: shader.amp - property string nameY: "Amplitude" - - - ShaderEffect { - id: shader - width: height - height: parent.height - anchors.centerIn: parent; - scale: height > root.height * 0.8 ? root.height * 0.8 / height : 1; - - blending: true - - mesh: "50x50" - - property variant size: Qt.size(width, height); - - property variant source: Image { source: "images/bug.jpg" } - - property real amp: root.inputY * 0.1; - - property real xrot: 2 / 8 * Math.PI; - - property real zrot: -root.inputX * Math.PI * 2 - - property real time: 0 - NumberAnimation on time { - id: timeAnimation - from: 0; - to: Math.PI * 2; - duration: 3457; - loops: Animation.Infinite - running: true; - } - - vertexShader: " - attribute highp vec4 qt_Vertex; - attribute highp vec2 qt_MultiTexCoord0; - uniform highp mat4 qt_Matrix; - uniform highp float xrot; - uniform highp float zrot; - uniform highp vec2 size; - uniform highp float time; - uniform highp float amp; - varying lowp vec2 v_TexCoord; - varying lowp float v_light; - void main() { - highp float xcosa = cos(xrot); - highp float xsina = sin(xrot); - - highp mat4 xrot = mat4(1, 0, 0, 0, - 0, xcosa, xsina, 0, - 0, -xsina, xcosa, 0, - 0, 0, 0, 1); - - highp float zcosa = cos(zrot); - highp float zsina = sin(zrot); - - highp mat4 zrot = mat4(zcosa, zsina, 0, 0, - -zsina, zcosa, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1); - - highp float near = 2.; - highp float far = 6.; - highp float fmn = far - near; - - highp mat4 proj = mat4(near, 0, 0, 0, - 0, near, 0, 0, - 0, 0, -(far + near) / fmn, -1., - 0, 0, -2. * far * near / fmn, 1); - - highp mat4 model = mat4(2, 0, 0, 0, - 0, 2, 0, 0, - 0, 0, 2, 0, - 0, -.5, -4, 1); - - vec4 nLocPos = vec4(qt_Vertex.xy * 2.0 / size - 1.0, 0, 1); - nLocPos.z = cos(nLocPos.x * 5. + time) * amp; - - vec4 pos = proj * model * xrot * zrot * nLocPos; - pos = vec4(pos.xyx/pos.w, 1); - - gl_Position = qt_Matrix * vec4((pos.xy + 1.0) / 2.0 * size , 0, 1); - - v_TexCoord = qt_MultiTexCoord0; - - - v_light = dot(normalize(vec3(-sin(nLocPos.x * 5.0 + time) * 5.0 * amp, 0, -1)), vec3(0, 0, -1)); - } - " - - fragmentShader: " - uniform lowp sampler2D source; - uniform lowp float qt_Opacity; - varying highp vec2 v_TexCoord; - varying lowp float v_light; - void main() { - highp vec4 c = texture2D(source, v_TexCoord); - gl_FragColor = (vec4(pow(v_light, 16.0)) * 0.3 + c) * qt_Opacity; - } - " - - } - -} - - diff --git a/basicsuite/Graphical Effects/effect_Displacement.qml b/basicsuite/Graphical Effects/effect_Displacement.qml deleted file mode 100644 index 3c7b6d0..0000000 --- a/basicsuite/Graphical Effects/effect_Displacement.qml +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -Item { - - id: root - - property real inputX: 0.1; - - property real feedbackX: effect.displacement - - property string nameX: "Displacement" - - Image { - id: image - source: "images/bug.jpg" - anchors.centerIn: parent - visible: false - } - - Image { - id: displacementMap - source: "images/glass_normal.png" - smooth: true - visible: false - } - - Displace { - id: effect; - - source: image - displacementSource: displacementMap - anchors.fill: source - - scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; - - displacement: inputX - } - -} diff --git a/basicsuite/Graphical Effects/effect_DropShadow.qml b/basicsuite/Graphical Effects/effect_DropShadow.qml deleted file mode 100644 index 0dd3c48..0000000 --- a/basicsuite/Graphical Effects/effect_DropShadow.qml +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -Item { - - id: root - - property real inputX: 0.5; - property real inputY: 0.2; - - property real feedbackX: effect.radius - property real feedbackY: effect.spread - - property string nameX: "Radius" - property string nameY: "Spread" - - Image { - id: image - source: "images/butterfly.png" - anchors.centerIn: parent - visible: false - } - - DropShadow { - id: effect; - - source: image - anchors.fill: source - - scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; - - samples: 4 - - radius: root.inputX * 7 - spread: root.inputY; - - color: Qt.rgba(0, 0, 0, 0.4); - - verticalOffset: 30.5 - horizontalOffset: 30.5 - } - -} diff --git a/basicsuite/Graphical Effects/effect_GaussianBlur.qml b/basicsuite/Graphical Effects/effect_GaussianBlur.qml deleted file mode 100644 index 7acfa3b..0000000 --- a/basicsuite/Graphical Effects/effect_GaussianBlur.qml +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -Item { - - id: root - - property real inputX: 0.5; - property real inputY: 1 - - property real feedbackX: effect.radius - property real feedbackY: effect.deviation - - property string nameX: "Radius" - property string nameY: "Deviation" - - Image { - id: image - source: "images/bug.jpg" - width: Math.min(root.width, root.height) * 0.8; - height: width - sourceSize: Qt.size(width, height); - anchors.centerIn: parent - } - - GaussianBlur { - id: effect; - - source: image - anchors.fill: source - - scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; - samples: 4 - - deviation: root.inputY * 20; - radius: root.inputX * 7 - } - -} diff --git a/basicsuite/Graphical Effects/effect_Glow.qml b/basicsuite/Graphical Effects/effect_Glow.qml deleted file mode 100644 index 728f8cc..0000000 --- a/basicsuite/Graphical Effects/effect_Glow.qml +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -Item { - - id: root - - property real inputX: 0.5; - property real inputY: 0.2; - - property real feedbackX: effect.radius - property real feedbackY: effect.spread - - property string nameX: "Radius" - property string nameY: "Spread" - - Image { - id: image - source: "images/butterfly.png" - anchors.centerIn: parent - visible: false - } - - Glow { - id: effect; - - source: image - anchors.fill: source - - scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; - - samples: 4 - - radius: root.inputX * 7 - spread: root.inputY; - - color: Qt.rgba(1, 0, 1, 1); - } -} diff --git a/basicsuite/Graphical Effects/effect_HueSaturation.qml b/basicsuite/Graphical Effects/effect_HueSaturation.qml deleted file mode 100644 index e6ba039..0000000 --- a/basicsuite/Graphical Effects/effect_HueSaturation.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -Item { - id: root - - property real inputX: 0.6; - property real feedbackX: effect.hue - property string nameX: "Hue" - - property real inputY: 0.2 - property real feedbackY: effect.saturation - property string nameY: "Saturation" - - Image { - id: image - source: "images/bug.jpg" - width: Math.min(root.width, root.height) * 0.8; - height: width - sourceSize: Qt.size(width, height); - anchors.centerIn: parent - } - - HueSaturation { - id: effect; - - source: image - anchors.fill: source - scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; - - hue: root.inputX * 2 - 1; - saturation: root.inputY * 2 - 1 - } -} diff --git a/basicsuite/Graphical Effects/effect_OpacityMask.qml b/basicsuite/Graphical Effects/effect_OpacityMask.qml deleted file mode 100644 index 47df139..0000000 --- a/basicsuite/Graphical Effects/effect_OpacityMask.qml +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -Item { - - id: root - - Image { - id: image - source: "images/bug.jpg" - anchors.centerIn: parent - visible: false - } - - Image { - id: mask - source: "images/butterfly.png" - visible: false - } - - OpacityMask { - id: effect; - - source: image - maskSource: mask - anchors.fill: source - - scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; - } -} diff --git a/basicsuite/Graphical Effects/effect_ThresholdMask.qml b/basicsuite/Graphical Effects/effect_ThresholdMask.qml deleted file mode 100644 index 18cb07b..0000000 --- a/basicsuite/Graphical Effects/effect_ThresholdMask.qml +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -Item { - - id: root - - property real inputX: 0.5; - property real inputY: 0.2; - - property real feedbackX: effect.threshold - property real feedbackY: effect.spread - - property string nameX: "Threshold" - property string nameY: "Spread" - - Image { - id: image - source: "images/bug.jpg" - anchors.centerIn: parent - visible: false - } - - Image { - id: mask - source: "images/fog.png" - visible: false - } - - ThresholdMask { - id: effect; - - source: image - maskSource: mask; - anchors.fill: source - - scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; - - threshold: root.inputX - spread: root.inputY - } - -} diff --git a/basicsuite/Graphical Effects/images/bug.jpg b/basicsuite/Graphical Effects/images/bug.jpg deleted file mode 100755 index 43e3676..0000000 Binary files a/basicsuite/Graphical Effects/images/bug.jpg and /dev/null differ diff --git a/basicsuite/Graphical Effects/images/butterfly.png b/basicsuite/Graphical Effects/images/butterfly.png deleted file mode 100644 index ce544f2..0000000 Binary files a/basicsuite/Graphical Effects/images/butterfly.png and /dev/null differ diff --git a/basicsuite/Graphical Effects/images/fog.png b/basicsuite/Graphical Effects/images/fog.png deleted file mode 100644 index f462222..0000000 Binary files a/basicsuite/Graphical Effects/images/fog.png and /dev/null differ diff --git a/basicsuite/Graphical Effects/images/glass_normal.png b/basicsuite/Graphical Effects/images/glass_normal.png deleted file mode 100755 index ba360ef..0000000 Binary files a/basicsuite/Graphical Effects/images/glass_normal.png and /dev/null differ diff --git a/basicsuite/Graphical Effects/main.qml b/basicsuite/Graphical Effects/main.qml deleted file mode 100644 index 66c97ff..0000000 --- a/basicsuite/Graphical Effects/main.qml +++ /dev/null @@ -1,231 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Item { - id: root - - width: 1280 - height: 720 - - Checkers { - id: checkers; - anchors.fill: parent - anchors.leftMargin: list.width - tileSize: 32 - } - - Loader { - id: loader - anchors.fill: checkers; - } - - Rectangle { - id: listBackground - anchors.left: parent.left - anchors.right: checkers.left - anchors.top: parent.top - anchors.bottom: parent.bottom - color: "black" - } - - ListModel { - id: listModel - ListElement { name: "Brignthness / Contrast"; file: "effect_BrightnessContrast.qml" } - ListElement { name: "Colorize"; file: "effect_Colorize.qml" } - ListElement { name: "Displacement"; file: "effect_Displacement.qml" } - ListElement { name: "Drop Shadow"; file: "effect_DropShadow.qml" } - ListElement { name: "Gaussian Blur"; file: "effect_GaussianBlur.qml" } - ListElement { name: "Glow"; file: "effect_Glow.qml" } - ListElement { name: "Hue / Saturation"; file: "effect_HueSaturation.qml" } - ListElement { name: "Opacity Mask"; file: "effect_OpacityMask.qml" } - ListElement { name: "Threshold Mask"; file: "effect_ThresholdMask.qml" } - ListElement { name: "Wave (custom)"; file: "effect_CustomWave.qml" } - ListElement { name: "Dissolve (custom)"; file: "effect_CustomDissolve.qml" } - } - - ListView - { - id: list - anchors.top: parent.top - anchors.left: parent.left - width: parent.width / 4 - height: parent.height - width - - clip: true - focus: true - - highlightMoveDuration: 0 - - onCurrentItemChanged: { - var entry = listModel.get(currentIndex); - loader.source = entry.file; - } - - model: listModel - - highlight: Rectangle { - color: "steelblue" - } - - delegate: Item { - id: delegateRoot - - width: list.width - height: root.height * 0.05 - - Rectangle { - width: parent.width - height: 3 - anchors.bottom: parent.bottom - gradient: Gradient { - GradientStop { position: 0; color: "transparent" } - GradientStop { position: 0.5; color: "lightgray" } - GradientStop { position: 1; color: "transparent" } - } - } - - Text { - color: "white" - font.pixelSize: parent.height * 0.5 - anchors.verticalCenter: parent.verticalCenter - anchors.verticalCenterOffset: -2 - x: parent.width * 0.1 - text: name - } - - MouseArea { - anchors.fill: parent - onClicked: list.currentIndex = index; - } - } - } - - Canvas { - id: canvas - anchors.fill: controller - anchors.margins: 10 - - property real padding: 20 - - onPaint: { - var ctx = canvas.getContext("2d"); - - var w = canvas.width - var h = canvas.height; - - - ctx.fillStyle = "rgb(50, 50, 50)" - ctx.beginPath(); - ctx.roundedRect(0, 0, w, h, w * 0.1, w * 0.1); - ctx.fill(); - - var margin = canvas.padding; - var segmentSize = 4 - ctx.strokeStyle = "gray" - ctx.beginPath(); - ctx.moveTo(margin, margin); - ctx.lineTo(margin, h-margin); - ctx.moveTo(margin, h - margin); - ctx.lineTo(w-margin, h - margin); - - var segmentCount = 11 - for (var i = 0; i mediaPlayer.duration) - newPosition = mediaPlayer.duration; - return newPosition; - } - - states: [ - State { - name: "HIDDEN" - PropertyChanges { - target: controlBar - opacity: 0.0 - } - }, - State { - name: "VISIBLE" - PropertyChanges { - target: controlBar - opacity: 0.95 - } - } - ] - - transitions: [ - Transition { - from: "HIDDEN" - to: "VISIBLE" - NumberAnimation { - id: showAnimation - target: controlBar - properties: "opacity" - from: 0.0 - to: 1.0 - duration: 200 - } - }, - Transition { - from: "VISIBLE" - to: "HIDDEN" - NumberAnimation { - id: hideAnimation - target: controlBar - properties: "opacity" - from: 0.95 - to: 0.0 - duration: 200 - } - } - ] -} diff --git a/basicsuite/Media Player/EffectSelectionPanel.qml b/basicsuite/Media Player/EffectSelectionPanel.qml deleted file mode 100755 index 4f7e161..0000000 --- a/basicsuite/Media Player/EffectSelectionPanel.qml +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: root - color: "#BB333333" - height: 78 - property int itemHeight: 25 - property string effectSource: "" - property bool isMouseAbove: mouseAboveMonitor.containsMouse - - Keys.onEscapePressed: visible = false - - signal clicked - QtObject { - id: d - property Item selectedItem - } - - ListModel { - id: sources - ListElement { name: "No effect"; source: "Effects/EffectPassThrough.qml" } - ListElement { name: "Billboard"; source: "Effects/EffectBillboard.qml" } - ListElement { name: "Black & white"; source: "Effects/EffectBlackAndWhite.qml" } - ListElement { name: "Blur"; source: "Effects/EffectGaussianBlur.qml" } - ListElement { name: "Edge detection"; source: "Effects/EffectSobelEdgeDetection1.qml" } - ListElement { name: "Emboss"; source: "Effects/EffectEmboss.qml" } - ListElement { name: "Glow"; source: "Effects/EffectGlow.qml" } - ListElement { name: "Isolate"; source: "Effects/EffectIsolate.qml" } - //ListElement { name: "Magnify"; source: "Effects/EffectMagnify.qml" } -// ListElement { name: "Page curl"; source: "Effects/EffectPageCurl.qml" } - ListElement { name: "Pixelate"; source: "Effects/EffectPixelate.qml" } - ListElement { name: "Posterize"; source: "Effects/EffectPosterize.qml" } -// ListElement { name: "Ripple"; source: "Effects/EffectRipple.qml" } - ListElement { name: "Sepia"; source: "Effects/EffectSepia.qml" } - ListElement { name: "Sharpen"; source: "Effects/EffectSharpen.qml" } - ListElement { name: "Shockwave"; source: "Effects/EffectShockwave.qml" } -// ListElement { name: "Tilt shift"; source: "Effects/EffectTiltShift.qml" } - ListElement { name: "Toon"; source: "Effects/EffectToon.qml" } - ListElement { name: "Warhol"; source: "Effects/EffectWarhol.qml" } - ListElement { name: "Wobble"; source: "Effects/EffectWobble.qml" } - ListElement { name: "Vignette"; source: "Effects/EffectVignette.qml" } - } - - Component { - id: sourceDelegate - Item { - id: sourceDelegateItem - width: root.width - height: itemHeight - - Text { - id: sourceSelectorItem - anchors.centerIn: parent - width: 0.9 * parent.width - height: 0.8 * itemHeight - text: name - color: "white" - } - - states: [ - State { - name: "selected" - PropertyChanges { - target: sourceSelectorItem - bgColor: "#ff8888" - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - ColorAnimation { - properties: "color" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - } - } - - MouseArea { - id: mouseAboveMonitor - anchors.fill: parent - hoverEnabled: true - } - - ListView { - id: list - anchors.fill: parent - clip: true - anchors.margins: 14 - model: sources - focus: root.visible && root.opacity && urlBar.opacity === 0 - - currentIndex: 0 - - onCurrentIndexChanged : { - effectSource = model.get(currentIndex).source - root.clicked() - applicationWindow.resetTimer() - } - - delegate: Item { - height: 40 - width: parent.width - Rectangle { - anchors.fill: parent - border.color: index == list.currentIndex ? "#44ffffff" : "transparent" - color: index == list.currentIndex ? "#22ffffff" : "transparent" - radius: 3 - Text { color: "white" ; text: name ; anchors.centerIn: parent; font.pixelSize: 20 } - MouseArea { - anchors.fill: parent - onClicked: list.currentIndex = index - } - } - } - } -} diff --git a/basicsuite/Media Player/Effects/Effect.qml b/basicsuite/Media Player/Effects/Effect.qml deleted file mode 100755 index 99308fd..0000000 --- a/basicsuite/Media Player/Effects/Effect.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -ShaderEffect { - property variant source - property ListModel parameters: ListModel { } - property bool divider: false - property real dividerValue: 1.0 - property real targetWidth: 0 - property real targetHeight: 0 - property string fragmentShaderSrc - property string vertexShaderSrc - - QtObject { - id: d - property string fragmentShaderCommon: " - #ifdef GL_ES - precision mediump float; - #else - # define lowp - # define mediump - # define highp - #endif // GL_ES - " - } - - // The following is a workaround for the fact that ShaderEffect - // doesn't provide a way for shader programs to be read from a file, - // rather than being inline in the QML file - - onFragmentShaderSrcChanged: - fragmentShader = d.fragmentShaderCommon + fragmentShaderSrc - onVertexShaderSrcChanged: - vertexShader = vertexShaderSrc -} diff --git a/basicsuite/Media Player/Effects/EffectBillboard.qml b/basicsuite/Media Player/Effects/EffectBillboard.qml deleted file mode 100755 index 947209e..0000000 --- a/basicsuite/Media Player/Effects/EffectBillboard.qml +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "grid spacing" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real grid: parameters.get(0).value * 10 - - property real step_x: 0.0015625 - property real step_y: targetHeight ? (step_x * targetWidth / targetHeight) : 0.0 - - fragmentShaderSrc: "uniform float grid; - uniform float dividerValue; - uniform float step_x; - uniform float step_y; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - float offx = floor(uv.x / (grid * step_x)); - float offy = floor(uv.y / (grid * step_y)); - vec3 res = texture2D(source, vec2(offx * grid * step_x , offy * grid * step_y)).rgb; - vec2 prc = fract(uv / vec2(grid * step_x, grid * step_y)); - vec2 pw = pow(abs(prc - 0.5), vec2(2.0)); - float rs = pow(0.45, 2.0); - float gr = smoothstep(rs - 0.1, rs + 0.1, pw.x + pw.y); - float y = (res.r + res.g + res.b) / 3.0; - vec3 ra = res / y; - float ls = 0.3; - float lb = ceil(y / ls); - float lf = ls * lb + 0.3; - res = lf * res; - vec3 col = mix(res, vec3(0.1, 0.1, 0.1), gr); - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * texture2D(source, uv); - }" -} diff --git a/basicsuite/Media Player/Effects/EffectBlackAndWhite.qml b/basicsuite/Media Player/Effects/EffectBlackAndWhite.qml deleted file mode 100755 index 8cbba60..0000000 --- a/basicsuite/Media Player/Effects/EffectBlackAndWhite.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "threshold" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real threshold: parameters.get(0).value - - fragmentShaderSrc: "uniform float threshold; - uniform float dividerValue; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec4 orig = texture2D(source, uv); - vec3 col = orig.rgb; - float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b; - y = y < threshold ? 0.0 : 1.0; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(y, y, y, 1.0); - else - gl_FragColor = qt_Opacity * orig; - }" -} diff --git a/basicsuite/Media Player/Effects/EffectEmboss.qml b/basicsuite/Media Player/Effects/EffectEmboss.qml deleted file mode 100755 index 23ef1cb..0000000 --- a/basicsuite/Media Player/Effects/EffectEmboss.qml +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - fragmentShaderSrc: "uniform float dividerValue; - const float step_w = 0.0015625; - const float step_h = 0.0027778; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; - vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; - vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; - vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; - vec3 t5 = texture2D(source, uv).rgb; - vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; - vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; - vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; - vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; - vec3 rr = -4.0 * t1 - 4.0 * t2 - 4.0 * t4 + 12.0 * t5; - float y = (rr.r + rr.g + rr.b) / 3.0; - vec3 col = vec3(y, y, y) + 0.3; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * texture2D(source, uv); - }" -} diff --git a/basicsuite/Media Player/Effects/EffectGaussianBlur.qml b/basicsuite/Media Player/Effects/EffectGaussianBlur.qml deleted file mode 100755 index f866524..0000000 --- a/basicsuite/Media Player/Effects/EffectGaussianBlur.qml +++ /dev/null @@ -1,136 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.geeks3d.com/20100909/shader-library-gaussian-blur-post-processing-filter-in-glsl/ - -import QtQuick 2.0 - -Item { - id: root - property bool divider: true - property real dividerValue: 1 - property ListModel parameters: ListModel { - ListElement { - name: "radius" - value: 0.5 - } - } - - property alias targetWidth: verticalShader.targetWidth - property alias targetHeight: verticalShader.targetHeight - property alias source: verticalShader.source - - Effect { - id: verticalShader - anchors.fill: parent - dividerValue: parent.dividerValue - property real blurSize: 4.0 * parent.parameters.get(0).value / targetHeight - fragmentShaderSrc: "uniform float dividerValue; - uniform float blurSize; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - c += texture2D(source, uv - vec2(0.0, 4.0*blurSize)) * 0.05; - c += texture2D(source, uv - vec2(0.0, 3.0*blurSize)) * 0.09; - c += texture2D(source, uv - vec2(0.0, 2.0*blurSize)) * 0.12; - c += texture2D(source, uv - vec2(0.0, 1.0*blurSize)) * 0.15; - c += texture2D(source, uv) * 0.18; - c += texture2D(source, uv + vec2(0.0, 1.0*blurSize)) * 0.15; - c += texture2D(source, uv + vec2(0.0, 2.0*blurSize)) * 0.12; - c += texture2D(source, uv + vec2(0.0, 3.0*blurSize)) * 0.09; - c += texture2D(source, uv + vec2(0.0, 4.0*blurSize)) * 0.05; - } else { - c = texture2D(source, qt_TexCoord0); - } - // First pass we don't apply opacity - gl_FragColor = c; - }" - } - - Effect { - id: horizontalShader - anchors.fill: parent - dividerValue: parent.dividerValue - property real blurSize: 4.0 * parent.parameters.get(0).value / parent.targetWidth - fragmentShaderSrc: "uniform float dividerValue; - uniform float blurSize; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - c += texture2D(source, uv - vec2(4.0*blurSize, 0.0)) * 0.05; - c += texture2D(source, uv - vec2(3.0*blurSize, 0.0)) * 0.09; - c += texture2D(source, uv - vec2(2.0*blurSize, 0.0)) * 0.12; - c += texture2D(source, uv - vec2(1.0*blurSize, 0.0)) * 0.15; - c += texture2D(source, uv) * 0.18; - c += texture2D(source, uv + vec2(1.0*blurSize, 0.0)) * 0.15; - c += texture2D(source, uv + vec2(2.0*blurSize, 0.0)) * 0.12; - c += texture2D(source, uv + vec2(3.0*blurSize, 0.0)) * 0.09; - c += texture2D(source, uv + vec2(4.0*blurSize, 0.0)) * 0.05; - } else { - c = texture2D(source, qt_TexCoord0); - } - gl_FragColor = qt_Opacity * c; - }" - source: horizontalShaderSource - - ShaderEffectSource { - id: horizontalShaderSource - sourceItem: verticalShader - smooth: true - hideSource: true - } - } -} - diff --git a/basicsuite/Media Player/Effects/EffectGlow.qml b/basicsuite/Media Player/Effects/EffectGlow.qml deleted file mode 100755 index 2cfee3b..0000000 --- a/basicsuite/Media Player/Effects/EffectGlow.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - fragmentShaderSrc: "uniform float dividerValue; - const float step_w = 0.0015625; - const float step_h = 0.0027778; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; - vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; - vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; - vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; - vec3 t5 = texture2D(source, uv).rgb; - vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; - vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; - vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; - vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; - vec3 xx = t1 + 2.0*t2 + t3 - t7 - 2.0*t8 - t9; - vec3 yy = t1 - t3 + 2.0*t4 - 2.0*t6 + t7 - t9; - vec3 rr = sqrt(xx * xx + yy * yy); - vec3 col = rr * 2.0 * t5; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * texture2D(source, uv); - }" -} diff --git a/basicsuite/Media Player/Effects/EffectIsolate.qml b/basicsuite/Media Player/Effects/EffectIsolate.qml deleted file mode 100755 index 4c569a5..0000000 --- a/basicsuite/Media Player/Effects/EffectIsolate.qml +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "hue" - value: 0.5 - } - ListElement { - name: "width" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real targetHue: parameters.get(0).value * 360 - property real windowWidth: parameters.get(1).value * 60 - - fragmentShaderSrc: "uniform float targetHue; - uniform float windowWidth; - uniform float dividerValue; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void rgb2hsl(vec3 rgb, out float h, out float s, float l) - { - float maxval = max(rgb.r, max(rgb.g, rgb.b)); - float minval = min(rgb.r, min(rgb.g, rgb.b)); - float delta = maxval - minval; - l = (minval + maxval) / 2.0; - s = 0.0; - if (l > 0.0 && l < 1.0) - s = delta / (l < 0.5 ? 2.0 * l : 2.0 - 2.0 * l); - h = 0.0; - if (delta > 0.0) - { - if (rgb.r == maxval && rgb.g != maxval) - h += (rgb.g - rgb.b ) / delta; - if (rgb.g == maxval && rgb.b != maxval) - h += 2.0 + (rgb.b - rgb.r) / delta; - if (rgb.b == maxval && rgb.r != maxval) - h += 4.0 + (rgb.r - rgb.g) / delta; - h *= 60.0; - } - } - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec3 col = texture2D(source, uv).rgb; - float h, s, l; - rgb2hsl(col, h, s, l); - float h2 = (h > targetHue) ? h - 360.0 : h + 360.0; - float y = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b; - vec3 result; - if (uv.x > dividerValue || (abs(h - targetHue) < windowWidth) || (abs(h2 - targetHue) < windowWidth)) - result = col; - else - result = vec3(y, y, y); - gl_FragColor = qt_Opacity * vec4(result, 1.0); - }" -} diff --git a/basicsuite/Media Player/Effects/EffectMagnify.qml b/basicsuite/Media Player/Effects/EffectMagnify.qml deleted file mode 100755 index 01f33a5..0000000 --- a/basicsuite/Media Player/Effects/EffectMagnify.qml +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - id: root - divider: false - parameters: ListModel { - ListElement { - name: "radius" - value: 0.5 - } - ListElement { - name: "diffraction" - value: 0.5 - } - } - - property real posX: -1 - property real posY: -1 - - QtObject { - id: d - property real oldTargetWidth: root.targetWidth - property real oldTargetHeight: root.targetHeight - } - - // Transform slider values, and bind result to shader uniforms - property real radius: parameters.get(0).value * 100 - property real diffractionIndex: parameters.get(1).value - - onTargetWidthChanged: { - if (posX == -1) - posX = targetWidth / 2 - else if (d.oldTargetWidth != 0) - posX *= (targetWidth / d.oldTargetWidth) - d.oldTargetWidth = targetWidth - } - - onTargetHeightChanged: { - if (posY == -1) - posY = targetHeight / 2 - else if (d.oldTargetHeight != 0) - posY *= (targetHeight / d.oldTargetHeight) - d.oldTargetHeight = targetHeight - } - - fragmentShaderSrc: "uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - uniform float radius; - uniform float diffractionIndex; - uniform float targetWidth; - uniform float targetHeight; - uniform float posX; - uniform float posY; - - void main() - { - vec2 tc = qt_TexCoord0; - vec2 center = vec2(posX, posY); - vec2 xy = gl_FragCoord.xy - center.xy; - float r = sqrt(xy.x * xy.x + xy.y * xy.y); - if (r < radius) { - float h = diffractionIndex * 0.5 * radius; - vec2 new_xy = r < radius ? xy * (radius - h) / sqrt(radius * radius - r * r) : xy; - vec2 targetSize = vec2(targetWidth, targetHeight); - tc = (new_xy + center) / targetSize; - tc.y = 1.0 - tc.y; - } - gl_FragColor = qt_Opacity * texture2D(source, tc); - }" - - MouseArea { - anchors.fill: parent - onPositionChanged: { root.posX = mouse.x; root.posY = root.targetHeight - mouse.y } - } -} diff --git a/basicsuite/Media Player/Effects/EffectPageCurl.qml b/basicsuite/Media Player/Effects/EffectPageCurl.qml deleted file mode 100755 index 39947d9..0000000 --- a/basicsuite/Media Player/Effects/EffectPageCurl.qml +++ /dev/null @@ -1,196 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - divider: false - parameters: ListModel { - ListElement { - name: "extent" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real curlExtent: 1.0 - parameters.get(0).value - - fragmentShaderSrc: "uniform float dividerValue; - uniform float curlExtent; - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - const float minAmount = -0.16; - const float maxAmount = 1.3; - const float PI = 3.141592653589793; - const float scale = 512.0; - const float sharpness = 3.0; - const vec4 bgColor = vec4(1.0, 1.0, 0.8, 1.0); - - float amount = curlExtent * (maxAmount - minAmount) + minAmount; - float cylinderCenter = amount; - // 360 degrees * amount - float cylinderAngle = 2.0 * PI * amount; - const float cylinderRadius = 1.0 / PI / 2.0; - - vec3 hitPoint(float hitAngle, float yc, vec3 point, mat3 rrotation) - { - float hitPoint = hitAngle / (2.0 * PI); - point.y = hitPoint; - return rrotation * point; - } - - vec4 antiAlias(vec4 color1, vec4 color2, float distance) - { - distance *= scale; - if (distance < 0.0) return color2; - if (distance > 2.0) return color1; - float dd = pow(1.0 - distance / 2.0, sharpness); - return ((color2 - color1) * dd) + color1; - } - - float distanceToEdge(vec3 point) - { - float dx = abs(point.x > 0.5 ? 1.0 - point.x : point.x); - float dy = abs(point.y > 0.5 ? 1.0 - point.y : point.y); - if (point.x < 0.0) dx = -point.x; - if (point.x > 1.0) dx = point.x - 1.0; - if (point.y < 0.0) dy = -point.y; - if (point.y > 1.0) dy = point.y - 1.0; - if ((point.x < 0.0 || point.x > 1.0) && (point.y < 0.0 || point.y > 1.0)) return sqrt(dx * dx + dy * dy); - return min(dx, dy); - } - - vec4 seeThrough(float yc, vec2 p, mat3 rotation, mat3 rrotation) - { - float hitAngle = PI - (acos(yc / cylinderRadius) - cylinderAngle); - vec3 point = hitPoint(hitAngle, yc, rotation * vec3(p, 1.0), rrotation); - if (yc <= 0.0 && (point.x < 0.0 || point.y < 0.0 || point.x > 1.0 || point.y > 1.0)) - return bgColor; - if (yc > 0.0) - return texture2D(source, p); - vec4 color = texture2D(source, point.xy); - vec4 tcolor = vec4(0.0); - return antiAlias(color, tcolor, distanceToEdge(point)); - } - - vec4 seeThroughWithShadow(float yc, vec2 p, vec3 point, mat3 rotation, mat3 rrotation) - { - float shadow = distanceToEdge(point) * 30.0; - shadow = (1.0 - shadow) / 3.0; - if (shadow < 0.0) - shadow = 0.0; - else - shadow *= amount; - vec4 shadowColor = seeThrough(yc, p, rotation, rrotation); - shadowColor.r -= shadow; - shadowColor.g -= shadow; - shadowColor.b -= shadow; - return shadowColor; - } - - vec4 backside(float yc, vec3 point) - { - vec4 color = texture2D(source, point.xy); - float gray = (color.r + color.b + color.g) / 15.0; - gray += (8.0 / 10.0) * (pow(1.0 - abs(yc / cylinderRadius), 2.0 / 10.0) / 2.0 + (5.0 / 10.0)); - color.rgb = vec3(gray); - return color; - } - - void main(void) - { - const float angle = 30.0 * PI / 180.0; - float c = cos(-angle); - float s = sin(-angle); - mat3 rotation = mat3( - c, s, 0, - -s, c, 0, - 0.12, 0.258, 1 - ); - c = cos(angle); - s = sin(angle); - mat3 rrotation = mat3( - c, s, 0, - -s, c, 0, - 0.15, -0.5, 1 - ); - vec3 point = rotation * vec3(qt_TexCoord0, 1.0); - float yc = point.y - cylinderCenter; - vec4 color = vec4(1.0, 0.0, 0.0, 1.0); - if (yc < -cylinderRadius) { - // See through to background - color = bgColor; - } else if (yc > cylinderRadius) { - // Flat surface - color = texture2D(source, qt_TexCoord0); - } else { - float hitAngle = (acos(yc / cylinderRadius) + cylinderAngle) - PI; - float hitAngleMod = mod(hitAngle, 2.0 * PI); - if ((hitAngleMod > PI && amount < 0.5) || (hitAngleMod > PI/2.0 && amount < 0.0)) { - color = seeThrough(yc, qt_TexCoord0, rotation, rrotation); - } else { - point = hitPoint(hitAngle, yc, point, rrotation); - if (point.x < 0.0 || point.y < 0.0 || point.x > 1.0 || point.y > 1.0) { - color = seeThroughWithShadow(yc, qt_TexCoord0, point, rotation, rrotation); - } else { - color = backside(yc, point); - vec4 otherColor; - if (yc < 0.0) { - float shado = 1.0 - (sqrt(pow(point.x - 0.5, 2.0) + pow(point.y - 0.5, 2.0)) / 0.71); - shado *= pow(-yc / cylinderRadius, 3.0); - shado *= 0.5; - otherColor = vec4(0.0, 0.0, 0.0, shado); - } else { - otherColor = texture2D(source, qt_TexCoord0); - } - color = antiAlias(color, otherColor, cylinderRadius - abs(yc)); - - // This second antialiasing step causes the shader to fail to render, on - // Symbian devices (tested so far using IVE3.5). Running out of scratch - // memory? - } - } - } - gl_FragColor = qt_Opacity * color; - }" -} diff --git a/basicsuite/Media Player/Effects/EffectPassThrough.qml b/basicsuite/Media Player/Effects/EffectPassThrough.qml deleted file mode 100755 index 1f259be..0000000 --- a/basicsuite/Media Player/Effects/EffectPassThrough.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - divider: false -} diff --git a/basicsuite/Media Player/Effects/EffectPixelate.qml b/basicsuite/Media Player/Effects/EffectPixelate.qml deleted file mode 100755 index 4bc73d3..0000000 --- a/basicsuite/Media Player/Effects/EffectPixelate.qml +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "granularity" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real granularity: parameters.get(0).value * 20 - - fragmentShaderSrc: "uniform float dividerValue; - uniform float granularity; - uniform float targetWidth; - uniform float targetHeight; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec2 tc = qt_TexCoord0; - if (uv.x < dividerValue && granularity > 0.0) { - float dx = granularity / targetWidth; - float dy = granularity / targetHeight; - tc = vec2(dx*(floor(uv.x/dx) + 0.5), - dy*(floor(uv.y/dy) + 0.5)); - } - gl_FragColor = qt_Opacity * texture2D(source, tc); - }" -} diff --git a/basicsuite/Media Player/Effects/EffectPosterize.qml b/basicsuite/Media Player/Effects/EffectPosterize.qml deleted file mode 100755 index 4b661a5..0000000 --- a/basicsuite/Media Player/Effects/EffectPosterize.qml +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "gamma" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real gamma: parameters.get(0).value - - property real numColors: 8.0 - - fragmentShaderSrc: "uniform float dividerValue; - uniform float gamma; - uniform float numColors; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - vec3 x = texture2D(source, uv).rgb; - x = pow(x, vec3(gamma, gamma, gamma)); - x = x * numColors; - x = floor(x); - x = x / numColors; - x = pow(x, vec3(1.0/gamma)); - c = vec4(x, 1.0); - } else { - c = texture2D(source, uv); - } - gl_FragColor = qt_Opacity * c; - }" -} diff --git a/basicsuite/Media Player/Effects/EffectRipple.qml b/basicsuite/Media Player/Effects/EffectRipple.qml deleted file mode 100755 index 7a82f50..0000000 --- a/basicsuite/Media Player/Effects/EffectRipple.qml +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "amplitude" - value: 0.5 - } - ListElement { - name: "frequency" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real amplitude: parameters.get(0).value * 0.03 - property real n: parameters.get(1).value * 7 - - property real time: 0 - NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } - - fragmentShaderSrc: "uniform float dividerValue; - uniform float targetWidth; - uniform float targetHeight; - uniform float time; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - const float PI = 3.1415926535; - const int ITER = 7; - const float RATE = 0.1; - uniform float amplitude; - uniform float n; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec2 tc = uv; - vec2 p = vec2(-1.0 + 2.0 * gl_FragCoord.x / targetWidth, -(-1.0 + 2.0 * gl_FragCoord.y / targetHeight)); - float diffx = 0.0; - float diffy = 0.0; - vec4 col; - if (uv.x < dividerValue) { - for (int i=0; i= (time - shock.z))) { - float diff = (distance - time); - float powDiff = 1.0 - pow(abs(diff*shock.x), shock.y*weight); - float diffTime = diff * powDiff; - vec2 diffUV = normalize(uv - center); - tc += (diffUV * diffTime); - } - } - gl_FragColor = qt_Opacity * texture2D(source, tc); - }" -} diff --git a/basicsuite/Media Player/Effects/EffectSobelEdgeDetection1.qml b/basicsuite/Media Player/Effects/EffectSobelEdgeDetection1.qml deleted file mode 100755 index 56f4869..0000000 --- a/basicsuite/Media Player/Effects/EffectSobelEdgeDetection1.qml +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "threshold" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real mixLevel: parameters.get(0).value - property real targetSize: 250 - (200 * mixLevel) // TODO: fix ... - property real resS: targetSize - property real resT: targetSize - - fragmentShaderSrc: "uniform float dividerValue; - uniform float mixLevel; - uniform float resS; - uniform float resT; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - vec2 st = qt_TexCoord0.st; - vec3 irgb = texture2D(source, st).rgb; - vec2 stp0 = vec2(1.0 / resS, 0.0); - vec2 st0p = vec2(0.0 , 1.0 / resT); - vec2 stpp = vec2(1.0 / resS, 1.0 / resT); - vec2 stpm = vec2(1.0 / resS, -1.0 / resT); - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - float i00 = dot(texture2D(source, st).rgb, W); - float im1m1 = dot(texture2D(source, st-stpp).rgb, W); - float ip1p1 = dot(texture2D(source, st+stpp).rgb, W); - float im1p1 = dot(texture2D(source, st-stpm).rgb, W); - float ip1m1 = dot(texture2D(source, st+stpm).rgb, W); - float im10 = dot(texture2D(source, st-stp0).rgb, W); - float ip10 = dot(texture2D(source, st+stp0).rgb, W); - float i0m1 = dot(texture2D(source, st-st0p).rgb, W); - float i0p1 = dot(texture2D(source, st+st0p).rgb, W); - float h = -1.0*im1p1 - 2.0*i0p1 - 1.0*ip1p1 + 1.0*im1m1 + 2.0*i0m1 + 1.0*ip1m1; - float v = -1.0*im1m1 - 2.0*im10 - 1.0*im1p1 + 1.0*ip1m1 + 2.0*ip10 + 1.0*ip1p1; - float mag = 1.0 - length(vec2(h, v)); - vec3 target = vec3(mag, mag, mag); - c = vec4(target, 1.0); - } else { - c = texture2D(source, qt_TexCoord0); - } - gl_FragColor = qt_Opacity * c; - }" -} diff --git a/basicsuite/Media Player/Effects/EffectSobelEdgeDetection2.qml b/basicsuite/Media Player/Effects/EffectSobelEdgeDetection2.qml deleted file mode 100755 index 938912d..0000000 --- a/basicsuite/Media Player/Effects/EffectSobelEdgeDetection2.qml +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "threshold" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real weight: parameters.get(0).value - - fragmentShaderSrc: "#version 130 - uniform sampler2D source; - uniform float dividerValue; - uniform float weight; - mat3 G[2] = mat3[]( - mat3( 1.0, 2.0, 1.0, 0.0, 0.0, 0.0, -1.0, -2.0, -1.0 ), - mat3( 1.0, 0.0, -1.0, 2.0, 0.0, -2.0, 1.0, 0.0, -1.0 ) - ); - uniform lowp float qt_Opacity; - in vec2 qt_TexCoord0; - out vec4 FragmentColor; - void main() { - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - mat3 intensity; - float conv[2]; - vec3 sample; - for (int i=0; i<3; ++i) { - for (int j=0; j<3; ++j) { - sample = texelFetch(source, ivec2(gl_FragCoord) + ivec2(i-1, j-1), 0).rgb; - intensity[i][j] = length(sample) * weight; - } - } - for (int i=0; i<2; ++i) { - float dp3 = dot(G[i][0], intensity[0]) + dot(G[i][1], intensity[1]) + dot(G[i][2], intensity[2]); - conv[i] = dp3 * dp3; - } - c = vec4(0.5 * sqrt(conv[0]*conv[0] + conv[1]*conv[1])); - } else { - c = texture2D(source, qt_TexCoord0); - } - FragmentColor = qt_Opacity * c; - }" -} diff --git a/basicsuite/Media Player/Effects/EffectTiltShift.qml b/basicsuite/Media Player/Effects/EffectTiltShift.qml deleted file mode 100755 index d0cf9c4..0000000 --- a/basicsuite/Media Player/Effects/EffectTiltShift.qml +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - fragmentShaderSrc: "uniform float dividerValue; - const float step_w = 0.0015625; - const float step_h = 0.0027778; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - vec3 blur() - { - vec2 uv = qt_TexCoord0.xy; - float y = uv.y < 0.4 ? uv.y : 1.0 - uv.y; - float dist = 8.0 - 20.0 * y; - vec3 acc = vec3(0.0, 0.0, 0.0); - for (float y=-2.0; y<=2.0; ++y) { - for (float x=-2.0; x<=2.0; ++x) { - acc += texture2D(source, vec2(uv.x + dist * x * step_w, uv.y + 0.5 * dist * y * step_h)).rgb; - } - } - return acc / 25.0; - } - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec3 col; - if (uv.x > dividerValue || (uv.y >= 0.4 && uv.y <= 0.6)) - col = texture2D(source, uv).rgb; - else - col = blur(); - gl_FragColor = qt_Opacity * vec4(col, 1.0); - }" -} diff --git a/basicsuite/Media Player/Effects/EffectToon.qml b/basicsuite/Media Player/Effects/EffectToon.qml deleted file mode 100755 index a17ad1c..0000000 --- a/basicsuite/Media Player/Effects/EffectToon.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "threshold" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real threshold: parameters.get(0).value - property real targetSize: 250 - (200 * threshold) // TODO: fix ... - property real resS: targetSize - property real resT: targetSize - - // TODO - property real magTol: 0.3 - property real quantize: 8.0 - - fragmentShaderSrc: "uniform float dividerValue; - uniform float threshold; - uniform float resS; - uniform float resT; - uniform float magTol; - uniform float quantize; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec4 color = vec4(1.0, 0.0, 0.0, 1.1); - vec2 uv = qt_TexCoord0.xy; - if (uv.x < dividerValue) { - vec2 st = qt_TexCoord0.st; - vec3 rgb = texture2D(source, st).rgb; - vec2 stp0 = vec2(1.0/resS, 0.0); - vec2 st0p = vec2(0.0 , 1.0/resT); - vec2 stpp = vec2(1.0/resS, 1.0/resT); - vec2 stpm = vec2(1.0/resS, -1.0/resT); - float i00 = dot( texture2D(source, st).rgb, vec3(0.2125,0.7154,0.0721)); - float im1m1 = dot( texture2D(source, st-stpp).rgb, vec3(0.2125,0.7154,0.0721)); - float ip1p1 = dot( texture2D(source, st+stpp).rgb, vec3(0.2125,0.7154,0.0721)); - float im1p1 = dot( texture2D(source, st-stpm).rgb, vec3(0.2125,0.7154,0.0721)); - float ip1m1 = dot( texture2D(source, st+stpm).rgb, vec3(0.2125,0.7154,0.0721)); - float im10 = dot( texture2D(source, st-stp0).rgb, vec3(0.2125,0.7154,0.0721)); - float ip10 = dot( texture2D(source, st+stp0).rgb, vec3(0.2125,0.7154,0.0721)); - float i0m1 = dot( texture2D(source, st-st0p).rgb, vec3(0.2125,0.7154,0.0721)); - float i0p1 = dot( texture2D(source, st+st0p).rgb, vec3(0.2125,0.7154,0.0721)); - float h = -1.*im1p1 - 2.*i0p1 - 1.*ip1p1 + 1.*im1m1 + 2.*i0m1 + 1.*ip1m1; - float v = -1.*im1m1 - 2.*im10 - 1.*im1p1 + 1.*ip1m1 + 2.*ip10 + 1.*ip1p1; - float mag = sqrt(h*h + v*v); - if (mag > magTol) { - color = vec4(0.0, 0.0, 0.0, 1.0); - } - else { - rgb.rgb *= quantize; - rgb.rgb += vec3(0.5, 0.5, 0.5); - ivec3 irgb = ivec3(rgb.rgb); - rgb.rgb = vec3(irgb) / quantize; - color = vec4(rgb, 1.0); - } - } else { - color = texture2D(source, uv); - } - gl_FragColor = qt_Opacity * color; - }" -} diff --git a/basicsuite/Media Player/Effects/EffectVignette.qml b/basicsuite/Media Player/Effects/EffectVignette.qml deleted file mode 100755 index 5ec5090..0000000 --- a/basicsuite/Media Player/Effects/EffectVignette.qml +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - fragmentShaderSrc: "uniform float dividerValue; - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec4 orig = texture2D(source, uv); - float cr = pow(0.1, 2.0); - float pt = pow(uv.x - 0.5, 2.0) + pow(uv.y - 0.5, 2.0); - float d = pt - cr; - float cf = 1.0; - if (d > 0.0) - cf = 1.0 - 2.0 * d; - vec3 col = cf * orig.rgb; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * orig; - }" -} diff --git a/basicsuite/Media Player/Effects/EffectWarhol.qml b/basicsuite/Media Player/Effects/EffectWarhol.qml deleted file mode 100755 index 1e40b30..0000000 --- a/basicsuite/Media Player/Effects/EffectWarhol.qml +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - fragmentShaderSrc: "uniform float dividerValue; - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec4 orig = texture2D(source, uv); - vec3 col = orig.rgb; - float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b; - y = y < 0.3 ? 0.0 : (y < 0.6 ? 0.5 : 1.0); - if (y == 0.5) - col = vec3(0.8, 0.0, 0.0); - else if (y == 1.0) - col = vec3(0.9, 0.9, 0.0); - else - col = vec3(0.0, 0.0, 0.0); - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * orig; - }" -} diff --git a/basicsuite/Media Player/Effects/EffectWobble.qml b/basicsuite/Media Player/Effects/EffectWobble.qml deleted file mode 100755 index 4b07639..0000000 --- a/basicsuite/Media Player/Effects/EffectWobble.qml +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "amplitude" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real amplitude: parameters.get(0).value * 0.05 - - property real frequency: 20 - property real time: 0 - - NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } - - fragmentShaderSrc: "uniform float amplitude; - uniform float dividerValue; - uniform float frequency; - uniform float time; - - uniform sampler2D source; - uniform lowp float qt_Opacity; - varying vec2 qt_TexCoord0; - - void main() - { - vec2 uv = qt_TexCoord0.xy; - vec2 tc = qt_TexCoord0; - if (uv.x < dividerValue) { - vec2 p = sin(time + frequency * qt_TexCoord0); - tc += amplitude * vec2(p.y, -p.x); - } - gl_FragColor = qt_Opacity * texture2D(source, tc); - }" -} diff --git a/basicsuite/Media Player/FileBrowser.qml b/basicsuite/Media Player/FileBrowser.qml deleted file mode 100644 index f9f2f81..0000000 --- a/basicsuite/Media Player/FileBrowser.qml +++ /dev/null @@ -1,415 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt.labs.folderlistmodel 2.0 - -Rectangle { - id: fileBrowser - color: "transparent" - - property string folder: "file:///data/videos" - - signal fileSelected(string file) - - function selectFile(file) { - if (file != "") - folder = loader.item.folders.folder - loader.sourceComponent = undefined - if (file != "") - fileBrowser.fileSelected("file://" + file) - } - - Loader { - id: loader - } - - function show() { - loader.sourceComponent = fileBrowserComponent - loader.item.parent = fileBrowser - loader.item.anchors.fill = fileBrowser - loader.item.folder = fileBrowser.folder - } - - Component { - id: fileBrowserComponent - - Rectangle { - id: root - gradient: Gradient { - GradientStop { position: 0; color: "#111111" } - GradientStop { position: 1; color: "#222222"} - } - property bool showFocusHighlight: false - property variant folders: folders1 - property variant view: view1 - property alias folder: folders1.folder - property color textColor: "white" - - FolderListModel { - id: folders1 - folder: folder - } - - FolderListModel { - id: folders2 - folder: folder - } - - SystemPalette { - id: palette - } - - Component { - id: folderDelegate - - Rectangle { - id: wrapper - function launch() { - if (folders.isFolder(index)) - down(filePath); - else - fileBrowser.selectFile(filePath) - } - width: root.width - height: 50 - color: "transparent" - - Rectangle { - id: highlight; visible: false - anchors.fill: parent - color: palette.highlight - gradient: Gradient { - GradientStop { id: t1; position: 0.0; color: palette.highlight } - GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } - } - } - - Item { - width: 40; height: 40 - y: 3 - x: 5 - Image { - source: "images/FileButton.png" - width: 34; height: 34 - anchors.centerIn: parent - visible: folders.isFolder(index) - } - } - - Text { - id: nameText - anchors.fill: parent; verticalAlignment: Text.AlignVCenter - text: fileName - anchors.leftMargin: 54 - font.pixelSize: 24 - color: (wrapper.ListView.isCurrentItem && root.showFocusHighlight) ? palette.highlightedText : textColor - elide: Text.ElideRight - } - - MouseArea { - id: mouseRegion - anchors.fill: parent - onPressed: { - root.showFocusHighlight = false; - wrapper.ListView.view.currentIndex = index; - } - onClicked: { if (folders == wrapper.ListView.view.model) launch() } - } - - states: [ - State { - name: "pressed" - when: mouseRegion.pressed - PropertyChanges { target: highlight; visible: true } - PropertyChanges { target: nameText; color: palette.highlightedText } - } - ] - } - } - - ListView { - id: view1 - anchors.top: titleBar.bottom - anchors.topMargin: 15 - anchors.bottom: parent.bottom - x: 0 - width: parent.width - model: folders1 - delegate: folderDelegate - highlight: Rectangle { - color: palette.highlight - visible: root.showFocusHighlight && view1.count != 0 - gradient: Gradient { - GradientStop { id: t1; position: 0.0; color: palette.highlight } - GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } - } - width: view1.currentItem == null ? 0 : view1.currentItem.width - } - highlightMoveVelocity: 1000 - pressDelay: 100 - focus: true - state: "current" - states: [ - State { - name: "current" - PropertyChanges { target: view1; x: 0 } - }, - State { - name: "exitLeft" - PropertyChanges { target: view1; x: -root.width } - }, - State { - name: "exitRight" - PropertyChanges { target: view1; x: root.width } - } - ] - transitions: [ - Transition { - to: "current" - SequentialAnimation { - NumberAnimation { properties: "x"; duration: 250 } - } - }, - Transition { - NumberAnimation { properties: "x"; duration: 250 } - NumberAnimation { properties: "x"; duration: 250 } - } - ] - Keys.onPressed: root.keyPressed(event.key) - } - - ListView { - id: view2 - anchors.top: titleBar.bottom - anchors.topMargin: 15 - anchors.bottom: parent.bottom - x: parent.width - width: parent.width - model: folders2 - delegate: folderDelegate - highlight: Rectangle { - color: palette.highlight - visible: root.showFocusHighlight && view2.count != 0 - gradient: Gradient { - GradientStop { id: t1; position: 0.0; color: palette.highlight } - GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } - } - width: view1.currentItem == null ? 0 : view1.currentItem.width - } - highlightMoveVelocity: 1000 - pressDelay: 100 - states: [ - State { - name: "current" - PropertyChanges { target: view2; x: 0 } - }, - State { - name: "exitLeft" - PropertyChanges { target: view2; x: -root.width } - }, - State { - name: "exitRight" - PropertyChanges { target: view2; x: root.width } - } - ] - transitions: [ - Transition { - to: "current" - SequentialAnimation { - NumberAnimation { properties: "x"; duration: 250 } - } - }, - Transition { - NumberAnimation { properties: "x"; duration: 250 } - } - ] - Keys.onPressed: root.keyPressed(event.key) - } - - Keys.onPressed: { - root.keyPressed(event.key); - if (event.key == Qt.Key_Return || event.key == Qt.Key_Select || event.key == Qt.Key_Right) { - view.currentItem.launch(); - event.accepted = true; - } else if (event.key == Qt.Key_Left) { - up(); - } - } - - Rectangle { - width: parent.width; - height: 70 - color: "#111111" - y: -7 - id: titleBar - - Rectangle { - id: upButton - width: 90 - height: titleBar.height - 7 - color: "transparent" - Image { anchors.centerIn: parent; source: "images/up.png"; width: 32; height: 32 } - MouseArea { id: upRegion; anchors.centerIn: parent - anchors.fill: parent - onClicked: if (folders.parentFolder != "") up() - } - states: [ - State { - name: "pressed" - when: upRegion.pressed - PropertyChanges { target: upButton; color: palette.highlight } - } - ] - } - -// Rectangle { -// color: "gray" -// x: 70 -// width: 1 -// height: 63 -// } - - Rectangle { - id: cancelButton - width: 100 - height: titleBar.height - 7 - color: "transparent" - anchors { left: upButton.right; leftMargin: 1; } - - Text { - anchors { fill: parent; topMargin: 3 } - text: "Cancel" - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 22 - } - - MouseArea { - id: cancelRegion - anchors.fill: parent - onClicked: fileBrowser.selectFile("") - } - - states: [ - State { - name: "pressed" - when: cancelRegion.pressed - PropertyChanges { target: cancelButton; color: palette.highlight } - } - ] - } - -// Rectangle { -// color: "gray" -// x: 171 -// width: 1 -// height: 63 -// } - - Text { - anchors.left: cancelButton.right; anchors.right: parent.right; height: parent.height - anchors.leftMargin: 4; anchors.rightMargin: 4 - text: String(folders.folder).replace("file://", "") - color: "white" - elide: Text.ElideLeft; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignVCenter - font.pixelSize: 28 - } - - Rectangle { - width: parent.width - anchors.bottom: parent.bottom - anchors.bottomMargin: 3 - height: 2 - color: palette.highlight - } - } - - function down(path) { - if (folders == folders1) { - view = view2 - folders = folders2; - view1.state = "exitLeft"; - } else { - view = view1 - folders = folders1; - view2.state = "exitLeft"; - } - view.x = root.width; - view.state = "current"; - view.focus = true; - folders.folder = "file://" + path; - } - - function up() { - var path = folders.parentFolder; - if (folders == folders1) { - view = view2 - folders = folders2; - view1.state = "exitRight"; - } else { - view = view1 - folders = folders1; - view2.state = "exitRight"; - } - view.x = -root.width; - view.state = "current"; - view.focus = true; - folders.folder = path; - } - - function keyPressed(key) { - switch (key) { - case Qt.Key_Up: - case Qt.Key_Down: - case Qt.Key_Left: - case Qt.Key_Right: - root.showFocusHighlight = true; - break; - default: - // do nothing - break; - } - } - } - } -} diff --git a/basicsuite/Media Player/ImageButton.qml b/basicsuite/Media Player/ImageButton.qml deleted file mode 100755 index 3644f37..0000000 --- a/basicsuite/Media Player/ImageButton.qml +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - - property alias enabled: mouseArea.enabled - property alias imageSource: image.source - - property bool checkable: false - property bool checked: false - property alias hover: mouseArea.containsMouse - property alias pressed: mouseArea.pressed - - opacity: enabled ? 1.0 : 0.3 - signal clicked - - width: image.width - height: image.height - - Image { - id: image - anchors.centerIn: parent - visible: true - opacity: pressed ? 0.6 : 1 - smooth: true - } - -// ColorOverlay { -// id: glowEffect -// anchors.fill: image -// source: image -// color: pressed ? "#22000000" : checked ? "orange" : "white" -// visible: checked || hover || pressed -// } - - MouseArea { - id: mouseArea - hoverEnabled: true - anchors.fill: root - onPositionChanged: applicationWindow.resetTimer() - onClicked: root.clicked(); - } -} diff --git a/basicsuite/Media Player/Intro.qml b/basicsuite/Media Player/Intro.qml deleted file mode 100644 index 5e1332f..0000000 --- a/basicsuite/Media Player/Intro.qml +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: root - color: "#111111" - -// Image { -// anchors.fill: parent -// source: "images/gradient.png" -// } - - Image { - id: logo - anchors.centerIn: root - anchors.verticalCenterOffset: -60 - source: "images/qt-logo.png" - opacity: 0.5 - - } -// Rectangle { -// id: button -// opacity: mouse.containsMouse ? 1 : 0 -// Behavior on opacity {NumberAnimation{duration: 100}} -// color: mouse.pressed ? "#11000000" : "#11ffffff" -// anchors.top: logo.bottom -// anchors.horizontalCenter: parent.horizontalCenter -// border.color: "#33ffffff" -// width: text.width + 40 -// height: text.height + 4 -// antialiasing: true -// radius: 4 -// MouseArea { -// id: mouse -// anchors.fill: parent -// hoverEnabled: true -// onClicked: applicationWindow.openVideo() -// } -// } - -// Text { -// id: text -// color: "#44ffffff" -// text: "Open File" -// font.bold: true -// font.pixelSize: 18 -// anchors.centerIn: button -// } -} diff --git a/basicsuite/Media Player/Media Player.qmlproject b/basicsuite/Media Player/Media Player.qmlproject deleted file mode 100644 index 4d32f75..0000000 --- a/basicsuite/Media Player/Media Player.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/Media Player/MetadataView.qml b/basicsuite/Media Player/MetadataView.qml deleted file mode 100644 index 4d45b75..0000000 --- a/basicsuite/Media Player/MetadataView.qml +++ /dev/null @@ -1,213 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: root - - property variant mediaPlayer: null - - anchors.fill: parent - color: "#AA000000" - Behavior on opacity { NumberAnimation { } } - opacity: 0 - - Rectangle { - height: column.height + 30 - width: 500 - color: "#BB222222" - anchors.centerIn: parent - anchors.verticalCenterOffset: -50 - - - Column { - id: column - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: 15 - spacing: 12 - - Text { - text: "Media Type: " + (mediaPlayer ? mediaPlayer.metaData.mediaType : "") - visible: mediaPlayer && mediaPlayer.metaData.mediaType !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Title: " + (mediaPlayer ? mediaPlayer.metaData.title : "") - visible: mediaPlayer && mediaPlayer.metaData.title !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Artist: " + (mediaPlayer ? mediaPlayer.metaData.leadPerformer : "") - visible: mediaPlayer && mediaPlayer.metaData.leadPerformer !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Artist: " + (mediaPlayer ? mediaPlayer.metaData.contributingArtist : "") - visible: mediaPlayer && mediaPlayer.metaData.contributingArtist !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Album: " + (mediaPlayer ? mediaPlayer.metaData.albumTitle : "") - visible: mediaPlayer && mediaPlayer.metaData.albumTitle !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Album Artist: " + (mediaPlayer ? mediaPlayer.metaData.albumArtist : "") - visible: mediaPlayer && mediaPlayer.metaData.albumArtist !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Author: " + (mediaPlayer ? mediaPlayer.metaData.author : "") - visible: mediaPlayer && mediaPlayer.metaData.author !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Composer: " + (mediaPlayer ? mediaPlayer.metaData.composer : "") - visible: mediaPlayer && mediaPlayer.metaData.composer !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Writer: " + (mediaPlayer ? mediaPlayer.metaData.writer : "") - visible: mediaPlayer && mediaPlayer.metaData.writer !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Genre: " + (mediaPlayer ? mediaPlayer.metaData.genre : "") - visible: mediaPlayer && mediaPlayer.metaData.genre !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Track Number: " + (mediaPlayer ? mediaPlayer.metaData.trackNumber : "") - visible: mediaPlayer && mediaPlayer.metaData.trackNumber !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Year: " + (mediaPlayer ? mediaPlayer.metaData.year : "") - visible: mediaPlayer && mediaPlayer.metaData.year !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Duration: " + (mediaPlayer ? Qt.formatTime(new Date(mediaPlayer.metaData.duration), mediaPlayer.metaData.duration >= 3600000 ? "H:mm:ss" : "m:ss") : "") - visible: mediaPlayer && mediaPlayer.metaData.duration !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Resolution: " + (mediaPlayer && mediaPlayer.metaData.resolution !== undefined ? (mediaPlayer.metaData.resolution.width + "x" + mediaPlayer.metaData.resolution.height) : "") - visible: mediaPlayer && mediaPlayer.metaData.resolution !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Audio Bitrate: " + (mediaPlayer ? Math.round(mediaPlayer.metaData.audioBitRate / 1000) + " kbps" : "") - visible: mediaPlayer && mediaPlayer.metaData.audioBitRate !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Video Bitrate: " + (mediaPlayer ? Math.round(mediaPlayer.metaData.videoBitRate / 1000) + " kbps" : "") - visible: mediaPlayer && mediaPlayer.metaData.videoBitRate !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - Text { - text: "Date: " + (mediaPlayer ? Qt.formatDate(mediaPlayer.metaData.date) : "") - visible: mediaPlayer && mediaPlayer.metaData.date !== undefined - color: "white" - font.pixelSize: 24 - width: parent.width - wrapMode: Text.WordWrap - } - } - } - - MouseArea { - anchors.fill: parent - onClicked: root.opacity = 0 - enabled: root.opacity !== 0 - } -} diff --git a/basicsuite/Media Player/ParameterPanel.qml b/basicsuite/Media Player/ParameterPanel.qml deleted file mode 100644 index 51b9938..0000000 --- a/basicsuite/Media Player/ParameterPanel.qml +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: root - height: view.model.count * sliderHeight - color: "#BB333333" - property color lineColor: "black" - property real spacing: 10 - property real sliderHeight: 50 - property bool isMouseAbove: mouseAboveMonitor.containsMouse - - property ListModel model: ListModel { } - - MouseArea { - id: mouseAboveMonitor - anchors.fill: parent - hoverEnabled: true; - } - - Component { - id: editDelegate - - Rectangle { - id: delegate - width: parent.width - height: root.sliderHeight - color: "transparent" - - Text { - id: text - text: name - color: "white" - anchors { - top: parent.top - bottom: parent.bottom - leftMargin: 15 - left: parent.left - } - horizontalAlignment: Text.AlignRight - verticalAlignment: Text.AlignVCenter - font.pixelSize: 20 - font.capitalization: Font.Capitalize - width: 90 - } - - Slider { - anchors { - verticalCenter: text.verticalCenter - verticalCenterOffset: 3 - left: text.right - leftMargin: 20 - right: parent.right - rightMargin: 20 - } - value: model.value - onValueChanged: view.model.setProperty(index, "value", value) - } - } - } - - ListView { - id: view - anchors.fill: parent - anchors.margins: 8 - model: root.model - delegate: editDelegate - interactive: false - } -} diff --git a/basicsuite/Media Player/PlaybackControl.qml b/basicsuite/Media Player/PlaybackControl.qml deleted file mode 100755 index f83f358..0000000 --- a/basicsuite/Media Player/PlaybackControl.qml +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Row { - id: root - spacing: 26 - height: playButton.height - - property bool isPlaybackEnabled: false - property bool isPlaying: false - - signal forwardButtonPressed() - signal reverseButtonPressed() - signal playButtonPressed() - signal stopButtonPressed() - - //Playback Controls - ImageButton { - id: rateReverseButton - enabled: isPlaybackEnabled - imageSource: "images/RateButtonReverse.png" - anchors.verticalCenter: root.verticalCenter - onClicked: { - reverseButtonPressed(); - } - } - ImageButton { - id: playButton - enabled: isPlaybackEnabled - imageSource: !isPlaying ? "images/PlayButton.png" : "images/PauseButton.png" - anchors.verticalCenter: root.verticalCenter -// anchors.right: rateForwardButton.left -// anchors.rightMargin: 10 - onClicked: { - playButtonPressed(); - } - } -// Rectangle{ -// enabled: isPlaybackEnabled -// color: "white" -// opacity: enabled ? 1 : 0.3 -// width: playButton.width -// height: width -// anchors.verticalCenter: root.verticalCenter -// MouseArea { -// anchors.fill: parent -// onClicked: stopButtonPressed(); -// } -// } - - ImageButton { - id: rateForwardButton - enabled: isPlaybackEnabled - imageSource: "images/RateButtonForward.png" - anchors.verticalCenter: root.verticalCenter - onClicked: { - forwardButtonPressed(); - } - } -} diff --git a/basicsuite/Media Player/SeekControl.qml b/basicsuite/Media Player/SeekControl.qml deleted file mode 100755 index 19a1fb7..0000000 --- a/basicsuite/Media Player/SeekControl.qml +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Item { - id: root - height: seekSlider.height - - property int position: 0 - property int duration: 0 - property bool seekable: false - property alias pressed : seekSlider.pressed - property bool enabled - - signal seekValueChanged(int newPosition) - - onPositionChanged: { - elapsedText.text = formatTime(position); - seekSlider.value = position; - } - - onDurationChanged: { - remainingText.text = formatTime(duration); - } - - Text { - id: elapsedText - anchors.verticalCenter: seekSlider.verticalCenter - anchors.left: root.left - text: "00:00" - font.pixelSize: 20 - color: "#cccccc" - } - - Slider { - id: seekSlider - anchors.leftMargin: 30 - anchors.rightMargin: 30 - anchors.left: elapsedText.right - anchors.right: remainingText.left - anchors.verticalCenter: root.verticalCenter - mutable: root.seekable - enabled: root.enabled - - minimum: 0.0 - maximum: root.duration !== 0 ? root.duration : 1 - - onValueChangedByHandle: { - seekValueChanged(newValue); - applicationWindow.resetTimer() - } - } - - Text { - id: remainingText - anchors.verticalCenter: seekSlider.verticalCenter - anchors.right: root.right - text: "00:00" - font.pixelSize: 20 - color: "#cccccc" - } - - function formatTime(time) { - time = time / 1000 - var hours = Math.floor(time / 3600); - time = time - hours * 3600; - var minutes = Math.floor(time / 60); - var seconds = Math.floor(time - minutes * 60); - - if (hours > 0) - return formatTimeBlock(hours) + ":" + formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); - else - return formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); - - } - - function formatTimeBlock(time) { - if (time === 0) - return "00" - if (time < 10) - return "0" + time; - else - return time.toString(); - } -} diff --git a/basicsuite/Media Player/Slider.qml b/basicsuite/Media Player/Slider.qml deleted file mode 100644 index da9732f..0000000 --- a/basicsuite/Media Player/Slider.qml +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Item { - id: slider - - height: handleBack.height - // value is read/write. - property real value: 0 - property real maximum: 1 - property real minimum: 0 - property int xMax: width - handle.width - onXMaxChanged: updatePos() - onMinimumChanged: updatePos() - onValueChanged: if (!pressed) updatePos() - property bool mutable: true - property alias pressed : backgroundMouse.pressed - - signal valueChangedByHandle(int newValue) - - function updatePos() { - if (maximum > minimum) { - var pos = 0 + (value - minimum) * slider.xMax / (maximum - minimum); - pos = Math.min(pos, width - handle.width - 0); - pos = Math.max(pos, 0); - handle.x = pos; - } else { - handle.x = 0; - } - } - - Rectangle { - id: background - width: slider.width - anchors.verticalCenter: slider.verticalCenter - height: 2 - color: "#666666" - - MouseArea { - id: backgroundMouse - anchors.fill: parent - anchors.topMargin: -24 - anchors.bottomMargin: -24 - enabled: slider.mutable - drag.target: handle - drag.axis: Drag.XAxis - drag.minimumX: 0 - drag.maximumX: slider.xMax - onPressedChanged: { - value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); - valueChangedByHandle(value); - updatePos(); - } - onPositionChanged: { - value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); - valueChangedByHandle(value); - } - onWheel: { - value = Math.max(minimum, Math.min(maximum, value + (wheel.angleDelta.y > 0 ? 1 : -1) * (10 / slider.xMax) * (slider.maximum - slider.minimum))); - valueChangedByHandle(value); - updatePos(); - } - } - } - - Rectangle { - id: progress - height: 5 - anchors.verticalCenter: background.verticalCenter - anchors.left: background.left - anchors.right: handle.right - anchors.rightMargin: handle.width / 2 - visible: slider.enabled - color: "#98c66c" - } - - Rectangle { - id: handleBack - width: 40 - height: width - radius: width / 2 - color: "#8898c66c" - antialiasing: true - anchors.centerIn: handle - visible: handle.visible - } - - Rectangle { - id: handle - width: 14 - height: width - radius: width / 2 - antialiasing: true - color: "#98c66c" - anchors.verticalCenter: background.verticalCenter - visible: slider.enabled - } -} - diff --git a/basicsuite/Media Player/UrlBar.qml b/basicsuite/Media Player/UrlBar.qml deleted file mode 100644 index c3cd648..0000000 --- a/basicsuite/Media Player/UrlBar.qml +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: root - height: 50 - signal urlAccepted(string text) - color: "#cc222222" - Behavior on opacity { NumberAnimation{} } - onOpacityChanged: { - if (opacity == 1) - urlInput.focus = true - else if (opacity == 0) - urlInput.focus = false - } - - Keys.onEscapePressed: root.opacity = 0 - - MouseArea { - anchors.fill: parent - onClicked: root.opacity = 0 - } - - Text { - anchors.bottom: urlBar.top - anchors.left: urlBar.left - anchors.bottomMargin: 8 - text: "Enter URL" - color: "white" - font.pixelSize: 20 - } - - BorderImage { - id: urlBar - source: "images/ControlBar.png" - border.top: 12 - border.bottom: 12 - border.left: 12 - border.right: 12 - height: 70 - anchors.centerIn: parent - anchors.verticalCenterOffset: -170 - width: 600 - - Rectangle { - anchors.fill: parent - anchors.margins: 16 - color: "#66ffffff" - border.color: "#bbffffff" - radius: 2 - antialiasing: true - - TextInput { - id: urlInput - selectionColor: "#aaffffff" - selectedTextColor: "black" - selectByMouse: true - anchors.fill: parent - anchors.margins: 5 - font.pixelSize: 24 - color: "black" - text: "http://" - onAccepted: root.urlAccepted(urlInput.text); - - } - } - } - -// Rectangle { -// anchors.right: urlBar.left -// anchors.rightMargin: 32 -// anchors.verticalCenter: urlBar.verticalCenter -// height: 70 -// width: 70 -// color: "gray" -// MouseArea { -// anchors.fill: parent -// onClicked: { urlInput.text = ""; urlInput.paste(); } -// } -// } -} diff --git a/basicsuite/Media Player/VolumeControl.qml b/basicsuite/Media Player/VolumeControl.qml deleted file mode 100755 index 62375f1..0000000 --- a/basicsuite/Media Player/VolumeControl.qml +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - width: 210 - height: volumeUp.height - - property alias volume: volumeSlider.value - - //Volume Controls - ImageButton { - id: volumeDown - imageSource: "images/VolumeDown.png" - anchors.verticalCenter: root.verticalCenter - anchors.left: root.left - scale: 1.4 - onClicked: { - root.volume = 0.0; - } - } - Slider { - id: volumeSlider - anchors.left: volumeDown.right - anchors.leftMargin: 22 - anchors.rightMargin: 22 - anchors.right: volumeUp.left - maximum: 1.0 - minimum: 0.0 - anchors.verticalCenter: root.verticalCenter - anchors.verticalCenterOffset: 1 - } - - ImageButton { - id: volumeUp - imageSource: "images/VolumeUp.png" - anchors.verticalCenter: root.verticalCenter - anchors.verticalCenterOffset: 1 - anchors.right: root.right - scale: 1.4 - onClicked: { - root.volume = 1.0 - } - } -} diff --git a/basicsuite/Media Player/description.txt b/basicsuite/Media Player/description.txt deleted file mode 100644 index bf034e5..0000000 --- a/basicsuite/Media Player/description.txt +++ /dev/null @@ -1,3 +0,0 @@ -The Media Player example demonstrates the use of the media playback features of Qt Multimedia with Qt Quick. - -It can play from a file or from Internet, both videos and music. diff --git a/basicsuite/Media Player/exclude.txt b/basicsuite/Media Player/exclude.txt deleted file mode 100644 index 952c994..0000000 --- a/basicsuite/Media Player/exclude.txt +++ /dev/null @@ -1 +0,0 @@ -android-beagleboard: diff --git a/basicsuite/Media Player/images/CameraButton.png b/basicsuite/Media Player/images/CameraButton.png deleted file mode 100644 index d950f78..0000000 Binary files a/basicsuite/Media Player/images/CameraButton.png and /dev/null differ diff --git a/basicsuite/Media Player/images/ControlBar.png b/basicsuite/Media Player/images/ControlBar.png deleted file mode 100644 index 8b5f545..0000000 Binary files a/basicsuite/Media Player/images/ControlBar.png and /dev/null differ diff --git a/basicsuite/Media Player/images/FXButton.png b/basicsuite/Media Player/images/FXButton.png deleted file mode 100644 index 04530f4..0000000 Binary files a/basicsuite/Media Player/images/FXButton.png and /dev/null differ diff --git a/basicsuite/Media Player/images/FileButton.png b/basicsuite/Media Player/images/FileButton.png deleted file mode 100644 index d65e681..0000000 Binary files a/basicsuite/Media Player/images/FileButton.png and /dev/null differ diff --git a/basicsuite/Media Player/images/FullscreenButton.png b/basicsuite/Media Player/images/FullscreenButton.png deleted file mode 100755 index 413872a..0000000 Binary files a/basicsuite/Media Player/images/FullscreenButton.png and /dev/null differ diff --git a/basicsuite/Media Player/images/PauseButton.png b/basicsuite/Media Player/images/PauseButton.png deleted file mode 100644 index 0d3e2d1..0000000 Binary files a/basicsuite/Media Player/images/PauseButton.png and /dev/null differ diff --git a/basicsuite/Media Player/images/PlayButton.png b/basicsuite/Media Player/images/PlayButton.png deleted file mode 100644 index 9a85633..0000000 Binary files a/basicsuite/Media Player/images/PlayButton.png and /dev/null differ diff --git a/basicsuite/Media Player/images/PlaybackSlider.png b/basicsuite/Media Player/images/PlaybackSlider.png deleted file mode 100755 index 3716315..0000000 Binary files a/basicsuite/Media Player/images/PlaybackSlider.png and /dev/null differ diff --git a/basicsuite/Media Player/images/RateButtonForward.png b/basicsuite/Media Player/images/RateButtonForward.png deleted file mode 100644 index 4b52603..0000000 Binary files a/basicsuite/Media Player/images/RateButtonForward.png and /dev/null differ diff --git a/basicsuite/Media Player/images/RateButtonReverse.png b/basicsuite/Media Player/images/RateButtonReverse.png deleted file mode 100644 index 64e94ed..0000000 Binary files a/basicsuite/Media Player/images/RateButtonReverse.png and /dev/null differ diff --git a/basicsuite/Media Player/images/SliderBackground.png b/basicsuite/Media Player/images/SliderBackground.png deleted file mode 100644 index b83f729..0000000 Binary files a/basicsuite/Media Player/images/SliderBackground.png and /dev/null differ diff --git a/basicsuite/Media Player/images/SliderHandle.png b/basicsuite/Media Player/images/SliderHandle.png deleted file mode 100755 index 5206100..0000000 Binary files a/basicsuite/Media Player/images/SliderHandle.png and /dev/null differ diff --git a/basicsuite/Media Player/images/SliderProgress.png b/basicsuite/Media Player/images/SliderProgress.png deleted file mode 100755 index e0efc87..0000000 Binary files a/basicsuite/Media Player/images/SliderProgress.png and /dev/null differ diff --git a/basicsuite/Media Player/images/UrlButton.png b/basicsuite/Media Player/images/UrlButton.png deleted file mode 100644 index 876951f..0000000 Binary files a/basicsuite/Media Player/images/UrlButton.png and /dev/null differ diff --git a/basicsuite/Media Player/images/VolumeDown.png b/basicsuite/Media Player/images/VolumeDown.png deleted file mode 100755 index 60c626d..0000000 Binary files a/basicsuite/Media Player/images/VolumeDown.png and /dev/null differ diff --git a/basicsuite/Media Player/images/VolumeUp.png b/basicsuite/Media Player/images/VolumeUp.png deleted file mode 100755 index 886fde7..0000000 Binary files a/basicsuite/Media Player/images/VolumeUp.png and /dev/null differ diff --git a/basicsuite/Media Player/images/folder.png b/basicsuite/Media Player/images/folder.png deleted file mode 100644 index e53e2ad..0000000 Binary files a/basicsuite/Media Player/images/folder.png and /dev/null differ diff --git a/basicsuite/Media Player/images/gradient.png b/basicsuite/Media Player/images/gradient.png deleted file mode 100644 index 1cd7281..0000000 Binary files a/basicsuite/Media Player/images/gradient.png and /dev/null differ diff --git a/basicsuite/Media Player/images/pattern.png b/basicsuite/Media Player/images/pattern.png deleted file mode 100644 index 028181e..0000000 Binary files a/basicsuite/Media Player/images/pattern.png and /dev/null differ diff --git a/basicsuite/Media Player/images/qt-logo.png b/basicsuite/Media Player/images/qt-logo.png deleted file mode 100755 index 242bb28..0000000 Binary files a/basicsuite/Media Player/images/qt-logo.png and /dev/null differ diff --git a/basicsuite/Media Player/images/titlebar.png b/basicsuite/Media Player/images/titlebar.png deleted file mode 100644 index 51c9008..0000000 Binary files a/basicsuite/Media Player/images/titlebar.png and /dev/null differ diff --git a/basicsuite/Media Player/images/titlebar.sci b/basicsuite/Media Player/images/titlebar.sci deleted file mode 100755 index 0418d94..0000000 --- a/basicsuite/Media Player/images/titlebar.sci +++ /dev/null @@ -1,5 +0,0 @@ -border.left: 10 -border.top: 12 -border.bottom: 12 -border.right: 10 -source: titlebar.png diff --git a/basicsuite/Media Player/images/up.png b/basicsuite/Media Player/images/up.png deleted file mode 100644 index b05f802..0000000 Binary files a/basicsuite/Media Player/images/up.png and /dev/null differ diff --git a/basicsuite/Media Player/main.qml b/basicsuite/Media Player/main.qml deleted file mode 100755 index d8075c8..0000000 --- a/basicsuite/Media Player/main.qml +++ /dev/null @@ -1,289 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtMultimedia 5.0 - -FocusScope { - id: applicationWindow - focus: true - - MouseArea { - id: mouseActivityMonitor - anchors.fill: parent - - hoverEnabled: true - onClicked: { - if (controlBar.state === "VISIBLE" && content.videoPlayer.mediaPlayer.status === MediaPlayer.Loaded) { - controlBar.hide(); - } else { - controlBar.show(); - controlBarTimer.restart(); - } - } - } - - signal resetTimer - onResetTimer: { - controlBar.show(); - controlBarTimer.restart(); - } - - Component.onCompleted: { - init(); - } - - Content { - id: content - anchors.fill: parent - } - - Timer { - id: controlBarTimer - interval: 4000 - running: false - - onTriggered: { - hideToolBars(); - } - } - - ControlBar { - id: controlBar - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: applicationWindow.bottom - mediaPlayer: content.videoPlayer.mediaPlayer - - onOpenFile: { - applicationWindow.openVideo(); - } - - onOpenURL: { - applicationWindow.openURL(); - } - - onOpenFX: { - applicationWindow.openFX(); - } - - onToggleFullScreen: { -// viewer.toggleFullscreen(); - } - } - - ParameterPanel { - id: parameterPanel - opacity: controlBar.opacity - visible: effectSelectionPanel.visible && model.count !== 0 - height: 116 - width: 500 - anchors { - bottomMargin: 15 - bottom: controlBar.top - right: effectSelectionPanel.left - rightMargin: 15 - } - } - - EffectSelectionPanel { - id: effectSelectionPanel - visible: false - opacity: controlBar.opacity - anchors { - bottom: controlBar.top - right: controlBar.right - // rightMargin: 15 - bottomMargin: 15 - } - width: 250 - height: 350 - itemHeight: 80 - onEffectSourceChanged: { - content.effectSource = effectSource - parameterPanel.model = content.effect.parameters - } - } - - UrlBar { - id: urlBar - opacity: 0 - visible: opacity != 0 - anchors.fill: parent - onUrlAccepted: { - urlBar.opacity = 0; - if (text != "") - content.openVideo(text) - } - } - - Rectangle { - anchors.right: parent.right - anchors.top: parent.top - anchors.rightMargin: 32 - anchors.topMargin: 32 - width: 40 - height: 40 - radius: width / 2 - color: infoMouser.pressed ? "#BB999999" : "#88444444" - antialiasing: true - visible: content.videoPlayer.mediaPlayer.status !== MediaPlayer.NoMedia && controlBar.state === "VISIBLE" - - Text { - anchors.centerIn: parent - text: "i" - font.italic: true - font.bold: true - color: "white" - font.pixelSize: 28 - } - - MouseArea { - id: infoMouser - anchors.fill: parent - anchors.margins: -10 - onClicked: metadataView.opacity = 1 - } - } - - MetadataView { - id: metadataView - mediaPlayer: content.videoPlayer.mediaPlayer - } - - property real volumeBeforeMuted: 1.0 - property bool isFullScreen: false - - FileBrowser { - id: fileBrowser - anchors.fill: parent - onFileSelected: { - if (file != "") - content.openVideo(file); - } - } - - Keys.onPressed: { - applicationWindow.resetTimer(); - if (event.key === Qt.Key_O && event.modifiers & Qt.ControlModifier) { - openVideo(); - return; - } else if (event.key === Qt.Key_N && event.modifiers & Qt.ControlModifier) { - openURL(); - return; - } else if (event.key === Qt.Key_E && event.modifiers & Qt.ControlModifier) { - openFX(); - return; - } else if (event.key === Qt.Key_F && event.modifiers & Qt.ControlModifier) { -// viewer.toggleFullscreen(); - return; - } else if (event.key === Qt.Key_Up || event.key === Qt.Key_VolumeUp) { - content.videoPlayer.mediaPlayer.volume = Math.min(1, content.videoPlayer.mediaPlayer.volume + 0.1); - return; - } else if (event.key === Qt.Key_Down || event.key === Qt.Key_VolumeDown) { - if (event.modifiers & Qt.ControlModifier) { - if (content.videoPlayer.mediaPlayer.volume) { - volumeBeforeMuted = content.videoPlayer.mediaPlayer.volume; - content.videoPlayer.mediaPlayer.volume = 0 - } else { - content.videoPlayer.mediaPlayer.volume = volumeBeforeMuted; - } - } else { - content.videoPlayer.mediaPlayer.volume = Math.max(0, content.videoPlayer.mediaPlayer.volume - 0.1); - } - return; - } else if (applicationWindow.isFullScreen && event.key === Qt.Key_Escape) { -// viewer.toggleFullscreen(); - return; - } - - // What's next should be handled only if there's a loaded media - if (content.videoPlayer.mediaPlayer.status !== MediaPlayer.Loaded - && content.videoPlayer.mediaPlayer.status !== MediaPlayer.Buffered) - return; - - if (event.key === Qt.Key_Space) { - if (content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.PlayingState) - content.videoPlayer.mediaPlayer.pause() - else if (content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.PausedState - || content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.StoppedState) - content.videoPlayer.mediaPlayer.play() - } else if (event.key === Qt.Key_Left) { - content.videoPlayer.mediaPlayer.seek(Math.max(0, content.videoPlayer.mediaPlayer.position - 30000)); - return; - } else if (event.key === Qt.Key_Right) { - content.videoPlayer.mediaPlayer.seek(Math.min(content.videoPlayer.mediaPlayer.duration, content.videoPlayer.mediaPlayer.position + 30000)); - return; - } - } - - function init() { - content.init() - } - - function openVideo() { - //videoFileBrowser.show() - // var videoFile = viewer.openFileDialog(); - // if (videoFile != "") - // content.openVideo(videoFile); - fileBrowser.show() - } - - function openCamera() { - content.openCamera() - } - - function openURL() { - urlBar.opacity = urlBar.opacity === 0 ? 1 : 0 - } - - function openFX() { - effectSelectionPanel.visible = !effectSelectionPanel.visible; - } - - function close() { - } - - function hideToolBars() { - if (!controlBar.isMouseAbove && !parameterPanel.isMouseAbove && !effectSelectionPanel.isMouseAbove && content.videoPlayer.isPlaying) - controlBar.hide(); - } -} diff --git a/basicsuite/Media Player/preview_l.jpg b/basicsuite/Media Player/preview_l.jpg deleted file mode 100644 index 0fff215..0000000 Binary files a/basicsuite/Media Player/preview_l.jpg and /dev/null differ diff --git a/basicsuite/Photo Gallery/Photo Gallery.qmlproject b/basicsuite/Photo Gallery/Photo Gallery.qmlproject deleted file mode 100644 index 4d32f75..0000000 --- a/basicsuite/Photo Gallery/Photo Gallery.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/Photo Gallery/description.txt b/basicsuite/Photo Gallery/description.txt deleted file mode 100644 index f5e302c..0000000 --- a/basicsuite/Photo Gallery/description.txt +++ /dev/null @@ -1 +0,0 @@ -This is a simple photo gallery, showing images found in /data/images. diff --git a/basicsuite/Photo Gallery/main.qml b/basicsuite/Photo Gallery/main.qml deleted file mode 100644 index 5fbab8a..0000000 --- a/basicsuite/Photo Gallery/main.qml +++ /dev/null @@ -1,295 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import Qt.labs.folderlistmodel 1.0 - -Item { - id: root - - width: 320 - height: 480 - - Rectangle { - anchors.fill: parent - color: "black" - } - - FolderListModel { - id: imageList - folder: "/data/images" - nameFilters: ["*.png", "*.jpg"] - - showDirs: false - } - - Text { - id: noImages - color: "white" - visible: grid.count == 0 - text: "No images in " + imageList.folder - anchors.centerIn: parent - } - - GridView { - id: grid - - anchors.fill: parent - - cellHeight: root.width / 3 - cellWidth: cellHeight - - model: imageList - -// NumberAnimation on contentY { from: 0; to: 2000; duration: 3000; loops: 1; easing.type: Easing.InOutCubic } - - delegate: Rectangle { - - id: box - color: "white" - width: grid.cellWidth - height: grid.cellHeight - scale: 0.97 - rotation: 2; - antialiasing: true - - Rectangle { - id: sepia - color: "#b08050" - width: image.width - height: image.height - anchors.centerIn: parent - - property real fakeOpacity: image.status == Image.Ready ? 1.5 : 0 - Behavior on fakeOpacity { NumberAnimation { duration: 1000 } } - - opacity: fakeOpacity - visible: image.opacity <= 0.99; - antialiasing: true - } - - Image { - id: image - source: filePath - width: grid.cellWidth * 0.9 - height: grid.cellHeight * 0.9 - anchors.centerIn: sepia - asynchronous: true - opacity: sepia.fakeOpacity - .5 - sourceSize.width: width; - antialiasing: true - } - - MouseArea { - anchors.fill: parent - onClicked: { - root.showBigImage(filePath, box.x - grid.contentX, box.y - grid.contentY, image); - } - } - } - } - - function showBigImage(filePath, itemX, itemY, image) { - fakeBigImage.x = itemX; - fakeBigImage.y = itemY; - fakeBigImage.sourceSize = image.sourceSize; - fakeBigImage.source = filePath; - - beginEnterLargeAnimation.running = true; - } - - property int time: 500; - property real xPos: width < height ? 0 : width / 2 - height / 2; - property real yPos: width < height ? height / 2 - width / 2: 0; - property real size: Math.min(width, height); - - states: [ - State { name: "grid" }, - State { name: "enter-large" }, - State { name: "large" }, - State { name: "exit-large" } - ] - - SequentialAnimation { - id: beginEnterLargeAnimation - PropertyAction { target: mouseArea; property: "enabled"; value: "true" } - PropertyAction { target: fakeBigImage; property: "rotation"; value: 2; } - PropertyAction { target: fakeBigImage; property: "scale"; value: 0.97 * 0.9; } - PropertyAction { target: fakeBigImage; property: "width"; value: grid.cellWidth; } - PropertyAction { target: fakeBigImage; property: "height"; value: grid.cellHeight; } - PropertyAction { target: fakeBigImage; property: "visible"; value: true; } - - ParallelAnimation { - NumberAnimation { target: fakeBigImage; property: "rotation"; to: 0; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: fakeBigImage; property: "scale"; to: 1; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: fakeBigImage; property: "x"; to: root.xPos; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: fakeBigImage; property: "y"; to: root.yPos; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: fakeBigImage; property: "width"; to: root.size; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: fakeBigImage; property: "height"; to: root.size; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: grid; property: "opacity"; to: 0; duration: root.time; easing.type: Easing.InOutCubic } - } - ScriptAction { - script: { - - bigImage = realBigImageComponent.createObject(root); - bigImage.source = fakeBigImage.source; - } - } - } - - property Item bigImage; - property real targetRotation: 0; - property real targetWidth: 0 - property real targetHeight: 0 - property bool bigImageShowing: false; - - SequentialAnimation { - id: finalizeEnterLargeAnimation - ScriptAction { script: { - fakeBigImage.anchors.centerIn = root; - } - } - ParallelAnimation { - NumberAnimation { target: bigImage; property: "opacity"; to: 1; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: fakeBigImage; property: "rotation"; to: root.targetRotation; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: bigImage; property: "rotation"; to: root.targetRotation; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: fakeBigImage; property: "width"; to: root.targetWidth; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: fakeBigImage; property: "height"; to: root.targetHeight; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: bigImage; property: "width"; to: root.targetWidth; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: bigImage; property: "height"; to: root.targetHeight; duration: root.time; easing.type: Easing.InOutCubic } - } - PropertyAction { target: fakeBigImage; property: "visible"; value: false } - PropertyAction { target: root; property: "bigImageShowing"; value: true } - } - - SequentialAnimation { - id: backToGridAnimation - ParallelAnimation { - NumberAnimation { target: bigImage; property: "opacity"; to: 0; duration: root.time; easing.type: Easing.InOutCubic } - NumberAnimation { target: grid; property: "opacity"; to: 1; duration: root.time; easing.type: Easing.InOutCubic } - } - PropertyAction { target: fakeBigImage; property: "source"; value: "" } - PropertyAction { target: root; property: "bigImageShowing"; value: false } - PropertyAction { target: mouseArea; property: "enabled"; value: false } - ScriptAction { script: { - bigImage.destroy(); - fakeBigImage.anchors.centerIn = undefined - } - } - } - - Image { - id: fakeBigImage - width: grid.cellWidth - height: grid.cellHeight - visible: false - antialiasing: true - } - - Component { - id: realBigImageComponent - - Image { - id: realBigImage - - anchors.centerIn: parent; - - asynchronous: true; - - // Bound size to the current display size, to try to avoid any GL_MAX_TEXTURE_SIZE issues. - sourceSize: Qt.size(Math.max(root.width, root.height), Math.max(root.width, root.height)); - - opacity: 0 - onStatusChanged: { - - if (status != Image.Ready) - return; - - var imageIsLandscape = width > height; - var screenIsLandscape = root.width > root.height; - - var targetScale; - - // Rotation needed... - if (imageIsLandscape != screenIsLandscape && width != height) { - root.targetRotation = 90; - var aspect = width / height - var screenAspect = root.height / root.width - - if (aspect > screenAspect) { - targetScale = root.height / width - } else { - targetScale = root.width / height; - } - } else { - root.targetRotation = 0; - var aspect = height / width; - var screenAspect = root.height / root.width - - if (aspect > screenAspect) { - targetScale = root.height / height - } else { - targetScale = root.width / width; - } - } - - root.targetWidth = width * targetScale - root.targetHeight = height * targetScale; - - width = root.size - height = root.size; - - finalizeEnterLargeAnimation.running = true; - } - } - } - - MouseArea { - id: mouseArea - anchors.fill: parent - enabled: false - - onClicked: { - if (root.bigImageShowing) - backToGridAnimation.running = true; - } - } - -} diff --git a/basicsuite/Photo Gallery/preview_l.jpg b/basicsuite/Photo Gallery/preview_l.jpg deleted file mode 100644 index 0b67f1d..0000000 Binary files a/basicsuite/Photo Gallery/preview_l.jpg and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/Qt5 Cinematic Demo.qmlproject b/basicsuite/Qt5 Cinematic Demo/Qt5 Cinematic Demo.qmlproject deleted file mode 100644 index eabee43..0000000 --- a/basicsuite/Qt5 Cinematic Demo/Qt5 Cinematic Demo.qmlproject +++ /dev/null @@ -1,20 +0,0 @@ -/* File generated by Qt Creator, version 2.4.1 */ - -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/Qt5 Cinematic Demo/Qt5_CinematicExperience.pro b/basicsuite/Qt5 Cinematic Demo/Qt5_CinematicExperience.pro deleted file mode 100644 index 3830ee9..0000000 --- a/basicsuite/Qt5 Cinematic Demo/Qt5_CinematicExperience.pro +++ /dev/null @@ -1,9 +0,0 @@ -TEMPLATE = app - -QT += qml quick -SOURCES += main.cpp - -target.path = /opt/Qt5_CinematicExperience -qml.files = Qt5_CinematicExperience.qml content -qml.path = /opt/Qt5_CinematicExperience -INSTALLS += target qml diff --git a/basicsuite/Qt5 Cinematic Demo/README b/basicsuite/Qt5 Cinematic Demo/README deleted file mode 100644 index 1f16c7e..0000000 --- a/basicsuite/Qt5 Cinematic Demo/README +++ /dev/null @@ -1,49 +0,0 @@ - -INTRO -========== - -This UX demo application presents some graphical features of Qt5. -The name 'Cinematic Experience' reflects how it's possible to build user -interfaces with increased dynamics. - - -RUNNING -========== - -To run this application you need relatively recent build of Qt5: -- http://qt-project.org -- http://qt.gitorious.org/qt/qt5 - -There are two different ways to run the application: - -1) If your target platform contains 'qmlscene' binary, just use it: ---- -cd Qt5_CinematicExperience -[path to Qt5]/qtbase/bin/qmlscene Qt5_CinematicExperience.qml ---- - -2) Alternatively, a simple launcher is provided to start the application: ---- -cd Qt5_CinematicExperience -[path to Qt5]/qtbase/bin/qmake -make -./Qt5_CinematicExperience ---- - -The run application in fullscreen mode, use '--fullscreen' parameter for -qmlscene or launcher. If you want to tweak the window resolution, -modify 'width' and 'height' properties in Qt5_CinematicExperience.qml - - -LICENSE -========== - -Source codes are licensed under a Creative Commons Attribution 3.0 Unported -License. http://creativecommons.org/licenses/by/3.0/ - -No attribution required, but feel free to mention us or -contact info@quitcoding.com - -Qt, and the Qt logo are trademarks of Nokia Corporation -Movie reviews copyright © IMDb.com -DVD cover icons from http://www.iconarchive.com diff --git a/basicsuite/Qt5 Cinematic Demo/content/Background.qml b/basicsuite/Qt5 Cinematic Demo/content/Background.qml deleted file mode 100644 index f0225ba..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/Background.qml +++ /dev/null @@ -1,39 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: root - - anchors.fill: parent - - Image { - id: backgroundImage - anchors.fill: parent - source: settings.showColors ? "images/background3.png" : "images/background.png" - Behavior on source { - SequentialAnimation { - NumberAnimation { target: backgroundImage; property: "opacity"; to: 0; duration: 400; easing.type: Easing.InQuad } - PropertyAction { target: backgroundImage; property: "source" } - NumberAnimation { target: backgroundImage; property: "opacity"; to: 1; duration: 400; easing.type: Easing.OutQuad } - } - } - } - - // Sky stars particles - ParticleSystem { - width: parent.width - height: 220 - paused: detailsView.isShown || infoView.isShown || !settings.showShootingStarParticles - ImageParticle { - source: "images/star.png" - rotationVariation: 10 - } - Emitter { - anchors.fill: parent - emitRate: 4 - lifeSpan: 5000 - size: 48 - sizeVariation: 16 - } - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/Button.qml b/basicsuite/Qt5 Cinematic Demo/content/Button.qml deleted file mode 100644 index c6ab643..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/Button.qml +++ /dev/null @@ -1,112 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: root - - property alias text: buttonTextItem.text - property bool effectsOn: true - signal clicked - - width: buttonBackgroundImage.width - height: buttonBackgroundImage.height - scale: mouseArea.pressed && mouseArea.containsMouse ? 0.9 : 1.0 - opacity: mouseArea.pressed && mouseArea.containsMouse ? 0.8 : 1.0 - - Behavior on scale { - NumberAnimation { duration: 150; easing.type: Easing.OutQuad } - } - Behavior on opacity { - NumberAnimation { duration: 150; easing.type: Easing.OutQuad } - } - - BorderImage { - id: buttonBackgroundImage - source: "images/button.png" - border.left: 24 - border.right: 24 - border.top: 20 - border.bottom: 20 - width: 140 - } - - // Stars effect - ParticleSystem { - id: particleSystem - anchors.fill: buttonBackgroundImage - running: root.effectsOn - ImageParticle { - source: "images/star.png" - rotationVariation: 180 - color:"#ffffff" - } - Emitter { - width: parent.width - height: 8 - emitRate: 16 - lifeSpan: 2000 - size: 32 - sizeVariation: 16 - endSize: 8 - velocity: PointDirection{ y: 20; x:-2; xVariation: 5; yVariation: 10 } - } - Turbulence { - width: parent.width - height: (parent.height / 2) - strength: 8 - } - } - - // Button background - ShaderEffectSource { - id: shaderSource - anchors.fill: buttonBackgroundImage - sourceItem: buttonBackgroundImage - hideSource: true - visible: false - } - - // Particles - ShaderEffectSource { - id: shaderSource2 - anchors.fill: particleSystem - sourceItem: particleSystem - hideSource: true - visible: false - } - - // Mask particles inside the button - ShaderEffect { - id: shaderEffectItem - anchors.fill: shaderSource - - property variant source: shaderSource - property variant source2: shaderSource2 - - fragmentShader: " - uniform sampler2D source; - uniform sampler2D source2; - uniform lowp float qt_Opacity; - varying highp vec2 qt_TexCoord0; - void main() { - lowp vec4 pix = texture2D(source, qt_TexCoord0); - lowp vec4 pix2 = texture2D(source2, qt_TexCoord0); - gl_FragColor = qt_Opacity * (pix + pix.a * pix2); - }" - } - - Text { - id: buttonTextItem - anchors.centerIn: parent - color: "#000000" - font.pixelSize: 28 - } - MouseArea { - id: mouseArea - anchors.fill: parent - anchors.margins: -16 - onClicked: { - root.clicked(); - } - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/CurtainEffect.qml b/basicsuite/Qt5 Cinematic Demo/content/CurtainEffect.qml deleted file mode 100644 index 961b348..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/CurtainEffect.qml +++ /dev/null @@ -1,53 +0,0 @@ -import QtQuick 2.0 - -ShaderEffect { - id: root - - property variant source - property real leftHeight: height / 2 - property real rightHeight: height / 2 - property real originalHeight: height - property real originalWidth: width - property real amplitude: 0.10 - - mesh: Qt.size(1, 80) - - vertexShader: " - attribute highp vec4 qt_Vertex; - attribute highp vec2 qt_MultiTexCoord0; - uniform highp mat4 qt_Matrix; - varying highp vec2 qt_TexCoord0; - varying lowp float shade; - uniform highp float leftHeight; - uniform highp float rightHeight; - uniform highp float originalHeight; - uniform highp float originalWidth; - uniform highp float amplitude; - - void main() { - qt_TexCoord0 = qt_MultiTexCoord0; - - highp vec4 shift = vec4(0); - shift.y = qt_Vertex.y * ((originalHeight - leftHeight) + (leftHeight - rightHeight) * (qt_Vertex.x / originalWidth)) / originalHeight; - - shade = sin(21.9911486 * qt_Vertex.y / originalHeight); - shift.x = amplitude * (originalHeight - leftHeight + (leftHeight - rightHeight) * (qt_Vertex.x / originalWidth)) * shade; - - gl_Position = qt_Matrix * (qt_Vertex - shift); - - shade = 0.2 * (2.0 - shade ) * (1.0 - (rightHeight + (leftHeight - rightHeight) * (1.0 - qt_Vertex.y / originalWidth)) / originalHeight); - } - " - - fragmentShader: " - varying highp vec2 qt_TexCoord0; - uniform lowp float qt_Opacity; - uniform sampler2D source; - varying lowp float shade; - void main() { - highp vec4 color = texture2D(source, qt_TexCoord0); - color.rgb *= 1.0 - shade; - gl_FragColor = color * qt_Opacity; - } - " -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/DelegateItem.qml b/basicsuite/Qt5 Cinematic Demo/content/DelegateItem.qml deleted file mode 100644 index ced4f95..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/DelegateItem.qml +++ /dev/null @@ -1,93 +0,0 @@ -import QtQuick 2.0 - -Item { - id: root - - property string name - property bool isSelected: listView.currentIndex === index - - width: parent ? parent.width : imageItem.width - height: imageItem.height - z: isSelected ? 1000 : -index - rotation: isSelected ? 0 : -15 - scale: isSelected ? mainView.height/540 : mainView.height/1080 - opacity: 1.0 - Math.abs((listView.currentIndex - index) * 0.25) - - Behavior on rotation { - NumberAnimation { duration: 500; easing.type: Easing.OutBack } - } - Behavior on scale { - NumberAnimation { duration: 1500; easing.type: Easing.OutElastic } - } - Behavior on opacity { - NumberAnimation { duration: 200; easing.type: Easing.OutQuad } - } - - MouseArea { - anchors.fill: parent - onClicked: { - if (isSelected) { - detailsView.image = model.image - detailsView.name = model.name - detailsView.year = model.year - detailsView.director = model.director - detailsView.cast = model.cast - detailsView.rating = model.rating - detailsView.overview = model.overview - detailsView.show(); - } else { - listView.currentIndex = index; - if (settings.showShootingStarParticles) shootingStarBurst.burst(50); - } - } - } - - Image { - id: imageItem - anchors.horizontalCenter: parent.horizontalCenter - source: "images/" + model.image - visible: !settings.showLighting - } - - ShaderEffectSource { - id: s1 - sourceItem: imageItem - hideSource: settings.showLighting - visible: settings.showLighting - } - - ShaderEffect { - anchors.fill: imageItem - property variant src: s1 - property variant srcNmap: coverNmapSource - property real widthPortition: mainView.width/imageItem.width - property real heightPortition: mainView.height/imageItem.height - property real widthNorm: widthPortition * 0.5 - 0.5 - property real heightNorm: root.y/imageItem.height - listView.contentY / imageItem.height - property real lightPosX: listView.globalLightPosX * widthPortition - widthNorm - property real lightPosY: listView.globalLightPosY * heightPortition - heightNorm - visible: settings.showLighting - - fragmentShader: " - uniform sampler2D src; - uniform sampler2D srcNmap; - uniform lowp float qt_Opacity; - varying highp vec2 qt_TexCoord0; - uniform highp float lightPosX; - uniform highp float lightPosY; - void main() { - highp vec4 pix = texture2D(src, qt_TexCoord0.st); - highp vec4 pix2 = texture2D(srcNmap, qt_TexCoord0.st); - highp vec3 normal = normalize(pix2.rgb * 2.0 - 1.0); - highp vec3 light_pos = normalize(vec3(qt_TexCoord0.x - lightPosX, qt_TexCoord0.y - lightPosY, 0.8 )); - highp float diffuse = max(dot(normal, light_pos), 0.2); - - // boost a bit - diffuse *= 2.5; - - highp vec3 color = diffuse * pix.rgb; - gl_FragColor = vec4(color, pix.a) * qt_Opacity; - } - " - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/DetailsView.qml b/basicsuite/Qt5 Cinematic Demo/content/DetailsView.qml deleted file mode 100644 index b3ff952..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/DetailsView.qml +++ /dev/null @@ -1,190 +0,0 @@ -import QtQuick 2.0 - -Item { - id: root - - property bool isShown: false - property string image - property string name - property string year - property string director - property string cast - property string overview - property alias rating: ratingsItem.rating - - anchors.fill: parent - opacity: 0 - visible: opacity - scale: 0.3 - - function show() { - mainView.scheduleUpdate(); - root.isShown = true; - showAnimation.restart(); - } - function hide() { - hideAnimation.restart(); - } - - Binding { - target: mainView - property: "blurAmount" - value: 40 * root.opacity - when: root.isShown - } - - ParallelAnimation { - id: showAnimation - NumberAnimation { target: root; property: "opacity"; to: 1.0; duration: 500; easing.type: Easing.InOutQuad } - NumberAnimation { target: root; property: "scale"; to: 1.0; duration: 500; easing.type: Easing.InOutQuad } - } - SequentialAnimation { - id: hideAnimation - ParallelAnimation { - NumberAnimation { target: root; property: "opacity"; to: 0; duration: 500; easing.type: Easing.InOutQuad } - NumberAnimation { target: root; property: "scale"; to: 0.3; duration: 500; easing.type: Easing.InOutQuad } - } - PropertyAction { target: root; property: "isShown"; value: false } - } - - MouseArea { - anchors.fill: parent - onClicked: { - root.hide(); - } - } - - Rectangle { - id: backgroundItem - anchors.centerIn: parent - width: Math.min(620, parent.width - 32) - height: Math.min(840, parent.height - 32) - border.color: "#808080" - border.width: 1 - opacity: 0.9 - gradient: Gradient { - GradientStop { position: 0.0; color: "#101010" } - GradientStop { position: 0.3; color: "#404040" } - GradientStop { position: 1.0; color: "#090909" } - } - } - - Flickable { - anchors.top: backgroundItem.top - anchors.left: backgroundItem.left - anchors.right: backgroundItem.right - anchors.bottom: bottomSeparator.top - anchors.margins: 1 - anchors.bottomMargin: 0 - - contentWidth: backgroundItem.width - contentHeight: ratingsItem.y + descriptionTextItem.height + 64 - flickableDirection: Flickable.VerticalFlick - clip: true - - Image { - id: movieImageItem - x: 8 - y: 24 - width: 192 - height: 192 - source: root.image ? "images/" + root.image : "" - fillMode: Image.PreserveAspectFit - smooth: true - } - - Column { - id: topColumn - y: 20 - anchors.left: movieImageItem.right - anchors.leftMargin: 10 - anchors.right: parent.right - anchors.rightMargin: 26 - spacing: 8 - Text { - id: titleTextItem - width: parent.width - wrapMode: Text.WordWrap - color: "#ffffff" - font.pixelSize: text.length < 12 ? settings.fontL : settings.fontMM - text: root.name - } - Text { - id: yearTextItem - width: parent.width - wrapMode: Text.WordWrap - color: "#ffffff" - font.pixelSize: settings.fontS - text: "Published: " + root.year - } - Text { - id: directorsTextItem - width: parent.width - wrapMode: Text.WordWrap - color: "#ffffff" - font.pixelSize: settings.fontS - text: "Director: " + root.director - } - Text { - id: castTextItem - width: parent.width - wrapMode: Text.WordWrap - color: "#ffffff" - font.pixelSize: settings.fontS - text: "Cast: " + root.cast - } - } - - RatingsItem { - id: ratingsItem - x: 10 - y: Math.max(topColumn.height, movieImageItem.height) + 40 - rating: root.rating - } - - Text { - id: descriptionTextItem - anchors.top: ratingsItem.bottom - anchors.topMargin: 16 - width: parent.width - 32 - anchors.horizontalCenter: parent.horizontalCenter - wrapMode: Text.WordWrap - color: "#ffffff" - font.pixelSize: settings.fontM - text: "Description: " + root.overview - } - } - - Rectangle { - id: bottomSeparator - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: backgroundItem.bottom - anchors.bottomMargin: 80 - width: backgroundItem.width - 16 - height: 1 - color: "#808080" - } - - Button { - anchors.bottom: backgroundItem.bottom - anchors.bottomMargin: 8 - anchors.left: backgroundItem.left - anchors.leftMargin: 32 - text: "Back" - effectsOn: false - onClicked: { - root.hide(); - } - } - Button { - anchors.bottom: backgroundItem.bottom - anchors.bottomMargin: 8 - anchors.right: backgroundItem.right - anchors.rightMargin: 32 - effectsOn: root.visible - text: "Order" - onClicked: { - console.debug("Order! TODO: implement"); - } - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/FpsItem.qml b/basicsuite/Qt5 Cinematic Demo/content/FpsItem.qml deleted file mode 100644 index fb66d56..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/FpsItem.qml +++ /dev/null @@ -1,42 +0,0 @@ -import QtQuick 2.0 - -Item { - id: root - property int frameCounter: 0 - property int fps: 0; - - width: 160 - height: 48 - - Image { - id: spinnerImage - source: "images/spinner.png" - NumberAnimation on rotation { - from:0 - to: 360 - duration: 800 - loops: Animation.Infinite - } - onRotationChanged: frameCounter++; - } - - Text { - anchors.right: parent.right - anchors.verticalCenter: spinnerImage.verticalCenter - color: "#ffffff" - style: Text.Outline - styleColor: "#606060" - font.pixelSize: 28 - text: root.fps + " fps" - } - - Timer { - interval: 2000 - repeat: true - running: true - onTriggered: { - fps = frameCounter/2; - frameCounter = 0; - } - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/InfoView.qml b/basicsuite/Qt5 Cinematic Demo/content/InfoView.qml deleted file mode 100644 index dee035e..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/InfoView.qml +++ /dev/null @@ -1,264 +0,0 @@ -import QtQuick 2.0 - -Item { - id: root - - property bool isShown: false - - anchors.fill: parent - - QtObject { - id: priv - property bool poleOut: false - // How curly the curtain is when opened - property int endCurly: 80 - // 0 = pole in, 1 = pole out - property real polePosition: 0 - property bool showingStarted: false - } - - function show() { - priv.showingStarted = true; - // Disabled, so animations continue while infoview is on - //isShown = true; - hideCurtainAnimation.stop(); - hidePoleAnimation.stop(); - if (priv.poleOut) { - showCurtainAnimation.restart(); - } else { - showPoleAnimation.restart(); - } - } - function hide() { - priv.showingStarted = false; - showCurtainAnimation.stop(); - showPoleAnimation.stop(); - if (priv.poleOut) { - hideCurtainAnimation.restart(); - } else { - hidePoleAnimation.restart(); - } - } - - onIsShownChanged: { - if (root.isShown) { - mainView.scheduleUpdate(); - } - } - - Binding { - target: mainView - property: "blurAmount" - value: 40 * priv.polePosition - when: root.isShown - } - - // Pole show/hide animations - SequentialAnimation { - id: showPoleAnimation - NumberAnimation { target: priv; property: "polePosition"; to: 1; duration: 600; easing.type: Easing.InOutQuad } - PropertyAction { target: priv; property: "poleOut"; value: true } - ScriptAction { script: showCurtainAnimation.restart(); } - } - SequentialAnimation { - id: hidePoleAnimation - PropertyAction { target: priv; property: "poleOut"; value: false } - NumberAnimation { target: priv; property: "polePosition"; to: 0; duration: 600; easing.type: Easing.InOutQuad } - PropertyAction { target: root; property: "isShown"; value: false } - } - - // Curtain show/hide animations - SequentialAnimation { - id: showCurtainAnimation - NumberAnimation { target: curtainEffect; property: "rightHeight"; to: root.height-8; duration: 1200; easing.type: Easing.OutBack } - } - SequentialAnimation { - id: hideCurtainAnimation - NumberAnimation { target: curtainEffect; property: "rightHeight"; to: 0; duration: 600; easing.type: Easing.OutCirc } - ScriptAction { script: hidePoleAnimation.restart(); } - } - - MouseArea { - anchors.fill: parent - enabled: priv.poleOut - onClicked: { - root.hide(); - } - } - - BorderImage { - anchors.right: parent.right - anchors.top: parent.top - border.left: 22 - border.right: 64 - border.top: 0 - border.bottom: 0 - width: 86 + priv.polePosition * (viewItem.width-88) - z: 20 - source: "images/info.png" - opacity: 0.5 + priv.polePosition - MouseArea { - anchors.fill: parent - anchors.margins: -20 - onClicked: { - if (priv.showingStarted) { - root.hide(); - } else { - root.show(); - } - } - } - } - - Item { - id: viewItem - anchors.right: parent.right - width: Math.min(620, parent.width) - height: parent.height + priv.endCurly - 16 - y: 8 - visible: priv.poleOut - - Rectangle { - id: backgroundItem - anchors.fill: parent - anchors.margins: 16 - anchors.topMargin: 8 - gradient: Gradient { - GradientStop { position: 0.0; color: "#101010" } - GradientStop { position: 0.3; color: "#404040" } - GradientStop { position: 1.0; color: "#090909" } - } - border.color: "#808080" - border.width: 1 - opacity: 0.8 - } - - Flickable { - id: flickableArea - anchors.fill: backgroundItem - contentHeight: infoTextColumn.height + 32 - contentWidth: backgroundItem.width - flickableDirection: Flickable.VerticalFlick - clip: true - - Column { - id: infoTextColumn - width: parent.width - spacing: 32 - - Item { - width: parent.width - height: 8 - } - Image { - id: textItem - anchors.horizontalCenter: parent.horizontalCenter - source: "images/heading.png" - } - - InfoViewItem { - text: "Welcome to 'Cinematic Experience' demo. This application demonstrates the power of Qt5 and few of the new additions available in QtQuick 2.0. Below is a short summary of those new features which have been used in this demo application." - image: "images/qt_logo2.png" - } - InfoViewItem { - text: "Rendering
    Qt5 has brand new rendering backend 'QML SceneGraph' which is optimized for hardware accelerated rendering. This allows to take full gains out of OpenGL powered GPUs on desktop and embedded devices. Not just performance, new Qt5 rendering backend also allows features which have not been possible earlier." - } - InfoViewItem { - text: "Particles
    Qt5 comes with a fresh particles plugin 'QtQuick.Particles 2.0' which is superior compared to Qt4 particles. In this demo application, twinkling stars, shooting star and fog/smoke have been implemented using this new particles engine. Superb." - image: "images/sc2.png" - } - InfoViewItem { - text: "Sprites
    QtQuick 2.0 has built-in support for sprites using Sprite, SpriteSequence and AnimatedSprite elements. Sprites can also be used as a source for particles. In this demo application, shooting star is an AnimatedSprite with 16 frames." - image: "images/sc5.png" - switchedLayout: true - } - InfoViewItem { - text: "Animations
    QtQuick has always had a very strong animations support. Qt5 supports now also animations along a non-linear paths using PathAnimation and PathInterpolator QML elements. In this demo, shooting star position moves along PathAnimation using PathCurves." - image: "images/sc1.png" - } - InfoViewItem { - text: "ShaderEffects
    Qt5 supports ShaderEffect and ShaderEffectSource QML elements which allow writing custom GLSL shader effects. This gives developers a lot of control to transform and enhance QML UIs by increasing dynamicity. In this demo, custom shader effect is used for lighting the movie delegates." - image: "images/sc3.png" - switchedLayout: true - } - InfoViewItem { - text: "Graphical Effects
    Qt5 comes with pre-defined set of effects such as drop-shadow, blur, glow, colorize etc. These are available in 'QtGraphicalEffects 1.0' plugin. In this demo, DropShadow is used to improve the appearance of movie title texts." - image: "images/sc4.png" - } - - Row { - anchors.horizontalCenter: parent.horizontalCenter - height: 128 - spacing: 16 - Image { - source: "images/qt_ambassador_logo.png" - anchors.bottom: parent.bottom - } - Image { - source: "images/cc-by_logo.png" - anchors.bottom: parent.bottom - } - Image { - source: "images/quit_logo.png" - anchors.bottom: parent.bottom - } - } - Text { - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - color: "#909090" - font.pixelSize: settings.fontXS - text: "Copyright 2012 QUIt Coding. Reuse sources freely." - } - } - } - - // Grip to close the view by flicking - Image { - id: gripImage - anchors.right: parent.right - anchors.rightMargin: 8 - anchors.bottom: parent.bottom - anchors.bottomMargin: 8 - source: "images/grip.png" - opacity: 0.25 - MouseArea { - property int pressedY: 0 - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.bottomMargin: priv.endCurly - 16 - anchors.margins: -16 - width: 90 - height: 80 - onPressed: { - showCurtainAnimation.stop(); - hideCurtainAnimation.stop(); - pressedY = mouseY - } - onPositionChanged: { - curtainEffect.rightHeight = root.height - (pressedY - mouseY) - 8 - } - onReleased: { - if (mouseY < -root.height*0.2) { - root.hide(); - } else { - root.show(); - } - } - } - } - } - - CurtainEffect { - id: curtainEffect - anchors.fill: viewItem - source: ShaderEffectSource { sourceItem: viewItem; hideSource: true } - rightHeight: 0 - leftHeight: rightHeight - Behavior on leftHeight { - SpringAnimation { spring: .4; damping: .05; mass: .5 } - } - // Hide smoothly when curtain closes - opacity: 0.004 * rightHeight - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/InfoViewItem.qml b/basicsuite/Qt5 Cinematic Demo/content/InfoViewItem.qml deleted file mode 100644 index a339f98..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/InfoViewItem.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.0 - -Item { - id: root - property alias text: textItem.text - property alias image: imageItem.source - // Switch image & text positions - property bool switchedLayout: false - - width: parent.width - height: Math.max(imageItem.height, textItem.paintedHeight) - - Image { - id: imageItem - x: root.switchedLayout ? 16 : parent.width - width - 10 - y: 8 - } - - Text { - id: textItem - width: parent.width - imageItem.width - 40 - x: root.switchedLayout ? parent.width - width - 16 : 16 - y: 8 - color: "#ffffff" - style: Text.Raised - styleColor: "#000000" - font.pixelSize: settings.fontS - wrapMode: Text.WordWrap - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/MainView.qml b/basicsuite/Qt5 Cinematic Demo/content/MainView.qml deleted file mode 100644 index 73efe70..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/MainView.qml +++ /dev/null @@ -1,232 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import QtGraphicalEffects 1.0 - -Item { - id: root - - // Set this to blur the mainView when showing something on top of it - property real blurAmount: 0 - - // Updates the blur shader source, best called right before adding blurAmount - function scheduleUpdate() { - mainContentSource.scheduleUpdate(); - } - - anchors.fill: parent - - // Update blur shader source when width/height changes - onHeightChanged: { - root.scheduleUpdate(); - } - onWidthChanged: { - root.scheduleUpdate(); - } - - Item { - id: mainViewArea - anchors.fill: parent - - Background { - id: background - } - - ListView { - id: listView - - property real globalLightPosX: lightImage.x / root.width - property real globalLightPosY: lightImage.y / root.height - - // Normal-mapped cover shared among delegates - ShaderEffectSource { - id: coverNmapSource - sourceItem: Image { source: "images/cover_nmap.png" } - hideSource: true - visible: false - } - - anchors.fill: parent - spacing: -60 - model: moviesModel - delegate: DelegateItem { - name: model.name - } - highlightFollowsCurrentItem: true - highlightRangeMode: ListView.StrictlyEnforceRange - highlightMoveDuration: 400 - preferredHighlightBegin: root.height * 0.5 - 140 - preferredHighlightEnd: root.height * 0.5 - 140 - cacheBuffer: 4000 - } - - Text { - id: titleText - anchors.verticalCenter: parent.verticalCenter - anchors.verticalCenterOffset: -40 - anchors.horizontalCenter: parent.horizontalCenter - width: 180 + parent.width * 0.25 - wrapMode: Text.WordWrap - horizontalAlignment: Text.AlignHCenter - text: listView.currentIndex+1 + ". " + listView.currentItem.name - color: "#ffffff" - style: Text.Outline - styleColor: "#b0a030" - font.pixelSize: settings.fontL - Behavior on text { - SequentialAnimation { - ParallelAnimation { - NumberAnimation { target: titleText; property: "opacity"; duration: 100; to: 0; easing.type: Easing.InOutQuad } - NumberAnimation { target: titleText; property: "scale"; duration: 100; to: 0.6; easing.type: Easing.InOutQuad } - } - PropertyAction { target: titleText; property: "text" } - ParallelAnimation { - NumberAnimation { target: titleText; property: "opacity"; duration: 100; to: 1; easing.type: Easing.InOutQuad } - NumberAnimation { target: titleText; property: "scale"; duration: 100; to: 1; easing.type: Easing.InOutQuad } - } - } - } - } - - Image { - anchors.bottom: parent.bottom - anchors.bottomMargin: 32 - anchors.horizontalCenter: parent.horizontalCenter - source: "images/qt_logo.png" - opacity: listView.atYEnd - Behavior on opacity { - NumberAnimation { duration: 500; easing.type: Easing.InOutQuad } - } - } - - // Shooting star + animation + particles - AnimatedSprite { - id: lightImage - width: 128 - height: 128 - frameWidth: 128 - frameHeight: 128 - frameCount: 16 - frameRate: 15 - source: "images/planet_sprite.png" - interpolate: true - loops: Animation.Infinite - visible: settings.showLighting || settings.showShootingStarParticles - running: !detailsView.isShown && !infoView.isShown && (settings.showLighting || settings.showShootingStarParticles) - } - - PathAnimation { - target: lightImage - duration: 5000 - orientation: PathAnimation.RightFirst - anchorPoint: Qt.point(lightImage.width/2, lightImage.height/2) - running: true - paused: detailsView.isShown || infoView.isShown || (!settings.showLighting && !settings.showShootingStarParticles) - loops: Animation.Infinite - path: Path { - id: lightAnimPath - property int w: root.width > 0 ? root.width : 1 - property int h: root.height > 0 ? root.height : 1 - startX: w*0.4; startY: h*0.3 - PathCurve { x: lightAnimPath.w*0.8; y: lightAnimPath.h*0.2 } - PathCurve { x: lightAnimPath.w*0.8; y: lightAnimPath.h*0.7 } - PathCurve { x: lightAnimPath.w*0.1; y: lightAnimPath.h*0.6 } - PathCurve { x: lightAnimPath.w*0.4; y: lightAnimPath.h*0.3 } - } - } - - ParticleSystem { - anchors.fill: parent - paused: detailsView.isShown || infoView.isShown - - // Shooting star particles - ImageParticle { - source: "images/particle.png" - color: "#ffefaf" - colorVariation: settings.showColors ? 1.0 : 0.1 - alpha: 0 - } - Emitter { - id: shootingStarEmitter - emitRate: settings.showShootingStarParticles ? 100 : 0 - lifeSpan: 2000 - x: lightImage.x + lightImage.width/2 - y: lightImage.y + lightImage.height/2 - velocity: PointDirection {xVariation: 8; yVariation: 8;} - acceleration: PointDirection {xVariation: 12; yVariation: 12;} - size: 32 - sizeVariation: 16 - } - Emitter { - id: shootingStarBurst - emitRate: 0 - lifeSpan: 2000 - x: lightImage.x + lightImage.width/2 - y: lightImage.y + lightImage.height/2 - velocity: PointDirection {xVariation: 60; yVariation: 60;} - acceleration: PointDirection {xVariation: 40; yVariation: 40;} - size: 24 - sizeVariation: 16 - } - - // Dust/Smoke particles - ImageParticle { - groups: ["smoke"] - source: "images/smoke.png" - color: "#ffffff" - alpha: 0.9 - opacity: 0.8 - colorVariation: settings.showColors ? 0.9 : 0.0 - rotationVariation: 180 - } - Emitter { - y: root.height * 0.85 - anchors.horizontalCenter: parent.horizontalCenter - width: 200 + parent.width * 0.1 - height: root.height * 0.3 - emitRate: settings.showFogParticles ? 8 : 0 - lifeSpan: 2000 - lifeSpanVariation: 1000 - group: "smoke" - size: 192 - sizeVariation: 64 - acceleration: PointDirection { y: -80; xVariation: 20 } - } - Emitter { - y: root.height * 0.9 - anchors.horizontalCenter: parent.horizontalCenter - width: 200 + parent.width * 0.1 - height: root.height * 0.2 - emitRate: settings.showFogParticles ? 10 : 0 - lifeSpan: 2000 - group: "smoke" - size: 192 - sizeVariation: 64 - acceleration: PointDirection { y: -20; xVariation: 40 } - } - Turbulence { - groups: ["smoke"] - width: parent.width - height: parent.height * 0.8 - strength: 60 - } - } - - SettingsView { - id: settingsView - } - } - - FastBlur { - anchors.fill: mainViewArea - radius: root.blurAmount - visible: root.blurAmount - source: ShaderEffectSource { - id: mainContentSource - anchors.fill: parent - sourceItem: mainViewArea - hideSource: false - live: false - visible: root.blurAmount - } - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/MoviesModel.qml b/basicsuite/Qt5 Cinematic Demo/content/MoviesModel.qml deleted file mode 100644 index c2ee561..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/MoviesModel.qml +++ /dev/null @@ -1,187 +0,0 @@ -import QtQuick 2.0 - -// Dummy model for movies -ListModel { - id: movieModel - - ListElement { - name: "Lord of the Rings: The Return of the King" - image: "15.png" - year: "2003" - rating: 8.9 - director: "Peter Jackson" - cast: "Elijah Wood, Viggo Mortensen, Ian McKellen" - overview: "While Frodo & Sam continue to approach Mount Doom to destroy the One Ring, unaware of the path Gollum is leading them, the former Fellowship aid Rohan & Gondor in a great battle in the Pelennor Fields, Minas Tirith and the Black Gates as Sauron wages his last war against Middle-Earth." - } - ListElement { - name: "Fight Club" - image: "9.png" - year: "1999" - rating: 8.9 - director: "David Fincher" - cast: "Brad Pitt, Edward Norton, Helena Bonham Carter" - overview: "A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on, with underground \"fight clubs\" forming in every town, until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion." - } - ListElement { - name: "Lord of the Rings: The Fellowship of the Ring" - image: "13.png" - year: "2001" - rating: 8.8 - director: "Peter Jackson" - cast: "Elijah Wood, Ian McKellen, Orlando Bloom" - overview: "An ancient Ring thought lost for centuries has been found, and through a strange twist in fate has been given to a small Hobbit named Frodo. When Gandalf discovers the Ring is in fact the One Ring of the Dark Lord Sauron, Frodo must make an epic quest to the Cracks of Doom in order to destroy it! However he does not go alone. He is joined by Gandalf, Legolas the elf, Gimli the Dwarf, Aragorn, Boromir and his three Hobbit friends Merry, Pippin and Samwise. Through mountains, snow, darkness, forests, rivers and plains, facing evil and danger at every corner the Fellowship of the Ring must go. Their quest to destroy the One Ring is the only hope for the end of the Dark Lords reign!" - } - ListElement { - name: "Lord of the Rings: The Two Towers" - image: "14.png" - year: "2002" - rating: 8.7 - director: "Peter Jackson" - cast: "Elijah Wood, Ian McKellen, Viggo Mortensen" - overview: "Sauron's forces increase. His allies grow. The Ringwraiths return in an even more frightening form. Saruman's army of Uruk Hai is ready to launch an assault against Aragorn and the people of Rohan. Yet, the Fellowship is broken and Boromir is dead. For the little hope that is left, Frodo and Sam march on into Mordor, unprotected. A number of new allies join with Aragorn, Gimli, Legolas, Pippin and Merry. And they must defend Rohan and attack Isengard. Yet, while all this is going on, Sauron's troops mass toward the City of Gondor, for the War of the Ring is about to begin." - } - ListElement { - name: "Gladiator" - image: "10.png" - year: "2000" - rating: 8.5 - director: "Ridley Scott" - cast: "Russell Crowe, Joaquin Phoenix, Connie Nielsen" - overview: "Maximus is a powerful Roman general, loved by the people and the aging Emperor, Marcus Aurelius. Before his death, the Emperor chooses Maximus to be his heir over his own son, Commodus, and a power struggle leaves Maximus and his family condemned to death. The powerful general is unable to save his family, and his loss of will allows him to get captured and put into the Gladiator games until he dies. The only desire that fuels him now is the chance to rise to the top so that he will be able to look into the eyes of the man who will feel his revenge." - } - ListElement { - name: "Big Fish" - image: "7.png" - year: "2003" - rating: 8.0 - director: "Tim Burton" - cast: "Ewan McGregor, Albert Finney, Billy Crudup" - overview: "The story revolves around a dying father and his son, who is trying to learn more about his dad by piecing together the stories he has gathered over the years. The son winds up re-creating his father's elusive life in a series of legends and myths inspired by the few facts he knows. Through these tales, the son begins to understand his father's great feats and his great failings." - } - ListElement { - name: "Avatar" - image: "12.png" - year: "2009" - rating: 8.0 - director: "James Cameron" - cast: "Sam Worthington, Zoe Saldana, Sigourney Weaver" - overview: "When his brother is killed in a robbery, paraplegic Marine Jake Sully decides to take his place in a mission on the distant world of Pandora. There he learns of greedy corporate figurehead Parker Selfridge's intentions of driving off the native humanoid \"Na\'vi\" in order to mine for the precious material scattered throughout their rich woodland. In exchange for the spinal surgery that will fix his legs, Jake gathers intel for the cooperating military unit spearheaded by gung-ho Colonel Quaritch, while simultaneously attempting to infiltrate the Na\'vi people with the use of an \"avatar\" identity. While Jake begins to bond with the native tribe and quickly falls in love with the beautiful alien Neytiri, the restless Colonel moves forward with his ruthless extermination tactics, forcing the soldier to take a stand - and fight back in an epic battle for the fate of Pandora." - } - ListElement { - name: "The Social Network" - image: "18.png" - year: "2010" - rating: 7.9 - director: "David Fincher" - cast: "Jesse Eisenberg, Andrew Garfield, Justin Timberlake" - overview: "On a fall night in 2003, Harvard undergrad and computer programming genius Mark Zuckerberg sits down at his computer and heatedly begins working on a new idea. In a fury of blogging and programming, what begins in his dorm room soon becomes a global social network and a revolution in communication. A mere six years and 500 million friends later, Mark Zuckerberg is the youngest billionaire in history... but for this entrepreneur, success leads to both personal and legal complications." - } - ListElement { - name: "300" - image: "5.png" - year: "2006" - rating: 7.8 - director: "Zack Snyder" - cast: "Gerard Butler, Lena Headey, David Wenham" - overview: "In the Battle of Thermopylae of 480 BC an alliance of Greek city-states fought the invading Persian army in the mountain pass of Thermopylae. Vastly outnumbered, the Greeks held back the enemy in one of the most famous last stands of history. Persian King Xerxes lead a Army of well over 100,000 (Persian king Xerxes before war has about 170,000 army) men to Greece and was confronted by 300 Spartans, 700 Thespians and other Slave soldiers. Xerxes waited for 10 days for King Leonidas to surrender or withdraw left with no options he moved. The battle lasted for about 3 days and after which all 300 Spartans were killed. The Spartan defeat was not the one expected, as a local shepherd, named Ephialtes, defected to the Persians and informed Xerxes of a separate path through Thermopylae, which the Persians could use to outflank the Greeks." - } - ListElement { - name: "The Last Samurai" - image: "2.png" - year: "2003" - rating: 7.7 - director: "Edward Zwick" - cast: "Tom Cruise, Ken Watanabe, Billy Connolly" - overview: "In the 1870s, Captain Nathan Algren, a cynical veteran of the American Civil war who will work for anyone, is hired by Americans who want lucrative contracts with the Emperor of Japan to train the peasant conscripts for the first standing imperial army in modern warfare using firearms. The imperial Omura cabinet's first priority is to repress a rebellion of traditionalist Samurai -hereditary warriors- who remain devoted to the sacred dynasty but reject the Westernizing policy and even refuse firearms. Yet when his ill-prepared superior force sets out too soon, their panic allows the sword-wielding samurai to crush them. Badly wounded Algren's courageous stand makes the samurai leader Katsumoto spare his life; once nursed to health he learns to know and respect the old Japanese way, and participates as advisor in Katsumoto's failed attempt to save the Bushido tradition, but..." - } - ListElement { - name: "The Bolt" - image: "1.png" - year: "2008" - rating: 7.1 - director: "Byron Howard, Chris Williams" - cast: "John Travolta, Miley Cyrus, Susie Essman" - overview: "Bolt, an American White Shepherd, has lived his whole life on the set of his action TV show, where he believes he has superpowers. When separated from the studio by accident, he meets a female alley cat named Mittens and a hamster named Rhino. He's trying to find the way home, to the studio. Along the way, he learns that he doesn't have superpowers and that the show is not real." - } - ListElement { - name: "The School of Rock" - image: "3.png" - year: "2003" - rating: 7.1 - director: "Richard Linklater" - cast: "Jack Black, Mike White, Joan Cusack" - overview: "Down and out rock star Dewey Finn gets fired from his band, and he faces a mountain of debts and depression. He takes a job as a 4th grade substitute teacher at an uptight private school where his attitude and hijinx have a powerful effect on his students. He also meets Zack, a 10-year-old guitar prodigy, who could help Dewey win a \"battle of the bands\" competition, which would solve his financial problems and put him back in the spotlight." - } - ListElement { - name: "Thor" - image: "19.png" - year: "2011" - rating: 7.0 - director: "Kenneth Branagh" - cast: "Chris Hemsworth, Anthony Hopkins, Natalie Portman" - overview: "The warrior Thor (Hemsworth) is cast out of the fantastic realm of Asgard by his father Odin (Hopkins) for his arrogance and sent to Earth to live among humans. Falling in love with scientist Jane Foster (Portman) teaches Thor much-needed lessons, and his new-found strength comes into play as a villain from his homeland sends dark forces toward Earth." - } - ListElement { - name: "Charlie and the Chocolate Factory" - image: "16.png" - year: "2005" - rating: 6.9 - director: "Tim Burton" - cast: "Johnny Depp, Freddie Highmore, David Kelly" - overview: "When Willy Wonka decides to let five children into his chocolate factory, he decides to release five golden tickets in five separate chocolate bars, causing complete mayhem. The tickets start to be found, with the fifth going to a very special boy, called Charlie Bucket. With his Grandpa, Charlie joins the rest of the children to experience the most amazing factory ever. But not everything goes to plan within the factory." - } - ListElement { - name: "Quantum of Solace" - image: "4.png" - year: "2008" - rating: 6.8 - director: "Marc Forster" - cast: "Daniel Craig, Olga Kurylenko, Mathieu Amalric" - overview: "Is there solace in revenge? Bond and \"M\" sniff a shadowy international network of power and corruption reaping billions. As Bond pursues the agents of an assassination attempt on \"M,\" all roads lead to Dominic Greene, a world-renowned developer of green technology. Greene, a nasty piece of work, is intent on securing a barren area of Bolivia in exchange for assisting a strongman stage a coup there. The CIA looks the other way, and only Bond, with help from a retired spy and from a mysterious beauty, stands in Greene's way. \"M\" wonders if she can trust Bond, or if vengeance possesses him. Beyond that, can anyone drawn to Bond live to tell the tale?" - } - ListElement { - name: "Dinosaur" - image: "8.png" - year: "2000" - rating: 6.3 - director: "Eric Leighton, Ralph Zondag" - cast: "D.B. Sweeney, Julianna Margulies, Samuel E. Wright" - overview: "During an attack on a pack of Iguanodon, an egg is separated and ends up with the possession of a group of lemurs. The lemurs care for this egg and the young creature born from it, which they call Aladar. When a meteor shower hits earth, Aladar and his family must leave their homeland. Away from home and as close to danger as they have ever been, they meet up with a huge group of dinosaurs, led by Kron and Bruton. All together they are trying to reach the nesting grounds, but it's not going to be easy." - } - ListElement { - name: "Bee Movie" - image: "6.png" - year: "2007" - rating: 6.2 - director: "Steve Hickner, Simon J. Smith" - cast: "Jerry Seinfeld, Renée Zellweger, Matthew Broderick" - overview: "When the bee Barry B. Benson graduates from college, he finds that he will have only one job for his entire life, and absolutely disappointed, he joins the team responsible for bringing the honey and pollination of the flowers to visit the world outside the hive. Once in Manhattan, he is saved by the florist Vanessa and he breaks the bee law to thank Vanessa. They become friends and Barry discovers that humans exploit bees to sell the honey they produce. Barry decides to sue the human race, with destructive consequences to nature." - } - ListElement { - name: "Jumper" - image: "11.png" - year: "2008" - rating: 5.9 - director: "Doug Liman" - cast: "Hayden Christensen, Samuel L. Jackson, Jamie Bell" - overview: "David Rice is a high school student in Ann Arbor, abandoned by his mother at five, enamored with Millie, a fellow student, and picked on by at least one classmate. On a winter's day, while about to drown, he discovers he can transport himself instantaneously to anyplace on earth. He leaves town, goes to New York City, robs a bank vault, and comes to the attention of a shadowy group of government hunters. Eight years later, the hunters, led by the murderous Roland, get a fix on David. He heads home, searches out Millie, invites her to travel with him, and only later realizes that Roland and his crew are seriously deadly. Is everyone close to David in danger?" - } - ListElement { - name: "The Haunting" - image: "17.png" - year: "1999" - rating: 4.7 - director: "Jan de Bont" - cast: "Liam Neeson, Catherine Zeta-Jones, Owen Wilson" - overview: "A remake of the classic 1963 movie \"The Haunting\" about a team of paranormal experts who look into strange occurrences in an ill-fated house. Through the course of the night some will unravel, some will question, and all will fight for their lives as the house fights back." - } - ListElement { - name: "Wild Wild West" - image: "20.png" - year: "1999" - rating: 4.5 - director: "Barry Sonnenfeld" - cast: "Will Smith, Kevin Kline, Kenneth Branagh" - overview: "Jim West is a guns-a-blazing former Civil War hero. Artemus Gordon is an inventive U.S. Marshal who excels in disguise. When the United States is threatened by psychotic Confederate Arliss Loveless, President Ulysses Grant teams the duo up to bring him to justice. On a hazard-packed train journey from Washington D.C. to Utah, West and Gordon must combine their skills to best Loveless and his diabolical machines." - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/RatingsItem.qml b/basicsuite/Qt5 Cinematic Demo/content/RatingsItem.qml deleted file mode 100644 index 6d22489..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/RatingsItem.qml +++ /dev/null @@ -1,32 +0,0 @@ -import QtQuick 2.0 - -Item { - property real rating: 5.0 - - width: emptyRatingStarsImage.width + ratingTextItem.paintedWidth + 4 - height: 32 - - // TODO: Implement ratings in shader + animations, instead of clipping trick - Image { - id: emptyRatingStarsImage - source: "images/stars2.png" - } - Item { - id: ratingImageItem - height: 32 - width: (36 * rating) - 2 - clip: true - Image { - source: "images/stars.png" - } - } - Text { - id: ratingTextItem - anchors.left: emptyRatingStarsImage.right - anchors.leftMargin: 4 - anchors.verticalCenter: ratingImageItem.verticalCenter - color: "#ffffff" - font.pixelSize: settings.fontM - text: "(" + rating.toFixed(1) + ")" - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/SettingsView.qml b/basicsuite/Qt5 Cinematic Demo/content/SettingsView.qml deleted file mode 100644 index 7944803..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/SettingsView.qml +++ /dev/null @@ -1,138 +0,0 @@ -import QtQuick 2.0 - -Item { - id: root - - property bool isShown: false - - anchors.fill: parent - - function show() { - isShown = true; - hideAnimation.stop(); - showAnimation.restart(); - } - function hide() { - isShown = false; - showAnimation.stop(); - hideAnimation.restart(); - } - - SequentialAnimation { - id: showAnimation - PropertyAction { target: backgroundItem; property: "visible"; value: true } - ParallelAnimation { - NumberAnimation { target: backgroundItem; property: "opacity"; to: 1; duration: 250; easing.type: Easing.InOutQuad } - NumberAnimation { target: backgroundItem; property: "scale"; to: 1; duration: 500; easing.type: Easing.OutBack } - } - } - SequentialAnimation { - id: hideAnimation - ParallelAnimation { - NumberAnimation { target: backgroundItem; property: "opacity"; to: 0; duration: 500; easing.type: Easing.InOutQuad } - NumberAnimation { target: backgroundItem; property: "scale"; to: 0.6; duration: 500; easing.type: Easing.InOutQuad } - } - PropertyAction { target: backgroundItem; property: "visible"; value: false } - } - - MouseArea { - anchors.fill: parent - enabled: root.isShown - onClicked: { - root.hide(); - } - } - - Image { - id: settingsIcon - anchors.left: parent.left - anchors.leftMargin: 4 - anchors.bottom: parent.bottom - anchors.bottomMargin: 4 - source: "images/settings.png" - opacity: backgroundItem.opacity + 0.4 - MouseArea { - anchors.fill: parent - anchors.margins: -20 - onClicked: { - if (root.isShown) { - root.hide(); - } else { - root.show(); - } - } - } - } - - BorderImage { - id: backgroundItem - anchors.left: settingsIcon.horizontalCenter - anchors.bottom: settingsIcon.verticalCenter - width: Math.min(480, parent.width - 60) - height: settingsContentColumn.height + 36 - source: "images/panel_bg.png" - border.left : 22 - border.right : 10 - border.top : 5 - border.bottom : 26 - - transformOrigin: Item.BottomLeft - visible: false - opacity: 0 - scale: 0.6 - - Column { - id: settingsContentColumn - width: parent.width - y: 8 - Switch { - text: "Show movies cover lighting?" - checked: settings.showLighting - onCheckedChanged: { - settings.showLighting = checked; - } - } - Rectangle { - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - 32 - height: 1 - color: "#404040" - } - Switch { - text: "Show shooting star particles?" - checked: settings.showShootingStarParticles - onCheckedChanged: { - settings.showShootingStarParticles = checked; - } - } - Rectangle { - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - 32 - height: 1 - color: "#404040" - } - Switch { - text: "Show fog particles?" - checked: settings.showFogParticles - onCheckedChanged: { - settings.showFogParticles = checked; - } - } - Rectangle { - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - 32 - height: 1 - color: "#404040" - } - Switch { - text: "Do you l-o-v-e colors?" - checked: settings.showColors - onText: "Yes" - offText: "No!" - onCheckedChanged: { - settings.showColors = checked; - } - } - } - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/Switch.qml b/basicsuite/Qt5 Cinematic Demo/content/Switch.qml deleted file mode 100644 index 967c03f..0000000 --- a/basicsuite/Qt5 Cinematic Demo/content/Switch.qml +++ /dev/null @@ -1,170 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: root - - property alias text: textItem.text - property bool checked: false - property string onText: "On" - property string offText: "Off" - - QtObject { - id: priv - property alias checkedPriv: root.checked - onCheckedPrivChanged: { - if (checkedPriv) switchEffectAnimation.restart(); - } - - function releaseSwitch() { - if (knob.x == 48) switchEffectAnimation.restart(); - // Don't switch if we are in correct side - if ((knob.x == -2 && !checked) || (knob.x == 48 && checked)) { - return; - } - checked = !checked; - } - } - - width: parent ? parent.width : 200 - height: 80 - - MouseArea { - width: parent.width - height: parent.height - onClicked: { - root.checked = !root.checked - } - } - - Text { - id: textItem - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: 22 - anchors.right: switchBackgroundImage.left - elide: Text.ElideRight - font.pixelSize: 20 - color: "#ffffff" - } - - Image { - id: switchBackgroundImage - source: "images/switch_background.png" - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 22 - } - Image { - id: switchFrameImage - source: "images/switch_frame.png" - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 21 - z: 10 - } - - Item { - id: switchItem - anchors.fill: switchBackgroundImage - - SequentialAnimation { - id: switchEffectAnimation - PropertyAction { target: particleSystem; property: "paused"; value: "false" } - ScriptAction { script: particleEmitter.pulse(3000) } - } - - Image { - id: switchOnImage - anchors.right: knob.right - anchors.rightMargin: 2 - source: "images/switch_on.png" - opacity: knob.x / 48 - - // Stars effect - ParticleSystem { - id: particleSystem - anchors.fill: parent - paused: true - onEmptyChanged: if (empty) particleSystem.pause(); - ImageParticle { - source: "images/star.png" - rotationVariation: 180 - color:"#ffffff" - } - Emitter { - id: particleEmitter - width: parent.width - height: 8 - emitRate: 16 - lifeSpan: 2000 - size: 32 - sizeVariation: 16 - endSize: 8 - velocity: PointDirection{ y: 20; x:-2; xVariation: 5; yVariation: 10 } - enabled: false - - } - Turbulence { - width: parent.width - height: (parent.height / 2) - strength: 8 - } - } - } - - Text { - anchors.verticalCenter: parent.verticalCenter - anchors.right: knob.left - anchors.rightMargin: 6 - color: "#000000" - font.pixelSize: 18 - font.bold: true - text: onText - } - Text { - anchors.verticalCenter: parent.verticalCenter - anchors.left: knob.right - anchors.leftMargin: 4 - color: "#ffffff" - font.pixelSize: 18 - font.bold: true - text: offText - } - - Image { - id: knob - source: "images/switch_thumb.png" - x: checked ? 48 : -2 - opacity: 0.4 - MouseArea { - anchors.fill: parent - drag.target: knob; drag.axis: Drag.XAxis; drag.minimumX: -2; drag.maximumX: 48 - onClicked: checked = !checked - onReleased: priv.releaseSwitch(); - } - Behavior on x { - NumberAnimation { duration: 250; easing.type: Easing.InOutQuad } - } - } - } - - // Mask out switch parts which should be hidden - ShaderEffect { - id: shaderItem - property variant source: ShaderEffectSource { sourceItem: switchItem; hideSource: true } - property variant maskSource: ShaderEffectSource { sourceItem: switchBackgroundImage; hideSource: true } - - anchors.fill: switchBackgroundImage - - fragmentShader: " - varying highp vec2 qt_TexCoord0; - uniform highp float qt_Opacity; - uniform sampler2D source; - uniform sampler2D maskSource; - void main(void) { - gl_FragColor = texture2D(source, qt_TexCoord0.st) * (texture2D(maskSource, qt_TexCoord0.st).a) * qt_Opacity; - } - " - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/1.png b/basicsuite/Qt5 Cinematic Demo/content/images/1.png deleted file mode 100644 index 15c16d0..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/1.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/10.png b/basicsuite/Qt5 Cinematic Demo/content/images/10.png deleted file mode 100644 index d1bbf39..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/10.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/11.png b/basicsuite/Qt5 Cinematic Demo/content/images/11.png deleted file mode 100644 index d2bf2f4..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/11.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/12.png b/basicsuite/Qt5 Cinematic Demo/content/images/12.png deleted file mode 100644 index 92031de..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/12.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/13.png b/basicsuite/Qt5 Cinematic Demo/content/images/13.png deleted file mode 100644 index d28b3ea..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/13.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/14.png b/basicsuite/Qt5 Cinematic Demo/content/images/14.png deleted file mode 100644 index 9755a27..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/14.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/15.png b/basicsuite/Qt5 Cinematic Demo/content/images/15.png deleted file mode 100644 index a1b6efb..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/15.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/16.png b/basicsuite/Qt5 Cinematic Demo/content/images/16.png deleted file mode 100644 index 7a4a520..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/16.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/17.png b/basicsuite/Qt5 Cinematic Demo/content/images/17.png deleted file mode 100644 index 33853b1..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/17.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/18.png b/basicsuite/Qt5 Cinematic Demo/content/images/18.png deleted file mode 100644 index a04e29e..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/18.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/19.png b/basicsuite/Qt5 Cinematic Demo/content/images/19.png deleted file mode 100644 index 8af7536..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/19.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/2.png b/basicsuite/Qt5 Cinematic Demo/content/images/2.png deleted file mode 100644 index 30deff4..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/2.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/20.png b/basicsuite/Qt5 Cinematic Demo/content/images/20.png deleted file mode 100644 index 78b8acb..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/20.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/3.png b/basicsuite/Qt5 Cinematic Demo/content/images/3.png deleted file mode 100644 index 0a2675e..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/3.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/4.png b/basicsuite/Qt5 Cinematic Demo/content/images/4.png deleted file mode 100644 index 7d4620b..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/4.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/5.png b/basicsuite/Qt5 Cinematic Demo/content/images/5.png deleted file mode 100644 index bfd1d61..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/5.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/6.png b/basicsuite/Qt5 Cinematic Demo/content/images/6.png deleted file mode 100644 index 7ae2086..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/6.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/7.png b/basicsuite/Qt5 Cinematic Demo/content/images/7.png deleted file mode 100644 index a1b1925..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/7.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/8.png b/basicsuite/Qt5 Cinematic Demo/content/images/8.png deleted file mode 100644 index fcfa8d4..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/8.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/9.png b/basicsuite/Qt5 Cinematic Demo/content/images/9.png deleted file mode 100644 index c066c29..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/9.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/background.png b/basicsuite/Qt5 Cinematic Demo/content/images/background.png deleted file mode 100644 index f88c905..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/background.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/background3.png b/basicsuite/Qt5 Cinematic Demo/content/images/background3.png deleted file mode 100644 index 67b16dd..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/background3.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/button.png b/basicsuite/Qt5 Cinematic Demo/content/images/button.png deleted file mode 100644 index 1f1c375..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/button.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/cc-by_logo.png b/basicsuite/Qt5 Cinematic Demo/content/images/cc-by_logo.png deleted file mode 100644 index d264c4e..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/cc-by_logo.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/cover_nmap.png b/basicsuite/Qt5 Cinematic Demo/content/images/cover_nmap.png deleted file mode 100644 index e613d9b..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/cover_nmap.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/grip.png b/basicsuite/Qt5 Cinematic Demo/content/images/grip.png deleted file mode 100644 index 66118f9..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/grip.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/heading.png b/basicsuite/Qt5 Cinematic Demo/content/images/heading.png deleted file mode 100644 index 509b12b..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/heading.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/heading_big.png b/basicsuite/Qt5 Cinematic Demo/content/images/heading_big.png deleted file mode 100644 index ec37388..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/heading_big.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/heading_big.xcf b/basicsuite/Qt5 Cinematic Demo/content/images/heading_big.xcf deleted file mode 100644 index b77b948..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/heading_big.xcf and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/info.png b/basicsuite/Qt5 Cinematic Demo/content/images/info.png deleted file mode 100644 index 0f9d3c3..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/info.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/panel_bg.png b/basicsuite/Qt5 Cinematic Demo/content/images/panel_bg.png deleted file mode 100644 index fd25e7e..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/panel_bg.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/particle.png b/basicsuite/Qt5 Cinematic Demo/content/images/particle.png deleted file mode 100644 index 5c83896..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/particle.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/planet_sprite.png b/basicsuite/Qt5 Cinematic Demo/content/images/planet_sprite.png deleted file mode 100644 index 8ea7b13..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/planet_sprite.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/qt_ambassador_logo.png b/basicsuite/Qt5 Cinematic Demo/content/images/qt_ambassador_logo.png deleted file mode 100644 index dec13bb..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/qt_ambassador_logo.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/qt_logo.png b/basicsuite/Qt5 Cinematic Demo/content/images/qt_logo.png deleted file mode 100644 index 53e4806..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/qt_logo.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/qt_logo2.png b/basicsuite/Qt5 Cinematic Demo/content/images/qt_logo2.png deleted file mode 100644 index 748392d..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/qt_logo2.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/quit_logo.png b/basicsuite/Qt5 Cinematic Demo/content/images/quit_logo.png deleted file mode 100644 index f1ad50e..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/quit_logo.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/sc1.png b/basicsuite/Qt5 Cinematic Demo/content/images/sc1.png deleted file mode 100644 index 3e21076..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/sc1.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/sc2.png b/basicsuite/Qt5 Cinematic Demo/content/images/sc2.png deleted file mode 100644 index 54befbd..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/sc2.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/sc3.png b/basicsuite/Qt5 Cinematic Demo/content/images/sc3.png deleted file mode 100644 index f71cec8..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/sc3.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/sc4.png b/basicsuite/Qt5 Cinematic Demo/content/images/sc4.png deleted file mode 100644 index d0797a1..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/sc4.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/sc5.png b/basicsuite/Qt5 Cinematic Demo/content/images/sc5.png deleted file mode 100644 index d9461c4..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/sc5.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/settings.png b/basicsuite/Qt5 Cinematic Demo/content/images/settings.png deleted file mode 100644 index 4215bee..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/settings.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/smoke.png b/basicsuite/Qt5 Cinematic Demo/content/images/smoke.png deleted file mode 100644 index be0cedf..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/smoke.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/spinner.png b/basicsuite/Qt5 Cinematic Demo/content/images/spinner.png deleted file mode 100644 index e59efb2..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/spinner.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/star.png b/basicsuite/Qt5 Cinematic Demo/content/images/star.png deleted file mode 100644 index 0d592cf..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/star.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/stars.png b/basicsuite/Qt5 Cinematic Demo/content/images/stars.png deleted file mode 100644 index a997e1b..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/stars.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/stars2.png b/basicsuite/Qt5 Cinematic Demo/content/images/stars2.png deleted file mode 100644 index 50e3200..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/stars2.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/switch_background.png b/basicsuite/Qt5 Cinematic Demo/content/images/switch_background.png deleted file mode 100644 index bd9a4ca..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/switch_background.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/switch_frame.png b/basicsuite/Qt5 Cinematic Demo/content/images/switch_frame.png deleted file mode 100644 index 8404a53..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/switch_frame.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/switch_on.png b/basicsuite/Qt5 Cinematic Demo/content/images/switch_on.png deleted file mode 100644 index bc9fccb..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/switch_on.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/content/images/switch_thumb.png b/basicsuite/Qt5 Cinematic Demo/content/images/switch_thumb.png deleted file mode 100644 index e8f7451..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/content/images/switch_thumb.png and /dev/null differ diff --git a/basicsuite/Qt5 Cinematic Demo/description.txt b/basicsuite/Qt5 Cinematic Demo/description.txt deleted file mode 100644 index 253d246..0000000 --- a/basicsuite/Qt5 Cinematic Demo/description.txt +++ /dev/null @@ -1,5 +0,0 @@ -The Qt5 Cinematic Experience is a demo by "QUIt Coding", a small group of talented individuals enjoying software development with cutting edge technologies. They are official members of the Qt Ambassador Program. - -The demo shows off a number features of Qt Quick 2.0. A nicely styled list control of movie covers with lighting effects, particles and transitions. The information roll-down curvy curtain is implemented using inline GLSL in the QML file. - -The source code for this demo and more awesome looking Qt Quick examples are available from quitcoding.com. diff --git a/basicsuite/Qt5 Cinematic Demo/main.cpp b/basicsuite/Qt5 Cinematic Demo/main.cpp deleted file mode 100644 index 81c1c85..0000000 --- a/basicsuite/Qt5 Cinematic Demo/main.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include - -int main(int argc, char* argv[]) -{ - QGuiApplication app(argc,argv); - QQuickView view; - view.setResizeMode(QQuickView::SizeRootObjectToView); - view.setSource(QUrl::fromLocalFile(QCoreApplication::applicationDirPath() + QLatin1String("/Qt5_CinematicExperience.qml"))); - - const QString lowerArgument = QString::fromLatin1(argv[1]).toLower(); - if (lowerArgument == QLatin1String("--fullscreen")) { - view.showFullScreen(); - } else { - view.show(); - } - return app.exec(); -} diff --git a/basicsuite/Qt5 Cinematic Demo/main.qml b/basicsuite/Qt5 Cinematic Demo/main.qml deleted file mode 100644 index b9ad90f..0000000 --- a/basicsuite/Qt5 Cinematic Demo/main.qml +++ /dev/null @@ -1,48 +0,0 @@ -import QtQuick 2.0 -import "content" - -Item { - id: mainWindow - - width: 1920 - height: 1080 - - QtObject { - id: settings - // These are used to scale fonts according to screen size - property real _scaler: 300 + mainWindow.width * mainWindow.height * 0.00015 - property int fontXS: _scaler * 0.032 - property int fontS: _scaler * 0.040 - property int fontM: _scaler * 0.046 - property int fontMM: _scaler * 0.064 - property int fontL: _scaler * 0.100 - // Settings - property bool showFogParticles: false - property bool showShootingStarParticles: false - property bool showLighting: false - property bool showColors: true - } - - MainView { - id: mainView - } - - InfoView { - id: infoView - } - - DetailsView { - id: detailsView - } - - MoviesModel { - id: moviesModel - } - - FpsItem { - anchors.top: parent.top - anchors.topMargin: 8 - anchors.left: parent.left - anchors.leftMargin: 8 - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/preview_l.jpg b/basicsuite/Qt5 Cinematic Demo/preview_l.jpg deleted file mode 100644 index 21bb2f9..0000000 Binary files a/basicsuite/Qt5 Cinematic Demo/preview_l.jpg and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/Button.qml b/basicsuite/Qt5 Launch Presentation/Button.qml deleted file mode 100644 index 6d6bf6e..0000000 --- a/basicsuite/Qt5 Launch Presentation/Button.qml +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - - id: root; - - border.width: (pressed ? 1.5 : 1) * height / 20; - border.color: Qt.rgba(1, 1, 1, 0.4); - radius: height / 4; - - antialiasing: true - - gradient: Gradient { - GradientStop { position: 0; color: Qt.rgba(0.5, 0.5, 0.5, pressed ? 0.7 : 0.5); } - GradientStop { position: 1; color: Qt.rgba(0.2, 0.2, 0.2, pressed ? 0.7 : 0.5); } - } - - Behavior on color { ColorAnimation { duration: 100 } } - - property bool pressed; - property alias label: textItem.text; - - Text { - id: textItem - anchors.centerIn: parent - color: "white" - font.pixelSize: parent.height / 3; - font.bold: true - } - - MouseArea { - id: mouse - anchors.fill: parent - onPressed: root.pressed = !root.pressed; - - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/CameraSlide.qml b/basicsuite/Qt5 Launch Presentation/CameraSlide.qml deleted file mode 100644 index 564b467..0000000 --- a/basicsuite/Qt5 Launch Presentation/CameraSlide.qml +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtMultimedia 5 -import "presentation" - -import QtGraphicalEffects 1.0 - -Slide { - - id: slide - - title: "Qt Multimedia - Camera" - - Camera { - id: camera - Component.onCompleted: camera.stop(); - } - - VideoOutput { - id: videoOut - anchors.fill: parent - source: camera - layer.enabled: true; - layer.effect: ZoomBlur { - samples: 16 - length: button.pressed ? parent.height / 5 : 0 - Behavior on length { - NumberAnimation { duration: 250 } - } - } - } - - onVisibleChanged: { - if (slide.visible) - camera.start(); - else - camera.stop(); - } - - Button { - id: button - anchors.bottom: videoOut.bottom - anchors.horizontalCenter: videoOut.horizontalCenter - anchors.bottomMargin: height / 2; -// anchors.bottom: slide.top; -// anchors.right: slide.right; -// anchors.bottomMargin: height; - label: pressed ? "Remove Effect" : "Zoom Effect"; - width: height * 4; - height: parent.height * 0.1 - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/CanvasSlide.qml b/basicsuite/Qt5 Launch Presentation/CanvasSlide.qml deleted file mode 100644 index d972b41..0000000 --- a/basicsuite/Qt5 Launch Presentation/CanvasSlide.qml +++ /dev/null @@ -1,161 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "presentation" - -Slide { - id: slide - - title: "Qt Quick - Canvas" - - - - Rectangle { - height: parent.height - width: parent.width * 0.45 - anchors.right: parent.right; - antialiasing: true - radius: slide.height * 0.03; - color: Qt.rgba(0.0, 0.0, 0.0, 0.2); - Canvas { - id:canvas - anchors.fill: parent; - - renderTarget: Canvas.Image; - antialiasing: true; - onPaint: { - eval(editor.text); - } - } - } - - Rectangle { - height: parent.height - width: parent.width * 0.45 - anchors.left: parent.left - antialiasing: true - radius: slide.height * 0.03; - color: Qt.rgba(0.0, 0.0, 0.0, 0.2); - - clip: true; - - TextEdit { - id: editor - anchors.fill: parent; - anchors.margins: 10 - - font.pixelSize: 16 - color: "white" - font.family: "courier" - font.bold: true - - text: -"var ctx = canvas.getContext('2d'); -ctx.save(); -ctx.clearRect(0, 0, canvas.width, canvas.height); -ctx.strokeStyle = 'palegreen' -ctx.fillStyle = 'limegreen'; -ctx.lineWidth = 5; - -ctx.beginPath(); -ctx.moveTo(100, 100); -ctx.lineTo(300, 100); -ctx.lineTo(100, 200); -ctx.closePath(); -ctx.fill(); -ctx.stroke(); - -ctx.fillStyle = 'aquamarine' -ctx.font = '20px sansserif' -ctx.fillText('HTML Canvas API!', 100, 300); -ctx.fillText('Imperative Drawing!', 100, 340); - -ctx.restore(); -" - onTextChanged: canvas.requestPaint(); - - onCursorRectangleChanged: { - emitter.burst(10) - - } - - ParticleSystem { - id: sys1 - running: slide.visible - } - - ImageParticle { - system: sys1 - source: "images/particle.png" - color: "white" - colorVariation: 0.2 - alpha: 0 - } - - Emitter { - id: emitter - system: sys1 - - x: editor.cursorRectangle.x - editor.cursorRectangle.height / 2; - y: editor.cursorRectangle.y - width: editor.cursorRectangle.height - height: editor.cursorRectangle.height - enabled: false - - lifeSpan: 1000 - - velocity: PointDirection { xVariation: 30; yVariation: 30; } - acceleration: PointDirection {xVariation: 30; yVariation: 30; y: 100 } - - endSize: 0 - - size: 4 - sizeVariation: 2 - } - - } - - - - - } -} diff --git a/basicsuite/Qt5 Launch Presentation/DemoMain.qml b/basicsuite/Qt5 Launch Presentation/DemoMain.qml deleted file mode 100644 index 05454be..0000000 --- a/basicsuite/Qt5 Launch Presentation/DemoMain.qml +++ /dev/null @@ -1,139 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -Item { - id: demoMain; - - property bool useDropShadow: true; - property bool useSwirls: true; - property bool useSimpleGradient: false; - property bool autorun: false; - - width: 1280 - height: 720 - - NoisyGradient { - anchors.fill: parent; - gradient: Gradient { - GradientStop { position: 0.0; color: Qt.rgba(0.64 * 0.6, 0.82 * 0.6, 0.15 * 0.6) } - GradientStop { position: 1.0; color: "black" } - } - visible: !parent.useSimpleGradient - } - - Rectangle { - anchors.fill: parent; - gradient: Gradient { - GradientStop { position: 0.0; color: Qt.rgba(0.64, 0.82, 0.15) } - GradientStop { position: 1.0; color: "black" } - } - visible: parent.useSimpleGradient; - } - - Rectangle { - id: colorTable - width: 1 - height: 46 - color: "transparent" - - Column { - spacing: 2 - y: 1 - Rectangle { width: 1; height: 10; color: "white" } - Rectangle { width: 1; height: 10; color: Qt.rgba(0.64 * 1.4, 0.82 * 1.4, 0.15 * 1.4, 1); } - Rectangle { width: 1; height: 10; color: Qt.rgba(0.64, 0.82, 0.15); } - Rectangle { width: 1; height: 10; color: Qt.rgba(0.64 * 0.7, 0.82 * 0.7, 0.15 * 0.7); } - } - - layer.enabled: true - layer.smooth: true - visible: false; - } - - - Swirl - { - x: 0; - width: parent.width - height: parent.height * 0.2 - anchors.bottom: parent.bottom; - amplitude: height * 0.2; - colorTable: colorTable; - speed: 0.2; - opacity: 0.3 - visible: parent.useSwirls; - } - - Timer { - interval: 20000 - running: parent.autorun - repeat: true - - onTriggered: { - var from = slides.currentSlide; - var to = from == slides.slides.length - 1 ? 1 : from + 1; - slides.switchSlides(slides.slides[from], slides.slides[to], true); - slides.currentSlide = to; - } - } - - SlideDeck { - id: slides - titleColor: "white" - textColor: "white" - anchors.fill: parent - layer.enabled: parent.useDropShadow - layer.effect: DropShadow { - horizontalOffset: slides.width * 0.005; - verticalOffset: slides.width * 0.005; - radius: 16.0 - samples: 16 - fast: true - color: Qt.rgba(0.0, 0.0, 0.0, 0.7); - } - } - - - -} diff --git a/basicsuite/Qt5 Launch Presentation/EffectsSlide.qml b/basicsuite/Qt5 Launch Presentation/EffectsSlide.qml deleted file mode 100644 index 0355284..0000000 --- a/basicsuite/Qt5 Launch Presentation/EffectsSlide.qml +++ /dev/null @@ -1,203 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -import "presentation" - -Slide { - id: slide - - title: "Qt Graphical Effects" - writeInText: "The Qt Graphical Effects module includes a wide range of effects:" - - property real t; - SequentialAnimation on t { - NumberAnimation { from: 0; to: 1; duration: 5000; easing.type: Easing.InOutCubic } - NumberAnimation { from: 1; to: 0; duration: 5000; easing.type: Easing.InOutCubic } - loops: Animation.Infinite - running: slide.visible; - } - - SequentialAnimation { - PropertyAction { target: grid; property: "opacity"; value: 0 } - PauseAnimation { duration: 1500 } - NumberAnimation { target: grid; property: "opacity"; to: 1; duration: 2000; easing.type: Easing.InOutCubic } - running: slide.visible; - } - - Grid { - id: grid; - - opacity: 0; - - width: parent.width - height: parent.height * 0.84 - anchors.bottom: parent.bottom; - - property real cw: width / columns - property real ch: height / rows; - - property int fontSize: slide.baseFontSize * 0.5 - - columns: 4 - rows: 2 - - Item { - width: grid.cw - height: grid.ch - Text { text: "Original"; color: "white"; font.pixelSize: grid.fontSize; anchors.horizontalCenter: noEffect.horizontalCenter } - Image { - id: noEffect; - source: "images/butterfly.png" - width: grid.cw * 0.9 - fillMode: Image.PreserveAspectFit - } - } - - Column { - Glow { - id: glowEffect - radius: 4 - samples: 4 - spread: slide.t - source: noEffect - width: grid.cw * 0.9 - height: width; - Text { text: "Glow"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } - } - } - - Column { - InnerShadow { - id: innerShadowEffect - radius: slide.t * 16; - samples: 16 - color: "black" - source: noEffect - width: grid.cw * 0.9 - height: width; - Text { text: "InnerShadow"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } - } - } - - Column { - GaussianBlur { - id: blurEffect - radius: slide.t * samples; - samples: 8 - source: noEffect - width: grid.cw * 0.9 - height: width; - Text { text: "GaussianBlur"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } - } - } - - Column { - ThresholdMask { - id: thresholdEffect - maskSource: Image { source: "images/fog.png" } - threshold: slide.t * 0.5 + 0.2; - spread: 0.2 - source: noEffect - width: grid.cw * 0.9 - height: width; - Text { text: "ThresholdMask"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } - } - } - - Column { - BrightnessContrast { - id: brightnessEffect - brightness: Math.sin(slide.t * 2 * Math.PI) * 0.5; - contrast: Math.sin(slide.t * 4 * Math.PI) * 0.5; - source: noEffect - width: grid.cw * 0.9 - height: width; - Text { text: "BrightnessContrast"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } - } - } - - Column { - Colorize { - id: colorizeEffect - hue: slide.t - source: noEffect - width: grid.cw * 0.9 - height: width; - Text { text: "Colorize"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } - } - } - - Column { - OpacityMask { - - Item { - id: maskSource; - anchors.fill: parent; - Rectangle { - anchors.fill: parent; - opacity: slide.t; - } - - Text { - text: "Qt 5" - font.pixelSize: parent.height * 0.15 - font.bold: true; - font.underline: true; - anchors.centerIn: parent; - rotation: 70 - } - visible: false; - } - - id: opacityMaskEffect - source: noEffect - maskSource: maskSource; - width: grid.cw * 0.9 - height: width; - Text { text: "OpacityMask"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } - } - } - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/ExamplesSlide.qml b/basicsuite/Qt5 Launch Presentation/ExamplesSlide.qml deleted file mode 100644 index 4540532..0000000 --- a/basicsuite/Qt5 Launch Presentation/ExamplesSlide.qml +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "presentation" - -Slide -{ - id: slide - - title: "Qt Quick 2" - - Row { - anchors.fill: parent - - spacing: (width - 320 * 3) / 2 - - Item { - width: 320 - height: 480 - clip: true - Loader { - id: load1 - } - } - - Item { - width: 320 - height: 480 - clip: true; - Loader { - id: load2 - } - } - - Loader { - id: load3 - } - } - - onVisibleChanged: { - if (visible) { - load1.source = "maroon/Maroon.qml" - load2.source = "samegame/Samegame.qml" - load3.source = "calqlatr/Calqlatr.qml" - } else { - load1.source = "" - load2.source = "" - load3.source = "" - } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/FontSlide.qml b/basicsuite/Qt5 Launch Presentation/FontSlide.qml deleted file mode 100644 index ce98779..0000000 --- a/basicsuite/Qt5 Launch Presentation/FontSlide.qml +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "presentation" - -Slide { - id: fontSlide; - title: "Qt Quick - Fonts" - writeInText: "The default font rendering in Qt Quick 2.0 uses distance fields, making\nit possible to do fully transformable text with subpixel positioning and\nsubpixel antialiasing. - -Native font rendering is also an option for applications that want to look native." - - Rectangle { - id: textRoot - anchors.centerIn: parent - anchors.horizontalCenterOffset: parent.width * 0.2 - anchors.verticalCenterOffset: parent.width * 0.1 - - width: 120 - height: 40 - - color: "transparent" - border.color: "white" - border.width: 1 - - Text { - anchors.centerIn: parent - - text: "Awesome!" - color: "white" - - font.pixelSize: 20; - - SequentialAnimation on scale { - NumberAnimation { to: 4; duration: 2508; easing.type: Easing.OutElastic } - NumberAnimation { to: 1; duration: 2508; easing.type: Easing.OutElastic } - PauseAnimation { duration: 1000 } - loops: Animation.Infinite - running: fontSlide.visible - } - - NumberAnimation on rotation { from: 0; to: 360; duration: 10000; loops: Animation.Infinite; easing.type: Easing.InOutCubic; running: fontSlide.visible } - } - } - - ShaderEffectSource { - width: textRoot.width - height: textRoot.height - sourceItem: textRoot - anchors.bottom: parent.bottom; - anchors.left: parent.left; - smooth: false - transformOrigin: Item.BottomLeft; - - visible: true - - scale: 4; - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/NoisyGradient.qml b/basicsuite/Qt5 Launch Presentation/NoisyGradient.qml deleted file mode 100644 index 904f14e..0000000 --- a/basicsuite/Qt5 Launch Presentation/NoisyGradient.qml +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -ShaderEffect { - - id: effectRoot; - - width: 1280 - height: 720 - - property Gradient gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 0.4; color: "blue" } - GradientStop { position: 1.0; color: "black" } - } - - Rectangle { - id: colorTable - width: 1 - height: 128; - - gradient: effectRoot.gradient; - - layer.enabled: true - layer.smooth: true - - visible: false; - } - - property variant source: colorTable; - - blending: false; - - fragmentShader:" - #ifdef GL_ES - precision lowp float; - #endif - - uniform lowp sampler2D source; - uniform lowp float qt_Opacity; - varying highp vec2 qt_TexCoord0; - - // Noise function from: http://stackoverflow.com/questions/4200224/random-noise-functions-for-glsl - float rand(vec2 n) { - return 0.5 + 0.5 * fract(sin(dot(n.xy, vec2(12.9898, 78.233))) * 43758.5453); - } - - void main() { - lowp float len = clamp(length(vec2(0.5, 0.0) - qt_TexCoord0), 0.0, 1.0); - gl_FragColor = texture2D(source, vec2(0, len)) * qt_Opacity + rand(qt_TexCoord0) * 0.05; - } -" -} diff --git a/basicsuite/Qt5 Launch Presentation/NormalMapGenerator.qml b/basicsuite/Qt5 Launch Presentation/NormalMapGenerator.qml deleted file mode 100644 index c6f55c7..0000000 --- a/basicsuite/Qt5 Launch Presentation/NormalMapGenerator.qml +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -ShaderEffect { - id: effectRoot; - - property alias source: blurShader.source; - - GaussianBlur - { - id: blurShader; - width: source != undefined ? source.width : 0 - height: source != undefined ? source.height : 0 - samples: 8 - radius: 8 - - layer.enabled: true; - layer.smooth: true; - - visible: false; - } - - width: 256 - height: 128 - - property variant tex: blurShader; - property size pixelSize: Qt.size(1 / blurShader.width, 1 / blurShader.height); - - fragmentShader: " - #ifdef GL_ES - precision lowp float; - #endif - - uniform lowp float qt_Opacity; - uniform lowp sampler2D tex; - uniform highp vec2 pixelSize; - varying highp vec2 qt_TexCoord0; - void main() { - - lowp vec2 xps = vec2(pixelSize.x, 0.0); - vec3 vx = vec3(1, 0, texture2D(tex, qt_TexCoord0 + xps).x - texture2D(tex, qt_TexCoord0 - xps).x); - - lowp vec2 yps = vec2(0.0, pixelSize.y); - vec3 vy = vec3(0, 1, texture2D(tex, qt_TexCoord0 + yps).x - texture2D(tex, qt_TexCoord0 - yps).x); - - vec3 n = normalize(cross(vx, vy)) * 0.5 + 0.5; - - gl_FragColor = vec4(n, 1); - } - " - -} diff --git a/basicsuite/Qt5 Launch Presentation/OpacityTransitionPresentation.qml b/basicsuite/Qt5 Launch Presentation/OpacityTransitionPresentation.qml deleted file mode 100644 index dc7cc02..0000000 --- a/basicsuite/Qt5 Launch Presentation/OpacityTransitionPresentation.qml +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 -import "presentation" - -Presentation { - - id: deck - - width: 1280 - height: 720 - - property bool inTransition: false; - - property variant fromSlide; - property variant toSlide; - - property int transitionTime: 500; - - SequentialAnimation { - id: forwardTransition - PropertyAction { target: deck; property: "inTransition"; value: true } - PropertyAction { target: toSlide; property: "visible"; value: true } - ParallelAnimation { - NumberAnimation { target: fromSlide; property: "opacity"; from: 1; to: 0; duration: deck.transitionTime; easing.type: Easing.OutQuart } - NumberAnimation { target: fromSlide; property: "scale"; from: 1; to: 1.1; duration: deck.transitionTime; easing.type: Easing.InOutQuart } - NumberAnimation { target: toSlide; property: "opacity"; from: 0; to: 1; duration: deck.transitionTime; easing.type: Easing.InQuart } - NumberAnimation { target: toSlide; property: "scale"; from: 0.7; to: 1; duration: deck.transitionTime; easing.type: Easing.InOutQuart } - } - PropertyAction { target: fromSlide; property: "visible"; value: false } - PropertyAction { target: fromSlide; property: "scale"; value: 1 } - PropertyAction { target: deck; property: "inTransition"; value: false } - } - SequentialAnimation { - id: backwardTransition - running: false - PropertyAction { target: deck; property: "inTransition"; value: true } - PropertyAction { target: toSlide; property: "visible"; value: true } - ParallelAnimation { - NumberAnimation { target: fromSlide; property: "opacity"; from: 1; to: 0; duration: deck.transitionTime; easing.type: Easing.OutQuart } - NumberAnimation { target: fromSlide; property: "scale"; from: 1; to: 0.7; duration: deck.transitionTime; easing.type: Easing.InOutQuart } - NumberAnimation { target: toSlide; property: "opacity"; from: 0; to: 1; duration: deck.transitionTime; easing.type: Easing.InQuart } - NumberAnimation { target: toSlide; property: "scale"; from: 1.1; to: 1; duration: deck.transitionTime; easing.type: Easing.InOutQuart } - } - PropertyAction { target: fromSlide; property: "visible"; value: false } - PropertyAction { target: fromSlide; property: "scale"; value: 1 } - PropertyAction { target: deck; property: "inTransition"; value: false } - } - - function switchSlides(from, to, forward) - { - if (deck.inTransition) - return false - - deck.fromSlide = from - deck.toSlide = to - - if (forward) - forwardTransition.running = true - else - backwardTransition.running = true - - return true - } -} diff --git a/basicsuite/Qt5 Launch Presentation/ParticleSlide.qml b/basicsuite/Qt5 Launch Presentation/ParticleSlide.qml deleted file mode 100644 index 2569a17..0000000 --- a/basicsuite/Qt5 Launch Presentation/ParticleSlide.qml +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "presentation" - -Slide -{ - id: slide - - title: "Qt Quick - Particle System" - - Row { - anchors.fill: parent - - SequentialAnimation on opacity { - running: slide.visible; - PropertyAction { value: 0 } - PauseAnimation { duration: 2000; } - NumberAnimation { to: 1; duration: 1000 } - } - - spacing: (width - 320 * 3) / 2 - - Loader { - id: load1 - } - - Loader { - id: load2 - } - - Loader { - id: load3 - } - } - - onVisibleChanged: { - if (visible) { - load1.source = "particles/velocityfrommotion.qml" - load2.source = "particles/customemitter.qml" - load3.source = "particles/emitmask.qml" - } else { - load1.source = "" - load2.source = "" - load3.source = "" - } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/README b/basicsuite/Qt5 Launch Presentation/README deleted file mode 100644 index 6b3f927..0000000 --- a/basicsuite/Qt5 Launch Presentation/README +++ /dev/null @@ -1,51 +0,0 @@ -This project contains quick tour of Qt 5.0, primarily focusing on its -graphical capabilities. - - - ------------------------------------------------------------------------- - Requirements: - - - Qt 5, including QtDeclarative, QtGraphicalEffects and QtMultimedia. - Commercial URL: http://qt.digia.com - Open Source URL: http://qt-project.org - - - The QML Presentation System: - URL: https://qt.gitorious.org/qt-labs/qml-presentation-system - git: git clone https://git.gitorious.org/qt-labs/qml-presentation-system.git - - - A movie file called 'bunny.mov' in the same directory as the - main.qml file. The demo will run without, but the Video slide will - not show anything. - - - ------------------------------------------------------------------------- - Running: - -To run the demo, start it using the Qt Quick 2.0 'qmlscene' tool. - -> qmlscene main.qml - -The demo includes a slightly fancy fullscreen gradient and a rather -computationally intensive drop shadow which can be too much for -low-end GPUs. On these systems, one could try to use the 'lofi' -launcher instead. - -> qmlscene main_lofi.qml - -It is possible to tweak the parameters of the main file also. - - - ------------------------------------------------------------------------- - Troubleshooting: - -For a -developer-build of Qt, the webkit plugin and QtWebProcess will -be located inside the qtwebkit module, rather than inside QtBase, the plugin -must be added to the QML import path and the path to QtWebProcess must be -added to PATH for the demo to run. - -The slides have been written for the resolution 1280x720. When resized -some of the spacing and content will look a bit odd. Any patches to -fix this will be welcomed :) \ No newline at end of file diff --git a/basicsuite/Qt5 Launch Presentation/ShaderSlide.qml b/basicsuite/Qt5 Launch Presentation/ShaderSlide.qml deleted file mode 100644 index 206cd9e..0000000 --- a/basicsuite/Qt5 Launch Presentation/ShaderSlide.qml +++ /dev/null @@ -1,197 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "presentation" - - -Slide { - id: slide - - title: "Qt Quick - ShaderEffect" - - writeInText: "Harness the raw power of the graphics processor. The ShaderEffect\nelement lets you write GLSL inline in your QML files." - - Image { - id: sourceItem - source: "images/ally.png" - visible: false - } - - SequentialAnimation { - id: kickoffAnimation - - // setup - PropertyAction { target: rotationAnimation; property: "running"; value: false } - PropertyAction { target: timeAnimation; property: "running"; value: false } - PropertyAction { target: shader; property: "amp"; value: 0 } - PropertyAction { target: shader; property: "xrot"; value: 0 } - PropertyAction { target: shader; property: "zrot"; value: 0 } - PropertyAction { target: shader; property: "time"; value: 0 } - PropertyAction { target: shader; property: "scale"; value: 1; } - PropertyAction { target: rotationAnimation; property: "running"; value: false } - PropertyAction { target: timeAnimation; property: "running"; value: false } - // short pause - PauseAnimation { duration: 2000 } - // get started... - ParallelAnimation { - NumberAnimation { target: shader; property: "xrot"; to: 2 * Math.PI / 8; duration: 1000; easing.type: Easing.InOutCubic } - NumberAnimation { target: shader; property: "amp"; to: 0.1; duration: 1000; easing.type: Easing.InOutCubic } -// NumberAnimation { target: shader; property: "scale"; to: 1.5; duration: 1000; easing.type: Easing.InOutCubic } - PropertyAction { target: rotationAnimation; property: "running"; value: true } - PropertyAction { target: timeAnimation; property: "running"; value: true } - } - - running: slide.visible; - } - - - ShaderEffect { - id: shader - width: height - height: parent.height - anchors.centerIn: parent; - anchors.verticalCenterOffset: slide.height * 0.1 - - blending: true - - mesh: "50x50" - - property variant size: Qt.size(width, height); - - property variant source: sourceItem; - - property real amp: 0 - - property real xrot: 0; // 2 * Math.PI / 8; -// NumberAnimation on xrot { from: 0; to: Math.PI * 2; duration: 3000; loops: Animation.Infinite } - - property real zrot: 0 - NumberAnimation on zrot { - id: rotationAnimation - from: 0; - to: Math.PI * 2; - duration: 20000; - loops: Animation.Infinite - easing.type: Easing.InOutCubic - running: false; - } - - property real time: 0 - NumberAnimation on time { - id: timeAnimation - from: 0; - to: Math.PI * 2; - duration: 3457; - loops: Animation.Infinite - running: false; - } - - vertexShader: " - attribute highp vec4 qt_Vertex; - attribute highp vec2 qt_MultiTexCoord0; - uniform highp mat4 qt_Matrix; - uniform highp float xrot; - uniform highp float zrot; - uniform highp vec2 size; - uniform highp float time; - uniform highp float amp; - varying lowp vec2 v_TexCoord; - varying lowp float v_light; - void main() { - highp float xcosa = cos(xrot); - highp float xsina = sin(xrot); - - highp mat4 xrot = mat4(1, 0, 0, 0, - 0, xcosa, xsina, 0, - 0, -xsina, xcosa, 0, - 0, 0, 0, 1); - - highp float zcosa = cos(zrot); - highp float zsina = sin(zrot); - - highp mat4 zrot = mat4(zcosa, zsina, 0, 0, - -zsina, zcosa, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1); - - highp float near = 2.; - highp float far = 6.; - highp float fmn = far - near; - - highp mat4 proj = mat4(near, 0, 0, 0, - 0, near, 0, 0, - 0, 0, -(far + near) / fmn, -1., - 0, 0, -2. * far * near / fmn, 1); - - highp mat4 model = mat4(2, 0, 0, 0, - 0, 2, 0, 0, - 0, 0, 2, 0, - 0, -.5, -4, 1); - - vec4 nLocPos = vec4(qt_Vertex.xy * 2.0 / size - 1.0, 0, 1); - nLocPos.z = cos(nLocPos.x * 5. + time) * amp; - - vec4 pos = proj * model * xrot * zrot * nLocPos; - pos = vec4(pos.xyx/pos.w, 1); - - gl_Position = qt_Matrix * vec4((pos.xy + 1.0) / 2.0 * size , 0, 1); - - v_TexCoord = qt_MultiTexCoord0; - - - v_light = dot(normalize(vec3(-sin(nLocPos.x * 5.0 + time) * 5.0 * amp, 0, -1)), vec3(0, 0, -1)); - } - " - - fragmentShader: " - uniform lowp sampler2D source; - uniform lowp float qt_Opacity; - varying highp vec2 v_TexCoord; - varying lowp float v_light; - void main() { - highp vec4 c = texture2D(source, v_TexCoord); - gl_FragColor = (vec4(pow(v_light, 16.0)) * 0.3 + c) * qt_Opacity; - } - " - - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/SlideDeck.qml b/basicsuite/Qt5 Launch Presentation/SlideDeck.qml deleted file mode 100644 index d9b76ce..0000000 --- a/basicsuite/Qt5 Launch Presentation/SlideDeck.qml +++ /dev/null @@ -1,232 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -import "presentation" - -OpacityTransitionPresentation { - id: presentation - - width: 1280 - height: 720 - - transitionTime: 2000 - - - /******************************************************************************** - * - * Introduction - * - */ - -/* - Rectangle { - id: openingSlideBlackout - color: "black" - anchors.fill: parent; - Behavior on opacity { NumberAnimation { duration: 1000 } } - } - - onCurrentSlideChanged: { - if (currentSlide < 2) - openingSlideBlackout.opacity = 1; - else - openingSlideBlackout.opacity = 0; - } - - - Slide { - - } -*/ - - Slide { - id: introSlide - - writeInText: "The following is a quick tour of what is new in Qt 5. - -It is an application written with Qt Quick, based on Qt 5. The source code is available from: -https://qt.gitorious.org/qt-labs/qt5-launch-demo - -We hope you will enjoy Qt 5 as much as we have enjoyed creating it. - -[tap to advance]" - -// Image { -// source: "images/qt-logo.png" -// opacity: 0.4 -// z: -1 -// anchors.centerIn: parent -// } - } - - Slide { - centeredText: "Introducing" - fontScale: 2 - } - - Slide { - centeredText: "Qt 5" - fontScale: 4; - } - - - Slide { - writeInText: "OpenGL-based scene graph for Qt Quick 2.0 - providing velvet animations, particles and impressive graphical effects - -Multimedia - Audio, Video and Camera support on all major platforms - -WebKit - Full HTML 5 support from the world's most popular web engine" - - } - - Slide { - writeInText: "C++ language features - template-based connect(), C++11 support - -Connectivity and Networking - DNS lookup, improved IPv6 support - -JSON Support - Fast parser and writer, binary format support" - } - - Slide { - writeInText: "Modularization of the Qt libraries - sanitizing our codebase and simplifying deployment - -Qt Platform Abstraction - Unifying the Qt codebase across platforms, minimizing the porting effort for new platforms - -Wayland support - Wayland-compatible Qt backend and compositor framework" - } - - - WidgetsSlide { } - - - - - /******************************************************************************** - * - * Qt Quick Graphics Stack - * - */ - ExamplesSlide { } - - FontSlide { } - CanvasSlide { } - ParticleSlide { } - ShaderSlide { } - - - - /******************************************************************************** - * - * Qt Graphical Effects - * - */ - - EffectsSlide {} - -// /******************************************************************************** -// * -// * Multimedia -// * -// */ - -// Slide { -// title: "Qt Multimedia" -// writeInText: "The Qt Multmedia module is implemented on all our major platforms, including Windows, Mac OS X and Linux. - -//It contains both a C++ API for use with existing Qt Widgets based applications and a QML API for use with Qt Quick 2.0. - -//The features include recording and playback of video and audio and also use of camera. - -//It also integrates nicely with the Qt Graphical Effects module." -// } - -// VideoSlide { } -// CameraSlide { } - - - - - /******************************************************************************** - * - * WebKit - * - */ - -// WebkitSlide { } - - - - /******************************************************************************** - * - * The End - * - */ - - Slide { - title: "Links" - content: [ - "Qt Project: qt-project.org", - "Qt by Digia: qt.digia.com", - "Follow us on Twitter", - " @QtProject", - " @QtCommercial", - "Find us on Facebook:", - " Qt Project", - " Qt by Digia", - "This demo: https://qt.gitorious.org/qt-labs/qt5-launch-demo" - ]; - - Image { - z: -1 - opacity: 0.7 - source: "images/qt-logo.png" - anchors.top: parent.top - anchors.right: parent.right - anchors.rightMargin: parent.width * 0.15 - fillMode: Image.PreserveAspectFit - } - - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/Swirl.qml b/basicsuite/Qt5 Launch Presentation/Swirl.qml deleted file mode 100644 index 710f04b..0000000 --- a/basicsuite/Qt5 Launch Presentation/Swirl.qml +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -ShaderEffect { - id: shader - - width: 400 - height: 300 - - property real speed: 1 - - property color d: Qt.rgba(Math.random() * 0.7, - Math.random() * 0.5, - Math.random() * 0.7, - Math.random() * 0.5) - property real tx - NumberAnimation on tx { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } - property real ty - NumberAnimation on ty { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } - property real tz - NumberAnimation on tz { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } - property real tw - NumberAnimation on tw { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } - - property real amplitude: height / 2 - - property variant colorTable: ShaderEffectSource { sourceItem: Rectangle { width: 4; height: 4; color: "green" } } - - fragmentShader: " - uniform lowp float qt_Opacity; - uniform lowp sampler2D colorTable; - varying highp vec2 qt_TexCoord0; - varying lowp float xx; - - void main() { - gl_FragColor = texture2D(colorTable, qt_TexCoord0); - gl_FragColor.xyz += xx * 0.1; - gl_FragColor *= qt_Opacity; - } - " - - vertexShader: " - uniform lowp vec4 d; - uniform highp float tx; - uniform highp float ty; - uniform highp float tz; - uniform highp float tw; - uniform highp float amplitude; - uniform highp mat4 qt_Matrix; - attribute highp vec4 qt_Vertex; - attribute highp vec2 qt_MultiTexCoord0; - varying highp vec2 qt_TexCoord0; - varying lowp float xx; - void main() { - highp vec4 pos = qt_Vertex; - - highp float y = sin(-tx + d.x * qt_MultiTexCoord0.x * 57. + 12. * d.y) - + sin(ty * 2.0 + d.z * qt_MultiTexCoord0.x * 21. + 5. * d.w) - + sin(tz * 4.0 + d.y * qt_MultiTexCoord0.x * 13. + 7.0 * d.x) - + sin(-ty * 8.0 + d.w * qt_MultiTexCoord0.x * 29. + 15. * d.z); - highp float x = sin(-tx + d.x * qt_MultiTexCoord0.x * 213. + 15. * d.y) - + sin(ty * 2.0 + d.z * qt_MultiTexCoord0.x * 107. + 12. * d.w) - + sin(tz * 4.0 + d.y * qt_MultiTexCoord0.x * 13. + 5. * d.x) - + sin(-ty * 8.0 + d.w * qt_MultiTexCoord0.x * 15. + 7. * d.z); - xx = x; - - pos.xy += vec2(x * sin(qt_MultiTexCoord0.x * 3.14152) * 0.3, - y * (1.0 - qt_MultiTexCoord0.y)) * amplitude; - - gl_Position = qt_Matrix * pos; - qt_TexCoord0 = qt_MultiTexCoord0; - } - " - - mesh: GridMesh { resolution: Qt.size(width / 10, 4) } - -} diff --git a/basicsuite/Qt5 Launch Presentation/VideoSlide.qml b/basicsuite/Qt5 Launch Presentation/VideoSlide.qml deleted file mode 100644 index d5abd89..0000000 --- a/basicsuite/Qt5 Launch Presentation/VideoSlide.qml +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtMultimedia 5 -import "presentation" - -import QtGraphicalEffects 1.0 - -Slide { - - id: slide - - title: "Qt Multimedia - Video" - - Video { - id: video - - anchors.fill: parent - source: "bunny.mov" - autoLoad: true; - - layer.enabled: true; - layer.smooth: true; - layer.effect: Displace { - displacementSource: normalMap - displacement: button.pressed ? 1.0 : 0.0 - Behavior on displacement { - NumberAnimation { duration: 1000 } - } - } - } - - Rectangle { - id: theItem; - width: 256 - height: 128 - color: "transparent" - Text { - id: label - color: "white" - text: "Qt 5" -// font.family: "Times New Roman" - font.bold: true; - font.pixelSize: 80 - anchors.centerIn: parent - } - visible: false; - } - - NormalMapGenerator { - anchors.left: theItem.right - width: 256 - height: 128 - id: normalMap - source: theItem; - visible: false - } - - centeredText: video.hasVideo ? "" : "'bunny.mov' is not found or cannot be played: " + video.errorString - - onVisibleChanged: { - if (slide.visible) - video.play(); - else - video.pause(); - } - - Button { - id: button - anchors.bottom: video.bottom - anchors.horizontalCenter: video.horizontalCenter - anchors.bottomMargin: height / 2; - label: pressed ? "Remove Effect" : "Displacement Effect"; - width: height * 4; - height: parent.height * 0.1 - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/WebKitSlideContent.qml b/basicsuite/Qt5 Launch Presentation/WebKitSlideContent.qml deleted file mode 100644 index b0a9c77..0000000 --- a/basicsuite/Qt5 Launch Presentation/WebKitSlideContent.qml +++ /dev/null @@ -1,124 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import QtWebKit 3.0 - -Item { - id: slide - - anchors.fill: parent; - - WebView { - id: browser - anchors.fill: parent - url: editor.text - - // This works around rendering bugs in webkit. CSS animations - // and webGL content gets a bad offset, but this hack - // clips it so it is not visible. Not ideal, but it kinda works - // for now. - layer.enabled: true - layer.smooth: true - } - - Rectangle { - border.width: 2 - border.color: "black" - opacity: 0.5 - color: "black" - anchors.fill: editor - anchors.margins: -editor.height * 0.2; - - radius: -anchors.margins - antialiasing: true - } - - TextInput { - id: editor - anchors.top: browser.bottom; - anchors.horizontalCenter: browser.horizontalCenter - font.pixelSize: slide.height * 0.05; - text: "http://qt.digia.com" - onAccepted: browser.reload(); - color: "white" - - onCursorPositionChanged: { - var rect = positionToRectangle(cursorPosition); - emitter.x = rect.x; - emitter.y = rect.y; - emitter.width = rect.width; - emitter.height = rect.height; - emitter.burst(10); - } - - ParticleSystem { - id: sys1 - running: slide.visible - } - - ImageParticle { - system: sys1 - source: "images/particle.png" - color: "white" - colorVariation: 0.2 - alpha: 0 - } - - Emitter { - id: emitter - system: sys1 - - enabled: false - - lifeSpan: 2000 - - velocity: PointDirection { xVariation: 30; yVariation: 30; } - acceleration: PointDirection {xVariation: 30; yVariation: 30; y: 100 } - - endSize: 0 - - size: 8 - sizeVariation: 2 - } - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml b/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml deleted file mode 100644 index 1873ab1..0000000 --- a/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import "presentation" - -Slide { - id: slide - - title: "Qt WebKit - WebView" - - Loader { - id: webkitLoader - - anchors.fill: parent - - source: "WebKitSlideContent.qml" - } - - centeredText: webkitLoader.status == Loader.Error ? "Qt WebKit not installed or otherwise failed to load" : "" -} - diff --git a/basicsuite/Qt5 Launch Presentation/WidgetsSlide.qml b/basicsuite/Qt5 Launch Presentation/WidgetsSlide.qml deleted file mode 100644 index 20f0770..0000000 --- a/basicsuite/Qt5 Launch Presentation/WidgetsSlide.qml +++ /dev/null @@ -1,152 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "presentation" - -Slide { - id: slide - - writeInText: "The Qt Widgets are working better than ever with accessibility\nimprovements and retina display support." - - property int slamTime: 800; - property int waitTime: 500; - - y: parent.height * 0.1 - - SequentialAnimation { - id: widgetAnimation - ScriptAction { script: { - boxesImage.opacity = 0; - mainwindowsImage.opacity = 0; - chipsWindow.opacity = 0; - stylesWindow.opacity = 0; - } - } - PauseAnimation { duration: 3000 } - ParallelAnimation { - NumberAnimation { target: boxesImage; property: "opacity"; from: 0; to: 1; duration: slide.slamTime; easing.type: Easing.OutBack } - NumberAnimation { target: boxesImage; property: "rotation"; from: 20; to: 10; duration: slide.slamTime; easing.type: Easing.OutBack } - NumberAnimation { target: boxesImage; property: "scale"; from: 2; to: 1.5; duration: slide.slamTime; easing.type: Easing.OutBack } - } - PauseAnimation { duration: slide.waitTime } - ParallelAnimation { - NumberAnimation { target: mainwindowsImage; property: "opacity"; from: 0; to: 1; duration: slide.slamTime; easing.type: Easing.OutBack } - NumberAnimation { target: mainwindowsImage; property: "rotation"; from: -35; to: -20; duration: slide.slamTime; easing.type: Easing.OutBack} - NumberAnimation { target: mainwindowsImage; property: "scale"; from: 2; to: 1.5; duration: slide.slamTime; easing.type: Easing.OutBack } - } - PauseAnimation { duration: slide.waitTime } - ParallelAnimation { - NumberAnimation { target: chipsWindow; property: "opacity"; from: 0; to: 1; duration: slide.slamTime; easing.type: Easing.InOutCubic } - NumberAnimation { target: chipsWindow; property: "rotation"; from: 10; to: 25; duration: slide.slamTime; easing.type: Easing.OutBack} - NumberAnimation { target: chipsWindow; property: "scale"; from: 2.5; to: 1.6; duration: slide.slamTime; easing.type: Easing.OutBack } - } - PauseAnimation { duration: slide.waitTime } - ParallelAnimation { - NumberAnimation { target: stylesWindow; property: "opacity"; from: 0; to: 1; duration: slide.slamTime; easing.type: Easing.InOutCubic } - NumberAnimation { target: stylesWindow; property: "rotation"; from: 30; to: -15; duration: slide.slamTime; easing.type: Easing.OutBack} - NumberAnimation { target: stylesWindow; property: "scale"; from: 1.8; to: 1.4; duration: slide.slamTime; easing.type: Easing.OutBack } - } - running: false - } - - onVisibleChanged: { - widgetAnimation.running = slide.visible; - } - - Row { - x: slide.width * 0.05 - y: slide.height * 0.65; - width: parent.width - Image { - id: boxesImage; - source: "images/widgets_boxes.png" - fillMode: Image.PreserveAspectFit - width: slide.width * .2 - antialiasing: true - opacity: 0; - y: -slide.height * 0.2 - rotation: 10 - scale: 1.5; - } - Image { - id: mainwindowsImage - source: "images/widgets_mainwindows.png" - fillMode: Image.PreserveAspectFit - width: slide.width * .2 - antialiasing: true - opacity: 0 - } - Image { - id: chipsWindow - source: "images/widgets_chips.png" - fillMode: Image.PreserveAspectFit - width: slide.width * .2 - x: slide.width * -0.05 - y: -slide.height * 0.2 - antialiasing: true - opacity: 0 - } - - Image { - id: stylesWindow - source: "images/widgets_styles_fusion.png" - fillMode: Image.PreserveAspectFit - width: slide.width * .2 - - x: slide.width * 1 - y: -slide.height * 0.1 - antialiasing: true - opacity: 0 - - Image { - source: "images/widgets_styles_macstyle.png" - fillMode: Image.PreserveAspectFit - width: slide.width * .2 - - x: parent.width * 0.3 - y: parent.width * 0.1 - rotation: -20 - antialiasing: true - } - } - } -} - diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/.DS_Store b/basicsuite/Qt5 Launch Presentation/calqlatr/.DS_Store deleted file mode 100644 index fe95b02..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/.DS_Store and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/Calqlatr.qml b/basicsuite/Qt5 Launch Presentation/calqlatr/Calqlatr.qml deleted file mode 100644 index 7640fbd..0000000 --- a/basicsuite/Qt5 Launch Presentation/calqlatr/Calqlatr.qml +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "content" -import "content/calculator.js" as CalcEngine - - -Rectangle { - id: window - width: 320 - height: 480 - focus: true - color: "#272822" - - onWidthChanged: controller.reload() - - function operatorPressed(operator) { CalcEngine.operatorPressed(operator) } - function digitPressed(digit) { CalcEngine.digitPressed(digit) } - - Item { - id: pad - width: window.width * 0.58 - NumberPad { y: 10; anchors.horizontalCenter: parent.horizontalCenter } - } - - AnimationController { - id: controller - animation: ParallelAnimation { - id: anim - NumberAnimation { target: display; property: "x"; duration: 400; from: -16; to: window.width - display.width; easing.type: Easing.InOutQuad } - NumberAnimation { target: pad; property: "x"; duration: 400; from: window.width - pad.width; to: 0; easing.type: Easing.InOutQuad } - SequentialAnimation { - NumberAnimation { target: pad; property: "scale"; duration: 200; from: 1; to: 0.97; easing.type: Easing.InOutQuad } - NumberAnimation { target: pad; property: "scale"; duration: 200; from: 0.97; to: 1; easing.type: Easing.InOutQuad } - } - } - } - - Display { - id: display - x: -16 - width: window.width * 0.42 - height: parent.height - - MouseArea { - property real startX: 0 - property real oldP: 0 - property bool rewind: false - - anchors.fill: parent - onPositionChanged: { - var reverse = startX > window.width / 2 - var mx = mapToItem(window, mouse.x).x - var p = Math.abs((mx - startX) / (window.width - display.width)) - if (p < oldP) - rewind = reverse ? false : true - else - rewind = reverse ? true : false - controller.progress = reverse ? 1 - p : p - oldP = p - } - onPressed: startX = mapToItem(window, mouse.x).x - onReleased: { - if (rewind) - controller.completeToBeginning() - else - controller.completeToEnd() - } - } - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/Button.qml b/basicsuite/Qt5 Launch Presentation/calqlatr/content/Button.qml deleted file mode 100644 index c355c2d..0000000 --- a/basicsuite/Qt5 Launch Presentation/calqlatr/content/Button.qml +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - property alias text: textItem.text - property alias color: textItem.color - - property bool operator: false - - signal clicked - - width: 30 - height: 50 - - Text { - id: textItem - font.pixelSize: 48 - wrapMode: Text.WordWrap - lineHeight: 0.75 - color: "white" - } - -// Rectangle { -// color: "red" -// opacity: 0.2 -// anchors.fill: mouse -// } - - MouseArea { - id: mouse - anchors.fill: parent - anchors.margins: -5 - onClicked: { - //parent.clicked() - if (operator) - window.operatorPressed(parent.text) - else - window.digitPressed(parent.text) - } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/Display.qml b/basicsuite/Qt5 Launch Presentation/calqlatr/content/Display.qml deleted file mode 100644 index 3c1d9c0..0000000 --- a/basicsuite/Qt5 Launch Presentation/calqlatr/content/Display.qml +++ /dev/null @@ -1,124 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: display - - function displayOperator(operator) - { - listView.model.append({ "operator": operator, "operand": "" }) - } - - function newLine(operator, operand) - { - listView.model.append({ "operator": operator, "operand": operand }) - } - - function appendDigit(digit) - { - if (!listView.model.count) - listView.model.append({ "operator": "", "operand": "" }) - var i = listView.model.count - 1; - listView.model.get(i).operand = listView.model.get(i).operand + digit; - } - - Item { - id: theItem - width: parent.width + 32 - height: parent.height - - Rectangle { - id: rect - x: 16 - color: "white" - height: parent.height - width: display.width - 16 - } - Image { - anchors.right: rect.left - source: "images/paper-edge-left.png" - height: parent.height - fillMode: Image.TileVertically - } - Image { - anchors.left: rect.right - source: "images/paper-edge-right.png" - height: parent.height - fillMode: Image.TileVertically - } - - Image { - source: "images/paper-grip.png" - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: 20 - } - - ListView { - id: listView - x: 16; y: 30 - width: display.width - height: display.height - delegate: Item { - height: 20 - width: parent.width - Text { - id: operator - x: 8 - font.pixelSize: 18 - color: "#6da43d" - text: model.operator - } - Text { - id: operand - font.pixelSize: 18 - anchors.right: parent.right - anchors.rightMargin: 26 - text: model.operand - } - } - model: ListModel { } - } - - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/NumberPad.qml b/basicsuite/Qt5 Launch Presentation/calqlatr/content/NumberPad.qml deleted file mode 100644 index 853c763..0000000 --- a/basicsuite/Qt5 Launch Presentation/calqlatr/content/NumberPad.qml +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Grid { - columns: 3 - columnSpacing: 32 - rowSpacing: 16 - - Button { text: "7" } - Button { text: "8" } - Button { text: "9" } - Button { text: "4" } - Button { text: "5" } - Button { text: "6" } - Button { text: "1" } - Button { text: "2" } - Button { text: "3" } - Button { text: "0" } - Button { text: "." } - Button { text: " " } - Button { text: "±"; color: "#6da43d"; operator: true } - Button { text: "−"; color: "#6da43d"; operator: true } - Button { text: "+"; color: "#6da43d"; operator: true } - Button { text: " "; color: "#6da43d"; operator: true } - Button { text: "÷"; color: "#6da43d"; operator: true } - Button { text: "×"; color: "#6da43d"; operator: true } - Button { text: "C"; color: "#6da43d"; operator: true } - Button { text: " "; color: "#6da43d"; operator: true } - Button { text: "="; color: "#6da43d"; operator: true } -} diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/StyleLabel.qml b/basicsuite/Qt5 Launch Presentation/calqlatr/content/StyleLabel.qml deleted file mode 100644 index 3bdea86..0000000 --- a/basicsuite/Qt5 Launch Presentation/calqlatr/content/StyleLabel.qml +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Text { - width: 64 - font.pixelSize: 14 - font.bold: false - wrapMode: Text.WordWrap - lineHeight: 0.75 - color: "#676764" -} diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/audio/touch.wav b/basicsuite/Qt5 Launch Presentation/calqlatr/content/audio/touch.wav deleted file mode 100644 index 94cccb7..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/audio/touch.wav and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/calculator.js b/basicsuite/Qt5 Launch Presentation/calqlatr/content/calculator.js deleted file mode 100644 index 843ef39..0000000 --- a/basicsuite/Qt5 Launch Presentation/calqlatr/content/calculator.js +++ /dev/null @@ -1,143 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -var curVal = 0 -var memory = 0 -var lastOp = "" -var previousOperator = "" -var digits = "" - -function disabled(op) { - if (op == "." && digits.toString().search(/\./) != -1) { - return true - } else if (op == window.squareRoot && digits.toString().search(/-/) != -1) { - return true - } else { - return false - } -} - -function digitPressed(op) -{ - if (disabled(op)) - return - if (digits.toString().length >= 14) - return - if (lastOp.toString().length == 1 && ((lastOp >= "0" && lastOp <= "9") || lastOp == ".") ) { - digits = digits + op.toString() - display.appendDigit(op.toString()) - } else { - digits = op - display.appendDigit(op.toString()) - } - lastOp = op -} - -function operatorPressed(op) -{ - if (disabled(op)) - return - lastOp = op - - if (previousOperator == "+") { - digits = Number(digits.valueOf()) + Number(curVal.valueOf()) - } else if (previousOperator == "−") { - digits = Number(curVal) - Number(digits.valueOf()) - } else if (previousOperator == "×") { - digits = Number(curVal) * Number(digits.valueOf()) - } else if (previousOperator == "÷") { - digits = Number(Number(curVal) / Number(digits.valueOf())).toString() - } else if (previousOperator == "=") { - } - - if (op == "+" || op == "−" || op == "×" || op == "÷") { - previousOperator = op - curVal = digits.valueOf() - display.displayOperator(previousOperator) - return - } - - if (op == "=") { - display.newLine("=", digits.toString()) - } - - curVal = 0 - previousOperator = "" - - if (op == "1/x") { - digits = (1 / digits.valueOf()).toString() - } else if (op == "x^2") { - digits = (digits.valueOf() * digits.valueOf()).toString() - } else if (op == "Abs") { - digits = (Math.abs(digits.valueOf())).toString() - } else if (op == "Int") { - digits = (Math.floor(digits.valueOf())).toString() - } else if (op == window.plusminus) { - digits = (digits.valueOf() * -1).toString() - } else if (op == window.squareRoot) { - digits = (Math.sqrt(digits.valueOf())).toString() - } else if (op == "mc") { - memory = 0; - } else if (op == "m+") { - memory += digits.valueOf() - } else if (op == "mr") { - digits = memory.toString() - } else if (op == "m-") { - memory = digits.valueOf() - } else if (op == window.leftArrow) { - digits = digits.toString().slice(0, -1) - if (digits.length == 0) { - digits = "0" - } - } else if (op == "Off") { - Qt.quit(); - } else if (op == "C") { - digits = "0" - } else if (op == "AC") { - curVal = 0 - memory = 0 - lastOp = "" - digits ="0" - } - - -} - diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-back.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-back.png deleted file mode 100644 index 2989ee2..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-back.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-close.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-close.png deleted file mode 100644 index 3e21248..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-close.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-settings.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-settings.png deleted file mode 100644 index 98e662f..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/icon-settings.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/logo.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/logo.png deleted file mode 100644 index 6bc6561..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/logo.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-edge-left.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-edge-left.png deleted file mode 100644 index ca29a3a..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-edge-left.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-edge-right.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-edge-right.png deleted file mode 100644 index 7c2da7b..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-edge-right.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-grip.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-grip.png deleted file mode 100644 index 953c408..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/paper-grip.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/settings-selected-a.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/settings-selected-a.png deleted file mode 100644 index e08ddfa..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/settings-selected-a.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/settings-selected-b.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/settings-selected-b.png deleted file mode 100644 index d9aa7e3..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/settings-selected-b.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/touch-green.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/touch-green.png deleted file mode 100644 index 64dbde6..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/touch-green.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/touch-white.png b/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/touch-white.png deleted file mode 100644 index bb02b00..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/calqlatr/content/images/touch-white.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/demo.qmlproject b/basicsuite/Qt5 Launch Presentation/demo.qmlproject deleted file mode 100644 index eed1c97..0000000 --- a/basicsuite/Qt5 Launch Presentation/demo.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -/* File generated by Qt Creator, version 2.6.1 */ - -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "images" - } -} diff --git a/basicsuite/Qt5 Launch Presentation/description.txt b/basicsuite/Qt5 Launch Presentation/description.txt deleted file mode 100644 index 48d03f3..0000000 --- a/basicsuite/Qt5 Launch Presentation/description.txt +++ /dev/null @@ -1,6 +0,0 @@ -The following is a quick tour of what is new in Qt 5. - -It is an application written with Qt Quick, based on Qt 5. The source code is available from: https://qt.gitorious.org/qt-labs/qt5-launch-demo -The demo makes use of the QML Presentation System, available from: ssh://codereview.qt-project.org/qt-labs/qml-presentation-system.git - -The demo has been modified slightly to run in this launcher. diff --git a/basicsuite/Qt5 Launch Presentation/images/ally.png b/basicsuite/Qt5 Launch Presentation/images/ally.png deleted file mode 100644 index 05b405b..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/ally.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/images/butterfly.png b/basicsuite/Qt5 Launch Presentation/images/butterfly.png deleted file mode 100644 index b8cc35c..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/butterfly.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/images/displace.png b/basicsuite/Qt5 Launch Presentation/images/displace.png deleted file mode 100644 index 440e8cb..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/displace.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/images/fog.png b/basicsuite/Qt5 Launch Presentation/images/fog.png deleted file mode 100644 index f462222..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/fog.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/images/particle.png b/basicsuite/Qt5 Launch Presentation/images/particle.png deleted file mode 100644 index 5c83896..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/particle.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/images/qt-logo.png b/basicsuite/Qt5 Launch Presentation/images/qt-logo.png deleted file mode 100644 index 7f2c662..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/qt-logo.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/images/widgets_boxes.png b/basicsuite/Qt5 Launch Presentation/images/widgets_boxes.png deleted file mode 100644 index 3115255..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/widgets_boxes.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/images/widgets_chips.png b/basicsuite/Qt5 Launch Presentation/images/widgets_chips.png deleted file mode 100644 index 4ef1664..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/widgets_chips.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/images/widgets_mainwindows.png b/basicsuite/Qt5 Launch Presentation/images/widgets_mainwindows.png deleted file mode 100644 index 5ce5416..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/widgets_mainwindows.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/images/widgets_styles_fusion.png b/basicsuite/Qt5 Launch Presentation/images/widgets_styles_fusion.png deleted file mode 100644 index d94f859..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/widgets_styles_fusion.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/images/widgets_styles_macstyle.png b/basicsuite/Qt5 Launch Presentation/images/widgets_styles_macstyle.png deleted file mode 100644 index 033f43b..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/images/widgets_styles_macstyle.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/main.qml b/basicsuite/Qt5 Launch Presentation/main.qml deleted file mode 100644 index 627ec48..0000000 --- a/basicsuite/Qt5 Launch Presentation/main.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - - width: 1280 - height: 720 - - property real widthFactor: root.width / root.height; - - DemoMain { - width: 720 * root.widthFactor - height: 720 - - anchors.centerIn: parent - - scale: root.height / height - - useDropShadow: false; - useSimpleGradient: true; - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/main_hifi.qml b/basicsuite/Qt5 Launch Presentation/main_hifi.qml deleted file mode 100644 index 19e006b..0000000 --- a/basicsuite/Qt5 Launch Presentation/main_hifi.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -DemoMain { - autorun: true -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/.DS_Store b/basicsuite/Qt5 Launch Presentation/maroon/.DS_Store deleted file mode 100644 index b5c859b..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/.DS_Store and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/Maroon.qml b/basicsuite/Qt5 Launch Presentation/maroon/Maroon.qml deleted file mode 100644 index d7bfcb6..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/Maroon.qml +++ /dev/null @@ -1,233 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "content" -import "content/logic.js" as Logic - -Item { - id: root - width: 320 - height: 480 - property var gameState: Logic.newGameState(canvas); - property bool passedSplash: false - - Image { - source:"content/gfx/background.png" - anchors.bottom: view.bottom - - ParticleSystem { - id: particles - anchors.fill: parent - - ImageParticle { - id: bubble - anchors.fill: parent - source: "content/gfx/catch.png" - opacity: 0.25 - } - - Wander { - xVariance: 25; - pace: 25; - } - - Emitter { - width: parent.width - height: 150 - anchors.bottom: parent.bottom - anchors.bottomMargin: 3 - startTime: 15000 - - emitRate: 2 - lifeSpan: 15000 - - acceleration: PointDirection{ y: -6; xVariation: 2; yVariation: 2 } - - size: 24 - sizeVariation: 16 - } - } - } - - Column { - id: view - y: -(height - 480) - width: 320 - - GameOverScreen { gameCanvas: canvas } - - Item { - id: canvasArea - width: 320 - height: 480 - - Row { - height: childrenRect.height - Image { - id: wave - y: 30 - source:"content/gfx/wave.png" - } - Image { - y: 30 - source:"content/gfx/wave.png" - } - NumberAnimation on x { from: 0; to: -(wave.width); duration: 16000; loops: Animation.Infinite } - SequentialAnimation on y { - loops: Animation.Infinite - NumberAnimation { from: y - 2; to: y + 2; duration: 1600; easing.type: Easing.InOutQuad } - NumberAnimation { from: y + 2; to: y - 2; duration: 1600; easing.type: Easing.InOutQuad } - } - } - - Row { - opacity: 0.5 - Image { - id: wave2 - y: 25 - source: "content/gfx/wave.png" - } - Image { - y: 25 - source: "content/gfx/wave.png" - } - NumberAnimation on x { from: -(wave2.width); to: 0; duration: 32000; loops: Animation.Infinite } - SequentialAnimation on y { - loops: Animation.Infinite - NumberAnimation { from: y + 2; to: y - 2; duration: 1600; easing.type: Easing.InOutQuad } - NumberAnimation { from: y - 2; to: y + 2; duration: 1600; easing.type: Easing.InOutQuad } - } - } - - Image { - source: "content/gfx/sunlight.png" - opacity: 0.02 - y: 0 - anchors.horizontalCenter: parent.horizontalCenter - transformOrigin: Item.Top - SequentialAnimation on rotation { - loops: Animation.Infinite - NumberAnimation { from: -10; to: 10; duration: 8000; easing.type: Easing.InOutSine } - NumberAnimation { from: 10; to: -10; duration: 8000; easing.type: Easing.InOutSine } - } - } - - Image { - source: "content/gfx/sunlight.png" - opacity: 0.04 - y: 20 - anchors.horizontalCenter: parent.horizontalCenter - transformOrigin: Item.Top - SequentialAnimation on rotation { - loops: Animation.Infinite - NumberAnimation { from: 10; to: -10; duration: 8000; easing.type: Easing.InOutSine } - NumberAnimation { from: -10; to: 10; duration: 8000; easing.type: Easing.InOutSine } - } - } - - Image { - source: "content/gfx/grid.png" - opacity: 0.5 - } - - GameCanvas { - id: canvas - anchors.bottom: parent.bottom - anchors.bottomMargin: 20 - x: 32 - focus: true - } - - InfoBar { anchors.bottom: canvas.top; anchors.bottomMargin: 6; width: parent.width } - - //3..2..1..go - Timer { - id: countdownTimer - interval: 1000 - running: root.countdown < 5 - repeat: true - onTriggered: root.countdown++ - } - Repeater { - model: ["content/gfx/text-blank.png", "content/gfx/text-3.png", "content/gfx/text-2.png", "content/gfx/text-1.png", "content/gfx/text-go.png"] - delegate: Image { - visible: root.countdown <= index - opacity: root.countdown == index ? 0.5 : 0.1 - scale: root.countdown >= index ? 1.0 : 0.0 - source: modelData - Behavior on opacity { NumberAnimation {} } - Behavior on scale { NumberAnimation {} } - } - } - } - - NewGameScreen { - onStartButtonClicked: root.passedSplash = true - } - } - - property int countdown: 10 - Timer { - id: gameStarter - interval: 4000 - running: false - repeat: false - onTriggered: Logic.startGame(canvas); - } - - states: [ - State { - name: "gameOn"; when: gameState.gameOver == false && passedSplash - PropertyChanges { target: view; y: -(height - 960) } - StateChangeScript { script: root.countdown = 0; } - PropertyChanges { target: gameStarter; running: true } - }, - State { - name: "gameOver"; when: gameState.gameOver == true - PropertyChanges { target: view; y: 0 } - } - ] - - transitions: Transition { - NumberAnimation { properties: "x,y"; duration: 1200; easing.type: Easing.OutQuad } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/BuildButton.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/BuildButton.qml deleted file mode 100644 index 49641fc..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/BuildButton.qml +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "logic.js" as Logic - -Item { - id: container - width: 64 - height: 64 - property alias source: img.source - property int index - property int row: 0 - property int col: 0 - property int towerType - property bool canBuild: true - property Item gameCanvas: parent.parent.parent - signal clicked() - - Image { - id: img - opacity: (canBuild && gameCanvas.coins >= Logic.towerData[towerType-1].cost) ? 1.0 : 0.4 - } - Text { - anchors.right: parent.right - font.pointSize: 14 - font.bold: true - color: "#ffffff" - text: Logic.towerData[towerType - 1].cost - } - MouseArea { - anchors.fill: parent - onClicked: { - Logic.buildTower(towerType, col, row) - container.clicked() - } - } - Image { - visible: col == index && row != 0 - source: "gfx/dialog-pointer.png" - anchors.top: parent.bottom - anchors.topMargin: 4 - anchors.horizontalCenter: parent.horizontalCenter - } - Image { - visible: col == index && row == 0 - source: "gfx/dialog-pointer.png" - rotation: 180 - anchors.bottom: parent.top - anchors.bottomMargin: 6 - anchors.horizontalCenter: parent.horizontalCenter - } -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/GameCanvas.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/GameCanvas.qml deleted file mode 100644 index 5e6e963..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/GameCanvas.qml +++ /dev/null @@ -1,240 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "logic.js" as Logic -import "towers" as Towers - -Item { - id: grid - - property int squareSize: 64 - property int rows: 6 - property int cols: 4 - property Item canvas: grid - property int score: 0 - property int coins: 100 - property int lives: 3 - property int waveNumber: 0 - property int waveProgress: 0 - property var towers - property var mobs - property bool gameRunning: false - property bool gameOver: false - property bool errored: false - property string errorString: "" - - width: cols * squareSize - height: rows * squareSize - - function freshState() { - lives = 3 - coins = 100 - score = 0 - waveNumber = 0 - waveProgress = 0 - gameOver = false - gameRunning = false - towerMenu.shown = false - helpButton.comeBack(); - } - - Text { - id: errorText // Mostly for debug purposes - text: errorString - visible: errored - color: "red" - font.pixelSize: 18 - wrapMode: Text.WordWrap - width: parent.width / 1.2 - height: parent.height / 1.2 - anchors.centerIn: parent - z: 1000 - } - - Timer { - interval: 16 - running: true - repeat: true - onTriggered: Logic.tick() - } - - MouseArea { - id: ma - anchors.fill: parent - onClicked: { - if (towerMenu.visible) - towerMenu.finish() - else - towerMenu.open(mouse.x, mouse.y) - } - } - - Image { - id: towerMenu - visible: false - z: 1500 - scale: 0.9 - opacity: 0.7 - property int dragDistance: 16 - property int targetRow: 0 - property int targetCol: 0 - property bool shown: false - property bool towerExists: false - - function finish() { - shown = false - } - - function open(xp,yp) { - if (!grid.gameRunning) - return - targetRow = Logic.row(yp) - targetCol = Logic.col(xp) - if (targetRow == 0) - towerMenu.y = (targetRow + 1) * grid.squareSize - else - towerMenu.y = (targetRow - 1) * grid.squareSize - towerExists = (grid.towers[Logic.towerIdx(targetCol, targetRow)] != null) - shown = true - helpButton.goAway(); - } - - states: State { - name: "shown"; when: towerMenu.shown && !grid.gameOver - PropertyChanges { target: towerMenu; visible: true; scale: 1; opacity: 1 } - } - - transitions: Transition { - PropertyAction { property: "visible" } - NumberAnimation { properties: "opacity,scale"; duration: 500; easing.type: Easing.OutElastic } - } - - x: -32 - source: "gfx/dialog.png" - Row { - id: buttonRow - height: 100 - anchors.centerIn: parent - spacing: 8 - BuildButton { - row: towerMenu.targetRow; col: towerMenu.targetCol - anchors.verticalCenter: parent.verticalCenter - towerType: 1; index: 0 - canBuild: !towerMenu.towerExists - source: "gfx/dialog-melee.png" - onClicked: towerMenu.finish() - } - BuildButton { - row: towerMenu.targetRow; col: towerMenu.targetCol - anchors.verticalCenter: parent.verticalCenter - towerType: 2; index: 1 - canBuild: !towerMenu.towerExists - source: "gfx/dialog-shooter.png" - onClicked: towerMenu.finish() - } - BuildButton { - row: towerMenu.targetRow; col: towerMenu.targetCol - anchors.verticalCenter: parent.verticalCenter - towerType: 3; index: 2 - canBuild: !towerMenu.towerExists - source: "gfx/dialog-bomb.png" - onClicked: towerMenu.finish() - } - BuildButton { - row: towerMenu.targetRow; col: towerMenu.targetCol - anchors.verticalCenter: parent.verticalCenter - towerType: 4; index: 3 - canBuild: !towerMenu.towerExists - source: "gfx/dialog-factory.png" - onClicked: towerMenu.finish() - } - } - } - - - Keys.onPressed: { // Cheat Codes while Testing - if (event.key == Qt.Key_Up && (event.modifiers & Qt.ShiftModifier)) - grid.coins += 10; - if (event.key == Qt.Key_Left && (event.modifiers & Qt.ShiftModifier)) - grid.lives += 1; - if (event.key == Qt.Key_Down && (event.modifiers & Qt.ShiftModifier)) - Logic.gameState.waveProgress += 1000; - if (event.key == Qt.Key_Right && (event.modifiers & Qt.ShiftModifier)) - Logic.endGame(); - } - - Image { - id: helpButton - z: 1010 - source: "gfx/button-help.png" - function goAway() { - helpMA.enabled = false; - helpButton.opacity = 0; - } - function comeBack() { - helpMA.enabled = true; - helpButton.opacity = 1; - } - Behavior on opacity { NumberAnimation {} } - MouseArea { - id: helpMA - anchors.fill: parent - onClicked: {helpImage.visible = true; helpButton.visible = false;} - } - - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: 0 - } - - Image { - id: helpImage - z: 1010 - source: "gfx/help.png" - anchors.fill: parent - visible: false - MouseArea { - anchors.fill: parent - onClicked: helpImage.visible = false; - } - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/GameOverScreen.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/GameOverScreen.qml deleted file mode 100644 index dfb439f..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/GameOverScreen.qml +++ /dev/null @@ -1,115 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "logic.js" as Logic - -Item { - id: gameOverScreen - width: 320 - height: 400 - property GameCanvas gameCanvas - - Image { - id: img - source: "gfx/text-gameover.png" - anchors.centerIn: parent - } - - ParticleSystem { - anchors.fill: parent - ImageParticle { - id: cloud - source: "gfx/cloud.png" - alphaVariation: 0.25 - opacity: 0.25 - } - - Wander { - xVariance: 100; - pace: 1; - } - - Emitter { - id: cloudLeft - width: 160 - height: 160 - anchors.right: parent.left - emitRate: 0.5 - lifeSpan: 12000 - velocity: PointDirection{ x: 64; xVariation: 2; yVariation: 2 } - size: 160 - } - - Emitter { - id: cloudRight - width: 160 - height: 160 - anchors.left: parent.right - emitRate: 0.5 - lifeSpan: 12000 - velocity: PointDirection{ x: -64; xVariation: 2; yVariation: 2 } - size: 160 - } - } - - - Text { - visible: gameCanvas != undefined - text: "You saved " + gameCanvas.score + " fishes!" - anchors.top: img.bottom - anchors.topMargin: 12 - anchors.horizontalCenter: parent.horizontalCenter - font.bold: true - color: "#000000" - opacity: 0.5 - } - - Image { - source: "gfx/button-play.png" - anchors.bottom: parent.bottom - anchors.bottomMargin: 0 - MouseArea { - anchors.fill: parent - onClicked: gameCanvas.gameOver = false//This will actually trigger the state change in main.qml - } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/InfoBar.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/InfoBar.qml deleted file mode 100644 index 36303fc..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/InfoBar.qml +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - height: childrenRect.height - - // Display the number of lives - Row { - anchors.left: parent.left - anchors.leftMargin: 10 - spacing: 5 - Repeater { - id: rep - model: Math.min(10, canvas.lives) - delegate: Image { source: "gfx/lifes.png" } - } - } - - // Display the number of fishes saved - Row { - anchors.right: points.left - anchors.rightMargin: 20 - spacing: 5 - Image { source: "gfx/scores.png" } - Text { - text: canvas.score - font.bold: true - } - } - - // Display the number of coins - Row { - id: points - anchors.right: parent.right - anchors.rightMargin: 10 - spacing: 5 - Image { source: "gfx/points.png" } - Text { - id: pointsLabel - text: canvas.coins - font.bold: true - } - } -} - diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/NewGameScreen.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/NewGameScreen.qml deleted file mode 100644 index 495e3aa..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/NewGameScreen.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -// This is the first screen. -// It shows the logo and emit a startButtonClicked signal -// when the user press the "PLAY" button. - -Item { - id: newGameScreen - width: 320 - height: 480 - - signal startButtonClicked - - Image { - source: "gfx/logo.png" - anchors.top: parent.top - anchors.topMargin: 60 - } - - Image { - source: "gfx/logo-fish.png" - anchors.top: parent.top - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x + 148; to: x + 25; duration: 2000; easing.type: Easing.InOutQuad } - NumberAnimation { from: x + 25; to: x + 148; duration: 1600; easing.type: Easing.InOutQuad } - } - SequentialAnimation on anchors.topMargin { - loops: Animation.Infinite - NumberAnimation { from: 100; to: 60; duration: 1600; easing.type: Easing.InOutQuad } - NumberAnimation { from: 60; to: 100; duration: 2000; easing.type: Easing.InOutQuad } - } - } - - Image { - source: "gfx/logo-bubble.png" - anchors.top: parent.top - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x + 140; to: x + 40; duration: 2000; easing.type: Easing.InOutQuad } - NumberAnimation { from: x + 40; to: x + 140; duration: 1600; easing.type: Easing.InOutQuad } - } - SequentialAnimation on anchors.topMargin { - loops: Animation.Infinite - NumberAnimation { from: 100; to: 60; duration: 1600; easing.type: Easing.InOutQuad } - NumberAnimation { from: 60; to: 100; duration: 2000; easing.type: Easing.InOutQuad } - } - SequentialAnimation on width { - loops: Animation.Infinite - NumberAnimation { from: 140; to: 160; duration: 1000; easing.type: Easing.InOutQuad } - NumberAnimation { from: 160; to: 140; duration: 800; easing.type: Easing.InOutQuad } - } - SequentialAnimation on height { - loops: Animation.Infinite - NumberAnimation { from: 150; to: 140; duration: 800; easing.type: Easing.InOutQuad } - NumberAnimation { from: 140; to: 150; duration: 1000; easing.type: Easing.InOutQuad } - } - } - - Image { - source: "gfx/button-play.png" - anchors.bottom: parent.bottom - anchors.bottomMargin: 60 - MouseArea { - anchors.fill: parent - onClicked: newGameScreen.startButtonClicked() - } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/SoundEffect.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/SoundEffect.qml deleted file mode 100644 index d286a39..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/SoundEffect.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -//Proxies a SoundEffect if QtMultimedia is installed -Item { - id: container - property QtObject effect: Qt.createQmlObject("import QtMultimedia 5.0; SoundEffect{ source: '" + container.source + "' }", container); - property url source: "" - onSourceChanged: if (effect != null) effect.source = source; - function play() { - if (effect != null) - effect.play(); - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/bomb-action.wav b/basicsuite/Qt5 Launch Presentation/maroon/content/audio/bomb-action.wav deleted file mode 100644 index b334dc1..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/bomb-action.wav and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/catch-action.wav b/basicsuite/Qt5 Launch Presentation/maroon/content/audio/catch-action.wav deleted file mode 100644 index 3e22124..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/catch-action.wav and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/catch.wav b/basicsuite/Qt5 Launch Presentation/maroon/content/audio/catch.wav deleted file mode 100644 index d3eade8..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/catch.wav and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/currency.wav b/basicsuite/Qt5 Launch Presentation/maroon/content/audio/currency.wav deleted file mode 100644 index 0d9ef2c..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/currency.wav and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/factory-action.wav b/basicsuite/Qt5 Launch Presentation/maroon/content/audio/factory-action.wav deleted file mode 100644 index a2ace6c..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/factory-action.wav and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/melee-action.wav b/basicsuite/Qt5 Launch Presentation/maroon/content/audio/melee-action.wav deleted file mode 100644 index d325af4..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/melee-action.wav and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/projectile-action.wav b/basicsuite/Qt5 Launch Presentation/maroon/content/audio/projectile-action.wav deleted file mode 100644 index 4e2284f..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/projectile-action.wav and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/shooter-action.wav b/basicsuite/Qt5 Launch Presentation/maroon/content/audio/shooter-action.wav deleted file mode 100644 index 3e12b94..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/audio/shooter-action.wav and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/background.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/background.png deleted file mode 100644 index d548b93..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/background.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb-action.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb-action.png deleted file mode 100644 index 42da5d7..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb-action.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb-idle.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb-idle.png deleted file mode 100644 index 3bd62e2..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb-idle.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb.png deleted file mode 100644 index 380da7d..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/bomb.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/button-help.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/button-help.png deleted file mode 100644 index aecebc1..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/button-help.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/button-play.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/button-play.png deleted file mode 100644 index 6cdad6c..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/button-play.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/catch-action.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/catch-action.png deleted file mode 100644 index 78ca9fe..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/catch-action.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/catch.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/catch.png deleted file mode 100644 index b7620fe..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/catch.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/cloud.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/cloud.png deleted file mode 100644 index d7c35f8..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/cloud.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/currency.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/currency.png deleted file mode 100644 index 1571341..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/currency.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-bomb.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-bomb.png deleted file mode 100644 index 708d916..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-bomb.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-factory.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-factory.png deleted file mode 100644 index d2e2a48..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-factory.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-melee.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-melee.png deleted file mode 100644 index 069d18d..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-melee.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-pointer.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-pointer.png deleted file mode 100644 index 9b51a09..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-pointer.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-shooter.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-shooter.png deleted file mode 100644 index af980ca..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog-shooter.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog.png deleted file mode 100644 index d528ba7..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/dialog.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory-action.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory-action.png deleted file mode 100644 index 8981678..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory-action.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory-idle.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory-idle.png deleted file mode 100644 index a145582..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory-idle.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory.png deleted file mode 100644 index bfb9f3f..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/factory.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/grid.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/grid.png deleted file mode 100644 index b595552..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/grid.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/help.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/help.png deleted file mode 100644 index 4654e4c..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/help.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/lifes.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/lifes.png deleted file mode 100644 index 135310b..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/lifes.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo-bubble.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo-bubble.png deleted file mode 100644 index 136151c..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo-bubble.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo-fish.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo-fish.png deleted file mode 100644 index c41833a..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo-fish.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo.png deleted file mode 100644 index 787ac99..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/logo.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee-action.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee-action.png deleted file mode 100644 index c53873b..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee-action.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee-idle.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee-idle.png deleted file mode 100644 index 621d9df..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee-idle.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee.png deleted file mode 100644 index ab24015..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/melee.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/mob-idle.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/mob-idle.png deleted file mode 100644 index dedacc7..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/mob-idle.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/mob.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/mob.png deleted file mode 100644 index 7569c35..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/mob.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/points.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/points.png deleted file mode 100644 index 1d2386d..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/points.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/projectile-action.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/projectile-action.png deleted file mode 100644 index aa2e650..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/projectile-action.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/projectile.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/projectile.png deleted file mode 100644 index c25a0c3..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/projectile.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/scores.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/scores.png deleted file mode 100644 index af757fe..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/scores.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter-action.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter-action.png deleted file mode 100644 index 08e7e30..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter-action.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter-idle.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter-idle.png deleted file mode 100644 index 663098d..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter-idle.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter.png deleted file mode 100644 index d44401e..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/shooter.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/sunlight.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/sunlight.png deleted file mode 100644 index d1c7042..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/sunlight.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-1.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-1.png deleted file mode 100644 index 3ea399c..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-1.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-2.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-2.png deleted file mode 100644 index 934a481..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-2.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-3.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-3.png deleted file mode 100644 index 47523f5..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-3.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-blank.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-blank.png deleted file mode 100644 index 4a687b2..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-blank.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-gameover.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-gameover.png deleted file mode 100644 index 4f53ef0..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-gameover.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-go.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-go.png deleted file mode 100644 index bfc26f7..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/text-go.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/wave.png b/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/wave.png deleted file mode 100644 index f97426c..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/maroon/content/gfx/wave.png and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/logic.js b/basicsuite/Qt5 Launch Presentation/maroon/content/logic.js deleted file mode 100644 index dd76b7e..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/logic.js +++ /dev/null @@ -1,264 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -.pragma library // Shared game state -.import QtQuick 2.0 as QQ - -// Game Stuff -var gameState // Local reference -function getGameState() { return gameState; } - -var towerData = [ // Name and cost, stats are in the delegate per instance - { "name": "Melee", "cost": 20 }, - { "name": "Ranged", "cost": 50 }, - { "name": "Bomb", "cost": 75 }, - { "name": "Factory", "cost": 25 } -] - -var waveBaseData = [300, 290, 280, 270, 220, 180, 160, 80, 80, 80, 30, 30, 30, 30]; -var waveData = []; - -var towerComponents = new Array(towerData.length); -var mobComponent = Qt.createComponent("mobs/MobBase.qml"); - -function endGame() -{ - gameState.gameRunning = false; - gameState.gameOver = true; - for (var i = 0; i < gameState.cols; i++) { - for (var j = 0; j < gameState.rows; j++) { - if (gameState.towers[towerIdx(i, j)]) { - gameState.towers[towerIdx(i, j)].destroy(); - gameState.towers[towerIdx(i, j)] = null; - } - } - for (var j in gameState.mobs[i]) - gameState.mobs[i][j].destroy(); - gameState.mobs[i].splice(0,gameState.mobs[i].length); //Leaves queue reusable - } -} - -function startGame(gameCanvas) -{ - waveData = new Array(); - for (var i in waveBaseData) - waveData[i] = waveBaseData[i]; - gameState.freshState(); - for (var i = 0; i < gameCanvas.cols; i++) { - for (var j = 0; j < gameCanvas.rows; j++) - gameState.towers[towerIdx(i, j)] = null; - gameState.mobs[i] = new Array(); - } - gameState.towers[towerIdx(0, 0)] = newTower(3, 0, 0);//Start with a starfish in the corner - gameState.gameRunning = true; - gameState.gameOver = false; -} - -function newGameState(gameCanvas) -{ - for (var i = 0; i < towerComponents.length; i++) { - towerComponents[i] = Qt.createComponent("towers/" + towerData[i].name + ".qml"); - if (towerComponents[i].status == QQ.Component.Error) { - gameCanvas.errored = true; - gameCanvas.errorString += "Loading Tower " + towerData[i].name + "\n" + (towerComponents[i].errorString()); - console.log(towerComponents[i].errorString()); - } - } - gameState = gameCanvas; - gameState.freshState(); - gameState.towers = new Array(gameCanvas.rows * gameCanvas.cols); - gameState.mobs = new Array(gameCanvas.cols); - return gameState; -} - -function row(y) -{ - return Math.floor(y / gameState.squareSize); -} - -function col(x) -{ - return Math.floor(x / gameState.squareSize); -} - -function towerIdx(x, y) -{ - return y + (x * gameState.rows); -} - -function newMob(col) -{ - var ret = mobComponent.createObject(gameState.canvas, - { "col" : col, - "speed" : (Math.min(2.0, 0.10 * (gameState.waveNumber + 1))), - "y" : gameState.canvas.height }); - gameState.mobs[col].push(ret); - return ret; -} - -function newTower(type, row, col) -{ - var ret = towerComponents[type].createObject(gameState.canvas); - ret.row = row; - ret.col = col; - ret.fireCounter = ret.rof; - ret.spawn(); - return ret; -} - -function buildTower(type, x, y) -{ - if (gameState.towers[towerIdx(x,y)] != null) { - if (type <= 0) { - gameState.towers[towerIdx(x,y)].sell(); - gameState.towers[towerIdx(x,y)] = null; - } - } else { - if (gameState.coins < towerData[type - 1].cost) - return; - gameState.towers[towerIdx(x, y)] = newTower(type - 1, y, x); - gameState.coins -= towerData[type - 1].cost; - } -} - -function killMob(col, mob) -{ - if (!mob) - return; - var idx = gameState.mobs[col].indexOf(mob); - if (idx == -1 || !mob.hp) - return; - mob.hp = 0; - mob.die(); - gameState.mobs[col].splice(idx,1); -} - -function killTower(row, col) -{ - var tower = gameState.towers[towerIdx(col, row)]; - if (!tower) - return; - tower.hp = 0; - tower.die(); - gameState.towers[towerIdx(col, row)] = null; -} - -function tick() -{ - if (!gameState.gameRunning) - return; - - // Spawn - gameState.waveProgress += 1; - var i = gameState.waveProgress; - var j = 0; - while (i > 0 && j < waveData.length) - i -= waveData[j++]; - if ( i == 0 ) // Spawn a mob - newMob(Math.floor(Math.random() * gameState.cols)); - if ( j == waveData.length ) { // Next Wave - gameState.waveNumber += 1; - gameState.waveProgress = 0; - var waveModifier = 10; // Constant governing how much faster the next wave is to spawn (not fish speed) - for (var k in waveData ) // Slightly faster - if (waveData[k] > waveModifier) - waveData[k] -= waveModifier; - } - - // Towers Attack - for (var j in gameState.towers) { - var tower = gameState.towers[j]; - if (tower == null) - continue; - if (tower.fireCounter > 0) { - tower.fireCounter -= 1; - continue; - } - var column = tower.col; - for (var k in gameState.mobs[column]) { - var conflict = gameState.mobs[column][k]; - if (conflict.y <= gameState.canvas.height && conflict.y + conflict.height > tower.y - && conflict.y - ((tower.row + 1) * gameState.squareSize) < gameState.squareSize * tower.range) { // In Range - tower.fire(); - tower.fireCounter = tower.rof; - conflict.hit(tower.damage); - } - } - - // Income - if (tower.income) { - gameState.coins += tower.income; - tower.fire(); - tower.fireCounter = tower.rof; - } - } - - // Mobs move - for (var i = 0; i < gameState.cols; i++) { - for (var j = 0; j < gameState.mobs[i].length; j++) { - var mob = gameState.mobs[i][j]; - var newPos = gameState.mobs[i][j].y - gameState.mobs[i][j].speed; - if (newPos < 0) { - gameState.lives -= 1; - killMob(i, mob); - if (gameState.lives <= 0) - endGame(); - continue; - } - var conflict = gameState.towers[towerIdx(i, row(newPos))]; - if (conflict != null) { - if (mob.y < conflict.y + gameState.squareSize) - gameState.mobs[i][j].y += gameState.mobs[i][j].speed * 10; // Moved inside tower, now hurry back out - if (mob.fireCounter > 0) { - mob.fireCounter--; - } else { - gameState.mobs[i][j].fire(); - conflict.hp -= mob.damage; - if (conflict.hp <= 0) - killTower(conflict.row, conflict.col); - mob.fireCounter = mob.rof; - } - } else { - gameState.mobs[i][j].y = newPos; - } - } - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/mobs/MobBase.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/mobs/MobBase.qml deleted file mode 100644 index d4ece66..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/mobs/MobBase.qml +++ /dev/null @@ -1,262 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "../logic.js" as Logic -import ".." - -Item { - id: container - property string name: "Fish" - property int col: 0 - property real hp: 3 - property real damage: 1 - property real speed: 0.25 - property int rof: 30 //In ticks - property int fireCounter: 0 - property bool dying: false - width: parent ? parent.squareSize : 0 - height: parent ? parent.squareSize : 0 - x: col * width - z: 1001 - function fire() { } - - function die() { - if (dying) - return; - dying = true; - bubble.jumpTo("burst"); - if (fishSprite.currentSprite == "front") - fishSprite.jumpTo(Math.random() > 0.5 ? "left" : "right" ); - fishSwim.start(); - Logic.gameState.score += 1; - killedSound.play(); - bubble.scale = 0.9 - destroy(350); - } - - function inked() { - if (hp > 0) - ink.jumpTo("dirty"); - } - - function hit(dmg) { - hp -= dmg; - - if (hp <= 0) - Logic.killMob(col, container); - } - - Component.onCompleted: spawnSound.play() - - SoundEffect { - id: spawnSound - source: "../audio/catch.wav" - } - SoundEffect { - id: killedSound - source: "../audio/catch-action.wav" - } - - SpriteSequence { - id: fishSprite - width: 64 - height: 64 - interpolate: false - goalSprite: "" - - Sprite { - name: "left" - source: "../gfx/mob-idle.png" - frameWidth: 64 - frameHeight: 64 - frameCount: 1 - frameDuration: 800 - frameDurationVariation: 400 - to: { "front" : 1 } - } - - Sprite { - name: "front" - source: "../gfx/mob-idle.png" - frameCount: 1 - frameX: 64 - frameWidth: 64 - frameHeight: 64 - frameDuration: 800 - frameDurationVariation: 400 - to: { "left" : 1, "right" : 1 } - } - - Sprite { - name: "right" - source: "../gfx/mob-idle.png" - frameCount: 1 - frameX: 128 - frameWidth: 64 - frameHeight: 64 - frameDuration: 800 - frameDurationVariation: 400 - to: { "front" : 1 } - } - - - Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. - name: "dummy" - source: "../gfx/melee-idle.png" - frameCount: 8 - frameWidth: 64 - frameHeight: 64 - frameX: 0 - frameDuration: 200 - } - - NumberAnimation on x { - id: fishSwim - running: false - property bool goingLeft: fishSprite.currentSprite == "right" - to: goingLeft ? -360 : 360 - duration: 300 - } - } - - SpriteSequence { - id: bubble - width: 64 - height: 64 - scale: 0.4 + (0.2 * hp) - interpolate: false - goalSprite: "" - - Behavior on scale { - NumberAnimation { duration: 150; easing.type: Easing.OutBack } - } - - Sprite { - name: "big" - source: "../gfx/catch.png" - frameCount: 1 - to: { "burst" : 0 } - } - - Sprite { - name: "burst" - source: "../gfx/catch-action.png" - frameCount: 3 - frameX: 64 - frameDuration: 200 - } - - Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. - name: "dummy" - source: "../gfx/melee-idle.png" - frameCount: 8 - frameWidth: 64 - frameHeight: 64 - frameX: 0 - frameDuration: 200 - } - SequentialAnimation on width { - loops: Animation.Infinite - NumberAnimation { from: width * 1; to: width * 1.1; duration: 800; easing.type: Easing.InOutQuad } - NumberAnimation { from: width * 1.1; to: width * 1; duration: 1000; easing.type: Easing.InOutQuad } - } - SequentialAnimation on height { - loops: Animation.Infinite - NumberAnimation { from: height * 1; to: height * 1.15; duration: 1200; easing.type: Easing.InOutQuad } - NumberAnimation { from: height * 1.15; to: height * 1; duration: 1000; easing.type: Easing.InOutQuad } - } - } - - SpriteSequence { - id: ink - width: 64 - height: 64 - scale: bubble.scale - goalSprite: "" - - Sprite { - name: "clean" - source: "../gfx/projectile-action.png" - frameCount: 1 - frameX: 0 - frameWidth: 64 - frameHeight: 64 - } - Sprite { - name: "dirty" - source: "../gfx/projectile-action.png" - frameCount: 3 - frameX: 64 - frameWidth: 64 - frameHeight: 64 - frameDuration: 150 - to: {"clean":1} - } - - Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. - name: "dummy" - source: "../gfx/melee-idle.png" - frameCount: 8 - frameWidth: 64 - frameHeight: 64 - frameX: 0 - frameDuration: 200 - } - SequentialAnimation on width { - loops: Animation.Infinite - NumberAnimation { from: width * 1; to: width * 1.1; duration: 800; easing.type: Easing.InOutQuad } - NumberAnimation { from: width * 1.1; to: width * 1; duration: 1000; easing.type: Easing.InOutQuad } - } - SequentialAnimation on height { - loops: Animation.Infinite - NumberAnimation { from: height * 1; to: height * 1.15; duration: 1200; easing.type: Easing.InOutQuad } - NumberAnimation { from: height * 1.15; to: height * 1; duration: 1000; easing.type: Easing.InOutQuad } - } - - } - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x; to: x - 5; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: x - 5; to: x; duration: 900; easing.type: Easing.InOutQuad } - } -} - diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Bomb.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Bomb.qml deleted file mode 100644 index 00437f4..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Bomb.qml +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "../logic.js" as Logic -import ".." - -TowerBase { - id: container - hp: 10 - range: 0.4 - rof: 10 - property real detonationRange: 2.5 - - function fire() { - sound.play() - sprite.jumpTo("shoot") - animDelay.start() - } - - function finishFire() { - var sCol = Math.max(0, col - 1) - var eCol = Math.min(Logic.gameState.cols - 1, col + 1) - var killList = new Array() - for (var i = sCol; i <= eCol; i++) { - for (var j = 0; j < Logic.gameState.mobs[i].length; j++) - if (Math.abs(Logic.gameState.mobs[i][j].y - container.y) < Logic.gameState.squareSize * detonationRange) - killList.push(Logic.gameState.mobs[i][j]) - while (killList.length > 0) - Logic.killMob(i, killList.pop()) - } - Logic.killTower(row, col); - } - - Timer { - id: animDelay - running: false - interval: shootState.frameCount * shootState.frameDuration - onTriggered: finishFire() - } - - function die() - { - destroy() // No blink, because we usually meant to die - } - - SoundEffect { - id: sound - source: "../audio/bomb-action.wav" - } - - SpriteSequence { - id: sprite - width: 64 - height: 64 - interpolate: false - goalSprite: "" - - Sprite { - name: "idle" - source: "../gfx/bomb-idle.png" - frameCount: 4 - frameDuration: 800 - } - - Sprite { - id: shootState - name: "shoot" - source: "../gfx/bomb-action.png" - frameCount: 6 - frameDuration: 155 - to: { "dying" : 1 } // So that if it takes a frame to clean up, it is on the last frame of the explosion - } - - Sprite { - name: "dying" - source: "../gfx/bomb-action.png" - frameCount: 1 - frameX: 64 * 5 - frameWidth: 64 - frameHeight: 64 - frameDuration: 155 - } - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x; to: x + 4; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: x + 4; to: x; duration: 900; easing.type: Easing.InOutQuad } - } - SequentialAnimation on y { - loops: Animation.Infinite - NumberAnimation { from: y; to: y - 4; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: y - 4; to: y; duration: 900; easing.type: Easing.InOutQuad } - } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Factory.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Factory.qml deleted file mode 100644 index b34a184..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Factory.qml +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "../logic.js" as Logic -import ".." - -TowerBase { - id: container - rof: 160 - income: 5 - SpriteSequence { - id: sprite - width: 64 - height: 64 - interpolate: false - goalSprite: "" - - Sprite { - name: "idle" - source: "../gfx/factory-idle.png" - frameCount: 4 - frameDuration: 200 - } - - Sprite { - name: "action" - source: "../gfx/factory-action.png" - frameCount: 4 - frameDuration: 90 - to: { "idle" : 1 } - } - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x; to: x + 4; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: x + 4; to: x; duration: 900; easing.type: Easing.InOutQuad } - } - SequentialAnimation on y { - loops: Animation.Infinite - NumberAnimation { from: y; to: y - 4; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: y - 4; to: y; duration: 900; easing.type: Easing.InOutQuad } - } - } - - SoundEffect { - id: actionSound - source: "../audio/factory-action.wav" - } - - function fire() { - actionSound.play() - sprite.jumpTo("action") - coinLaunch.start() - } - - function spawn() { - coin.target = Logic.gameState.mapToItem(container, 240, -32) - } - - Image { - id: coin - property var target: { "x" : 0, "y" : 0 } - source: "../gfx/currency.png" - visible: false - } - - SequentialAnimation { - id: coinLaunch - PropertyAction { target: coin; property: "visible"; value: true } - ParallelAnimation { - NumberAnimation { target: coin; property: "x"; from: 16; to: coin.target.x } - NumberAnimation { target: coin; property: "y"; from: 16; to: coin.target.y } - } - PropertyAction { target: coin; property: "visible"; value: false } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Melee.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Melee.qml deleted file mode 100644 index 1b49a45..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Melee.qml +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import ".." - -TowerBase { - hp: 4 - range: 0.1 - damage: 1 - rof: 40 - income: 0 - - SpriteSequence { - id: sprite - width: 64 - height: 64 - interpolate: false - goalSprite: "" - - Sprite { - name: "idle" - source: "../gfx/melee-idle.png" - frameCount: 8 - frameDuration: 250 - } - - Sprite { - name: "shoot" - source: "../gfx/melee-action.png" - frameCount: 2 - frameDuration: 200 - to: { "idle" : 1 } - } - } - - function fire() { - shootSound.play() - sprite.jumpTo("shoot") - } - - SoundEffect { - id: shootSound - source: "../audio/melee-action.wav" - } -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Ranged.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Ranged.qml deleted file mode 100644 index 33f3354..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/towers/Ranged.qml +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "../logic.js" as Logic -import ".." - -TowerBase { - id: container - hp: 2 - range: 6 - damage: 0 // By projectile - rof: 40 - income: 0 - property var targetMob - property real realDamage: 1 - function fire() { - proj.x = 32 - proj.width / 2 - proj.y = 0 - targetMob = Logic.gameState.mobs[col][0] - projAnim.to = targetMob.y - container.y -10 - projAnim.start() - shootSound.play() - sprite.jumpTo("shoot") - } - - Image { - id: proj - y: 1000 - SequentialAnimation on y { - id: projAnim - running: false - property real to: 1000 - SmoothedAnimation { - to: projAnim.to - velocity: 400 - } - ScriptAction { - script: { - if (targetMob && targetMob.hit) { - targetMob.hit(realDamage) - targetMob.inked() - projSound.play() - } - } - } - PropertyAction { - value: 1000; - } - } - source: "../gfx/projectile.png" - } - - SoundEffect { - id: shootSound - source: "../audio/shooter-action.wav" - } - SoundEffect { - id: projSound - source: "../audio/projectile-action.wav" - } - - SpriteSequence { - id: sprite - width: 64 - height: 64 - interpolate: false - goalSprite: "" - - Sprite { - name: "idle" - source: "../gfx/shooter-idle.png" - frameCount: 4 - frameDuration: 250 - } - - Sprite { - name: "shoot" - source: "../gfx/shooter-action.png" - frameCount: 5 - frameDuration: 90 - to: { "idle" : 1 } - } - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x; to: x - 4; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: x - 4; to: x; duration: 900; easing.type: Easing.InOutQuad } - } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/maroon/content/towers/TowerBase.qml b/basicsuite/Qt5 Launch Presentation/maroon/content/towers/TowerBase.qml deleted file mode 100644 index 5c71cb0..0000000 --- a/basicsuite/Qt5 Launch Presentation/maroon/content/towers/TowerBase.qml +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - property real hp: 1 - property real range: 0 - property real damage: 0 - property int rof: 100 - property int fireCounter: 0 - property int income: 0 - property int row: 0 - property int col: 0 - - width: parent ? parent.squareSize : 0 - height: parent ? parent.squareSize : 0 - //This is how it is placed on the gameboard, do not modify/animate the X/Y/Z of a TowerBase please - x: col * width - y: row * height - z: 1000 - - function fire() { } - function spawn() { } //After all game properties are set - function die() { stdDeath.start(); destroy(1000); } - function sell() { destroy(); } - - SequentialAnimation on opacity { - id: stdDeath - running: false - loops: 2 - NumberAnimation { from: 1; to: 0; } - NumberAnimation { from: 0; to: 1; } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/particles/customemitter.qml b/basicsuite/Qt5 Launch Presentation/particles/customemitter.qml deleted file mode 100644 index 270935d..0000000 --- a/basicsuite/Qt5 Launch Presentation/particles/customemitter.qml +++ /dev/null @@ -1,91 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -ParticleSystem { - id: sys - width: 320 - height: 480 - running: true - - property real petalLength: 180 - property real petalRotation: 0 - NumberAnimation on petalRotation { - from: 0; - to: 360; - loops: -1; - running: true - duration: 24000 - } - - function convert(a) {return a*(Math.PI/180);} - Emitter { - lifeSpan: 4000 - emitRate: 120 - size: 12 - anchors.centerIn: parent - //! [0] - onEmitParticles: { - for (var i=0; i 0) { - root.currentSlide = 0; - root.slides[root.currentSlide].visible = true; - } - } - - function switchSlides(from, to, forward) { - from.visible = false - to.visible = true - return true - } - - function goToNextSlide() { - root._userNum = 0 - if (_faded) - return - if (root.currentSlide + 1 < root.slides.length) { - var from = slides[currentSlide] - var to = slides[currentSlide + 1] - if (switchSlides(from, to, true)) { - currentSlide = currentSlide + 1; - root.focus = true; - } - } - } - - function goToPreviousSlide() { - root._userNum = 0 - if (root._faded) - return - if (root.currentSlide - 1 >= 0) { - var from = slides[currentSlide] - var to = slides[currentSlide - 1] - if (switchSlides(from, to, false)) { - currentSlide = currentSlide - 1; - root.focus = true; - } - } - } - - function goToUserSlide() { - --_userNum; - if (root._faded || _userNum >= root.slides.length) - return - if (_userNum < 0) - goToNextSlide() - else if (root.currentSlide != _userNum) { - var from = slides[currentSlide] - var to = slides[_userNum] - if (switchSlides(from, to, _userNum > currentSlide)) { - currentSlide = _userNum; - root.focus = true; - } - } - } - - focus: true - - Keys.onSpacePressed: goToNextSlide() - Keys.onRightPressed: goToNextSlide() - Keys.onDownPressed: goToNextSlide() - Keys.onLeftPressed: goToPreviousSlide() - Keys.onUpPressed: goToPreviousSlide() - Keys.onEscapePressed: Qt.quit() - Keys.onPressed: { - if (event.key >= Qt.Key_0 && event.key <= Qt.Key_9) - _userNum = 10 * _userNum + (event.key - Qt.Key_0) - else { - if (event.key == Qt.Key_Return || event.key == Qt.Key_Enter) - goToUserSlide(); - else if (event.key == Qt.Key_Backspace) - goToPreviousSlide(); - else if (event.key == Qt.Key_C) - root._faded = !root._faded; - _userNum = 0; - } - } - - Rectangle { - z: 1000 - color: "black" - anchors.fill: parent - opacity: root._faded ? 1 : 0 - Behavior on opacity { NumberAnimation { duration: 250 } } - } - - MouseArea { - id: mouseArea - anchors.fill: parent - acceptedButtons: Qt.LeftButton | Qt.RightButton - onClicked: { - if (mouse.button == Qt.RightButton) - goToPreviousSlide() - else - goToNextSlide() - } - onPressAndHold: goToPreviousSlide(); //A back mechanism for touch only devices - } - - Window { - id: notesWindow; - width: 400 - height: 300 - - title: "QML Presentation: Notes" - visible: root.showNotes - - Text { - anchors.fill: parent - anchors.margins: parent.height * 0.1; - - font.pixelSize: 16 - wrapMode: Text.WordWrap - - property string notes: root.slides[root.currentSlide].notes; - text: notes == "" ? "Slide has no notes..." : notes; - font.italic: notes == ""; - } - } -} diff --git a/basicsuite/Qt5 Launch Presentation/presentation/Slide.qml b/basicsuite/Qt5 Launch Presentation/presentation/Slide.qml deleted file mode 100644 index 339298d..0000000 --- a/basicsuite/Qt5 Launch Presentation/presentation/Slide.qml +++ /dev/null @@ -1,186 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QML Presentation System. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Digia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 - -Item { - /* - Slides can only be instantiated as a direct child of a Presentation {} as they rely on - several properties there. - */ - - id: slide - - property bool isSlide: true; - - property string title; - property variant content: [] - property string centeredText - property string writeInText; - property string notes; - - property real fontSize: parent.height * 0.05 - property real fontScale: 1 - - property real baseFontSize: fontSize * fontScale - property real titleFontSize: fontSize * 1.2 * fontScale - property real bulletSpacing: 1 - - property real contentWidth: width - - // Define the slide to be the "content area" - x: parent.width * 0.05 - y: parent.height * 0.2 - width: parent.width * 0.9 - height: parent.height * 0.7 - - property real masterWidth: parent.width - property real masterHeight: parent.height - - property color titleColor: parent.titleColor; - property color textColor: parent.textColor; - property string fontFamily: parent.fontFamily; - - visible: false - - Text { - id: titleText - font.pixelSize: titleFontSize - text: title; - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: parent.top - anchors.bottomMargin: parent.fontSize * 1.5 - font.bold: true; - font.family: slide.fontFamily - color: slide.titleColor - horizontalAlignment: Text.Center - z: 1 - } - - Text { - id: centeredId - width: parent.width - anchors.centerIn: parent - anchors.verticalCenterOffset: - parent.y / 3 - text: centeredText - horizontalAlignment: Text.Center - font.pixelSize: baseFontSize - font.family: slide.fontFamily - color: slide.textColor - wrapMode: Text.Wrap - } - - Text { - id: writeInTextId - property int length; - font.family: slide.fontFamily - font.pixelSize: baseFontSize - color: slide.textColor - - anchors.fill: parent; - wrapMode: Text.Wrap - - text: slide.writeInText.substring(0, length); - - NumberAnimation on length { - from: 0; - to: slide.writeInText.length; - duration: slide.writeInText.length * 30; - running: slide.visible && parent.visible && slide.writeInText.length > 0 - } - - visible: slide.writeInText != undefined; - } - - - Column { - id: contentId - anchors.fill: parent - - Repeater { - model: content.length - - Row { - id: row - - function decideIndentLevel(s) { return s.charAt(0) == " " ? 1 + decideIndentLevel(s.substring(1)) : 0 } - property int indentLevel: decideIndentLevel(content[index]) - property int nextIndentLevel: index < content.length - 1 ? decideIndentLevel(content[index+1]) : 0 - property real indentFactor: (10 - row.indentLevel * 2) / 10; - - height: text.height + (nextIndentLevel == 0 ? 1 : 0.3) * slide.baseFontSize * slide.bulletSpacing - x: slide.baseFontSize * indentLevel - - Rectangle { - id: dot - y: baseFontSize * row.indentFactor / 2 - width: baseFontSize / 4 - height: baseFontSize / 4 - color: slide.textColor - radius: width / 2 - smooth: true - opacity: text.text.length == 0 ? 0 : 1 - } - - Rectangle { - id: space - width: dot.width * 2 - height: 1 - color: "#00ffffff" - } - - Text { - id: text - width: slide.contentWidth - parent.x - dot.width - space.width - font.pixelSize: baseFontSize * row.indentFactor - text: content[index] - textFormat: Text.PlainText - wrapMode: Text.WordWrap - color: slide.textColor - horizontalAlignment: Text.AlignLeft - font.family: slide.fontFamily - } - } - } - } - -} diff --git a/basicsuite/Qt5 Launch Presentation/presentation/SlideCounter.qml b/basicsuite/Qt5 Launch Presentation/presentation/SlideCounter.qml deleted file mode 100644 index 06e7542..0000000 --- a/basicsuite/Qt5 Launch Presentation/presentation/SlideCounter.qml +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QML Presentation System. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Digia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 - -Text { - id: counter; - - property real fontSize: parent.height * 0.05 - property real fontScale: 0.5; - property color textColor: parent.textColor != undefined ? parent.textColor : "black" - property string fontFamily: parent.fontFamily != undefined ? parent.fontFamily : "Helvetica" - - text: "# " + (parent.currentSlide + 1) + " / " + parent.slides.length; - color: counter.textColor; - font.family: counter.fontFamily; - font.pixelSize: fontSize * fontScale; - - anchors.right: parent.right; - anchors.bottom: parent.bottom; - anchors.margins: font.pixelSize; -} diff --git a/basicsuite/Qt5 Launch Presentation/preview_l.jpg b/basicsuite/Qt5 Launch Presentation/preview_l.jpg deleted file mode 100644 index 8decd76..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/preview_l.jpg and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/samegame/.DS_Store b/basicsuite/Qt5 Launch Presentation/samegame/.DS_Store deleted file mode 100644 index 9805454..0000000 Binary files a/basicsuite/Qt5 Launch Presentation/samegame/.DS_Store and /dev/null differ diff --git a/basicsuite/Qt5 Launch Presentation/samegame/Samegame.qml b/basicsuite/Qt5 Launch Presentation/samegame/Samegame.qml deleted file mode 100644 index 2b0b82a..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/Samegame.qml +++ /dev/null @@ -1,371 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "content/samegame.js" as Logic -import "settings.js" as Settings -import "content" - -Rectangle { - id: root - width: 320; height: 480 - property int acc: 0 - - - function loadPuzzle() { - if (gameCanvas.mode != "") - Logic.cleanUp(); - Logic.startNewGame(gameCanvas,"puzzle","levels/level"+acc+".qml") - } - function nextPuzzle() { - acc = (acc + 1) % 10; - loadPuzzle(); - } - Timer { - id: gameOverTimer - interval: 1500 - running : gameCanvas.gameOver && gameCanvas.mode == "puzzle" //mode will be reset by cleanUp(); - repeat : false - onTriggered: { - Logic.cleanUp(); - nextPuzzle(); - } - } - - Image { - source: "content/gfx/background.png" - anchors.fill: parent - } - - GameArea { - id: gameCanvas - z: 1 - y: Settings.headerHeight - - width: parent.width - height: parent.height - Settings.headerHeight - Settings.footerHeight - - backgroundVisible: root.state == "in-game" - onModeChanged: if (gameCanvas.mode != "puzzle") puzzleWon = false; //UI has stricter constraints on this variable than the game does - Age { - groups: ["redspots", "greenspots", "bluespots", "yellowspots"] - enabled: root.state == "" - system: gameCanvas.ps - } - - onPuzzleLost: acc--;//So that nextPuzzle() reloads the current one - - } - - Item { - id: menu - z: 2 - width: parent.width; - anchors.top: parent.top - anchors.bottom: bottomBar.top - - LogoAnimation { - x: 64 - y: Settings.headerHeight - particleSystem: gameCanvas.ps - running: root.state == "" - } - Row { - x: 112 - y: 20 - Image { source: "content/gfx/logo-a.png" } - Image { source: "content/gfx/logo-m.png" } - Image { source: "content/gfx/logo-e.png" } - } - - Column { - y: 100 + 40 - spacing: Settings.menuButtonSpacing - - Button { - width: root.width - rotatedButton: true - imgSrc: "content/gfx/but-game-1.png" - onClicked: { - if (root.state == "in-game") - return //Prevent double clicking - root.state = "in-game" - gameCanvas.blockFile = "Block.qml" - gameCanvas.background = "gfx/background.png" - arcadeTimer.start(); - } - //Emitted particles don't fade out, because ImageParticle is on the GameArea - system: gameCanvas.ps - group: "green" - Timer { - id: arcadeTimer - interval: Settings.menuDelay - running : false - repeat : false - onTriggered: Logic.startNewGame(gameCanvas) - } - } - - Button { - width: root.width - rotatedButton: true - imgSrc: "content/gfx/but-game-2.png" - onClicked: { - if (root.state == "in-game") - return - root.state = "in-game" - gameCanvas.blockFile = "Block.qml" - gameCanvas.background = "gfx/background.png" - twopTimer.start(); - } - system: gameCanvas.ps - group: "green" - Timer { - id: twopTimer - interval: Settings.menuDelay - running : false - repeat : false - onTriggered: Logic.startNewGame(gameCanvas, "multiplayer") - } - } - - Button { - width: root.width - rotatedButton: true - imgSrc: "content/gfx/but-game-3.png" - onClicked: { - if (root.state == "in-game") - return - root.state = "in-game" - gameCanvas.blockFile = "SimpleBlock.qml" - gameCanvas.background = "gfx/background.png" - endlessTimer.start(); - } - system: gameCanvas.ps - group: "blue" - Timer { - id: endlessTimer - interval: Settings.menuDelay - running : false - repeat : false - onTriggered: Logic.startNewGame(gameCanvas, "endless") - } - } - - Button { - width: root.width - rotatedButton: true - imgSrc: "content/gfx/but-game-4.png" - group: "yellow" - onClicked: { - if (root.state == "in-game") - return - root.state = "in-game" - gameCanvas.blockFile = "PuzzleBlock.qml" - gameCanvas.background = "gfx/background.png" - puzzleTimer.start(); - } - Timer { - id: puzzleTimer - interval: Settings.menuDelay - running : false - repeat : false - onTriggered: loadPuzzle(); - } - system: gameCanvas.ps - } - } - } - - Image { - id: scoreBar - source: "content/gfx/bar.png" - width: parent.width - z: 6 - y: -Settings.headerHeight - height: Settings.headerHeight - Behavior on opacity { NumberAnimation {} } - SamegameText { - id: arcadeScore - anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} - text: 'P1: ' + gameCanvas.score - font.pixelSize: Settings.fontPixelSize - textFormat: Text.StyledText - color: "white" - opacity: gameCanvas.mode == "arcade" ? 1 : 0 - Behavior on opacity { NumberAnimation {} } - } - SamegameText { - id: arcadeHighScore - anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} - text: 'Highscore: ' + gameCanvas.highScore - opacity: gameCanvas.mode == "arcade" ? 1 : 0 - } - SamegameText { - id: p1Score - anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} - text: 'P1: ' + gameCanvas.score - opacity: gameCanvas.mode == "multiplayer" ? 1 : 0 - } - SamegameText { - id: p2Score - anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} - text: 'P2: ' + gameCanvas.score2 - opacity: gameCanvas.mode == "multiplayer" ? 1 : 0 - rotation: 180 - } - SamegameText { - id: puzzleMoves - anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} - text: 'Moves: ' + gameCanvas.moves - opacity: gameCanvas.mode == "puzzle" ? 1 : 0 - } - SamegameText { - Image { - source: "content/gfx/icon-time.png" - x: -20 - } - id: puzzleTime - anchors { topMargin: 3; top: parent.top; horizontalCenter: parent.horizontalCenter; horizontalCenterOffset: 20} - text: "00:00" - opacity: gameCanvas.mode == "puzzle" ? 1 : 0 - Timer { - interval: 1000 - repeat: true - running: gameCanvas.mode == "puzzle" && !gameCanvas.gameOver - onTriggered: { - var elapsed = Math.floor((new Date() - Logic.gameDuration)/ 1000.0); - var mins = Math.floor(elapsed/60.0); - var secs = (elapsed % 60); - puzzleTime.text = (mins < 10 ? "0" : "") + mins + ":" + (secs < 10 ? "0" : "") + secs; - } - } - } - SamegameText { - id: puzzleScore - anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} - text: 'Score: ' + gameCanvas.score - opacity: gameCanvas.mode == "puzzle" ? 1 : 0 - } - } - - Image { - id: bottomBar - width: parent.width - height: Settings.footerHeight - source: "content/gfx/bar.png" - y: parent.height - Settings.footerHeight; - z: 2 - Button { - id: quitButton - height: Settings.toolButtonHeight - imgSrc: "content/gfx/but-quit.png" - onClicked: {Qt.quit(); } - anchors { left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: 11 } - } - Button { - id: menuButton - height: Settings.toolButtonHeight - imgSrc: "content/gfx/but-menu.png" - visible: (root.state == "in-game"); - onClicked: {root.state = ""; Logic.cleanUp(); gameCanvas.mode = ""} - anchors { left: quitButton.right; verticalCenter: parent.verticalCenter; leftMargin: 0 } - } - Button { - id: againButton - height: Settings.toolButtonHeight - imgSrc: "content/gfx/but-game-new.png" - visible: (root.state == "in-game"); - opacity: gameCanvas.gameOver && (gameCanvas.mode == "arcade" || gameCanvas.mode == "multiplayer") - Behavior on opacity{ NumberAnimation {} } - onClicked: {if (gameCanvas.gameOver) { Logic.startNewGame(gameCanvas, gameCanvas.mode);}} - anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 11 } - } - Button { - id: nextButton - height: Settings.toolButtonHeight - imgSrc: "content/gfx/but-puzzle-next.png" - visible: (root.state == "in-game") && gameCanvas.mode == "puzzle" && gameCanvas.puzzleWon - opacity: gameCanvas.puzzleWon ? 1 : 0 - Behavior on opacity{ NumberAnimation {} } - onClicked: {if (gameCanvas.puzzleWon) nextPuzzle();} - anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 11 } - } - } - - Connections { - target: root - onStateChanged: stateChangeAnim.running = true - } - SequentialAnimation { - id: stateChangeAnim - ParallelAnimation { - NumberAnimation { target: bottomBar; property: "y"; to: root.height; duration: Settings.menuDelay/2; easing.type: Easing.OutQuad } - NumberAnimation { target: scoreBar; property: "y"; to: -Settings.headerHeight; duration: Settings.menuDelay/2; easing.type: Easing.OutQuad } - } - ParallelAnimation { - NumberAnimation { target: bottomBar; property: "y"; to: root.height - Settings.footerHeight; duration: Settings.menuDelay/2; easing.type: Easing.OutBounce} - NumberAnimation { target: scoreBar; property: "y"; to: root.state == "" ? -Settings.headerHeight : 0; duration: Settings.menuDelay/2; easing.type: Easing.OutBounce} - } - } - - states: [ - State { - name: "in-game" - PropertyChanges { - target: menu - opacity: 0 - visible: false - } - } - ] - - transitions: [ - Transition { - NumberAnimation {properties: "x,y,opacity"} - } - ] - - //"Debug mode" - focus: true - Keys.onAsteriskPressed: Logic.nuke(); - Keys.onSpacePressed: gameCanvas.puzzleWon = true; -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/Block.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/Block.qml deleted file mode 100644 index 85f2e27..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/Block.qml +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: block - property bool dying: false - property bool spawned: false - property int type: 0 - property ParticleSystem particleSystem - - Behavior on x { - enabled: spawned; - SpringAnimation{ spring: 2; damping: 0.2 } - } - Behavior on y { - SpringAnimation{ spring: 2; damping: 0.2 } - } - - Image { - id: img - source: { - if (type == 0){ - "gfx/red.png"; - } else if (type == 1) { - "gfx/blue.png"; - } else if (type == 2) { - "gfx/green.png"; - } else { - "gfx/yellow.png"; - } - } - opacity: 0 - Behavior on opacity { NumberAnimation { duration: 200 } } - anchors.fill: parent - } - - //Foreground particles - BlockEmitter { - id: particles - system: particleSystem - group: { - if (type == 0){ - "red"; - } else if (type == 1) { - "blue"; - } else if (type == 2) { - "green"; - } else { - "yellow"; - } - } - anchors.fill: parent - } - - //Paint particles on the background - PaintEmitter { - id: particles2 - system: particleSystem - } - - states: [ - State { - name: "AliveState"; when: spawned == true && dying == false - PropertyChanges { target: img; opacity: 1 } - }, - - State { - name: "DeathState"; when: dying == true - StateChangeScript { script: {particleSystem.paused = false; particles.pulse(100); particles2.pulse(100);} } - PropertyChanges { target: img; opacity: 0 } - StateChangeScript { script: block.destroy(1000); } - } - ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/BlockEmitter.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/BlockEmitter.qml deleted file mode 100644 index 7dad509..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/BlockEmitter.qml +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -import "../settings.js" as Settings - -Emitter { - property Item block: parent - velocity: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -40; magnitudeVariation: 40} - acceleration: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -100;} - shape: EllipseShape{fill:true} - enabled: false; - lifeSpan: 700; lifeSpanVariation: 100 - emitRate: 1000 - maximumEmitted: 100 //only fires 0.1s bursts (still 2x old number) - size: Settings.blockSize * 0.85 - endSize: Settings.blockSize * 0.85 /2 -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/Button.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/Button.qml deleted file mode 100644 index aab21ec..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/Button.qml +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - property alias imgSrc: image.source - property alias system: emitter.system - property alias group: emitter.group - signal clicked - property bool rotatedButton: false - - width: image.width - height: image.sourceSize.height - Image { - id: image - height: parent.height - width: height/sourceSize.height * sourceSize.width - - anchors.horizontalCenter: parent.horizontalCenter - rotation: rotatedButton ? ((Math.random() * 3 + 2) * (Math.random() <= 0.5 ? -1 : 1)) : 0 - MenuEmitter { - id: emitter - anchors.fill: parent - //shape: MaskShape {source: image.source} - } - } - MouseArea { - anchors.fill: parent - onClicked: {parent.clicked(); emitter.burst(400);} - } -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/GameArea.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/GameArea.qml deleted file mode 100644 index f3ca98d..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/GameArea.qml +++ /dev/null @@ -1,226 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "samegame.js" as Logic - -Item { - id: gameCanvas - property bool gameOver: true - property int score: 0 - property int highScore: 0 - property int moves: 0 - property string mode: "" - property ParticleSystem ps: particleSystem - //For easy theming - property alias backgroundVisible: bg.visible - property string background: "gfx/background.png" - property string blockFile: "Block.qml" - onBlockFileChanged: Logic.changeBlock(blockFile); - property alias particlePack: auxLoader.source - //For multiplayer - property int score2: 0 - property int curTurn: 1 - property bool autoTurnChange: false - signal swapPlayers - property bool swapping: false - //onSwapPlayers: if (autoTurnChange) Logic.turnChange();//Now implemented below - //For puzzle - property url level - property bool puzzleWon: false - signal puzzleLost //Since root is tracking the puzzle progress - function showPuzzleEnd (won) { - if (won) { - smokeParticle.color = Qt.rgba(0,1,0,0); - puzzleWin.play(); - } else { - smokeParticle.color = Qt.rgba(1,0,0,0); - puzzleFail.play(); - puzzleLost(); - } - } - function showPuzzleGoal (str) { - puzzleTextBubble.opacity = 1; - puzzleTextLabel.text = str; - } - Image { - id: bg - z: -1 - anchors.fill: parent - source: background; - fillMode: Image.PreserveAspectCrop - } - - MouseArea { - anchors.fill: parent; onClicked: { - if (puzzleTextBubble.opacity == 1) { - puzzleTextBubble.opacity = 0; - Logic.finishLoadingMap(); - } else if (!swapping) { - Logic.handleClick(mouse.x,mouse.y); - } - } - } - - Image { - id: highScoreTextBubble - opacity: mode == "arcade" && gameOver && gameCanvas.score == gameCanvas.highScore ? 1 : 0 - Behavior on opacity { NumberAnimation {} } - anchors.centerIn: parent - z: 10 - source: "gfx/bubble-highscore.png" - Image { - anchors.centerIn: parent - source: "gfx/text-highscore-new.png" - rotation: -10 - } - } - - Image { - id: puzzleTextBubble - anchors.centerIn: parent - opacity: 0 - Behavior on opacity { NumberAnimation {} } - z: 10 - source: "gfx/bubble-puzzle.png" - Connections { - target: gameCanvas - onModeChanged: if (mode != "puzzle" && puzzleTextBubble.opacity > 0) puzzleTextBubble.opacity = 0; - } - Text { - id: puzzleTextLabel - width: parent.width - 24 - anchors.centerIn: parent - horizontalAlignment: Text.AlignHCenter - color: "white" - font.pixelSize: 24 - font.bold: true - wrapMode: Text.WordWrap - } - } - onModeChanged: { - p1WonImg.opacity = 0; - p2WonImg.opacity = 0; - } - SmokeText { id: puzzleWin; source: "gfx/icon-ok.png"; system: particleSystem } - SmokeText { id: puzzleFail; source: "gfx/icon-fail.png"; system: particleSystem } - - onSwapPlayers: { - smokeParticle.color = "yellow" - Logic.turnChange(); - if (curTurn == 1) { - p1Text.play(); - } else { - p2Text.play(); - } - clickDelay.running = true; - } - SequentialAnimation { - id: clickDelay - ScriptAction { script: gameCanvas.swapping = true; } - PauseAnimation { duration: 750 } - ScriptAction { script: gameCanvas.swapping = false; } - } - - SmokeText { - id: p1Text; source: "gfx/text-p1-go.png"; - system: particleSystem; playerNum: 1 - opacity: p1WonImg.opacity + p2WonImg.opacity > 0 ? 0 : 1 - } - - SmokeText { - id: p2Text; source: "gfx/text-p2-go.png"; - system: particleSystem; playerNum: 2 - opacity: p1WonImg.opacity + p2WonImg.opacity > 0 ? 0 : 1 - } - - onGameOverChanged: { - if (gameCanvas.mode == "multiplayer") { - if (gameCanvas.score >= gameCanvas.score2) { - p1WonImg.opacity = 1; - } else { - p2WonImg.opacity = 1; - } - } - } - Image { - id: p1WonImg - source: "gfx/text-p1-won.png" - anchors.centerIn: parent - opacity: 0 - Behavior on opacity { NumberAnimation {} } - z: 10 - } - Image { - id: p2WonImg - source: "gfx/text-p2-won.png" - anchors.centerIn: parent - opacity: 0 - Behavior on opacity { NumberAnimation {} } - z: 10 - } - - ParticleSystem{ - id: particleSystem; - anchors.fill: parent - z: 5 - ImageParticle { - id: smokeParticle - groups: ["smoke"] - source: "gfx/particle-smoke.png" - alpha: 0.1 - alphaVariation: 0.1 - color: "yellow" - } - Loader { - id: auxLoader - anchors.fill: parent - source: "PrimaryPack.qml" - onItemChanged: { - if (item && "particleSystem" in item) - item.particleSystem = particleSystem - if (item && "gameArea" in item) - item.gameArea = gameCanvas - } - } - } -} - diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/LogoAnimation.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/LogoAnimation.qml deleted file mode 100644 index c879893..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/LogoAnimation.qml +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: container //Positioned where the 48x48 S/G should be - property alias running: mainAnim.running - property ParticleSystem particleSystem - property int dur: 500 - signal boomTime - Image { - id: s1 - source: "gfx/logo-s.png" - y: 0 - } - Image { - id: g1 - source: "gfx/logo-g.png" - y: -128 - } - Column { - Repeater { - model: 2 - Item { - width: 48 - height: 48 - BlockEmitter { - id: emitter - anchors.fill: parent - group: "red" - system: particleSystem - Connections { - target: container - onBoomTime: emitter.pulse(100); - } - } - } - } - } - SequentialAnimation { - id: mainAnim - running: true - loops: -1 - PropertyAction { target: g1; property: "y"; value: -128} - PropertyAction { target: g1; property: "opacity"; value: 1} - PropertyAction { target: s1; property: "y"; value: 0} - PropertyAction { target: s1; property: "opacity"; value: 1} - NumberAnimation { target: g1; property: "y"; from: -96; to: -48; duration: dur} - ParallelAnimation { - NumberAnimation { target: g1; property: "y"; from: -48; to: 0; duration: dur} - NumberAnimation { target: s1; property: "y"; from: 0; to: 48; duration: dur } - } - PauseAnimation { duration: dur } - ScriptAction { script: container.boomTime(); } - ParallelAnimation { - NumberAnimation { target: g1; property: "opacity"; to: 0; duration: dur } - NumberAnimation { target: s1; property: "opacity"; to: 0; duration: dur } - } - PropertyAction { target: s1; property: "y"; value: -128} - PropertyAction { target: s1; property: "opacity"; value: 1} - NumberAnimation { target: s1; property: "y"; from: -96; to: 0; duration: dur * 2} - } -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/MenuEmitter.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/MenuEmitter.qml deleted file mode 100644 index 16c7660..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/MenuEmitter.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Emitter { - anchors.fill: parent - velocity: AngleDirection{angleVariation: 360; magnitude: 140; magnitudeVariation: 40} - enabled: false; - lifeSpan: 500; - emitRate: 1 - size: 28 - endSize: 14 - group: "yellow" -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/PaintEmitter.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/PaintEmitter.qml deleted file mode 100644 index 4a67c4a..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/PaintEmitter.qml +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "../settings.js" as Settings - -Emitter { - property Item block: parent - anchors.fill: parent - shape: EllipseShape { fill: true } - group: { - if (block.type == 0){ - "redspots"; - } else if (block.type == 1) { - "bluespots"; - } else if (block.type == 2) { - "greenspots"; - } else { - "yellowspots"; - } - } - size: Settings.blockSize * 2 - endSize: Settings.blockSize/2 - lifeSpan: 30000 - enabled: false - emitRate: 60 - maximumEmitted: 60 - velocity: PointDirection{ y: 4; yVariation: 4 } - /* Possibly better, but dependent on gerrit change,28212 - property real mainIntensity: 0.8 - property real subIntensity: 0.1 - property real colorVariation: 0.005 - onEmitParticles: {//One group, many colors, for better stacking - for (var i=0; i
    Clear in three moves..." - startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , - 0 , 0 , 0 , 0 , 0 , 1 , 1 , 2 , 1 , 1 , - 0 , 0 , 0 , 1 , 1 , 3 , 3 , 3 , 3 , 3 , - 0 , 1 , 1 , 3 , 3 , 3 , 1 , 3 , 1 , 1 , - 1 , 2 , 3 , 3 , 1 , 1 , 3 , 3 , 3 , 3 , - 1 , 3 , 3 , 2 , 3 , 3 , 3 , 3 , 1 , 1 , - 1 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level1.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level1.qml deleted file mode 100644 index 4bb15cb..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level1.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - timeTarget: 10 - goalText: "2 of 10

    Clear in 10 seconds..." - startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 1 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 2 , 2 , - 1 , 2 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 2 , - 2 , 2 , 1 , 3 , 3 , 3 , 1 , 1 , 1 , 2 , - 2 , 1 , 1 , 1 , 3 , 3 , 3 , 1 , 2 , 2 , - 1 , 1 , 1 , 1 , 1 , 3 , 3 , 3 , 2 , 1 ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level2.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level2.qml deleted file mode 100644 index a319479..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level2.qml +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - scoreTarget: 1200 - timeTarget: 60 - goalText: "3 of 10

    Score over 1200 points in one minute..." - mustClear: false - startingGrid: [ 3 , 1 , 2 , 1 , 1 , 2 , 1 , 1 , 3 , 3 , - 1 , 3 , 3 , 2 , 3 , 3 , 1 , 1 , 3 , 1 , - 3 , 1 , 3 , 3 , 2 , 3 , 3 , 3 , 1 , 2 , - 3 , 2 , 2 , 1 , 3 , 3 , 2 , 1 , 1 , 2 , - 3 , 1 , 2 , 2 , 2 , 2 , 2 , 1 , 3 , 1 , - 2 , 3 , 1 , 2 , 2 , 3 , 3 , 1 , 3 , 2 , - 3 , 2 , 1 , 1 , 3 , 3 , 3 , 2 , 2 , 1 , - 1 , 2 , 2 , 3 , 2 , 3 , 3 , 3 , 1 , 1 , - 1 , 3 , 3 , 3 , 1 , 2 , 2 , 3 , 3 , 1 , - 3 , 3 , 2 , 1 , 2 , 2 , 1 , 1 , 1 , 3 , - 2 , 1 , 3 , 2 , 3 , 2 , 3 , 2 , 2 , 1 , - 1 , 3 , 1 , 2 , 1 , 2 , 3 , 1 , 2 , 2 , - 1 , 2 , 2 , 2 , 1 , 1 , 2 , 3 , 1 , 2 ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level3.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level3.qml deleted file mode 100644 index 43e82d7..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level3.qml +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - scoreTarget: 3000 - timeTarget: 60 - goalText: "4 of 10
    Clear the board with over 3000 points in under a minute..." - startingGrid: [ 3 , 3 , 1 , 1 , 1 , 2 , 2 , 4 , 3 , 3 , - 4 , 3 , 1 , 4 , 2 , 2 , 2 , 4 , 3 , 4 , - 4 , 3 , 3 , 4 , 1 , 1 , 3 , 3 , 4 , 4 , - 3 , 3 , 3 , 3 , 3 , 1 , 3 , 2 , 2 , 4 , - 4 , 4 , 3 , 4 , 3 , 1 , 4 , 4 , 4 , 4 , - 4 , 4 , 3 , 4 , 1 , 1 , 4 , 4 , 3 , 3 , - 4 , 2 , 2 , 2 , 2 , 2 , 4 , 4 , 4 , 1 , - 4 , 4 , 2 , 4 , 2 , 2 , 1 , 1 , 1 , 1 , - 4 , 4 , 2 , 4 , 2 , 2 , 1 , 4 , 4 , 1 , - 4 , 1 , 1 , 4 , 3 , 3 , 4 , 2 , 4 , 1 , - 4 , 1 , 1 , 2 , 3 , 3 , 4 , 2 , 2 , 1 , - 1 , 1 , 2 , 2 , 2 , 3 , 3 , 3 , 2 , 1 , - 4 , 1 , 1 , 2 , 2 , 3 , 4 , 3 , 4 , 4 ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level4.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level4.qml deleted file mode 100644 index 46ad42f..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level4.qml +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - goalText: "5 of 10

    Clear the level..." - startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 1 , 3 , 2 , 1 , 1 , 1 , 1 , 3 , 2 , 3 , - 1 , 2 , 3 , 1 , 3 , 2 , 2 , 1 , 1 , 2 , - 3 , 2 , 2 , 2 , 1 , 1 , 1 , 1 , 3 , 3 , - 2 , 1 , 1 , 3 , 2 , 1 , 1 , 2 , 1 , 3 , - 1 , 3 , 3 , 1 , 2 , 1 , 2 , 1 , 3 , 3 , - 1 , 3 , 2 , 2 , 2 , 1 , 1 , 3 , 2 , 3 , - 1 , 1 , 3 , 2 , 3 , 3 , 2 , 1 , 1 , 1 , - 1 , 2 , 2 , 3 , 2 , 2 , 1 , 3 , 1 , 3 ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level5.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level5.qml deleted file mode 100644 index 3716264..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level5.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - moveTarget: 4 - goalText: "6 of 10

    Clear in four or less moves..." - startingGrid: [ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , - 4 , 2 , 2 , 2 , 4 , 3 , 3 , 3 , 4 , 4 , - 4 , 2 , 4 , 4 , 4 , 3 , 2 , 3 , 4 , 4 , - 4 , 2 , 2 , 2 , 4 , 3 , 3 , 3 , 4 , 4 , - 4 , 4 , 4 , 2 , 4 , 3 , 4 , 3 , 4 , 4 , - 4 , 2 , 2 , 2 , 4 , 3 , 4 , 3 , 4 , 4 , - 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , - 4 , 3 , 4 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , - 4 , 3 , 3 , 3 , 4 , 2 , 4 , 4 , 4 , 3 , - 4 , 3 , 3 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , - 4 , 3 , 4 , 3 , 4 , 2 , 4 , 4 , 4 , 4 , - 4 , 3 , 4 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , - 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level6.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level6.qml deleted file mode 100644 index 4547b75..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level6.qml +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - moveTarget: 20 - timeTarget: 40 - goalText: "7 of 10

    Clear with 20 moves in 40 seconds (or better)." - startingGrid: [ 1 , 3 , 1 , 1 , 1 , 1 , 2 , 1 , 2 , 2 , - 2 , 1 , 2 , 3 , 3 , 1 , 3 , 1 , 1 , 3 , - 3 , 1 , 1 , 1 , 2 , 2 , 3 , 2 , 3 , 1 , - 1 , 3 , 1 , 1 , 3 , 1 , 1 , 1 , 2 , 3 , - 2 , 1 , 1 , 1 , 3 , 2 , 3 , 3 , 2 , 3 , - 3 , 3 , 3 , 3 , 2 , 2 , 3 , 1 , 3 , 2 , - 2 , 2 , 3 , 2 , 2 , 3 , 2 , 2 , 2 , 2 , - 1 , 2 , 1 , 2 , 1 , 3 , 2 , 3 , 2 , 3 , - 1 , 1 , 2 , 3 , 3 , 3 , 3 , 1 , 1 , 2 , - 3 , 3 , 2 , 2 , 2 , 2 , 3 , 1 , 3 , 1 , - 1 , 2 , 3 , 3 , 3 , 1 , 3 , 2 , 1 , 2 , - 1 , 2 , 1 , 1 , 2 , 3 , 1 , 2 , 1 , 3 , - 3 , 1 , 2 , 2 , 1 , 3 , 3 , 1 , 3 , 2 ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level7.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level7.qml deleted file mode 100644 index 5d71d7c..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level7.qml +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - goalText: "8 of 10

    Clear the grid." - startingGrid: [ 2 , 4 , 3 , 2 , 3 , 2 , 3 , 3 , 4 , 3 , - 2 , 2 , 3 , 3 , 1 , 4 , 3 , 3 , 3 , 2 , - 1 , 4 , 2 , 3 , 4 , 3 , 3 , 1 , 1 , 1 , - 2 , 1 , 2 , 4 , 4 , 2 , 2 , 3 , 2 , 1 , - 3 , 4 , 4 , 1 , 3 , 2 , 4 , 2 , 1 , 1 , - 2 , 2 , 3 , 1 , 2 , 4 , 1 , 2 , 1 , 2 , - 1 , 2 , 3 , 2 , 4 , 4 , 3 , 1 , 1 , 2 , - 4 , 4 , 2 , 1 , 2 , 4 , 2 , 2 , 4 , 3 , - 4 , 2 , 4 , 1 , 3 , 4 , 1 , 4 , 2 , 4 , - 4 , 3 , 4 , 1 , 4 , 3 , 1 , 3 , 1 , 1 , - 3 , 3 , 2 , 3 , 2 , 4 , 1 , 2 , 4 , 4 , - 3 , 4 , 2 , 2 , 4 , 3 , 4 , 1 , 3 , 2 , - 4 , 3 , 3 , 4 , 2 , 4 , 1 , 2 , 3 , 2 ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level8.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level8.qml deleted file mode 100644 index 9dbb8c2..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level8.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - scoreTarget: 1000 - goalText: "9 of 10

    Score over 1000 points" - startingGrid: [ 1 , 4 , 4 , 3 , 2 , 1 , 4 , 2 , 4 , 2 , - 2 , 3 , 4 , 4 , 1 , 1 , 1 , 4 , 4 , 4 , - 1 , 3 , 1 , 2 , 2 , 1 , 2 , 1 , 4 , 2 , - 4 , 3 , 4 , 2 , 1 , 4 , 1 , 2 , 2 , 3 , - 3 , 4 , 2 , 4 , 4 , 3 , 2 , 2 , 2 , 1 , - 4 , 4 , 3 , 2 , 4 , 4 , 2 , 1 , 1 , 1 , - 1 , 2 , 1 , 3 , 4 , 1 , 1 , 3 , 2 , 3 , - 3 , 4 , 2 , 2 , 1 , 3 , 2 , 2 , 4 , 2 , - 2 , 4 , 1 , 2 , 2 , 4 , 3 , 3 , 3 , 1 , - 1 , 2 , 2 , 4 , 1 , 2 , 2 , 3 , 3 , 3 , - 4 , 4 , 1 , 4 , 3 , 1 , 3 , 3 , 3 , 4 , - 1 , 2 , 4 , 1 , 2 , 1 , 1 , 4 , 2 , 1 , - 1 , 2 , 3 , 4 , 2 , 4 , 4 , 2 , 1 , 3 ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level9.qml b/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level9.qml deleted file mode 100644 index 4e8bf19..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/levels/level9.qml +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - scoreTarget: 2000 - timeTarget: 60 - moveTarget: 20 - mustClear: false - goalText: "10 of 10

    Score 2000 in one minute with less than 20 moves!" - startingGrid: [ 3 , 2 , 3 , 1 , 3 , 3 , 4 , 1 , 3 , 3 , - 2 , 3 , 2 , 1 , 1 , 2 , 2 , 2 , 4 , 1 , - 2 , 4 , 4 , 4 , 3 , 1 , 4 , 4 , 4 , 1 , - 3 , 1 , 3 , 4 , 4 , 2 , 2 , 2 , 2 , 3 , - 2 , 1 , 4 , 4 , 3 , 3 , 1 , 1 , 3 , 2 , - 3 , 2 , 1 , 4 , 3 , 4 , 1 , 3 , 4 , 2 , - 3 , 3 , 1 , 4 , 4 , 4 , 2 , 1 , 2 , 3 , - 2 , 3 , 4 , 3 , 4 , 1 , 1 , 3 , 2 , 4 , - 4 , 4 , 1 , 2 , 4 , 3 , 2 , 2 , 2 , 4 , - 1 , 4 , 2 , 2 , 1 , 1 , 2 , 1 , 1 , 4 , - 1 , 4 , 3 , 3 , 3 , 1 , 3 , 4 , 4 , 2 , - 3 , 4 , 1 , 1 , 2 , 2 , 2 , 3 , 2 , 1 , - 3 , 3 , 4 , 3 , 1 , 1 , 1 , 4 , 4 , 3 ] -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/content/samegame.js b/basicsuite/Qt5 Launch Presentation/samegame/content/samegame.js deleted file mode 100755 index 7b226cb..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/content/samegame.js +++ /dev/null @@ -1,581 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* This script file handles the game logic */ -.pragma library -.import QtQuick.LocalStorage 2.0 as Sql -.import "../settings.js" as Settings - -var maxColumn = 10; -var maxRow = 13; -var types = 3; -var maxIndex = maxColumn*maxRow; -var board = new Array(maxIndex); -var blockSrc = "Block.qml"; -var gameDuration; -var component = Qt.createComponent(blockSrc); -var gameCanvas; -var betweenTurns = false; - -var puzzleLevel = null; -var puzzlePath = ""; - -var gameMode = "arcade"; //Set in new game, then tweaks behaviour of other functions -var gameOver = false; - -function changeBlock(src) -{ - blockSrc = src; - component = Qt.createComponent(blockSrc); -} - -// Index function used instead of a 2D array -function index(column, row) -{ - return column + row * maxColumn; -} - -function timeStr(msecs) -{ - var secs = Math.floor(msecs/1000); - var m = Math.floor(secs/60); - var ret = "" + m + "m " + (secs%60) + "s"; - return ret; -} - -function cleanUp() -{ - if (gameCanvas == undefined) - return; - // Delete blocks from previous game - for (var i = 0; i < maxIndex; i++) { - if (board[i] != null) - board[i].destroy(); - board[i] = null; - } - if (puzzleLevel != null){ - puzzleLevel.destroy(); - puzzleLevel = null; - } - gameCanvas.mode = "" -} - -function startNewGame(gc, mode, map) -{ - gameCanvas = gc; - if (mode == undefined) - gameMode = "arcade"; - else - gameMode = mode; - gameOver = false; - - cleanUp(); - - gc.gameOver = false; - gc.mode = gameMode; - // Calculate board size - maxColumn = Math.floor(gameCanvas.width/Settings.blockSize); - maxRow = Math.floor(gameCanvas.height/Settings.blockSize); - maxIndex = maxRow * maxColumn; - if (gameMode == "arcade") //Needs to be after board sizing - getHighScore(); - - - // Initialize Board - board = new Array(maxIndex); - gameCanvas.score = 0; - gameCanvas.score2 = 0; - gameCanvas.moves = 0; - gameCanvas.curTurn = 1; - if (gameMode == "puzzle") - loadMap(map); - else//Note that we load them in reverse order for correct visual stacking - for (var column = maxColumn - 1; column >= 0; column--) - for (var row = maxRow - 1; row >= 0; row--) - createBlock(column, row); - if (gameMode == "puzzle") - getLevelHistory();//Needs to be after map load - gameDuration = new Date(); -} - -var fillFound; // Set after a floodFill call to the number of blocks found -var floodBoard; // Set to 1 if the floodFill reaches off that node - -// NOTE: Be careful with vars named x,y, as the calling object's x,y are still in scope -function handleClick(x,y) -{ - if (betweenTurns || gameOver || gameCanvas == undefined) - return; - var column = Math.floor(x/Settings.blockSize); - var row = Math.floor(y/Settings.blockSize); - if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) - return; - if (board[index(column, row)] == null) - return; - // If it's a valid block, remove it and all connected (does nothing if it's not connected) - floodFill(column,row, -1); - if (fillFound <= 0) - return; - if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) - gameCanvas.score2 += (fillFound - 1) * (fillFound - 1); - else - gameCanvas.score += (fillFound - 1) * (fillFound - 1); - if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) - shuffleUp(); - else - shuffleDown(); - gameCanvas.moves += 1; - if (gameMode == "endless") - refill(); - else if (gameMode != "multiplayer") - victoryCheck(); - if (gameMode == "multiplayer" && !gc.gameOver){ - betweenTurns = true; - gameCanvas.swapPlayers();//signal, animate and call turnChange() when ready - } -} - -function floodFill(column,row,type) -{ - if (board[index(column, row)] == null) - return; - var first = false; - if (type == -1) { - first = true; - type = board[index(column,row)].type; - - // Flood fill initialization - fillFound = 0; - floodBoard = new Array(maxIndex); - } - if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) - return; - if (floodBoard[index(column, row)] == 1 || (!first && type != board[index(column, row)].type)) - return; - floodBoard[index(column, row)] = 1; - floodFill(column + 1, row, type); - floodFill(column - 1, row, type); - floodFill(column, row + 1, type); - floodFill(column, row - 1, type); - if (first == true && fillFound == 0) - return; // Can't remove single blocks - board[index(column, row)].dying = true; - board[index(column, row)] = null; - fillFound += 1; -} - -function shuffleDown() -{ - // Fall down - for (var column = 0; column < maxColumn; column++) { - var fallDist = 0; - for (var row = maxRow - 1; row >= 0; row--) { - if (board[index(column,row)] == null) { - fallDist += 1; - } else { - if (fallDist > 0) { - var obj = board[index(column, row)]; - obj.y = (row + fallDist) * Settings.blockSize; - board[index(column, row + fallDist)] = obj; - board[index(column, row)] = null; - } - } - } - } - // Fall to the left - fallDist = 0; - for (column = 0; column < maxColumn; column++) { - if (board[index(column, maxRow - 1)] == null) { - fallDist += 1; - } else { - if (fallDist > 0) { - for (row = 0; row < maxRow; row++) { - obj = board[index(column, row)]; - if (obj == null) - continue; - obj.x = (column - fallDist) * Settings.blockSize; - board[index(column - fallDist,row)] = obj; - board[index(column, row)] = null; - } - } - } - } -} - - -function shuffleUp() -{ - // Fall up - for (var column = 0; column < maxColumn; column++) { - var fallDist = 0; - for (var row = 0; row < maxRow; row++) { - if (board[index(column,row)] == null) { - fallDist += 1; - } else { - if (fallDist > 0) { - var obj = board[index(column, row)]; - obj.y = (row - fallDist) * Settings.blockSize; - board[index(column, row - fallDist)] = obj; - board[index(column, row)] = null; - } - } - } - } - // Fall to the left (or should it be right, so as to be left for P2?) - fallDist = 0; - for (column = 0; column < maxColumn; column++) { - if (board[index(column, 0)] == null) { - fallDist += 1; - } else { - if (fallDist > 0) { - for (row = 0; row < maxRow; row++) { - obj = board[index(column, row)]; - if (obj == null) - continue; - obj.x = (column - fallDist) * Settings.blockSize; - board[index(column - fallDist,row)] = obj; - board[index(column, row)] = null; - } - } - } - } -} - -function turnChange()//called by ui outside -{ - betweenTurns = false; - if (gameCanvas.curTurn == 1){ - shuffleUp(); - gameCanvas.curTurn = 2; - victoryCheck(); - }else{ - shuffleDown(); - gameCanvas.curTurn = 1; - victoryCheck(); - } -} - -function refill() -{ - for (var column = 0; column < maxColumn; column++) { - for (var row = 0; row < maxRow; row++) { - if (board[index(column, row)] == null) - createBlock(column, row); - } - } -} - -function victoryCheck() -{ - // Awards bonuses for no blocks left - var deservesBonus = true; - if (board[index(0,maxRow - 1)] != null || board[index(0,0)] != null) - deservesBonus = false; - // Checks for game over - if (deservesBonus){ - if (gameCanvas.curTurn = 1) - gameCanvas.score += 1000; - else - gameCanvas.score2 += 1000; - } - gameOver = deservesBonus; - if (gameCanvas.curTurn == 1){ - if (!(floodMoveCheck(0, maxRow - 1, -1))) - gameOver = true; - }else{ - if (!(floodMoveCheck(0, 0, -1, true))) - gameOver = true; - } - if (gameMode == "puzzle"){ - puzzleVictoryCheck(deservesBonus);//Takes it from here - return; - } - if (gameOver) { - var winnerScore = Math.max(gameCanvas.score, gameCanvas.score2); - if (gameMode == "multiplayer"){ - gameCanvas.score = winnerScore; - saveHighScore(gameCanvas.score2); - } - saveHighScore(gameCanvas.score); - gameDuration = new Date() - gameDuration; - gameCanvas.gameOver = true; - } -} - -// Only floods up and right, to see if it can find adjacent same-typed blocks -function floodMoveCheck(column, row, type, goDownInstead) -{ - if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) - return false; - if (board[index(column, row)] == null) - return false; - var myType = board[index(column, row)].type; - if (type == myType) - return true; - if (goDownInstead) - return floodMoveCheck(column + 1, row, myType, goDownInstead) || - floodMoveCheck(column, row + 1, myType, goDownInstead); - else - return floodMoveCheck(column + 1, row, myType) || - floodMoveCheck(column, row - 1, myType); -} - -function createBlock(column,row,type) -{ - // Note that we don't wait for the component to become ready. This will - // only work if the block QML is a local file. Otherwise the component will - // not be ready immediately. There is a statusChanged signal on the - // component you could use if you want to wait to load remote files. - if (component.status == 1){ - if (type == undefined) - type = Math.floor(Math.random() * types); - if (type < 0 || type > 4) { - console.log("Invalid type requested");//TODO: Is this triggered by custom levels much? - return; - } - var dynamicObject = component.createObject(gameCanvas, - {"type": type, - "x": column*Settings.blockSize, - "y": -1*Settings.blockSize, - "width": Settings.blockSize, - "height": Settings.blockSize, - "particleSystem": gameCanvas.ps}); - if (dynamicObject == null){ - console.log("error creating block"); - console.log(component.errorString()); - return false; - } - dynamicObject.y = row*Settings.blockSize; - dynamicObject.spawned = true; - - board[index(column,row)] = dynamicObject; - }else{ - console.log("error loading block component"); - console.log(component.errorString()); - return false; - } - return true; -} - -function showPuzzleError(str) -{ - //TODO: Nice user visible UI? - console.log(str); -} - -function loadMap(map) -{ - puzzlePath = map; - var levelComp = Qt.createComponent(puzzlePath); - if (levelComp.status != 1){ - console.log("Error loading level"); - showPuzzleError(levelComp.errorString()); - return; - } - puzzleLevel = levelComp.createObject(); - if (puzzleLevel == null || !puzzleLevel.startingGrid instanceof Array) { - showPuzzleError("Bugger!"); - return; - } - gameCanvas.showPuzzleGoal(puzzleLevel.goalText); - //showPuzzleGoal should call finishLoadingMap as the next thing it does, before handling more events -} - -function finishLoadingMap() -{ - for (var i in puzzleLevel.startingGrid) - if (! (puzzleLevel.startingGrid[i] >= 0 && puzzleLevel.startingGrid[i] <= 9) ) - puzzleLevel.startingGrid[i] = 0; - //TODO: Don't allow loading larger levels, leads to cheating - while (puzzleLevel.startingGrid.length > maxIndex) puzzleLevel.startingGrid.shift(); - while (puzzleLevel.startingGrid.length < maxIndex) puzzleLevel.startingGrid.unshift(0); - for (var i in puzzleLevel.startingGrid) - if (puzzleLevel.startingGrid[i] > 0) - createBlock(i % maxColumn, Math.floor(i / maxColumn), puzzleLevel.startingGrid[i] - 1); - - //### Experimental feature - allow levels to contain arbitrary QML scenes as well! - //while (puzzleLevel.children.length) - // puzzleLevel.children[0].parent = gameCanvas; - gameDuration = new Date(); //Don't start until we finish loading -} - -function puzzleVictoryCheck(clearedAll)//gameOver has also been set if no more moves -{ - var won = true; - var soFar = new Date() - gameDuration; - if (puzzleLevel.scoreTarget != -1 && gameCanvas.score < puzzleLevel.scoreTarget){ - won = false; - } if (puzzleLevel.scoreTarget != -1 && gameCanvas.score >= puzzleLevel.scoreTarget && !puzzleLevel.mustClear){ - gameOver = true; - } if (puzzleLevel.timeTarget != -1 && soFar/1000.0 > puzzleLevel.timeTarget){ - gameOver = true; - } if (puzzleLevel.moveTarget != -1 && gameCanvas.moves >= puzzleLevel.moveTarget){ - gameOver = true; - } if (puzzleLevel.mustClear && gameOver && !clearedAll) { - won = false; - } - - if (gameOver) { - gameCanvas.gameOver = true; - gameCanvas.showPuzzleEnd(won); - - if (won) { - // Store progress - saveLevelHistory(); - } - } -} - -function getHighScore() -{ - var db = Sql.LocalStorage.openDatabaseSync( - "SameGame", - "2.0", - "SameGame Local Data", - 100 - ); - db.transaction( - function(tx) { - tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(game TEXT, score NUMBER, gridSize TEXT, time NUMBER)'); - // Only show results for the current grid size - var rs = tx.executeSql('SELECT * FROM Scores WHERE gridSize = "' - + maxColumn + "x" + maxRow + '" AND game = "' + gameMode + '" ORDER BY score desc'); - if (rs.rows.length > 0) - gameCanvas.highScore = rs.rows.item(0).score; - else - gameCanvas.highScore = 0; - } - ); -} - -function saveHighScore(score) -{ - // Offline storage - var db = Sql.LocalStorage.openDatabaseSync( - "SameGame", - "2.0", - "SameGame Local Data", - 100 - ); - var dataStr = "INSERT INTO Scores VALUES(?, ?, ?, ?)"; - var data = [ - gameMode, - score, - maxColumn + "x" + maxRow, - Math.floor(gameDuration / 1000) - ]; - if (score >= gameCanvas.highScore)//Update UI field - gameCanvas.highScore = score; - - db.transaction( - function(tx) { - tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(game TEXT, score NUMBER, gridSize TEXT, time NUMBER)'); - tx.executeSql(dataStr, data); - } - ); -} - -function getLevelHistory() -{ - var db = Sql.LocalStorage.openDatabaseSync( - "SameGame", - "2.0", - "SameGame Local Data", - 100 - ); - db.transaction( - function(tx) { - tx.executeSql('CREATE TABLE IF NOT EXISTS Puzzle(level TEXT, score NUMBER, moves NUMBER, time NUMBER)'); - var rs = tx.executeSql('SELECT * FROM Puzzle WHERE level = "' + puzzlePath + '" ORDER BY score desc'); - if (rs.rows.length > 0) { - gameCanvas.puzzleWon = true; - gameCanvas.highScore = rs.rows.item(0).score; - } else { - gameCanvas.puzzleWon = false; - gameCanvas.highScore = 0; - } - } - ); -} - -function saveLevelHistory() -{ - var db = Sql.LocalStorage.openDatabaseSync( - "SameGame", - "2.0", - "SameGame Local Data", - 100 - ); - var dataStr = "INSERT INTO Puzzle VALUES(?, ?, ?, ?)"; - var data = [ - puzzlePath, - gameCanvas.score, - gameCanvas.moves, - Math.floor(gameDuration / 1000) - ]; - gameCanvas.puzzleWon = true; - - db.transaction( - function(tx) { - tx.executeSql('CREATE TABLE IF NOT EXISTS Puzzle(level TEXT, score NUMBER, moves NUMBER, time NUMBER)'); - tx.executeSql(dataStr, data); - } - ); -} - -function nuke() //For "Debug mode" -{ - for (var row = 1; row <= 5; row++) { - for (var col = 0; col < 5; col++) { - if (board[index(col, maxRow - row)] != null) { - board[index(col, maxRow - row)].dying = true; - board[index(col, maxRow - row)] = null; - } - } - } - if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) - shuffleUp(); - else - shuffleDown(); - if (gameMode == "endless") - refill(); - else - victoryCheck(); -} diff --git a/basicsuite/Qt5 Launch Presentation/samegame/settings.js b/basicsuite/Qt5 Launch Presentation/samegame/settings.js deleted file mode 100644 index e09dee9..0000000 --- a/basicsuite/Qt5 Launch Presentation/samegame/settings.js +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -.pragma library - -//This should be switched over once a proper QML settings API exists - -var menuDelay = 500 - -var headerHeight = 20 // 70 on BB10 -var footerHeight = 44 // 100 on BB10 - -var fontPixelSize = 14 // 55 on BB10 - -var blockSize = 32 // 64 on BB10 - -var toolButtonHeight = 32 // 64 on BB10 - -var menuButtonSpacing = 0 // 15 on BB10 diff --git a/basicsuite/Qt5 Particles Demo/Qt5 Particles Demo.qmlproject b/basicsuite/Qt5 Particles Demo/Qt5 Particles Demo.qmlproject deleted file mode 100644 index 4d32f75..0000000 --- a/basicsuite/Qt5 Particles Demo/Qt5 Particles Demo.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/Qt5 Particles Demo/content/burstandpulse.qml b/basicsuite/Qt5 Particles Demo/content/burstandpulse.qml deleted file mode 100644 index c44c8dc..0000000 --- a/basicsuite/Qt5 Particles Demo/content/burstandpulse.qml +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Rectangle { - width: 320 - height: 480 - color: "black" - property bool lastWasPulse: false - Timer { - interval: 3500 - triggeredOnStart: true - running: true - repeat: true - onTriggered: { - //! [0] - if (lastWasPulse) { - burstEmitter.burst(500); - lastWasPulse = false; - } else { - pulseEmitter.pulse(500); - lastWasPulse = true; - } - //! [0] - } - } - ParticleSystem { - id: particles - anchors.fill: parent - ImageParticle { - source: "../images/star.png" - alpha: 0 - colorVariation: 0.6 - } - - Emitter { - id: burstEmitter - x: parent.width/2 - y: parent.height/3 - emitRate: 1000 - lifeSpan: 2000 - enabled: false - velocity: AngleDirection{magnitude: 64; angleVariation: 360} - size: 24 - sizeVariation: 8 - Text { - anchors.centerIn: parent - color: "white" - font.pixelSize: 18 - text: "Burst" - } - } - Emitter { - id: pulseEmitter - x: parent.width/2 - y: 2*parent.height/3 - emitRate: 1000 - lifeSpan: 2000 - enabled: false - velocity: AngleDirection{magnitude: 64; angleVariation: 360} - size: 24 - sizeVariation: 8 - Text { - anchors.centerIn: parent - color: "white" - font.pixelSize: 18 - text: "Pulse" - } - } - } -} diff --git a/basicsuite/Qt5 Particles Demo/content/customemitter.qml b/basicsuite/Qt5 Particles Demo/content/customemitter.qml deleted file mode 100644 index bcf7da3..0000000 --- a/basicsuite/Qt5 Particles Demo/content/customemitter.qml +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -ParticleSystem { - id: sys - width: 360 - height: 600 - running: true - Rectangle { - z: -1 - anchors.fill: parent - color: "black" - } - - property real petalLength: 180 - property real petalRotation: 0 - NumberAnimation on petalRotation { - from: 0; - to: 360; - loops: -1; - running: true - duration: 24000 - } - - function convert(a) {return a*(Math.PI/180);} - Emitter { - lifeSpan: 4000 - emitRate: 120 - size: 12 - anchors.centerIn: parent - //! [0] - onEmitParticles: { - for (var i=0; i - - emitters.qml - content/burstandpulse.qml - content/customemitter.qml - content/emitmask.qml - content/maximumemitted.qml - content/shapeanddirection.qml - content/trailemitter.qml - content/velocityfrommotion.qml - - diff --git a/basicsuite/Qt5 Particles Demo/images/_explo.png b/basicsuite/Qt5 Particles Demo/images/_explo.png deleted file mode 100644 index 4297245..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/_explo.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/backgroundLeaves.jpg b/basicsuite/Qt5 Particles Demo/images/backgroundLeaves.jpg deleted file mode 100755 index 08be167..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/backgroundLeaves.jpg and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/bear_tiles.png b/basicsuite/Qt5 Particles Demo/images/bear_tiles.png deleted file mode 100644 index 6bbb2a9..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/bear_tiles.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/candle.png b/basicsuite/Qt5 Particles Demo/images/candle.png deleted file mode 100644 index 8fa3193..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/candle.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/colortable.png b/basicsuite/Qt5 Particles Demo/images/colortable.png deleted file mode 100644 index a62ceeb..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/colortable.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/finalfrontier.png b/basicsuite/Qt5 Particles Demo/images/finalfrontier.png deleted file mode 100644 index 2ba1815..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/finalfrontier.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/flower.png b/basicsuite/Qt5 Particles Demo/images/flower.png deleted file mode 100644 index b5c6062..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/flower.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/matchmask.png b/basicsuite/Qt5 Particles Demo/images/matchmask.png deleted file mode 100644 index e575875..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/matchmask.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/meteor.png b/basicsuite/Qt5 Particles Demo/images/meteor.png deleted file mode 100644 index e8c368a..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/meteor.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/meteor_explo.png b/basicsuite/Qt5 Particles Demo/images/meteor_explo.png deleted file mode 100644 index e659bfe..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/meteor_explo.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/meteors.png b/basicsuite/Qt5 Particles Demo/images/meteors.png deleted file mode 100644 index bada8a1..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/meteors.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/nullRock.png b/basicsuite/Qt5 Particles Demo/images/nullRock.png deleted file mode 100644 index 4076327..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/nullRock.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/particle.png b/basicsuite/Qt5 Particles Demo/images/particle.png deleted file mode 100644 index 5c83896..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/particle.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/particle2.png b/basicsuite/Qt5 Particles Demo/images/particle2.png deleted file mode 100644 index 36349c6..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/particle2.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/particle3.png b/basicsuite/Qt5 Particles Demo/images/particle3.png deleted file mode 100644 index 905d8f3..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/particle3.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/particle4.png b/basicsuite/Qt5 Particles Demo/images/particle4.png deleted file mode 100644 index bc95b70..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/particle4.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/particleA.png b/basicsuite/Qt5 Particles Demo/images/particleA.png deleted file mode 100644 index c63acde..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/particleA.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/portal_bg.png b/basicsuite/Qt5 Particles Demo/images/portal_bg.png deleted file mode 100644 index 3c59eea..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/portal_bg.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/realLeaf1.png b/basicsuite/Qt5 Particles Demo/images/realLeaf1.png deleted file mode 100644 index 6cabf29..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/realLeaf1.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/realLeaf2.png b/basicsuite/Qt5 Particles Demo/images/realLeaf2.png deleted file mode 100644 index bfeca86..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/realLeaf2.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/realLeaf3.png b/basicsuite/Qt5 Particles Demo/images/realLeaf3.png deleted file mode 100644 index b1071e8..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/realLeaf3.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/realLeaf4.png b/basicsuite/Qt5 Particles Demo/images/realLeaf4.png deleted file mode 100644 index d61d53d..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/realLeaf4.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/rocket.png b/basicsuite/Qt5 Particles Demo/images/rocket.png deleted file mode 100644 index a171610..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/rocket.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/rocket2.png b/basicsuite/Qt5 Particles Demo/images/rocket2.png deleted file mode 100644 index 7110f8f..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/rocket2.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/sizeInOut.png b/basicsuite/Qt5 Particles Demo/images/sizeInOut.png deleted file mode 100644 index 0a306ea..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/sizeInOut.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/snowflake.png b/basicsuite/Qt5 Particles Demo/images/snowflake.png deleted file mode 100644 index 490887a..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/snowflake.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/sparkleSize.png b/basicsuite/Qt5 Particles Demo/images/sparkleSize.png deleted file mode 100644 index 7520565..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/sparkleSize.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/star.png b/basicsuite/Qt5 Particles Demo/images/star.png deleted file mode 100644 index 0d592cf..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/star.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/starfish_0.png b/basicsuite/Qt5 Particles Demo/images/starfish_0.png deleted file mode 100644 index 8747f02..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/starfish_0.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/starfish_1.png b/basicsuite/Qt5 Particles Demo/images/starfish_1.png deleted file mode 100644 index 1f3f159..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/starfish_1.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/starfish_2.png b/basicsuite/Qt5 Particles Demo/images/starfish_2.png deleted file mode 100644 index c6c7e5a..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/starfish_2.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/starfish_3.png b/basicsuite/Qt5 Particles Demo/images/starfish_3.png deleted file mode 100644 index 307a89f..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/starfish_3.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/starfish_4.png b/basicsuite/Qt5 Particles Demo/images/starfish_4.png deleted file mode 100644 index d61c265..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/starfish_4.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/images/starfish_mask.png b/basicsuite/Qt5 Particles Demo/images/starfish_mask.png deleted file mode 100644 index 2ef74f9..0000000 Binary files a/basicsuite/Qt5 Particles Demo/images/starfish_mask.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/main.cpp b/basicsuite/Qt5 Particles Demo/main.cpp deleted file mode 100644 index 66e7ce4..0000000 --- a/basicsuite/Qt5 Particles Demo/main.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include "../../shared/shared.h" -DECLARATIVE_EXAMPLE_MAIN(particles/emitters/emitters) diff --git a/basicsuite/Qt5 Particles Demo/main.qml b/basicsuite/Qt5 Particles Demo/main.qml deleted file mode 100644 index 2b9a338..0000000 --- a/basicsuite/Qt5 Particles Demo/main.qml +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "shared" as Examples - -Item { - height: 480 - width: 320 - Examples.LauncherList { - id: ll - anchors.fill: parent - Component.onCompleted: { - addExample("Velocity from Motion", "Particle motion just by moving emitters", Qt.resolvedUrl("content/velocityfrommotion.qml")); - addExample("Burst and Pulse", "Emit imperatively", Qt.resolvedUrl("content/burstandpulse.qml")); - addExample("Custom Emitter", "Custom starting state", Qt.resolvedUrl("content/customemitter.qml")); - addExample("Emit Mask", "Emit arbitrary shapes", Qt.resolvedUrl("content/emitmask.qml")); - addExample("Maximum Emitted", "Put a limit on emissions", Qt.resolvedUrl("content/maximumemitted.qml")); - addExample("Shape and Direction", "Creates a portal effect", Qt.resolvedUrl("content/shapeanddirection.qml")); - addExample("TrailEmitter", "Emit from other particles", Qt.resolvedUrl("content/trailemitter.qml")); - } - } -} diff --git a/basicsuite/Qt5 Particles Demo/preview_l.jpg b/basicsuite/Qt5 Particles Demo/preview_l.jpg deleted file mode 100644 index fa0db59..0000000 Binary files a/basicsuite/Qt5 Particles Demo/preview_l.jpg and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/shared/Button.qml b/basicsuite/Qt5 Particles Demo/shared/Button.qml deleted file mode 100644 index 9bbc01a..0000000 --- a/basicsuite/Qt5 Particles Demo/shared/Button.qml +++ /dev/null @@ -1,91 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: container - - property string text: "Button" - property string subText: "" - signal clicked - property alias containsMouse: mouseArea.containsMouse - property alias pressed: mouseArea.pressed - implicitHeight: col.height - height: implicitHeight - width: buttonLabel.width + 20 - - MouseArea { - id: mouseArea - anchors.fill: parent - onClicked: container.clicked() - hoverEnabled: true - } - - Column { - spacing: 2 - id: col - anchors.verticalCenter: parent.verticalCenter - width: parent.width - Text { - id: buttonLabel - anchors.left: parent.left - anchors.leftMargin: 10 - anchors.right: parent.right - anchors.rightMargin: 10 - text: container.text - color: "black" - font.pixelSize: 22 - wrapMode: Text.WrapAtWordBoundaryOrAnywhere - styleColor: "white" - style: Text.Raised - - } - Text { - id: buttonLabel2 - anchors.left: parent.left - anchors.leftMargin: 10 - text: container.subText - wrapMode: Text.WrapAtWordBoundaryOrAnywhere - color: "#666" - font.pixelSize: 12 - } - } -} diff --git a/basicsuite/Qt5 Particles Demo/shared/LauncherList.qml b/basicsuite/Qt5 Particles Demo/shared/LauncherList.qml deleted file mode 100644 index 4336cf3..0000000 --- a/basicsuite/Qt5 Particles Demo/shared/LauncherList.qml +++ /dev/null @@ -1,148 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Item { - //model is a list of {"name":"somename", "url":"file:///some/url/mainfile.qml"} - //function used to add to model A) to enforce scheme B) to allow Qt.resolveUrl in url assignments - - function addExample(name, desc, url) - { - myModel.append({"name":name, "description":desc, "url":url}) - } - function hideExample() - { - ei.visible = false; - } - - ListView { - clip: true - delegate: SimpleLauncherDelegate{exampleItem: ei} - model: ListModel {id:myModel} - anchors.fill: parent - visible: !ei.visible - } - - Item { - id: ei - visible: false - clip: true - property url exampleUrl - onExampleUrlChanged: visible = (exampleUrl == '' ? false : true); //Setting exampleUrl automatically shows example - anchors.fill: parent - anchors.bottomMargin: 40 - MouseArea{ - anchors.fill: parent - enabled: ei.visible - //Eats mouse events - } - Loader{ - focus: true - source: ei.exampleUrl - anchors.fill: parent - } - } - Rectangle { - id: bar - visible: ei.visible - anchors.bottom: parent.bottom - width: parent.width - height: 40 - - Rectangle { - height: 1 - color: "#ccc" - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - } - - Rectangle { - height: 1 - color: "#fff" - anchors.top: parent.top - anchors.topMargin: 1 - anchors.left: parent.left - anchors.right: parent.right - } - - gradient: Gradient { - GradientStop { position: 0 ; color: "#eee" } - GradientStop { position: 1 ; color: "#ccc" } - } - - MouseArea{ - anchors.fill: parent - enabled: ei.visible - //Eats mouse events - } - - Image { - id: back - source: "images/back.png" - anchors.verticalCenter: parent.verticalCenter - anchors.verticalCenterOffset: 2 - anchors.left: parent.left - anchors.leftMargin: 16 - - MouseArea { - id: mouse - hoverEnabled: true - anchors.centerIn: parent - width: 38 - height: 31 - anchors.verticalCenterOffset: -1 - onClicked: ei.exampleUrl = "" - Rectangle { - anchors.fill: parent - opacity: mouse.pressed ? 1 : 0 - Behavior on opacity { NumberAnimation{ duration: 100 }} - gradient: Gradient { - GradientStop { position: 0 ; color: "#22000000" } - GradientStop { position: 0.2 ; color: "#11000000" } - } - border.color: "darkgray" - antialiasing: true - radius: 4 - } - } - } - } -} diff --git a/basicsuite/Qt5 Particles Demo/shared/README b/basicsuite/Qt5 Particles Demo/shared/README deleted file mode 100644 index bf16f23..0000000 --- a/basicsuite/Qt5 Particles Demo/shared/README +++ /dev/null @@ -1,11 +0,0 @@ -These files are shared between multiple examples as a set of common and -reusuable components. While they do demonstrate the building of reusable -components in QML, they are not official examples themselves. -Consequently they do not have entries in the Qt documentation, and are -documented only through the code comments within the files. Developers -new to QML are strongly encouraged to go through the official examples -before delving into this directory. - -For most application use, see the Qt Quick Components project to find -ready-made Components you can use in your own projects. Qt Declarative -examples do not use them only to avoid external dependencies. diff --git a/basicsuite/Qt5 Particles Demo/shared/SimpleLauncherDelegate.qml b/basicsuite/Qt5 Particles Demo/shared/SimpleLauncherDelegate.qml deleted file mode 100644 index e891266..0000000 --- a/basicsuite/Qt5 Particles Demo/shared/SimpleLauncherDelegate.qml +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: container - property Item exampleItem - width: ListView.view.width - height: button.implicitHeight + 22 - - gradient: Gradient { - GradientStop { - position: 0 - Behavior on color {ColorAnimation { duration: 100 }} - color: button.pressed ? "#e0e0e0" : "#fff" - } - GradientStop { - position: 1 - Behavior on color {ColorAnimation { duration: 100 }} - color: button.pressed ? "#e0e0e0" : button.containsMouse ? "#f5f5f5" : "#eee" - } - } - - Image { - id: image - opacity: 0.7 - Behavior on opacity {NumberAnimation {duration: 100}} - source: "images/next.png" - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 16 - } - - Button { - id: button - anchors.top: parent.top - anchors.left: parent.left - anchors.bottom: parent.bottom - anchors.right:image.left - text: name - subText: description - onClicked: exampleItem.exampleUrl = url; - } - - Rectangle { - height: 1 - color: "#ccc" - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - } -} diff --git a/basicsuite/Qt5 Particles Demo/shared/images/back.png b/basicsuite/Qt5 Particles Demo/shared/images/back.png deleted file mode 100644 index 5340209..0000000 Binary files a/basicsuite/Qt5 Particles Demo/shared/images/back.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/shared/images/next.png b/basicsuite/Qt5 Particles Demo/shared/images/next.png deleted file mode 100644 index cdef8db..0000000 Binary files a/basicsuite/Qt5 Particles Demo/shared/images/next.png and /dev/null differ diff --git a/basicsuite/Qt5 Particles Demo/shared/qmldir b/basicsuite/Qt5 Particles Demo/shared/qmldir deleted file mode 100644 index 2f1e56a..0000000 --- a/basicsuite/Qt5 Particles Demo/shared/qmldir +++ /dev/null @@ -1,3 +0,0 @@ -Button 2.0 Button.qml -LauncherList 2.0 LauncherList.qml -SimpleLauncherDelegate 2.0 SimpleLauncherDelegate.qml diff --git a/basicsuite/Qt5 Particles Demo/shared/quick_shared.qrc b/basicsuite/Qt5 Particles Demo/shared/quick_shared.qrc deleted file mode 100644 index 9fc114d..0000000 --- a/basicsuite/Qt5 Particles Demo/shared/quick_shared.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - LauncherList.qml - SimpleLauncherDelegate.qml - Button.qml - images/back.png - - diff --git a/basicsuite/Qt5 Particles Demo/shared/shared.h b/basicsuite/Qt5 Particles Demo/shared/shared.h deleted file mode 100644 index eab15f3..0000000 --- a/basicsuite/Qt5 Particles Demo/shared/shared.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include -#include -#define DECLARATIVE_EXAMPLE_MAIN(NAME) int main(int argc, char* argv[]) \ -{\ - QGuiApplication app(argc,argv);\ - QQuickView view;\ - view.connect(view.engine(), SIGNAL(quit()), &app, SLOT(quit()));\ - view.setSource(QUrl("qrc:///" #NAME ".qml")); \ - if (QGuiApplication::platformName() == QLatin1String("qnx") || \ - QGuiApplication::platformName() == QLatin1String("eglfs")) {\ - view.setResizeMode(QQuickView::SizeRootObjectToView);\ - view.showFullScreen();\ - } else {\ - view.show();\ - }\ - return app.exec();\ -} diff --git a/basicsuite/Qt5 Particles Demo/shared/shared.qrc b/basicsuite/Qt5 Particles Demo/shared/shared.qrc deleted file mode 100644 index 4ac856e..0000000 --- a/basicsuite/Qt5 Particles Demo/shared/shared.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - LauncherList.qml - SimpleLauncherDelegate.qml - Button.qml - images/back.png - - diff --git a/basicsuite/Qt5Everywhere/Button.qml b/basicsuite/Qt5Everywhere/Button.qml deleted file mode 100644 index 43e93b8..0000000 --- a/basicsuite/Qt5Everywhere/Button.qml +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - width: (app.height + app.width) * 0.04 - height: width - - property string imageSource : "" - property double rotation: 0 - signal clicked() - - Image { - id: buttonImage - anchors.fill: root - anchors.margins: 0 - source: root.imageSource - opacity: 1.0 - rotation: root.rotation - } - - MouseArea { - id: buttonMouseArea - anchors.fill: root - anchors.margins: -20 - hoverEnabled: true - onClicked: root.clicked() - onEntered: buttonImage.anchors.margins = -(root.width * 0.1) - onExited: buttonImage.anchors.margins = 0 - onPressed: {buttonImage.opacity = 0.7; buttonImage.anchors.margins = -(root.width * 0.1)} - onReleased: { buttonImage.opacity = 1.0; buttonImage.anchors.margins = 0} - } -} diff --git a/basicsuite/Qt5Everywhere/Cloud.qml b/basicsuite/Qt5Everywhere/Cloud.qml deleted file mode 100644 index b399308..0000000 --- a/basicsuite/Qt5Everywhere/Cloud.qml +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: cloudRoot - x: app.width - y: randomY+deltaY - width: app.width*0.2 - height: width*0.4 - - property int duration: 20000 - property string sourceImage: "" - property real deltaY: 0 - property real randomY: app.height*0.3 - property real amplitudeY: app.height*0.2 - - function start() { - recalculate() - cloudXAnimation.restart(); - cloudYAnimation.restart(); - } - - function recalculate() { - cloudRoot.duration = Math.random()*15000 + 10000 - cloudRoot.x = app.width - cloudRoot.randomY = Math.random()*app.height - cloudRoot.width = app.width*0.2 - cloudRoot.height = cloudRoot.width*0.4 - cloudRoot.scale = Math.random()*0.6 + 0.7 - } - - Image { - id: cloud - anchors.fill: cloudRoot - source: cloudRoot.sourceImage - } - - SequentialAnimation{ - id: cloudYAnimation - NumberAnimation { target: cloudRoot; property: "deltaY"; duration: cloudRoot.duration*0.3; from: 0; to:cloudRoot.amplitudeY; easing.type: Easing.InOutQuad } - NumberAnimation { target: cloudRoot; property: "deltaY"; duration: cloudRoot.duration*0.3; from: cloudRoot.amplitudeY; to:0; easing.type: Easing.InOutQuad } - running: true - onRunningChanged: { - if (!running) { - cloudRoot.amplitudeY = Math.random() * (app.height*0.2) - restart() - } - } - } - - NumberAnimation { - id: cloudXAnimation - target: cloudRoot - property: "x" - duration: cloudRoot.duration - to:-cloudRoot.width - running: true - - onRunningChanged: { - if (!running) { - recalculate() - restart() - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/DialogButton.qml b/basicsuite/Qt5Everywhere/DialogButton.qml deleted file mode 100644 index 7f24e5d..0000000 --- a/basicsuite/Qt5Everywhere/DialogButton.qml +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: button - radius: 10 - height: 0.3 * dialog.height - width: dialog.width * 0.5 - dialog.dialogMargin - color: "transparent" - - property string buttonText - signal clicked() - - Text { - anchors.centerIn: parent - text: button.buttonText - font.pixelSize: 0.4 * button.height - color: "#ffffff" - } - - MouseArea { - anchors.fill: parent - onPressed: parent.color = Qt.rgba(0.2, 0.2, 0.2, 0.4) - onReleased: parent.color = "transparent" - onClicked: button.clicked() - } -} diff --git a/basicsuite/Qt5Everywhere/Element.qml b/basicsuite/Qt5Everywhere/Element.qml deleted file mode 100644 index 097a3fc..0000000 --- a/basicsuite/Qt5Everywhere/Element.qml +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - width: 1 - height: 1 - - property int itemId : 1 - - Image { - id: elementImage - anchors.centerIn: root - z: 5 - } - - Component.onCompleted: { - elementImage.source = root.itemId === 1 ? "images/tree1.png" : - root.itemId === 2 ? "images/tree2.png" : - root.itemId === 3 ? "images/mountain.png" : - root.itemId === 4 ? "images/stones.png" : - root.itemId === 5 ? "images/box_open.png" : - root.itemId === 6 ? "images/box.png" : - root.itemId === 10 ? "images/character0.png" : - root.itemId === 11 ? "images/character1.png" : - root.itemId === 12 ? "images/character3.png" : - root.itemId === 13 ? "images/character7.png" : - root.itemId === 14 ? "images/character8.png" : - root.itemId === 15 ? "images/character9.png" : - root.itemId === 20 ? "images/character2.png" : - root.itemId === 21 ? "images/character4.png" : - root.itemId === 22 ? "images/character5.png" : - root.itemId === 23 ? "images/character6.png" : - root.itemId === 24 ? "images/character10.png" : - "" - } -} diff --git a/basicsuite/Qt5Everywhere/Group.qml b/basicsuite/Qt5Everywhere/Group.qml deleted file mode 100644 index 6ee3304..0000000 --- a/basicsuite/Qt5Everywhere/Group.qml +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "style.js" as Style - -Item { - id: group - objectName: "group" - - property int uid: 0 - property real targetScale: 1 - property int textX: 0 - property int textY: 0 - property string name: "Text" - property real imageScale: 6.0 - - property int fontSize: 160 - property string uiFont: Style.FONT_FAMILY - property bool bold: true - property int fontTransition: 6 - - Text { - text: group.name - x: textX - y: textY - font.pixelSize: group.fontSize - font.family: Style.FONT_FAMILY - font.bold: group.bold - color: "#42200a" - smooth: true - - Text { - text: group.name - color: "#1d6cb0" - x:group.fontTransition - y:-group.fontTransition - font.pixelSize: group.fontSize - font.family: Style.FONT_FAMILY - font.bold: group.bold - smooth: true - } - } -} diff --git a/basicsuite/Qt5Everywhere/HelpScreen.qml b/basicsuite/Qt5Everywhere/HelpScreen.qml deleted file mode 100644 index 3fb540c..0000000 --- a/basicsuite/Qt5Everywhere/HelpScreen.qml +++ /dev/null @@ -1,329 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "style.js" as Style - -Item { - id: root - anchors.fill:parent - property int delay: 500 - property int rotationAngle:0 - - SequentialAnimation { - id: closeAnimation - - ScriptAction{ - script: { - pointer.visible = false - instructionText.text = "" - instructionText2.text = "" - highlightImage.smooth = false - highlight.size = Math.max(root.height, root.width)*2.5 - } - } - - PauseAnimation { duration: root.delay } - - onRunningChanged: if (!running){ - stopAnimations() - root.visible=false - highlight.size=0 - highlightImage.smooth = true - } - } - - - Item{ - id: highlight - property int size: 0 - property bool hidden: false - width:1 - height:1 - Behavior on x {NumberAnimation{duration: root.delay}} - Behavior on y {NumberAnimation{duration: root.delay}} - Behavior on size {id: sizeBehavior; NumberAnimation{duration: root.delay}} - } - - Image{ - id: highlightImage - anchors.centerIn: highlight - width: highlight.hidden? 0: highlight.size - height: highlight.hidden? 0: highlight.size - source: "images/highlight_mask.png" - opacity: .8 - smooth: true - } - - Rectangle{ - id: top - anchors {left:parent.left; top: parent.top; right: parent.right; bottom: highlightImage.top} - color: "black" - opacity: .8 - } - - Rectangle{ - id: bottom - anchors {left:parent.left; top: highlightImage.bottom; right: parent.right; bottom: parent.bottom} - color: "black" - opacity: .8 - } - - Rectangle{ - id: left - anchors {left:parent.left; top: highlightImage.top; right: highlightImage.left; bottom: highlightImage.bottom} - color: "black" - opacity: .8 - } - - Rectangle{ - id: right - anchors {left:highlightImage.right; top: highlightImage.top; right: parent.right; bottom: highlightImage.bottom} - color: "black" - opacity: .8 - } - - Text{ - id: instructionText - anchors {horizontalCenter: parent.horizontalCenter; top: parent.top; topMargin: parent.height*.05} - text: "" - font.pixelSize: parent.width*.075 - font.family: Style.FONT_FAMILY - smooth: true - color: "white" - - Text{ - id: instructionText2 - anchors {horizontalCenter: parent.horizontalCenter; top: parent.bottom; topMargin: -parent.height/2} - text: "" - font.pixelSize: parent.font.pixelSize - font.family: Style.FONT_FAMILY - smooth: true - color: "white" - } - } - - Item{ - id: pointer - width: parent.width*.3 - height: parent.width*.3 - - Image{ - id: handImage - width: parent.width*.8 - height: width - source: "images/hand.png" - y: parent.height/2-height/2 - x: parent.width/2-width/2+deltaX - property int deltaX:0 - anchors.verticalCenter: parent.verticalCenter - rotation: 90 - - SequentialAnimation{ - id: pointingAnimation - PauseAnimation { duration: root.delay} - NumberAnimation{ - target: handImage - property: "deltaX" - from: -handImage.width*.2 - to: handImage.width*.2 - duration: 500 - easing.type: Easing.InOutCubic - } - PauseAnimation { duration: 200 } - NumberAnimation{ - target: handImage - property: "deltaX" - from: handImage.width*.2 - to: -handImage.width*.2 - duration: 500 - easing.type: Easing.InOutCubic - - } - } - - } - } - - SequentialAnimation { - id: helpAnimation - loops: Animation.Infinite - - PauseAnimation { duration: 1000 } - PropertyAction { target: handImage; property: "mirror"; value: true} - PropertyAction { target: instructionText; property: "text"; value: "Tap on the devices to"} - PropertyAction { target: instructionText2; property: "text"; value: "open applications"} - PropertyAction { target: pointer; property: "visible"; value: true} - PropertyAction { target: highlight; property: "hidden"; value: false} - - SequentialAnimation { - id: clickAnimation - property int index: 0 - property variant uids: [8,12] - loops: 2 - - ScriptAction{ - script: { - clickAnimation.index+=1 - if (clickAnimation.index>=clickAnimation.uids.length) clickAnimation.index=0 - } - } - - ScriptAction{ - script: { - highlight.size= (700+clickAnimation.index*100)*canvas.scalingFactor - - highlight.x=root.width/2 +getPosition(clickAnimation.uids[clickAnimation.index]).x*canvas.scalingFactor - highlight.y=root.height/2 +getPosition(clickAnimation.uids[clickAnimation.index]).y*canvas.scalingFactor - - pointer.x= root.width/2 -pointer.width/2 +getPosition(clickAnimation.uids[clickAnimation.index]).x*canvas.scalingFactor*.5 - pointer.y= root.height/2 -pointer.height/2 +getPosition(clickAnimation.uids[clickAnimation.index]).y*canvas.scalingFactor*.5 - pointer.rotation=Math.atan2(getPosition(clickAnimation.uids[clickAnimation.index]).y*canvas.scalingFactor, getPosition(clickAnimation.uids[clickAnimation.index]).x*canvas.scalingFactor)*180.0/Math.PI - pointingAnimation.restart() - } - } - - PauseAnimation { duration: 3000 } - } - PauseAnimation { duration: 1000 } - - SequentialAnimation{ - id: navigationAnimation - PropertyAction { target: handImage; property: "mirror"; value: false} - PropertyAction { target: instructionText; property: "text"; value: "Use the Arrow to navigate"} - PropertyAction { target: instructionText2; property: "text"; value: "between applications"} - ScriptAction{ - script: { - highlight.size= Math.min(root.width, root.height)*.4 - - var _x=0; - var _y=0; - - if (root.width > root.height){ - _x = navigationPanel.x+navigationPanel.width /2 - _y = navigationPanel.y+navigationPanel.height*.33 - pointer.x= root.width/2 -pointer.width/2 +root.width*.2 - pointer.y= root.height/2 -pointer.height/2 - highlight.x=_x - highlight.y=_y - - }else{ - _x=navigationPanel.x+navigationPanel.width*.33 - _y=navigationPanel.y + navigationPanel.height /2 - pointer.x= root.width/2 -pointer.width/2 - pointer.y= root.height/2 -pointer.height/2 +root.height*.2 - highlight.x=_x - highlight.y=_y - } - - pointer.rotation=Math.atan2(_y-(pointer.y+pointer.height/2), _x-(pointer.x+pointer.width/2))*180.0/Math.PI - - pointingAnimation.restart() - } - } - PauseAnimation { duration: 5000 } - - PropertyAction { target: instructionText; property: "text"; value: "Use the Home button to"} - PropertyAction { target: instructionText2; property: "text"; value: "return to the beginning"} - ScriptAction{ - script: { - highlight.size= Math.min(root.width, root.height)*.3 - - var _x=0; - var _y=0; - - if (root.width > root.height){ - _x = navigationPanel.x+navigationPanel.width /2 - _y = navigationPanel.y+navigationPanel.height-navigationPanel.width /2 - pointer.x= root.width/2 -pointer.width/2 +root.width*.2 - pointer.y= root.height/2 -pointer.height/2 - highlight.x=_x - highlight.y=_y - - }else{ - _x=navigationPanel.x+navigationPanel.width-navigationPanel.height /2 - _y=navigationPanel.y + navigationPanel.height /2 - pointer.x= root.width/2 -pointer.width/2 - pointer.y= root.height/2 -pointer.height/2 +root.height*.2 - highlight.x=_x - highlight.y=_y - } - pointer.rotation=Math.atan2(_y-(pointer.y+pointer.height/2), _x-(pointer.x+pointer.width/2))*180.0/Math.PI - - pointingAnimation.restart() - } - } - PauseAnimation { duration: 5000 } - } - - } - - onWidthChanged: if (visible) show() - onHeightChanged: if (visible) show() - - function show(){ - highlight.hidden = true - - pointer.visible = false - rotationAngle = 0 - - startAnimations() - visible = true - } - - function startAnimations(){ - pointingAnimation.restart() - helpAnimation.restart() - } - - function stopAnimations(){ - pointingAnimation.stop() - helpAnimation.stop() - } - - MouseArea{ - anchors.fill: root - onClicked: { - stopAnimations() - closeAnimation.restart() - } - } -} - diff --git a/basicsuite/Qt5Everywhere/IslandElementContainer.qml b/basicsuite/Qt5Everywhere/IslandElementContainer.qml deleted file mode 100644 index c191d68..0000000 --- a/basicsuite/Qt5Everywhere/IslandElementContainer.qml +++ /dev/null @@ -1,158 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: elementContainer - - width: place == 2 ? parent.width : (islandWidth-parent.width)/2 - height: place == 2 ? 0.1*islandHeight : 0.4*islandHeight - x: place == 0 ? -width : place == 1 ? parent.width : 0 - y: place == 2 ? parent.height : (parent.height - height*0.6) - - property int place : 0 - property int itemWidth : islandWidth * 0.1 - property int islandWidth: 100 - property int islandHeight: 100 - - function createElement(xx, yy, itemId) { - var component = Qt.createComponent("Element.qml") - if (component.status === Component.Ready) - component.createObject(elementContainer, {"x": xx, "y": yy, "itemId": itemId}); - } - - function createElements() - { - // Left side - if (place === 0) { - var temp0 = Math.floor(Math.random()*6.9); - switch(temp0) { - case 0: - createElement(elementContainer.width*0.4, elementContainer.height*0.2, 1); - createElement(elementContainer.width*0.25, elementContainer.height*0.3, 1); - createElement(elementContainer.width*0.15, elementContainer.height*0.5, 1); - createElement(elementContainer.width*0.55, elementContainer.height*0.4, 1); - break; - case 1: - createElement(elementContainer.width*0.6, elementContainer.height*0.1, 1); - createElement(elementContainer.width*0.4, elementContainer.height*0.2, 1); - createElement(elementContainer.width*0.7, elementContainer.height*0.3, 1); - createElement(elementContainer.width*0.3, elementContainer.height*0.5, 1); - break; - case 2: - createElement(elementContainer.width*0.6, elementContainer.height*0.1, 3); - createElement(elementContainer.width*0.4, elementContainer.height*0.6, 4); - createElement(elementContainer.width*0.8, elementContainer.height*0.8, 4); - break; - case 3: - createElement(elementContainer.width*0.6, elementContainer.height*0.1, 3); - createElement(elementContainer.width*0.4, elementContainer.height*0.4, 1); - createElement(elementContainer.width*0.5, elementContainer.height*0.5, 2); - createElement(elementContainer.width*0.7, elementContainer.height*0.6, 2); - break; - case 4: - case 5: - var characterId = 10 + Math.floor(Math.random()*5.9); - createElement(elementContainer.width*0.7, elementContainer.height*0.3, characterId); - break; - default: break; - } - } - else if (place === 1) { - var temp1 = Math.floor(Math.random()*6.9); - switch(temp1) { - case 0: - createElement(elementContainer.width*0.6, elementContainer.height*0.2, 1); - createElement(elementContainer.width*0.75, elementContainer.height*0.3, 1); - createElement(elementContainer.width*0.85, elementContainer.height*0.5, 1); - createElement(elementContainer.width*0.45, elementContainer.height*0.4, 1); - break; - case 1: - createElement(elementContainer.width*0.4, elementContainer.height*0.1, 1); - createElement(elementContainer.width*0.6, elementContainer.height*0.2, 1); - createElement(elementContainer.width*0.3, elementContainer.height*0.3, 1); - createElement(elementContainer.width*0.7, elementContainer.height*0.5, 1); - break; - case 2: - createElement(elementContainer.width*0.4, elementContainer.height*0.1, 3); - createElement(elementContainer.width*0.6, elementContainer.height*0.6, 4); - createElement(elementContainer.width*0.2, elementContainer.height*0.8, 4); - break; - case 3: - createElement(elementContainer.width*0.4, elementContainer.height*0.1, 3); - createElement(elementContainer.width*0.6, elementContainer.height*0.4, 2); - createElement(elementContainer.width*0.5, elementContainer.height*0.5, 1); - createElement(elementContainer.width*0.3, elementContainer.height*0.6, 2); - break; - case 4: - case 5: - var characterId1 = 20 + Math.floor(Math.random()*4.9); - createElement(elementContainer.width*0.3, elementContainer.height*0.3, characterId1); - break; - default: break; - } - } - else { - var temp2 = Math.floor(Math.random()*4.9); - switch(temp2) { - case 0: - createElement(elementContainer.width*0.8, elementContainer.height*0.8, 5); - createElement(elementContainer.width*0.4, elementContainer.height*0.5, 5); - break; - case 1: - createElement(elementContainer.width*0.1, elementContainer.height*0.5, 1); - createElement(elementContainer.width*0.2, elementContainer.height*0.9, 2); - createElement(elementContainer.width*0.6, elementContainer.height*0.8, 4); - break; - case 2: - createElement(elementContainer.width*0.2, elementContainer.height*0.5, 6); - createElement(elementContainer.width*0.7, elementContainer.height*0.6, 2); - createElement(elementContainer.width*0.6, elementContainer.height*0.7, 1); - break; - case 3: - createElement(elementContainer.width*0.2, elementContainer.height*0.8, 6); - createElement(elementContainer.width*0.7, elementContainer.height*0.6, 6); - break; - default: break; - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/NavigationPanel.qml b/basicsuite/Qt5Everywhere/NavigationPanel.qml deleted file mode 100644 index e73cc7f..0000000 --- a/basicsuite/Qt5Everywhere/NavigationPanel.qml +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Grid { - id: root - - function checkOrientation() { - root.spacing = (app.height + app.width) * 0.02 - - if (app.width >= app.height) { - root.columns = 1 - root.anchors.bottom = undefined - root.anchors.horizontalCenter = undefined - root.anchors.right = app.right - root.anchors.verticalCenter = app.verticalCenter - root.anchors.rightMargin = app.width * 0.02 - root.anchors.bottomMargin = 0 - } - else { - root.columns = 3 - root.anchors.right = undefined - root.anchors.verticalCenter = undefined - root.anchors.bottom = app.bottom - root.anchors.horizontalCenter = app.horizontalCenter - root.anchors.rightMargin = 0 - root.anchors.bottomMargin = app.width * 0.02 - } - } - - Button { - id: nextButton - imageSource: "images/btn_next.png" - onClicked: canvas.goNext() - } - - Button { - id: prevButton - imageSource: "images/btn_previous.png" - onClicked: canvas.goPrevious() - } - - Button { - id: homeButton - imageSource: app.navigationState === 0 && !helpscreen.visible ? "images/btn_help.png" : "images/btn_home.png" - onClicked: { - if (app.navigationState===0){ - helpscreen.show() - return; - } - canvas.goBack() - } - } -} diff --git a/basicsuite/Qt5Everywhere/Qt5Everywhere.pro b/basicsuite/Qt5Everywhere/Qt5Everywhere.pro deleted file mode 100644 index 7168613..0000000 --- a/basicsuite/Qt5Everywhere/Qt5Everywhere.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS += \ - demos \ diff --git a/basicsuite/Qt5Everywhere/QtLogo.png b/basicsuite/Qt5Everywhere/QtLogo.png deleted file mode 100644 index 7b5c533..0000000 Binary files a/basicsuite/Qt5Everywhere/QtLogo.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/QuitDialog.qml b/basicsuite/Qt5Everywhere/QuitDialog.qml deleted file mode 100644 index 897afb9..0000000 --- a/basicsuite/Qt5Everywhere/QuitDialog.qml +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: root - anchors.fill: parent - color: Qt.rgba(0.0, 0.0, 0.0, 0.7) - - signal yes() - signal no() - - MouseArea { - anchors.fill: parent - } - - Rectangle { - id: dialog - anchors.centerIn: parent - width: dialogText.paintedWidth * 1.1 - height: parent.height * 0.3 - property double dialogMargin: height * 0.05 - - gradient: Gradient { - GradientStop { position: 0.0; color: "#222222" } - GradientStop { position: 0.3; color: "#000000" } - GradientStop { position: 1.0; color: "#111111" } - } - radius: 10 - border { color: "#999999"; width: 1 } - - Item { - id: content - anchors { left: parent.left; right: parent.right; top: parent.top } - height: dialog.height * 0.6 - - Text { - id: dialogText - anchors.centerIn: parent - verticalAlignment: Text.AlignVCenter - text: qsTr("Are you sure you want to quit?") - color: "#ffffff" - font.pixelSize: 0.2 *content.height - } - } - - Rectangle { - id: line - anchors { left: parent.left; right: parent.right; top: content.bottom } - anchors.leftMargin: dialog.dialogMargin - anchors.rightMargin: dialog.dialogMargin - height: 1 - color: "#777777" - } - - DialogButton { - anchors { bottom: dialog.bottom; left:dialog.left; bottomMargin: dialog.dialogMargin; leftMargin: dialog.dialogMargin } - buttonText: "Yes" - onClicked: root.yes() - } - DialogButton { - anchors { bottom: dialog.bottom; right:dialog.right; bottomMargin: dialog.dialogMargin; rightMargin: dialog.dialogMargin } - buttonText: "No" - onClicked: root.no() - } - - } - -} diff --git a/basicsuite/Qt5Everywhere/Slide.qml b/basicsuite/Qt5Everywhere/Slide.qml deleted file mode 100644 index 36e0b08..0000000 --- a/basicsuite/Qt5Everywhere/Slide.qml +++ /dev/null @@ -1,252 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "style.js" as Style - -Item { - id: slide - objectName: "slide" - - property int uid: 0 - property int gid: 0 - property string url: "" - property int device: 0 - property string imageSource: "" - property bool loaded: false - property bool loading: false - property real targetScale: 1 - property bool animationRunning: navigationAnimation.running || zoomAnimation.running - property int demoWidth: 603 - property int demoHeight: 378 - property int maskVerticalOffset: 51 - property int maskHorizontalOffset: 1 - property string demoColor: "#4353c3" - property string name: "" - - function targetWidth() - { - return demoWidth*scale; - } - - function targetHeight() - { - return demoHeight*scale; - } - - Rectangle { - id: demoBackground - anchors.centerIn: parent - width: demoContainer.width * 1.03 - height: demoContainer.height * 1.03 - color: "black" - z: slide.loading || slide.loaded ? 1:-1 - - Rectangle{ - id: demoContainer - anchors.centerIn: parent - width: demoWidth - height: demoHeight - color: demoColor - clip: true - - Text { - id: splashScreenText - color: 'white' - font.pixelSize: parent.width *.2 - font.family: Style.FONT_FAMILY - text: slide.name - anchors.centerIn: parent - smooth: true - visible: true - } - } - } - - ShaderEffectSource{ - id: demo - anchors.centerIn: parent - width: demoWidth - height: demoHeight - sourceItem: demoContainer - live: false - visible: (hasSnapshot && !slide.loaded) || updating - hideSource: visible && !updating && !loading - clip: true - - property bool updating: false - property bool hasSnapshot: false - - onScheduledUpdateCompleted: { - updating = false - hasSnapshot = true - releaseDemo(true) - } - } - - Image { - id: deviceMaskImage - anchors.centerIn: parent - anchors.verticalCenterOffset: maskVerticalOffset - anchors.horizontalCenterOffset: maskHorizontalOffset - smooth: !animationRunning - antialiasing: !animationRunning - source: slide.imageSource - width: slide.width - height: slide.height - z: 2 - - IslandElementContainer { id: leftElementcontainer; place: 0; islandHeight: islandImage.height; islandWidth: islandImage.width } - IslandElementContainer { id: rightElementcontainer;place: 1; islandHeight: islandImage.height; islandWidth: islandImage.width } - IslandElementContainer { id: bottomElementcontainer;place: 2; islandHeight: islandImage.height; islandWidth: islandImage.width } - } - - Image { - id: islandImage - anchors.top: deviceMaskImage.bottom - anchors.topMargin: -height * 0.3 - anchors.horizontalCenter: deviceMaskImage.horizontalCenter - source: "images/island.png" - smooth: !animationRunning - antialiasing: !animationRunning - width: Math.max(deviceMaskImage.width, deviceMaskImage.height) * 1.6 - height: width/2 - z: -3 - } - - // Load timer - Timer { - id: loadTimer - interval: 5 - running: false - repeat: false - onTriggered: { - loadSplashScreen(); - load() - } - } - - function loadDemo(){ - if (!slide.loaded) - { - splashScreenText.visible = true - loadTimer.start(); - } else if (slide.url==="demos/radio/radio.qml"){ - for (var i =0; i go home - canvas.goHome() - } - } - - onPressed: { - // Save mouse state - oldX = mouse.x - oldY = mouse.y - startMouseX = mouse.x - startMouseY = mouse.y - } - - onPositionChanged: { - var dx = mouse.x - oldX; - var dy = mouse.y - oldY; - - oldX = mouse.x; - oldY = mouse.y; - - if (!zoomAnimation.running && !navigationAnimation.running) - { - panning = true; - canvas.xOffset += dx; - canvas.yOffset += dy; - app.navigationState = 3 //dirty - } - } - onWheel: { - var newScalingFactor = canvas.scalingFactor - if (wheel.angleDelta.y > 0){ - newScalingFactor+=canvas.scalingFactor*.05 - }else{ - newScalingFactor-=canvas.scalingFactor*.05 - } - if (newScalingFactor < app.minScaleFactor) newScalingFactor = app.minScaleFactor - if (newScalingFactor > app.maxScaleFactor) newScalingFactor = app.maxScaleFactor - canvas.scalingFactor = newScalingFactor - } -} diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/Calqlatr.qml b/basicsuite/Qt5Everywhere/demos/calqlatr/Calqlatr.qml deleted file mode 100644 index 39a0834..0000000 --- a/basicsuite/Qt5Everywhere/demos/calqlatr/Calqlatr.qml +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "content" -import "content/calculator.js" as CalcEngine - - -Rectangle { - id: window - anchors.fill: parent - color: "#272822" - - function operatorPressed(operator) { CalcEngine.operatorPressed(operator) } - function digitPressed(digit) { CalcEngine.digitPressed(digit) } - - Item { - id: pad - width: window.width * 0.58 - height: window.height * 0.98 - NumberPad { anchors.horizontalCenter: parent.horizontalCenter } - } - - AnimationController { - id: controller - animation: ParallelAnimation { - id: anim - NumberAnimation { target: display; property: "x"; duration: 400; from: -16; to: window.width - display.width; easing.type: Easing.InOutQuad } - NumberAnimation { target: pad; property: "x"; duration: 400; from: window.width - pad.width; to: 0; easing.type: Easing.InOutQuad } - SequentialAnimation { - NumberAnimation { target: pad; property: "scale"; duration: 200; from: 1; to: 0.97; easing.type: Easing.InOutQuad } - NumberAnimation { target: pad; property: "scale"; duration: 200; from: 0.97; to: 1; easing.type: Easing.InOutQuad } - } - } - } - - Display { - id: display - x: -16 - width: window.width * 0.42 - height: parent.height - - MouseArea { - property real startX: 0 - property real oldP: 0 - property bool rewind: false - - anchors.fill: parent - onPositionChanged: { - var reverse = startX > window.width / 2 - var mx = mapToItem(window, mouse.x).x - var p = Math.abs((mx - startX) / (window.width - display.width)) - if (p < oldP) - rewind = reverse ? false : true - else - rewind = reverse ? true : false - controller.progress = reverse ? 1 - p : p - oldP = p - } - onPressed: startX = mapToItem(window, mouse.x).x - onReleased: { - if (rewind) - controller.completeToBeginning() - else - controller.completeToEnd() - } - } - } - -} diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/Button.qml b/basicsuite/Qt5Everywhere/demos/calqlatr/content/Button.qml deleted file mode 100644 index 6165ed3..0000000 --- a/basicsuite/Qt5Everywhere/demos/calqlatr/content/Button.qml +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - property alias text: textItem.text - property alias color: textItem.color - property bool operator: false - - signal clicked - - width: 0.33*pad.width - height: pad.height/7 - - Text { - id: textItem - anchors.centerIn: parent - horizontalAlignment: Text.AlignHCenter - font.pixelSize: parent.height * 0.6 - elide: Text.ElideLeft - lineHeight: 0.75 - color: "white" - } - - Image { - id: touchImage - source: "images/touch-green.png" - anchors.centerIn: parent - width: 2*parent.height - height: 2*parent.height - visible: false - } - - MouseArea { - id: mouse - anchors.fill: parent - anchors.margins: -5 - onPressed: touchImage.visible = true - onReleased: touchImage.visible = false - onClicked: { - if (operator) - window.operatorPressed(parent.text) - else - window.digitPressed(parent.text) - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/Display.qml b/basicsuite/Qt5Everywhere/demos/calqlatr/content/Display.qml deleted file mode 100644 index df3bfa2..0000000 --- a/basicsuite/Qt5Everywhere/demos/calqlatr/content/Display.qml +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: display - function clearAll() - { - listView.model.clear(); - } - - function displayOperator(operator) - { - listView.model.append({ "operator": operator, "operand": "" }) - } - - function newLine(operator, operand) - { - listView.model.append({ "operator": operator, "operand": operand }) - } - - function appendDigit(digit) - { - if (!listView.model.count) - listView.model.append({ "operator": "", "operand": "" }) - var i = listView.model.count - 1; - listView.model.get(i).operand = listView.model.get(i).operand + digit; - } - - Item { - id: theItem - width: parent.width + 32 - height: parent.height - - Rectangle { - id: rect - x: 16 - color: "white" - height: parent.height - width: display.width - 16 - } - Image { - anchors.right: rect.left - source: "images/paper-edge-left.png" - height: parent.height - fillMode: Image.TileVertically - } - Image { - anchors.left: rect.right - source: "images/paper-edge-right.png" - height: parent.height - fillMode: Image.TileVertically - } - - Image { - source: "images/paper-grip.png" - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: 20 - } - - ListView { - id: listView - x: 16; y: 30 - width: display.width - height: display.height - delegate: Item { - height: 20 - width: parent.width - Text { - id: operator - x: 8 - font.pixelSize: 18 - color: "#6da43d" - text: model.operator - } - Text { - id: operand - font.pixelSize: 18 - anchors.right: parent.right - anchors.rightMargin: 26 - text: model.operand - } - } - model: ListModel { } - } - - } - -} diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/NumberPad.qml b/basicsuite/Qt5Everywhere/demos/calqlatr/content/NumberPad.qml deleted file mode 100644 index 454c50d..0000000 --- a/basicsuite/Qt5Everywhere/demos/calqlatr/content/NumberPad.qml +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Grid { - columns: 3 - columnSpacing: 0 - rowSpacing: 0 - - Button { text: "7" } - Button { text: "8" } - Button { text: "9" } - Button { text: "4" } - Button { text: "5" } - Button { text: "6" } - Button { text: "1" } - Button { text: "2" } - Button { text: "3" } - Button { text: "0" } - Button { text: "." } - Button { text: " " } - Button { text: "±"; color: "#6da43d"; operator: true } - Button { text: "−"; color: "#6da43d"; operator: true } - Button { text: "+"; color: "#6da43d"; operator: true } - Button { text: " "; color: "#6da43d"; operator: true } - Button { text: "÷"; color: "#6da43d"; operator: true } - Button { text: "×"; color: "#6da43d"; operator: true } - Button { text: "C"; color: "#6da43d"; operator: true } - Button { text: " "; color: "#6da43d"; operator: true } - Button { text: "="; color: "#6da43d"; operator: true } -} diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/StyleLabel.qml b/basicsuite/Qt5Everywhere/demos/calqlatr/content/StyleLabel.qml deleted file mode 100644 index 3bdea86..0000000 --- a/basicsuite/Qt5Everywhere/demos/calqlatr/content/StyleLabel.qml +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Text { - width: 64 - font.pixelSize: 14 - font.bold: false - wrapMode: Text.WordWrap - lineHeight: 0.75 - color: "#676764" -} diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/audio/touch.wav b/basicsuite/Qt5Everywhere/demos/calqlatr/content/audio/touch.wav deleted file mode 100644 index 94cccb7..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/audio/touch.wav and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/calculator.js b/basicsuite/Qt5Everywhere/demos/calqlatr/content/calculator.js deleted file mode 100644 index ffc78bf..0000000 --- a/basicsuite/Qt5Everywhere/demos/calqlatr/content/calculator.js +++ /dev/null @@ -1,150 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -var curVal = 0 -var memory = 0 -var lastOp = "" -var previousOperator = "" -var digits = "" - -function disabled(op) { - if (op == "." && digits.toString().search(/\./) != -1) { - return true - } else if (op == window.squareRoot && digits.toString().search(/-/) != -1) { - return true - } else { - return false - } -} - -function digitPressed(op) -{ - if (lastOp == "=") - display.newLine("", ""); - - if (disabled(op)) - return - if (digits.toString().length >= 14) - return - if (lastOp.toString().length == 1 && ((lastOp >= "0" && lastOp <= "9") || lastOp == ".") ) { - digits = digits + op.toString() - display.appendDigit(op.toString()) - } else { - digits = op - display.appendDigit(op.toString()) - } - lastOp = op -} - -function operatorPressed(op) -{ - if (disabled(op)) - return - lastOp = op - - if (previousOperator == "+") { - digits = Number(digits.valueOf()) + Number(curVal.valueOf()) - } else if (previousOperator == "−") { - digits = Number(curVal) - Number(digits.valueOf()) - } else if (previousOperator == "×") { - digits = Number(curVal) * Number(digits.valueOf()) - } else if (previousOperator == "÷") { - digits = Number(Number(curVal) / Number(digits.valueOf())).toString() - } else if (previousOperator == "=") { - } - - if (op == "+" || op == "−" || op == "×" || op == "÷") { - previousOperator = op - curVal = digits.valueOf() - display.displayOperator(previousOperator) - return - } - - if (op == "=") { - display.newLine("=", digits.toString()) - } - - curVal = 0 - previousOperator = "" - - if (op == "1/x") { - digits = (1 / digits.valueOf()).toString() - } else if (op == "x^2") { - digits = (digits.valueOf() * digits.valueOf()).toString() - } else if (op == "Abs") { - digits = (Math.abs(digits.valueOf())).toString() - } else if (op == "Int") { - digits = (Math.floor(digits.valueOf())).toString() - } else if (op == window.plusminus) { - digits = (digits.valueOf() * -1).toString() - } else if (op == window.squareRoot) { - digits = (Math.sqrt(digits.valueOf())).toString() - } else if (op == "mc") { - memory = 0; - } else if (op == "m+") { - memory += digits.valueOf() - } else if (op == "mr") { - digits = memory.toString() - } else if (op == "m-") { - memory = digits.valueOf() - } else if (op == window.leftArrow) { - digits = digits.toString().slice(0, -1) - if (digits.length == 0) { - digits = "0" - } - } else if (op == "Off") { - Qt.quit(); - } else if (op == "C") { - curVal = 0 - memory = 0 - lastOp = "" - digits = "" - display.clearAll() - } else if (op == "AC") { - curVal = 0 - memory = 0 - lastOp = "" - digits ="0" - } - - -} - diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-back.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-back.png deleted file mode 100644 index 2989ee2..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-back.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-close.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-close.png deleted file mode 100644 index 3e21248..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-close.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-settings.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-settings.png deleted file mode 100644 index 98e662f..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/icon-settings.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/logo.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/logo.png deleted file mode 100644 index 6bc6561..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/logo.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-edge-left.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-edge-left.png deleted file mode 100644 index ca29a3a..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-edge-left.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-edge-right.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-edge-right.png deleted file mode 100644 index 7c2da7b..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-edge-right.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-grip.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-grip.png deleted file mode 100644 index 953c408..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/paper-grip.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/settings-selected-a.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/settings-selected-a.png deleted file mode 100644 index e08ddfa..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/settings-selected-a.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/settings-selected-b.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/settings-selected-b.png deleted file mode 100644 index d9aa7e3..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/settings-selected-b.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/touch-green.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/touch-green.png deleted file mode 100644 index 64dbde6..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/touch-green.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/touch-white.png b/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/touch-white.png deleted file mode 100644 index bb02b00..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/calqlatr/content/images/touch-white.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/canvasclock/canvasClock.qml b/basicsuite/Qt5Everywhere/demos/canvasclock/canvasClock.qml deleted file mode 100644 index e2b3bb0..0000000 --- a/basicsuite/Qt5Everywhere/demos/canvasclock/canvasClock.qml +++ /dev/null @@ -1,404 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: root - anchors.fill: parent - property color rimColor: Qt.rgba(1,0,0,1) //'#ff0000' - property color dialColor: Qt.rgba(0.2,0.2,0.2,1) //'#333333' - property color bgcolor: Qt.rgba(1,1,1,1) - property int dialStyle: 0 - color: "#333333" - - Text{ - id: codeText - anchors {fill:parent} - text: "" - rotation: 10 - color: "#666666" - font.pixelSize: root.height*.05 - - verticalAlignment:Text.AlignBottom - - property int pos: 0 - - property string code: " -var ctx = clockCanvas.getContext('2d') -ctx.clearRect(0,0,clockContainer.clockRadius,clockContainer.clockRadius) - -var gradient = ctx.createRadialGradient(clockContainer.clockRadius/4, clockContainer.clockRadius/4, 0, clockContainer.clockRadius/4, clockContainer.clockRadius/4, clockContainer.clockRadius) -gradient.addColorStop(0, '#ffffff') -gradient.addColorStop(1, '#888888') - -ctx.fillStyle = gradient -ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) -ctx.fill() - -drawDials(ctx) - -var gradient2 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius) -gradient2.addColorStop(0, Qt.rgba(0,0,0,.5)) -gradient2.addColorStop(.5, Qt.rgba(1,1,1,.5)) -gradient2.addColorStop(1, Qt.rgba(0,0,0,.5)) - -var gradient3 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius) -gradient3.addColorStop(0, Qt.rgba(1,1,1,.5)) -gradient3.addColorStop(.5, Qt.rgba(0,0,0,.5)) -gradient3.addColorStop(1, Qt.rgba(1,1,1,.5)) - -ctx.lineWidth = clockContainer.clockRadius*.05 -ctx.strokeStyle = root.rimColor - -ctx.beginPath() -ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false) -ctx.stroke() - -ctx.strokeStyle = gradient2 -ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false) -ctx.stroke() - -ctx.beginPath() -ctx.strokeStyle = root.rimColor -ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) -ctx.stroke() - -ctx.strokeStyle = gradient3 -ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) -ctx.stroke() -ctx.closePath() - -function drawPointer(context, angle, len, thickness, color){ - context.beginPath() - context.lineWidth = thickness - context.strokeStyle = color - context.moveTo(clockContainer.clockRadius/2, clockContainer.clockRadius/2) - var x1=Math.cos(angle*0.01745)*len - var y1=Math.sin(angle*0.01745)*len - context.lineTo(clockContainer.clockRadius/2+.5+x1,clockContainer.clockRadius/2+.5+y1) - context.stroke() - context.closePath() -}" - - Timer{ - id: textTimer - interval: 10 - onTriggered: { - codeText.pos++ - if (codeText.pos >= codeText.code.length)codeText.pos=0 - codeText.text+=codeText.code.charAt(codeText.pos) - if (codeText.text.length >1000){ - codeText.text=codeText.text.substring(codeText.text.length-1000) - } - } - repeat: true - running: true - } - } - - Rectangle { - anchors.fill: parent - gradient: Gradient { - GradientStop {position: .0; color :"black"} - GradientStop {position: .5; color :"transparent"} - GradientStop {position: 1.0; color :"black"} - - } - opacity: .5 - } - - Item { - id: clockContainer - width: 2* Math.min(root.width*.8, root.height*.8) - height: width - scale: 0.5 - anchors.centerIn: parent - property int clockRadius: width - - ShaderEffectSource{ - id: clockBg - anchors.fill: parent - sourceItem: clockCanvas - hideSource: true - live: false - } - - Canvas { - id: clockCanvas - anchors.fill: parent - onPaint: { - var ctx = clockCanvas.getContext('2d') - - ctx.clearRect(0,0,clockContainer.clockRadius,clockContainer.clockRadius) - - var gradient = ctx.createRadialGradient(clockContainer.clockRadius/4, clockContainer.clockRadius/4, 0, clockContainer.clockRadius/4, clockContainer.clockRadius/4, clockContainer.clockRadius) - - ctx.fillStyle = root.bgcolor - ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) - ctx.fill() - - gradient.addColorStop(0, Qt.rgba(0,0,0,0)) - gradient.addColorStop(1, Qt.rgba(0,0,0,.5)) - - ctx.fillStyle = gradient - ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) - ctx.fill() - - drawDials(ctx) - - var gradient2 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius) - gradient2.addColorStop(0, Qt.rgba(0,0,0,.5)) - gradient2.addColorStop(.5, Qt.rgba(1,1,1,.5)) - gradient2.addColorStop(1, Qt.rgba(0,0,0,.5)) - - var gradient3 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius) - gradient3.addColorStop(0, Qt.rgba(1,1,1,.5)) - gradient3.addColorStop(.5, Qt.rgba(0,0,0,.5)) - gradient3.addColorStop(1, Qt.rgba(1,1,1,.5)) - - ctx.lineWidth = clockContainer.clockRadius*.05 - - ctx.strokeStyle = root.rimColor - ctx.beginPath() - ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false) - ctx.stroke() - - ctx.strokeStyle = gradient2 - ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false) - ctx.stroke() - - ctx.beginPath() - ctx.strokeStyle = root.rimColor - ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) - ctx.stroke() - - ctx.strokeStyle = gradient3 - - ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) - ctx.stroke() - ctx.closePath() - - - clockBg.scheduleUpdate() - } - - function drawDials(context){ - - context.strokeStyle = "#888888" - context.fillStyle = root.dialColor - context.lineWidth = 2 - context.beginPath() - for (var i=1; i<=60; i++){ - var x1=Math.cos(((i)*6)*0.01745)*clockContainer.clockRadius*.4 - var y1=Math.sin(((i)*6)*0.01745)*clockContainer.clockRadius*.4 - - var x2=Math.cos(((i)*6)*0.01745)*clockContainer.clockRadius*.45 - var y2=Math.sin(((i)*6)*0.01745)*clockContainer.clockRadius*.45 - - context.moveTo(clockContainer.clockRadius/2+.5+x1,clockContainer.clockRadius/2+.5+y1) - context.lineTo(clockContainer.clockRadius/2+.5+x2,clockContainer.clockRadius/2+.5+y2) - context.stroke() - } - context.closePath() - - context.beginPath() - - var romans = ['I','II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII'] - - for (i=1; i<=12; i++){ - x1=Math.cos((-90+(i)*30)*0.01745)*clockContainer.clockRadius*.35 -clockContainer.width*0.03 - y1=Math.sin((-90+(i)*30)*0.01745)*clockContainer.clockRadius*.35 +clockContainer.height*0.04 - - if (root.dialStyle === 1) x1-=clockContainer.width*0.01 - - context.font = 'bold '+Math.floor(clockContainer.width*.1)+'px Arial' - - - if (i >= 10) - x1 -= clockContainer.width*0.02 - context.textAlign = 'center'; - context.textBaseline = 'middle' - - var dial = i - - if (root.dialStyle === 1) dial = romans[i-1] - context.text(dial,clockContainer.clockRadius/2+x1,clockContainer.clockRadius/2+y1) - - context.fill() - context.stroke() - } - context.closePath() - } - } - - Canvas { - id: clockPointers - anchors.fill: parent - antialiasing: true - renderTarget: Canvas.Image - onPaint: { - var ctx = clockPointers.getContext('2d') - ctx.clearRect(0,0,clockContainer.clockRadius,clockContainer.clockRadius) - ctx.lineCap = 'round' - drawPointer(ctx, -90+clock.hours*30, clockContainer.clockRadius*.25, clockContainer.clockRadius*.05, "#000000") - drawPointer(ctx, -90+clock.minutes*6, clockContainer.clockRadius*.375, clockContainer.clockRadius*.025, "#333333") - drawPointer(ctx, -90+clock.seconds*6, clockContainer.clockRadius*.40, 4, "#aa0000") - - // Draw nail - ctx.beginPath() - ctx.fillStyle = "#535353" - ctx.ellipse(clockContainer.clockRadius/2-16,clockContainer.clockRadius/2-16,32,32) - ctx.fill() - ctx.closePath() - } - - function drawPointer(context, angle, len, thickness, color){ - context.beginPath() - context.lineWidth = thickness - context.strokeStyle = color - context.moveTo(clockContainer.clockRadius/2, clockContainer.clockRadius/2) - var x1=Math.cos(angle*0.01745)*len - var y1=Math.sin(angle*0.01745)*len - context.lineTo(clockContainer.clockRadius/2+.5+x1,clockContainer.clockRadius/2+.5+y1) - context.stroke() - context.closePath() - } - } - - Timer{ - id: clock - interval: 1000 - repeat: true - running: !mouseArea.pressed - - property int hours: 0 - property int minutes: 0 - property int seconds: 0 - - onTriggered: { - seconds ++ - if (seconds == 60) seconds = 0 - - if (seconds == 0) minutes++ - if (minutes == 60) { - hours++ - minutes=0 - } - - if (hours >= 12) hours=0 - - clockPointers.requestPaint() - } - } - } - - MouseArea { - id: mouseArea - anchors.fill: clockContainer - property bool grabbed: false - - onPressed: { - - var temp = clockContainer.clockRadius/2 - var ang = (90+Math.atan2((mouseY-temp), (mouseX-temp))*57.2957795) - if (ang <0) ang+=360 - - if (ang/6 > clock.minutes-2 && ang/6clockContainer.clockRadius*.42*clockContainer.scale){ - root.rimColor = newColor() - clockCanvas.requestPaint() - return; - }else if (dist>clockContainer.clockRadius*.32*clockContainer.scale) { - root.dialStyle = Math.round(Math.random()) - root.dialColor = newColor() - clockCanvas.requestPaint() - }else{ - root.bgcolor = newColor() - clockCanvas.requestPaint() - } - } - } - - onPositionChanged: { - if (grabbed) { - var temp = clockContainer.clockRadius/2 - var ang = (90+Math.atan2((mouseY-temp), (mouseX-temp))*57.2957795) - if (ang <0) ang+=360 - - var oldMinutes = clock.minutes - clock.minutes=ang/6 - - if (oldMinutes>55 && clock.minutes <5) clock.hours++ - if (oldMinutes<5 && clock.minutes >50) clock.hours-- - if (clock.hours >12) clock.hours=1 - if (clock.hours <0) clock.hours=11 - - - clockPointers.requestPaint() - } - } - onReleased: grabbed = false; - } - - function newColor(){ - var r=Math.random() - var g=Math.random() - var b=Math.random() - return Qt.rgba(r,g,b,1) - } - - Component.onCompleted: { - var d = new Date() - clock.hours = d.getHours() - if (clock.hours>=12)clock.hours-=12 - clock.minutes = d.getMinutes() - clock.seconds = d.getSeconds() - clockCanvas.requestPaint() - } -} diff --git a/basicsuite/Qt5Everywhere/demos/demos.pro b/basicsuite/Qt5Everywhere/demos/demos.pro deleted file mode 100644 index 439fe35..0000000 --- a/basicsuite/Qt5Everywhere/demos/demos.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS += \ - shaders \ diff --git a/basicsuite/Qt5Everywhere/demos/gridrssnews/RssDelegate.qml b/basicsuite/Qt5Everywhere/demos/gridrssnews/RssDelegate.qml deleted file mode 100644 index b0c2047..0000000 --- a/basicsuite/Qt5Everywhere/demos/gridrssnews/RssDelegate.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: delegate - height: grid.cellHeight - width: grid.cellWidth - color: mainWindow.appBackground - property int tileMargin: mainWindow.tileMargin - - Rectangle { - anchors.left: parent.left - anchors.top: parent.top - anchors.topMargin: parent.tileMargin/2 - width: parent.width - tileMargin - height: parent.height - tileMargin - color: mainWindow.tileBackground - - MouseArea { - anchors.fill: parent - onClicked: { - grid.currentIndex = index - console.log(link) - Qt.openUrlExternally(link) - } - } - - states: [ - State { - name: "selected" - when: delegate.GridView.isCurrentItem - } - ] - - - Image { - id: iconImage - source: url - width: parent.width - height: parent.height - } - - Rectangle{ - width: parent.width - height: dateText.height + tileMargin - anchors.top: dateText.top - anchors.bottom: parent.bottom - color: "Black" - opacity: 0.5 - visible: iconImage.source - - } - - Text { - id: dateText - anchors.left: parent.left - anchors.leftMargin: tileMargin - anchors.bottom: parent.bottom - anchors.bottomMargin: tileMargin - anchors.right: parent.right - anchors.rightMargin: tileMargin - - color: mainWindow.textColor - text: title - width: parent.width; - wrapMode: Text.WordWrap; - smooth: true - font { family: mainWindow.uiFont; pixelSize: mainWindow.tileFontSize } - } - } -} - diff --git a/basicsuite/Qt5Everywhere/demos/gridrssnews/ScrollBar.qml b/basicsuite/Qt5Everywhere/demos/gridrssnews/ScrollBar.qml deleted file mode 100644 index dae206b..0000000 --- a/basicsuite/Qt5Everywhere/demos/gridrssnews/ScrollBar.qml +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: scrollBar - - // The properties that define the scrollbar's state. - // position and pageSize are in the range 0.0 - 1.0. They are relative to the - // height of the page, i.e. a pageSize of 0.5 means that you can see 50% - // of the height of the view. - // orientation can be either Qt.Vertical or Qt.Horizontal - property real position - property real pageSize - property variant orientation : Qt.Vertical - - // A light, semi-transparent background - Rectangle { - id: background - anchors.fill: parent - radius: width/2 - 1 - color: mainWindow.appBackground - } - - // Size the bar to the required size, depending upon the orientation. - Rectangle { - x: scrollBar.position * (scrollBar.width-2) + 1 - y: 1 - width: scrollBar.pageSize * (scrollBar.width-2) - height: parent.height - radius: height/2 - 1 - color: mainWindow.tileBackground - } -} diff --git a/basicsuite/Qt5Everywhere/demos/gridrssnews/main.qml b/basicsuite/Qt5Everywhere/demos/gridrssnews/main.qml deleted file mode 100644 index d85d292..0000000 --- a/basicsuite/Qt5Everywhere/demos/gridrssnews/main.qml +++ /dev/null @@ -1,150 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.XmlListModel 2.0 - -Rectangle { - id: mainWindow - anchors.fill: parent - color: appBackground - - property int tileHeight: parseInt(grid.height / 3) - property int tileFontSize: tileHeight * 0.08 - property int horizontalMargin: height * 0.08 - property int topBarsize: height * 0.2 - property int bottomBarSize: height * 0.08 - property int tileMargin: height * 0.01 - property int appHeaderFontSize: topBarsize * 0.4 - property string appBackground: "#262626" - property string tileBackground: "#86bc24" - property string textColor: "white" - property string uiFont: "Segoe UI" - - XmlListModel { - id: feedModel - //source: "http://blog.qt.digia.com/feed/" - source: "http://news.yahoo.com/rss/tech" - //query: "/rss/channel/item" - // Filter out items that don't have images - query: "/rss/channel/item[exists(child::media:content)]" - namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";" - XmlRole { name: "url"; query: "media:content/@url/string()" } - XmlRole { name: "title"; query: "title/string()" } - XmlRole { name: "pubDate"; query: "pubDate/string()" } - XmlRole { name: "link"; query: "link/string()" } - - onStatusChanged: { - if (status == XmlListModel.Ready) { - playbanner.start(); - } - } - } - - // Top bar - Item { - id: topBar - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - anchors.leftMargin: horizontalMargin - opacity: 0 - height: topBarsize - Text { - id: title - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - text: qsTr("Yahoo Technology") - font.family: uiFont; - font.pixelSize: appHeaderFontSize; - color: textColor - smooth: true - } - } - - // Grid view - GridView { - id: grid - anchors.fill: parent - anchors.topMargin: topBarsize - anchors.bottomMargin: bottomBarSize - anchors.leftMargin: horizontalMargin - anchors.rightMargin: horizontalMargin - opacity: 0 - flow: GridView.TopToBottom - cellHeight: tileHeight - cellWidth: parseInt(tileHeight * 1.5) - cacheBuffer: cellWidth - clip: false - focus: true - model: feedModel - delegate: RssDelegate {} - - // Only show the scrollbars when the view is moving. - states: State { - when: grid.movingHorizontally - PropertyChanges { target: horizontalScrollBar; opacity: 1 } - } - - transitions: Transition { - NumberAnimation { properties: "opacity"; duration: 400 } - } - } - - ScrollBar { - id: horizontalScrollBar - width: parent.width; height: 6 - anchors.bottom: parent.bottom - anchors.left: parent.left - opacity: 0 - orientation: Qt.Horizontal - position: grid.visibleArea.xPosition - pageSize: grid.visibleArea.widthRatio - } - - SequentialAnimation { - id: playbanner - running: false - NumberAnimation { target: topBar; property: "opacity"; to: 1.0; duration: 300} - NumberAnimation { target: grid; property: "opacity"; to: 1.0; duration: 300} - } - -} - diff --git a/basicsuite/Qt5Everywhere/demos/heartmonitor/HeartData.js b/basicsuite/Qt5Everywhere/demos/heartmonitor/HeartData.js deleted file mode 100644 index 467e431..0000000 --- a/basicsuite/Qt5Everywhere/demos/heartmonitor/HeartData.js +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -var heartData = [0,0,0,0,0] - -function fillHeartData(length) { - if (length !== heartData.length) { - heartData = new Array(length); - for (var i=0; i 0) - app.beatDifference = 0.8*beatDifference + 0.2*(ms - app.previousTime) - app.frequency = Math.round(60000.0 / app.beatDifference) - app.previousTime = ms; - } - - function updateData() { - app.heartDataIndex++; - if (app.heartDataIndex >= Data.heartData.length) - app.heartDataIndex = 0; - else - app.heartDataIndex++; - - if (beatDataIndex >= 0) - fillBeatData() - else - fillRandomData() - - heartCanvas.requestPaint() - } - - function fillBeatData() { - var value = 0; - switch (app.beatDataIndex) { - case 0: value = Math.random()*0.1+0.1; break; - case 1: value = Math.random()*0.1+0.0; break; - case 2: value = Math.random()*0.3+0.7; break; - case 3: value = Math.random()*0.1-0.05; break; - case 4: value = Math.random()*0.3-0.8; break; - case 5: value = Math.random()*0.1-0.05; break; - case 6: value = Math.random()*0.1-0.05; break; - case 7: value = Math.random()*0.1+0.15; break; - default: value = 0; break; - } - - Data.heartData[app.heartDataIndex] = value; - app.beatDataIndex++; - if (app.beatDataIndex > 7) - app.beatDataIndex = -1 - } - - function fillRandomData() { - Data.heartData[app.heartDataIndex] = Math.random()*0.05-0.025 - } - - onWidthChanged: { - Data.fillHeartData(Math.floor(app.width*0.5)) - gridCanvas.requestPaint(); - } - onHeightChanged: gridCanvas.requestPaint() - - Item { - id: grid - anchors.fill: parent - - Canvas { - id: gridCanvas - anchors.fill: parent - antialiasing: true - renderTarget: Canvas.Image - onPaint: { - var ctx = gridCanvas.getContext('2d') - - ctx.clearRect(0,0,grid.width,grid.height) - var step = 1000 / updateTimer.interval * (app.width / Data.heartData.length) - var xCount = app.width / step - var yCount = app.height / step - ctx.strokeStyle = app.gridColor; - - var x=0; - ctx.beginPath() - for (var i=0; i 100 ? app.alarmColor : app.textColor - font { pixelSize: app.width * .1; bold: true } - } - - // Pulse timer - Timer { - id: heartTimer - interval: 1200 - running: true - repeat: false - onTriggered: pulse() - } - - // Update timer - Timer { - id: updateTimer - interval: 30 - running: true - repeat: true - onTriggered: updateData() - } - - SequentialAnimation{ - id: heartAnimation - NumberAnimation { target: heart; property: "scale"; duration: 100; from: 1.0; to:1.2; easing.type: Easing.Linear } - NumberAnimation { target: heart; property: "scale"; duration: 100; from: 1.2; to:1.0; easing.type: Easing.Linear } - } - - Component.onCompleted: { - Data.fillHeartData(Math.max(100,Math.floor(app.width*0.5))) - } -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/.DS_Store b/basicsuite/Qt5Everywhere/demos/maroon/.DS_Store deleted file mode 100644 index b5c859b..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/.DS_Store and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/Maroon.qml b/basicsuite/Qt5Everywhere/demos/maroon/Maroon.qml deleted file mode 100644 index d7bfcb6..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/Maroon.qml +++ /dev/null @@ -1,233 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "content" -import "content/logic.js" as Logic - -Item { - id: root - width: 320 - height: 480 - property var gameState: Logic.newGameState(canvas); - property bool passedSplash: false - - Image { - source:"content/gfx/background.png" - anchors.bottom: view.bottom - - ParticleSystem { - id: particles - anchors.fill: parent - - ImageParticle { - id: bubble - anchors.fill: parent - source: "content/gfx/catch.png" - opacity: 0.25 - } - - Wander { - xVariance: 25; - pace: 25; - } - - Emitter { - width: parent.width - height: 150 - anchors.bottom: parent.bottom - anchors.bottomMargin: 3 - startTime: 15000 - - emitRate: 2 - lifeSpan: 15000 - - acceleration: PointDirection{ y: -6; xVariation: 2; yVariation: 2 } - - size: 24 - sizeVariation: 16 - } - } - } - - Column { - id: view - y: -(height - 480) - width: 320 - - GameOverScreen { gameCanvas: canvas } - - Item { - id: canvasArea - width: 320 - height: 480 - - Row { - height: childrenRect.height - Image { - id: wave - y: 30 - source:"content/gfx/wave.png" - } - Image { - y: 30 - source:"content/gfx/wave.png" - } - NumberAnimation on x { from: 0; to: -(wave.width); duration: 16000; loops: Animation.Infinite } - SequentialAnimation on y { - loops: Animation.Infinite - NumberAnimation { from: y - 2; to: y + 2; duration: 1600; easing.type: Easing.InOutQuad } - NumberAnimation { from: y + 2; to: y - 2; duration: 1600; easing.type: Easing.InOutQuad } - } - } - - Row { - opacity: 0.5 - Image { - id: wave2 - y: 25 - source: "content/gfx/wave.png" - } - Image { - y: 25 - source: "content/gfx/wave.png" - } - NumberAnimation on x { from: -(wave2.width); to: 0; duration: 32000; loops: Animation.Infinite } - SequentialAnimation on y { - loops: Animation.Infinite - NumberAnimation { from: y + 2; to: y - 2; duration: 1600; easing.type: Easing.InOutQuad } - NumberAnimation { from: y - 2; to: y + 2; duration: 1600; easing.type: Easing.InOutQuad } - } - } - - Image { - source: "content/gfx/sunlight.png" - opacity: 0.02 - y: 0 - anchors.horizontalCenter: parent.horizontalCenter - transformOrigin: Item.Top - SequentialAnimation on rotation { - loops: Animation.Infinite - NumberAnimation { from: -10; to: 10; duration: 8000; easing.type: Easing.InOutSine } - NumberAnimation { from: 10; to: -10; duration: 8000; easing.type: Easing.InOutSine } - } - } - - Image { - source: "content/gfx/sunlight.png" - opacity: 0.04 - y: 20 - anchors.horizontalCenter: parent.horizontalCenter - transformOrigin: Item.Top - SequentialAnimation on rotation { - loops: Animation.Infinite - NumberAnimation { from: 10; to: -10; duration: 8000; easing.type: Easing.InOutSine } - NumberAnimation { from: -10; to: 10; duration: 8000; easing.type: Easing.InOutSine } - } - } - - Image { - source: "content/gfx/grid.png" - opacity: 0.5 - } - - GameCanvas { - id: canvas - anchors.bottom: parent.bottom - anchors.bottomMargin: 20 - x: 32 - focus: true - } - - InfoBar { anchors.bottom: canvas.top; anchors.bottomMargin: 6; width: parent.width } - - //3..2..1..go - Timer { - id: countdownTimer - interval: 1000 - running: root.countdown < 5 - repeat: true - onTriggered: root.countdown++ - } - Repeater { - model: ["content/gfx/text-blank.png", "content/gfx/text-3.png", "content/gfx/text-2.png", "content/gfx/text-1.png", "content/gfx/text-go.png"] - delegate: Image { - visible: root.countdown <= index - opacity: root.countdown == index ? 0.5 : 0.1 - scale: root.countdown >= index ? 1.0 : 0.0 - source: modelData - Behavior on opacity { NumberAnimation {} } - Behavior on scale { NumberAnimation {} } - } - } - } - - NewGameScreen { - onStartButtonClicked: root.passedSplash = true - } - } - - property int countdown: 10 - Timer { - id: gameStarter - interval: 4000 - running: false - repeat: false - onTriggered: Logic.startGame(canvas); - } - - states: [ - State { - name: "gameOn"; when: gameState.gameOver == false && passedSplash - PropertyChanges { target: view; y: -(height - 960) } - StateChangeScript { script: root.countdown = 0; } - PropertyChanges { target: gameStarter; running: true } - }, - State { - name: "gameOver"; when: gameState.gameOver == true - PropertyChanges { target: view; y: 0 } - } - ] - - transitions: Transition { - NumberAnimation { properties: "x,y"; duration: 1200; easing.type: Easing.OutQuad } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/BuildButton.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/BuildButton.qml deleted file mode 100644 index 49641fc..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/BuildButton.qml +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "logic.js" as Logic - -Item { - id: container - width: 64 - height: 64 - property alias source: img.source - property int index - property int row: 0 - property int col: 0 - property int towerType - property bool canBuild: true - property Item gameCanvas: parent.parent.parent - signal clicked() - - Image { - id: img - opacity: (canBuild && gameCanvas.coins >= Logic.towerData[towerType-1].cost) ? 1.0 : 0.4 - } - Text { - anchors.right: parent.right - font.pointSize: 14 - font.bold: true - color: "#ffffff" - text: Logic.towerData[towerType - 1].cost - } - MouseArea { - anchors.fill: parent - onClicked: { - Logic.buildTower(towerType, col, row) - container.clicked() - } - } - Image { - visible: col == index && row != 0 - source: "gfx/dialog-pointer.png" - anchors.top: parent.bottom - anchors.topMargin: 4 - anchors.horizontalCenter: parent.horizontalCenter - } - Image { - visible: col == index && row == 0 - source: "gfx/dialog-pointer.png" - rotation: 180 - anchors.bottom: parent.top - anchors.bottomMargin: 6 - anchors.horizontalCenter: parent.horizontalCenter - } -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/GameCanvas.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/GameCanvas.qml deleted file mode 100644 index 5e6e963..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/GameCanvas.qml +++ /dev/null @@ -1,240 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "logic.js" as Logic -import "towers" as Towers - -Item { - id: grid - - property int squareSize: 64 - property int rows: 6 - property int cols: 4 - property Item canvas: grid - property int score: 0 - property int coins: 100 - property int lives: 3 - property int waveNumber: 0 - property int waveProgress: 0 - property var towers - property var mobs - property bool gameRunning: false - property bool gameOver: false - property bool errored: false - property string errorString: "" - - width: cols * squareSize - height: rows * squareSize - - function freshState() { - lives = 3 - coins = 100 - score = 0 - waveNumber = 0 - waveProgress = 0 - gameOver = false - gameRunning = false - towerMenu.shown = false - helpButton.comeBack(); - } - - Text { - id: errorText // Mostly for debug purposes - text: errorString - visible: errored - color: "red" - font.pixelSize: 18 - wrapMode: Text.WordWrap - width: parent.width / 1.2 - height: parent.height / 1.2 - anchors.centerIn: parent - z: 1000 - } - - Timer { - interval: 16 - running: true - repeat: true - onTriggered: Logic.tick() - } - - MouseArea { - id: ma - anchors.fill: parent - onClicked: { - if (towerMenu.visible) - towerMenu.finish() - else - towerMenu.open(mouse.x, mouse.y) - } - } - - Image { - id: towerMenu - visible: false - z: 1500 - scale: 0.9 - opacity: 0.7 - property int dragDistance: 16 - property int targetRow: 0 - property int targetCol: 0 - property bool shown: false - property bool towerExists: false - - function finish() { - shown = false - } - - function open(xp,yp) { - if (!grid.gameRunning) - return - targetRow = Logic.row(yp) - targetCol = Logic.col(xp) - if (targetRow == 0) - towerMenu.y = (targetRow + 1) * grid.squareSize - else - towerMenu.y = (targetRow - 1) * grid.squareSize - towerExists = (grid.towers[Logic.towerIdx(targetCol, targetRow)] != null) - shown = true - helpButton.goAway(); - } - - states: State { - name: "shown"; when: towerMenu.shown && !grid.gameOver - PropertyChanges { target: towerMenu; visible: true; scale: 1; opacity: 1 } - } - - transitions: Transition { - PropertyAction { property: "visible" } - NumberAnimation { properties: "opacity,scale"; duration: 500; easing.type: Easing.OutElastic } - } - - x: -32 - source: "gfx/dialog.png" - Row { - id: buttonRow - height: 100 - anchors.centerIn: parent - spacing: 8 - BuildButton { - row: towerMenu.targetRow; col: towerMenu.targetCol - anchors.verticalCenter: parent.verticalCenter - towerType: 1; index: 0 - canBuild: !towerMenu.towerExists - source: "gfx/dialog-melee.png" - onClicked: towerMenu.finish() - } - BuildButton { - row: towerMenu.targetRow; col: towerMenu.targetCol - anchors.verticalCenter: parent.verticalCenter - towerType: 2; index: 1 - canBuild: !towerMenu.towerExists - source: "gfx/dialog-shooter.png" - onClicked: towerMenu.finish() - } - BuildButton { - row: towerMenu.targetRow; col: towerMenu.targetCol - anchors.verticalCenter: parent.verticalCenter - towerType: 3; index: 2 - canBuild: !towerMenu.towerExists - source: "gfx/dialog-bomb.png" - onClicked: towerMenu.finish() - } - BuildButton { - row: towerMenu.targetRow; col: towerMenu.targetCol - anchors.verticalCenter: parent.verticalCenter - towerType: 4; index: 3 - canBuild: !towerMenu.towerExists - source: "gfx/dialog-factory.png" - onClicked: towerMenu.finish() - } - } - } - - - Keys.onPressed: { // Cheat Codes while Testing - if (event.key == Qt.Key_Up && (event.modifiers & Qt.ShiftModifier)) - grid.coins += 10; - if (event.key == Qt.Key_Left && (event.modifiers & Qt.ShiftModifier)) - grid.lives += 1; - if (event.key == Qt.Key_Down && (event.modifiers & Qt.ShiftModifier)) - Logic.gameState.waveProgress += 1000; - if (event.key == Qt.Key_Right && (event.modifiers & Qt.ShiftModifier)) - Logic.endGame(); - } - - Image { - id: helpButton - z: 1010 - source: "gfx/button-help.png" - function goAway() { - helpMA.enabled = false; - helpButton.opacity = 0; - } - function comeBack() { - helpMA.enabled = true; - helpButton.opacity = 1; - } - Behavior on opacity { NumberAnimation {} } - MouseArea { - id: helpMA - anchors.fill: parent - onClicked: {helpImage.visible = true; helpButton.visible = false;} - } - - anchors.horizontalCenter: parent.horizontalCenter - anchors.bottom: parent.bottom - anchors.bottomMargin: 0 - } - - Image { - id: helpImage - z: 1010 - source: "gfx/help.png" - anchors.fill: parent - visible: false - MouseArea { - anchors.fill: parent - onClicked: helpImage.visible = false; - } - } - -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/GameOverScreen.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/GameOverScreen.qml deleted file mode 100644 index dfb439f..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/GameOverScreen.qml +++ /dev/null @@ -1,115 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "logic.js" as Logic - -Item { - id: gameOverScreen - width: 320 - height: 400 - property GameCanvas gameCanvas - - Image { - id: img - source: "gfx/text-gameover.png" - anchors.centerIn: parent - } - - ParticleSystem { - anchors.fill: parent - ImageParticle { - id: cloud - source: "gfx/cloud.png" - alphaVariation: 0.25 - opacity: 0.25 - } - - Wander { - xVariance: 100; - pace: 1; - } - - Emitter { - id: cloudLeft - width: 160 - height: 160 - anchors.right: parent.left - emitRate: 0.5 - lifeSpan: 12000 - velocity: PointDirection{ x: 64; xVariation: 2; yVariation: 2 } - size: 160 - } - - Emitter { - id: cloudRight - width: 160 - height: 160 - anchors.left: parent.right - emitRate: 0.5 - lifeSpan: 12000 - velocity: PointDirection{ x: -64; xVariation: 2; yVariation: 2 } - size: 160 - } - } - - - Text { - visible: gameCanvas != undefined - text: "You saved " + gameCanvas.score + " fishes!" - anchors.top: img.bottom - anchors.topMargin: 12 - anchors.horizontalCenter: parent.horizontalCenter - font.bold: true - color: "#000000" - opacity: 0.5 - } - - Image { - source: "gfx/button-play.png" - anchors.bottom: parent.bottom - anchors.bottomMargin: 0 - MouseArea { - anchors.fill: parent - onClicked: gameCanvas.gameOver = false//This will actually trigger the state change in main.qml - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/InfoBar.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/InfoBar.qml deleted file mode 100644 index 36303fc..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/InfoBar.qml +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - height: childrenRect.height - - // Display the number of lives - Row { - anchors.left: parent.left - anchors.leftMargin: 10 - spacing: 5 - Repeater { - id: rep - model: Math.min(10, canvas.lives) - delegate: Image { source: "gfx/lifes.png" } - } - } - - // Display the number of fishes saved - Row { - anchors.right: points.left - anchors.rightMargin: 20 - spacing: 5 - Image { source: "gfx/scores.png" } - Text { - text: canvas.score - font.bold: true - } - } - - // Display the number of coins - Row { - id: points - anchors.right: parent.right - anchors.rightMargin: 10 - spacing: 5 - Image { source: "gfx/points.png" } - Text { - id: pointsLabel - text: canvas.coins - font.bold: true - } - } -} - diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/NewGameScreen.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/NewGameScreen.qml deleted file mode 100644 index 495e3aa..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/NewGameScreen.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -// This is the first screen. -// It shows the logo and emit a startButtonClicked signal -// when the user press the "PLAY" button. - -Item { - id: newGameScreen - width: 320 - height: 480 - - signal startButtonClicked - - Image { - source: "gfx/logo.png" - anchors.top: parent.top - anchors.topMargin: 60 - } - - Image { - source: "gfx/logo-fish.png" - anchors.top: parent.top - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x + 148; to: x + 25; duration: 2000; easing.type: Easing.InOutQuad } - NumberAnimation { from: x + 25; to: x + 148; duration: 1600; easing.type: Easing.InOutQuad } - } - SequentialAnimation on anchors.topMargin { - loops: Animation.Infinite - NumberAnimation { from: 100; to: 60; duration: 1600; easing.type: Easing.InOutQuad } - NumberAnimation { from: 60; to: 100; duration: 2000; easing.type: Easing.InOutQuad } - } - } - - Image { - source: "gfx/logo-bubble.png" - anchors.top: parent.top - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x + 140; to: x + 40; duration: 2000; easing.type: Easing.InOutQuad } - NumberAnimation { from: x + 40; to: x + 140; duration: 1600; easing.type: Easing.InOutQuad } - } - SequentialAnimation on anchors.topMargin { - loops: Animation.Infinite - NumberAnimation { from: 100; to: 60; duration: 1600; easing.type: Easing.InOutQuad } - NumberAnimation { from: 60; to: 100; duration: 2000; easing.type: Easing.InOutQuad } - } - SequentialAnimation on width { - loops: Animation.Infinite - NumberAnimation { from: 140; to: 160; duration: 1000; easing.type: Easing.InOutQuad } - NumberAnimation { from: 160; to: 140; duration: 800; easing.type: Easing.InOutQuad } - } - SequentialAnimation on height { - loops: Animation.Infinite - NumberAnimation { from: 150; to: 140; duration: 800; easing.type: Easing.InOutQuad } - NumberAnimation { from: 140; to: 150; duration: 1000; easing.type: Easing.InOutQuad } - } - } - - Image { - source: "gfx/button-play.png" - anchors.bottom: parent.bottom - anchors.bottomMargin: 60 - MouseArea { - anchors.fill: parent - onClicked: newGameScreen.startButtonClicked() - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/SoundEffect.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/SoundEffect.qml deleted file mode 100644 index 0dccd12..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/SoundEffect.qml +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -//Proxies a SoundEffect if QtMultimedia is installed -Item { - id: container - property QtObject effect: Qt.createQmlObject("import QtMultimedia 5.0; SoundEffect{ source: '" + container.source + "' }", container); - property url source: "" - onSourceChanged: if (effect != null) effect.source = source; - function play() { - if (effect != null) - effect.play(); - } -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/bomb-action.wav b/basicsuite/Qt5Everywhere/demos/maroon/content/audio/bomb-action.wav deleted file mode 100644 index b334dc1..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/bomb-action.wav and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/catch-action.wav b/basicsuite/Qt5Everywhere/demos/maroon/content/audio/catch-action.wav deleted file mode 100644 index 3e22124..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/catch-action.wav and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/catch.wav b/basicsuite/Qt5Everywhere/demos/maroon/content/audio/catch.wav deleted file mode 100644 index d3eade8..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/catch.wav and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/currency.wav b/basicsuite/Qt5Everywhere/demos/maroon/content/audio/currency.wav deleted file mode 100644 index 0d9ef2c..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/currency.wav and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/factory-action.wav b/basicsuite/Qt5Everywhere/demos/maroon/content/audio/factory-action.wav deleted file mode 100644 index a2ace6c..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/factory-action.wav and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/melee-action.wav b/basicsuite/Qt5Everywhere/demos/maroon/content/audio/melee-action.wav deleted file mode 100644 index d325af4..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/melee-action.wav and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/projectile-action.wav b/basicsuite/Qt5Everywhere/demos/maroon/content/audio/projectile-action.wav deleted file mode 100644 index 4e2284f..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/projectile-action.wav and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/shooter-action.wav b/basicsuite/Qt5Everywhere/demos/maroon/content/audio/shooter-action.wav deleted file mode 100644 index 3e12b94..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/audio/shooter-action.wav and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/background.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/background.png deleted file mode 100644 index d548b93..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/background.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb-action.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb-action.png deleted file mode 100644 index 42da5d7..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb-action.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb-idle.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb-idle.png deleted file mode 100644 index 3bd62e2..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb-idle.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb.png deleted file mode 100644 index 380da7d..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/bomb.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/button-help.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/button-help.png deleted file mode 100644 index aecebc1..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/button-help.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/button-play.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/button-play.png deleted file mode 100644 index 6cdad6c..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/button-play.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/catch-action.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/catch-action.png deleted file mode 100644 index 78ca9fe..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/catch-action.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/catch.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/catch.png deleted file mode 100644 index b7620fe..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/catch.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/cloud.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/cloud.png deleted file mode 100644 index d7c35f8..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/cloud.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/currency.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/currency.png deleted file mode 100644 index 1571341..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/currency.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-bomb.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-bomb.png deleted file mode 100644 index 708d916..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-bomb.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-factory.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-factory.png deleted file mode 100644 index d2e2a48..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-factory.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-melee.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-melee.png deleted file mode 100644 index 069d18d..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-melee.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-pointer.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-pointer.png deleted file mode 100644 index 9b51a09..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-pointer.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-shooter.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-shooter.png deleted file mode 100644 index af980ca..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog-shooter.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog.png deleted file mode 100644 index d528ba7..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/dialog.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory-action.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory-action.png deleted file mode 100644 index 8981678..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory-action.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory-idle.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory-idle.png deleted file mode 100644 index a145582..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory-idle.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory.png deleted file mode 100644 index bfb9f3f..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/factory.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/grid.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/grid.png deleted file mode 100644 index b595552..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/grid.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/help.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/help.png deleted file mode 100644 index 4654e4c..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/help.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/lifes.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/lifes.png deleted file mode 100644 index 135310b..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/lifes.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo-bubble.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo-bubble.png deleted file mode 100644 index 136151c..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo-bubble.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo-fish.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo-fish.png deleted file mode 100644 index c41833a..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo-fish.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo.png deleted file mode 100644 index 787ac99..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/logo.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee-action.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee-action.png deleted file mode 100644 index c53873b..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee-action.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee-idle.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee-idle.png deleted file mode 100644 index 621d9df..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee-idle.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee.png deleted file mode 100644 index ab24015..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/melee.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/mob-idle.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/mob-idle.png deleted file mode 100644 index dedacc7..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/mob-idle.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/mob.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/mob.png deleted file mode 100644 index 7569c35..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/mob.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/points.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/points.png deleted file mode 100644 index 1d2386d..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/points.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/projectile-action.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/projectile-action.png deleted file mode 100644 index aa2e650..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/projectile-action.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/projectile.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/projectile.png deleted file mode 100644 index c25a0c3..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/projectile.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/scores.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/scores.png deleted file mode 100644 index af757fe..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/scores.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter-action.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter-action.png deleted file mode 100644 index 08e7e30..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter-action.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter-idle.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter-idle.png deleted file mode 100644 index 663098d..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter-idle.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter.png deleted file mode 100644 index d44401e..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/shooter.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/sunlight.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/sunlight.png deleted file mode 100644 index d1c7042..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/sunlight.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-1.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-1.png deleted file mode 100644 index 3ea399c..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-1.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-2.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-2.png deleted file mode 100644 index 934a481..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-2.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-3.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-3.png deleted file mode 100644 index 47523f5..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-3.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-blank.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-blank.png deleted file mode 100644 index 4a687b2..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-blank.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-gameover.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-gameover.png deleted file mode 100644 index 4f53ef0..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-gameover.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-go.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-go.png deleted file mode 100644 index bfc26f7..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/text-go.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/wave.png b/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/wave.png deleted file mode 100644 index f97426c..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/maroon/content/gfx/wave.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/logic.js b/basicsuite/Qt5Everywhere/demos/maroon/content/logic.js deleted file mode 100644 index dd76b7e..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/logic.js +++ /dev/null @@ -1,264 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -.pragma library // Shared game state -.import QtQuick 2.0 as QQ - -// Game Stuff -var gameState // Local reference -function getGameState() { return gameState; } - -var towerData = [ // Name and cost, stats are in the delegate per instance - { "name": "Melee", "cost": 20 }, - { "name": "Ranged", "cost": 50 }, - { "name": "Bomb", "cost": 75 }, - { "name": "Factory", "cost": 25 } -] - -var waveBaseData = [300, 290, 280, 270, 220, 180, 160, 80, 80, 80, 30, 30, 30, 30]; -var waveData = []; - -var towerComponents = new Array(towerData.length); -var mobComponent = Qt.createComponent("mobs/MobBase.qml"); - -function endGame() -{ - gameState.gameRunning = false; - gameState.gameOver = true; - for (var i = 0; i < gameState.cols; i++) { - for (var j = 0; j < gameState.rows; j++) { - if (gameState.towers[towerIdx(i, j)]) { - gameState.towers[towerIdx(i, j)].destroy(); - gameState.towers[towerIdx(i, j)] = null; - } - } - for (var j in gameState.mobs[i]) - gameState.mobs[i][j].destroy(); - gameState.mobs[i].splice(0,gameState.mobs[i].length); //Leaves queue reusable - } -} - -function startGame(gameCanvas) -{ - waveData = new Array(); - for (var i in waveBaseData) - waveData[i] = waveBaseData[i]; - gameState.freshState(); - for (var i = 0; i < gameCanvas.cols; i++) { - for (var j = 0; j < gameCanvas.rows; j++) - gameState.towers[towerIdx(i, j)] = null; - gameState.mobs[i] = new Array(); - } - gameState.towers[towerIdx(0, 0)] = newTower(3, 0, 0);//Start with a starfish in the corner - gameState.gameRunning = true; - gameState.gameOver = false; -} - -function newGameState(gameCanvas) -{ - for (var i = 0; i < towerComponents.length; i++) { - towerComponents[i] = Qt.createComponent("towers/" + towerData[i].name + ".qml"); - if (towerComponents[i].status == QQ.Component.Error) { - gameCanvas.errored = true; - gameCanvas.errorString += "Loading Tower " + towerData[i].name + "\n" + (towerComponents[i].errorString()); - console.log(towerComponents[i].errorString()); - } - } - gameState = gameCanvas; - gameState.freshState(); - gameState.towers = new Array(gameCanvas.rows * gameCanvas.cols); - gameState.mobs = new Array(gameCanvas.cols); - return gameState; -} - -function row(y) -{ - return Math.floor(y / gameState.squareSize); -} - -function col(x) -{ - return Math.floor(x / gameState.squareSize); -} - -function towerIdx(x, y) -{ - return y + (x * gameState.rows); -} - -function newMob(col) -{ - var ret = mobComponent.createObject(gameState.canvas, - { "col" : col, - "speed" : (Math.min(2.0, 0.10 * (gameState.waveNumber + 1))), - "y" : gameState.canvas.height }); - gameState.mobs[col].push(ret); - return ret; -} - -function newTower(type, row, col) -{ - var ret = towerComponents[type].createObject(gameState.canvas); - ret.row = row; - ret.col = col; - ret.fireCounter = ret.rof; - ret.spawn(); - return ret; -} - -function buildTower(type, x, y) -{ - if (gameState.towers[towerIdx(x,y)] != null) { - if (type <= 0) { - gameState.towers[towerIdx(x,y)].sell(); - gameState.towers[towerIdx(x,y)] = null; - } - } else { - if (gameState.coins < towerData[type - 1].cost) - return; - gameState.towers[towerIdx(x, y)] = newTower(type - 1, y, x); - gameState.coins -= towerData[type - 1].cost; - } -} - -function killMob(col, mob) -{ - if (!mob) - return; - var idx = gameState.mobs[col].indexOf(mob); - if (idx == -1 || !mob.hp) - return; - mob.hp = 0; - mob.die(); - gameState.mobs[col].splice(idx,1); -} - -function killTower(row, col) -{ - var tower = gameState.towers[towerIdx(col, row)]; - if (!tower) - return; - tower.hp = 0; - tower.die(); - gameState.towers[towerIdx(col, row)] = null; -} - -function tick() -{ - if (!gameState.gameRunning) - return; - - // Spawn - gameState.waveProgress += 1; - var i = gameState.waveProgress; - var j = 0; - while (i > 0 && j < waveData.length) - i -= waveData[j++]; - if ( i == 0 ) // Spawn a mob - newMob(Math.floor(Math.random() * gameState.cols)); - if ( j == waveData.length ) { // Next Wave - gameState.waveNumber += 1; - gameState.waveProgress = 0; - var waveModifier = 10; // Constant governing how much faster the next wave is to spawn (not fish speed) - for (var k in waveData ) // Slightly faster - if (waveData[k] > waveModifier) - waveData[k] -= waveModifier; - } - - // Towers Attack - for (var j in gameState.towers) { - var tower = gameState.towers[j]; - if (tower == null) - continue; - if (tower.fireCounter > 0) { - tower.fireCounter -= 1; - continue; - } - var column = tower.col; - for (var k in gameState.mobs[column]) { - var conflict = gameState.mobs[column][k]; - if (conflict.y <= gameState.canvas.height && conflict.y + conflict.height > tower.y - && conflict.y - ((tower.row + 1) * gameState.squareSize) < gameState.squareSize * tower.range) { // In Range - tower.fire(); - tower.fireCounter = tower.rof; - conflict.hit(tower.damage); - } - } - - // Income - if (tower.income) { - gameState.coins += tower.income; - tower.fire(); - tower.fireCounter = tower.rof; - } - } - - // Mobs move - for (var i = 0; i < gameState.cols; i++) { - for (var j = 0; j < gameState.mobs[i].length; j++) { - var mob = gameState.mobs[i][j]; - var newPos = gameState.mobs[i][j].y - gameState.mobs[i][j].speed; - if (newPos < 0) { - gameState.lives -= 1; - killMob(i, mob); - if (gameState.lives <= 0) - endGame(); - continue; - } - var conflict = gameState.towers[towerIdx(i, row(newPos))]; - if (conflict != null) { - if (mob.y < conflict.y + gameState.squareSize) - gameState.mobs[i][j].y += gameState.mobs[i][j].speed * 10; // Moved inside tower, now hurry back out - if (mob.fireCounter > 0) { - mob.fireCounter--; - } else { - gameState.mobs[i][j].fire(); - conflict.hp -= mob.damage; - if (conflict.hp <= 0) - killTower(conflict.row, conflict.col); - mob.fireCounter = mob.rof; - } - } else { - gameState.mobs[i][j].y = newPos; - } - } - } - -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/mobs/MobBase.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/mobs/MobBase.qml deleted file mode 100644 index d4ece66..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/mobs/MobBase.qml +++ /dev/null @@ -1,262 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "../logic.js" as Logic -import ".." - -Item { - id: container - property string name: "Fish" - property int col: 0 - property real hp: 3 - property real damage: 1 - property real speed: 0.25 - property int rof: 30 //In ticks - property int fireCounter: 0 - property bool dying: false - width: parent ? parent.squareSize : 0 - height: parent ? parent.squareSize : 0 - x: col * width - z: 1001 - function fire() { } - - function die() { - if (dying) - return; - dying = true; - bubble.jumpTo("burst"); - if (fishSprite.currentSprite == "front") - fishSprite.jumpTo(Math.random() > 0.5 ? "left" : "right" ); - fishSwim.start(); - Logic.gameState.score += 1; - killedSound.play(); - bubble.scale = 0.9 - destroy(350); - } - - function inked() { - if (hp > 0) - ink.jumpTo("dirty"); - } - - function hit(dmg) { - hp -= dmg; - - if (hp <= 0) - Logic.killMob(col, container); - } - - Component.onCompleted: spawnSound.play() - - SoundEffect { - id: spawnSound - source: "../audio/catch.wav" - } - SoundEffect { - id: killedSound - source: "../audio/catch-action.wav" - } - - SpriteSequence { - id: fishSprite - width: 64 - height: 64 - interpolate: false - goalSprite: "" - - Sprite { - name: "left" - source: "../gfx/mob-idle.png" - frameWidth: 64 - frameHeight: 64 - frameCount: 1 - frameDuration: 800 - frameDurationVariation: 400 - to: { "front" : 1 } - } - - Sprite { - name: "front" - source: "../gfx/mob-idle.png" - frameCount: 1 - frameX: 64 - frameWidth: 64 - frameHeight: 64 - frameDuration: 800 - frameDurationVariation: 400 - to: { "left" : 1, "right" : 1 } - } - - Sprite { - name: "right" - source: "../gfx/mob-idle.png" - frameCount: 1 - frameX: 128 - frameWidth: 64 - frameHeight: 64 - frameDuration: 800 - frameDurationVariation: 400 - to: { "front" : 1 } - } - - - Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. - name: "dummy" - source: "../gfx/melee-idle.png" - frameCount: 8 - frameWidth: 64 - frameHeight: 64 - frameX: 0 - frameDuration: 200 - } - - NumberAnimation on x { - id: fishSwim - running: false - property bool goingLeft: fishSprite.currentSprite == "right" - to: goingLeft ? -360 : 360 - duration: 300 - } - } - - SpriteSequence { - id: bubble - width: 64 - height: 64 - scale: 0.4 + (0.2 * hp) - interpolate: false - goalSprite: "" - - Behavior on scale { - NumberAnimation { duration: 150; easing.type: Easing.OutBack } - } - - Sprite { - name: "big" - source: "../gfx/catch.png" - frameCount: 1 - to: { "burst" : 0 } - } - - Sprite { - name: "burst" - source: "../gfx/catch-action.png" - frameCount: 3 - frameX: 64 - frameDuration: 200 - } - - Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. - name: "dummy" - source: "../gfx/melee-idle.png" - frameCount: 8 - frameWidth: 64 - frameHeight: 64 - frameX: 0 - frameDuration: 200 - } - SequentialAnimation on width { - loops: Animation.Infinite - NumberAnimation { from: width * 1; to: width * 1.1; duration: 800; easing.type: Easing.InOutQuad } - NumberAnimation { from: width * 1.1; to: width * 1; duration: 1000; easing.type: Easing.InOutQuad } - } - SequentialAnimation on height { - loops: Animation.Infinite - NumberAnimation { from: height * 1; to: height * 1.15; duration: 1200; easing.type: Easing.InOutQuad } - NumberAnimation { from: height * 1.15; to: height * 1; duration: 1000; easing.type: Easing.InOutQuad } - } - } - - SpriteSequence { - id: ink - width: 64 - height: 64 - scale: bubble.scale - goalSprite: "" - - Sprite { - name: "clean" - source: "../gfx/projectile-action.png" - frameCount: 1 - frameX: 0 - frameWidth: 64 - frameHeight: 64 - } - Sprite { - name: "dirty" - source: "../gfx/projectile-action.png" - frameCount: 3 - frameX: 64 - frameWidth: 64 - frameHeight: 64 - frameDuration: 150 - to: {"clean":1} - } - - Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. - name: "dummy" - source: "../gfx/melee-idle.png" - frameCount: 8 - frameWidth: 64 - frameHeight: 64 - frameX: 0 - frameDuration: 200 - } - SequentialAnimation on width { - loops: Animation.Infinite - NumberAnimation { from: width * 1; to: width * 1.1; duration: 800; easing.type: Easing.InOutQuad } - NumberAnimation { from: width * 1.1; to: width * 1; duration: 1000; easing.type: Easing.InOutQuad } - } - SequentialAnimation on height { - loops: Animation.Infinite - NumberAnimation { from: height * 1; to: height * 1.15; duration: 1200; easing.type: Easing.InOutQuad } - NumberAnimation { from: height * 1.15; to: height * 1; duration: 1000; easing.type: Easing.InOutQuad } - } - - } - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x; to: x - 5; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: x - 5; to: x; duration: 900; easing.type: Easing.InOutQuad } - } -} - diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Bomb.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Bomb.qml deleted file mode 100644 index 41522ef..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Bomb.qml +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "../logic.js" as Logic -import ".." - -TowerBase { - id: container - hp: 10 - range: 0.4 - rof: 10 - property real detonationRange: 2.5 - - function fire() { - sound.play() - sprite.jumpTo("shoot") - animDelay.start() - } - - function finishFire() { - var sCol = Math.max(0, col - 1) - var eCol = Math.min(Logic.gameState.cols - 1, col + 1) - var killList = new Array() - for (var i = sCol; i <= eCol; i++) { - for (var j = 0; j < Logic.gameState.mobs[i].length; j++) - if (Math.abs(Logic.gameState.mobs[i][j].y - container.y) < Logic.gameState.squareSize * detonationRange) - killList.push(Logic.gameState.mobs[i][j]) - while (killList.length > 0) - Logic.killMob(i, killList.pop()) - } - Logic.killTower(row, col); - } - - Timer { - id: animDelay - running: false - interval: shootState.frameCount * shootState.frameDuration - onTriggered: finishFire() - } - - function die() - { - destroy() // No blink, because we usually meant to die - } - - SoundEffect { - id: sound - source: "../audio/bomb-action.wav" - } - - SpriteSequence { - id: sprite - width: 64 - height: 64 - interpolate: false - goalSprite: "" - - Sprite { - name: "idle" - source: "../gfx/bomb-idle.png" - frameCount: 4 - frameDuration: 800 - } - - Sprite { - id: shootState - name: "shoot" - source: "../gfx/bomb-action.png" - frameCount: 6 - frameDuration: 155 - to: { "dying" : 1 } // So that if it takes a frame to clean up, it is on the last frame of the explosion - } - - Sprite { - name: "dying" - source: "../gfx/bomb-action.png" - frameCount: 1 - frameX: 64 * 5 - frameWidth: 64 - frameHeight: 64 - frameDuration: 155 - } - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x; to: x + 4; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: x + 4; to: x; duration: 900; easing.type: Easing.InOutQuad } - } - SequentialAnimation on y { - loops: Animation.Infinite - NumberAnimation { from: y; to: y - 4; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: y - 4; to: y; duration: 900; easing.type: Easing.InOutQuad } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Factory.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Factory.qml deleted file mode 100644 index b34a184..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Factory.qml +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "../logic.js" as Logic -import ".." - -TowerBase { - id: container - rof: 160 - income: 5 - SpriteSequence { - id: sprite - width: 64 - height: 64 - interpolate: false - goalSprite: "" - - Sprite { - name: "idle" - source: "../gfx/factory-idle.png" - frameCount: 4 - frameDuration: 200 - } - - Sprite { - name: "action" - source: "../gfx/factory-action.png" - frameCount: 4 - frameDuration: 90 - to: { "idle" : 1 } - } - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x; to: x + 4; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: x + 4; to: x; duration: 900; easing.type: Easing.InOutQuad } - } - SequentialAnimation on y { - loops: Animation.Infinite - NumberAnimation { from: y; to: y - 4; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: y - 4; to: y; duration: 900; easing.type: Easing.InOutQuad } - } - } - - SoundEffect { - id: actionSound - source: "../audio/factory-action.wav" - } - - function fire() { - actionSound.play() - sprite.jumpTo("action") - coinLaunch.start() - } - - function spawn() { - coin.target = Logic.gameState.mapToItem(container, 240, -32) - } - - Image { - id: coin - property var target: { "x" : 0, "y" : 0 } - source: "../gfx/currency.png" - visible: false - } - - SequentialAnimation { - id: coinLaunch - PropertyAction { target: coin; property: "visible"; value: true } - ParallelAnimation { - NumberAnimation { target: coin; property: "x"; from: 16; to: coin.target.x } - NumberAnimation { target: coin; property: "y"; from: 16; to: coin.target.y } - } - PropertyAction { target: coin; property: "visible"; value: false } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Melee.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Melee.qml deleted file mode 100644 index 1b49a45..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Melee.qml +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import ".." - -TowerBase { - hp: 4 - range: 0.1 - damage: 1 - rof: 40 - income: 0 - - SpriteSequence { - id: sprite - width: 64 - height: 64 - interpolate: false - goalSprite: "" - - Sprite { - name: "idle" - source: "../gfx/melee-idle.png" - frameCount: 8 - frameDuration: 250 - } - - Sprite { - name: "shoot" - source: "../gfx/melee-action.png" - frameCount: 2 - frameDuration: 200 - to: { "idle" : 1 } - } - } - - function fire() { - shootSound.play() - sprite.jumpTo("shoot") - } - - SoundEffect { - id: shootSound - source: "../audio/melee-action.wav" - } -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Ranged.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Ranged.qml deleted file mode 100644 index 33f3354..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/towers/Ranged.qml +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "../logic.js" as Logic -import ".." - -TowerBase { - id: container - hp: 2 - range: 6 - damage: 0 // By projectile - rof: 40 - income: 0 - property var targetMob - property real realDamage: 1 - function fire() { - proj.x = 32 - proj.width / 2 - proj.y = 0 - targetMob = Logic.gameState.mobs[col][0] - projAnim.to = targetMob.y - container.y -10 - projAnim.start() - shootSound.play() - sprite.jumpTo("shoot") - } - - Image { - id: proj - y: 1000 - SequentialAnimation on y { - id: projAnim - running: false - property real to: 1000 - SmoothedAnimation { - to: projAnim.to - velocity: 400 - } - ScriptAction { - script: { - if (targetMob && targetMob.hit) { - targetMob.hit(realDamage) - targetMob.inked() - projSound.play() - } - } - } - PropertyAction { - value: 1000; - } - } - source: "../gfx/projectile.png" - } - - SoundEffect { - id: shootSound - source: "../audio/shooter-action.wav" - } - SoundEffect { - id: projSound - source: "../audio/projectile-action.wav" - } - - SpriteSequence { - id: sprite - width: 64 - height: 64 - interpolate: false - goalSprite: "" - - Sprite { - name: "idle" - source: "../gfx/shooter-idle.png" - frameCount: 4 - frameDuration: 250 - } - - Sprite { - name: "shoot" - source: "../gfx/shooter-action.png" - frameCount: 5 - frameDuration: 90 - to: { "idle" : 1 } - } - - SequentialAnimation on x { - loops: Animation.Infinite - NumberAnimation { from: x; to: x - 4; duration: 900; easing.type: Easing.InOutQuad } - NumberAnimation { from: x - 4; to: x; duration: 900; easing.type: Easing.InOutQuad } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/maroon/content/towers/TowerBase.qml b/basicsuite/Qt5Everywhere/demos/maroon/content/towers/TowerBase.qml deleted file mode 100644 index 5c71cb0..0000000 --- a/basicsuite/Qt5Everywhere/demos/maroon/content/towers/TowerBase.qml +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - property real hp: 1 - property real range: 0 - property real damage: 0 - property int rof: 100 - property int fireCounter: 0 - property int income: 0 - property int row: 0 - property int col: 0 - - width: parent ? parent.squareSize : 0 - height: parent ? parent.squareSize : 0 - //This is how it is placed on the gameboard, do not modify/animate the X/Y/Z of a TowerBase please - x: col * width - y: row * height - z: 1000 - - function fire() { } - function spawn() { } //After all game properties are set - function die() { stdDeath.start(); destroy(1000); } - function sell() { destroy(); } - - SequentialAnimation on opacity { - id: stdDeath - running: false - loops: 2 - NumberAnimation { from: 1; to: 0; } - NumberAnimation { from: 0; to: 1; } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/particledemo/BootScreenDemo.qml b/basicsuite/Qt5Everywhere/demos/particledemo/BootScreenDemo.qml deleted file mode 100644 index eb4e29e..0000000 --- a/basicsuite/Qt5Everywhere/demos/particledemo/BootScreenDemo.qml +++ /dev/null @@ -1,181 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: root - property real size: Math.min(root.width, root.height); - signal finished() - - SequentialAnimation { - id: entryAnimation - running: true - PropertyAction { target: sphereEmitter; property: "emitRate"; value: 150 } - PropertyAction { target: starEmitter; property: "emitRate"; value: 100 } - PropertyAction { target: starEmitter; property: "enabled"; value: true } - PropertyAction { target: sphereEmitter; property: "enabled"; value: true } - PropertyAction { target: sphereSystem; property: "running"; value: true } - PropertyAction { target: starSystem; property: "running"; value: true } - PauseAnimation { duration: 5000 } - - onRunningChanged: if (!running) explodeAnimation.restart() - } - - SequentialAnimation{ - id: explodeAnimation - ScriptAction { script: { - starAccel.x = 5 - starAccel.xVariation = 20; - starAccel.yVariation = 20; - sphereAccel.x = -5 - sphereAccel.xVariation = 20 - sphereAccel.yVariation = 20 - sphereParticle.alpha = 0; - } - } - PropertyAction { target: sphereEmitter; property: "emitRate"; value: 200 } - PropertyAction { target: starEmitter; property: "emitRate"; value: 200 } - PauseAnimation { duration: 2000 } - PropertyAction { target: starEmitter; property: "enabled"; value: false } - PropertyAction { target: sphereEmitter; property: "enabled"; value: false } - PauseAnimation { duration: 5000 } - - onRunningChanged: { - if (!running) { - root.finished() - root.destroy() - } - } - } - - Item { - id: logo; - width: root.size / 2; - height: root.size / 2; - anchors.centerIn: parent - } - - ParticleSystem { - id: sphereSystem; - anchors.fill: logo - running: false - - ImageParticle { - id: sphereParticle - source: "images/particle.png" - color: "#80c342" - alpha: 1 - colorVariation: 0.0 - } - - Emitter { - id: sphereEmitter - anchors.fill: parent - emitRate: 100 - lifeSpan: 4000 - size: root.width*.15 - sizeVariation: size *.2 - velocity: PointDirection { xVariation: 2; yVariation: 2; } - - acceleration: PointDirection { - id: sphereAccel - xVariation: 1; - yVariation: 1; - } - - shape: MaskShape { - source: "images/qt-logo-green-mask.png" - } - } - } - - ParticleSystem { - id: starSystem; - anchors.fill: logo - running: false - - ImageParticle { - id: starParticle - source: "images/particle_star.png" - color: "#ffffff" - alpha: 0 - colorVariation: 0 - } - - Emitter { - id: starEmitter - anchors.fill: parent - emitRate: 50 - lifeSpan: 5000 - size: root.width*.1 - sizeVariation: size *.2 - velocity: PointDirection { xVariation: 1; yVariation: 1; } - - acceleration: PointDirection { - id: starAccel - xVariation: 0; - yVariation: 0; - } - - shape: MaskShape { - source: "images/qt-logo-white-mask.png" - } - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - - if (entryAnimation.running) { - entryAnimation.complete() - return; - } - - if (explodeAnimation.running) { - root.finished() - root.destroy() - } - - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/particledemo/ParticleSysComponent.qml b/basicsuite/Qt5Everywhere/demos/particledemo/ParticleSysComponent.qml deleted file mode 100644 index fc74037..0000000 --- a/basicsuite/Qt5Everywhere/demos/particledemo/ParticleSysComponent.qml +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -/** - * ParticleSystem component draw particles with the given color. - */ - -ParticleSystem { - id: root - anchors.fill: parent - running: true - - property color particleColor: "#ff0000" - property real angle: particleRoot.angle; - property int pointCount: particleRoot.pointCount; - property real radius: particleRoot.distance; - property real movement: particleRoot.movement; - property bool emitting: particleRoot.running; - property int touchX: 0 - property int touchY: 0 - property int startAngle: 0 - property bool pressed: false - property real targetX: pressed ? touchX : width/2+radius * Math.cos(targetAngle*(Math.PI/180)) - property real targetY: pressed ? touchY : height/2+radius * Math.sin(targetAngle*(Math.PI/180)) - property real targetAngle: angle+startAngle - - Emitter { - id: emitter - lifeSpan: 1000 - emitRate: 80 - x: targetX - y: targetY - enabled: root.emitting - size: root.height*.05 - endSize: root.height*.1 - sizeVariation: .5 - velocity: AngleDirection{angle:0; angleVariation: 360; magnitude: 10} - acceleration: AngleDirection{angle:0; angleVariation: 360; magnitude: 10} - velocityFromMovement: root.movement - } - - ImageParticle { - id: imageParticle - source: "images/particle.png" - color: root.pointCount >0 && root.pressed ? root.particleColor: "#444444" - alpha: .0 - colorVariation: root.pointCount >0 && root.pressed ? 0.3: .0 - - Behavior on color{ - enabled: root.pointCount != 0 - ColorAnimation { duration: 500 } - } - - SequentialAnimation on color { - id: colorAnimation - loops: Animation.Infinite - running: root.pointCount === 0 - ColorAnimation {from: root.particleColor; to: "magenta"; duration: 2000} - ColorAnimation {from: "magenta"; to: "blue"; duration: 1000} - ColorAnimation {from: "blue"; to: "violet"; duration: 1000} - ColorAnimation {from: "violet"; to: "red"; duration: 1000} - ColorAnimation {from: "red"; to: "orange"; duration: 1000} - ColorAnimation {from: "orange"; to: "yellow"; duration: 1000} - ColorAnimation {from: "yellow"; to: "green"; duration: 1000} - ColorAnimation {from: "green"; to: root.particleColor; duration: 2000} - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/particledemo/images/particle.png b/basicsuite/Qt5Everywhere/demos/particledemo/images/particle.png deleted file mode 100644 index 7520c9b..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/particledemo/images/particle.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/particledemo/images/particle_star.png b/basicsuite/Qt5Everywhere/demos/particledemo/images/particle_star.png deleted file mode 100644 index 5660d27..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/particledemo/images/particle_star.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/particledemo/images/qt-logo-green-mask.png b/basicsuite/Qt5Everywhere/demos/particledemo/images/qt-logo-green-mask.png deleted file mode 100644 index 84be10d..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/particledemo/images/qt-logo-green-mask.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/particledemo/images/qt-logo-white-mask.png b/basicsuite/Qt5Everywhere/demos/particledemo/images/qt-logo-white-mask.png deleted file mode 100644 index 920eeee..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/particledemo/images/qt-logo-white-mask.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/particledemo/particle.png b/basicsuite/Qt5Everywhere/demos/particledemo/particle.png deleted file mode 100644 index 5c83896..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/particledemo/particle.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/particledemo/particledemo.qml b/basicsuite/Qt5Everywhere/demos/particledemo/particledemo.qml deleted file mode 100644 index c3f8253..0000000 --- a/basicsuite/Qt5Everywhere/demos/particledemo/particledemo.qml +++ /dev/null @@ -1,213 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Rectangle { - id: particleRoot - color: "#000000" - anchors.fill: parent - - property real distance: parent.height*.4 - property real angle: 0 - property real movement: 0 - property alias running: angleAnimation.running - property int pointCount: mouseArea.pointCount + multiPointTouchArea.pointCount - - BootScreenDemo { - width: Math.min(parent.width,parent.height) - height: width - anchors.centerIn: parent - z: 1 - onFinished: { - distanceAnimation.restart() - angleAnimation.restart() - } - } - - RotationAnimation on angle { - id: angleAnimation - from: 0 - to: 360 - running: false - duration: distanceAnimation.delay - direction: RotationAnimation.Shortest - loops: Animation.Infinite - } - - SequentialAnimation on distance { - id: distanceAnimation - property int easingType:0 - property int delay: 1000 - running: false - - NumberAnimation { - from: 0 - to: parent.height*.4 - duration: distanceAnimation.delay/2 - easing.type: distanceAnimation.easingType - } - - NumberAnimation { - from: parent.height*.4 - to: 0 - duration: distanceAnimation.delay/2 - easing.type: distanceAnimation.easingType - } - - onRunningChanged: { - if (!running){ - var type = Math.floor(Math.random()*10) - switch (type){ - case 0: - distanceAnimation.easingType=Easing.InOutBack - break; - case 1: - distanceAnimation.easingType=Easing.InOutBounce - break; - case 2: - distanceAnimation.easingType=Easing.InOutCirc - break; - case 3: - distanceAnimation.easingType=Easing.InOutElastic - break; - case 4: - distanceAnimation.easingType=Easing.InOutSine - break; - case 5: - distanceAnimation.easingType=Easing.OutInQuad - break; - case 6: - distanceAnimation.easingType=Easing.OutInCubic - break; - case 7: - distanceAnimation.easingType=Easing.OutExpo - break; - case 8: - distanceAnimation.easingType=Easing.OutCurve - break; - default: - distanceAnimation.easingType=Easing.Linear - break; - } - - distanceAnimation.delay = 500 + Math.floor(Math.random()*1500) - angleAnimation.from = 180 + Math.random()*90 - 45 - particleRoot.movement = Math.random()*2 - angleAnimation.restart() - distanceAnimation.restart() - } - } - } - - /** - * Create five ParticleSysComponents for drawing particles - * in the place of multitouch points with the given color. - */ - ParticleSysComponent{ id: p1; particleColor: "#ff0000"; startAngle: 1*360/(5-particleRoot.pointCount); } - ParticleSysComponent{ id: p2; particleColor: "#00ff00"; startAngle: 2*360/(5-particleRoot.pointCount); } - ParticleSysComponent{ id: p3; particleColor: "#0000ff"; startAngle: 3*360/(5-particleRoot.pointCount); } - ParticleSysComponent{ id: p4; particleColor: "#ffff00"; startAngle: 4*360/(5-particleRoot.pointCount); } - ParticleSysComponent{ id: p5; particleColor: "#ff00ff"; startAngle: 5*360/(5-particleRoot.pointCount); } - - /** - * In this demo we only support five touch point at the same time. - * One from mouseArea (because of Desktop-support) and four from MultiPointTouchArea. - */ - MultiPointTouchArea { - id: multiPointTouchArea - anchors.fill: parent - minimumTouchPoints: 1 - maximumTouchPoints: 6 - - property int pointCount:0 - - touchPoints: [ - TouchPoint { id: point1 }, - TouchPoint { id: point2 }, - TouchPoint { id: point3 }, - TouchPoint { id: point4 } - ] - - onPressed: updatePointCount() - onReleased: updatePointCount() - onTouchUpdated: { - p2.touchX = point1.x; p2.touchY = point1.y; p2.pressed = point1.pressed; - p3.touchX = point2.x; p3.touchY = point2.y; p3.pressed = point2.pressed; - p4.touchX = point3.x; p4.touchY = point3.y; p4.pressed = point3.pressed; - p5.touchX = point4.x; p5.touchY = point4.y; p5.pressed = point4.pressed; - } - - function updatePointCount(){ - var tmp = 0 - for (var i=0; i<4; i++) { - if (touchPoints[i].pressed) - tmp++ - } - pointCount = tmp - } - } - - /** - * For desktop. - */ - MouseArea { - id: mouseArea - anchors.fill: parent - - property int pointCount:0 - - onPressed: { - pointCount = 1; - p1.touchX = mouse.x; - p1.touchY = mouse.y; - p1.pressed = true; - } - onReleased: { - pointCount = 0; - p1.pressed = false; - } - onPositionChanged: { - p1.touchX = mouse.x; - p1.touchY = mouse.y; - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/photosurface/images/image0.png b/basicsuite/Qt5Everywhere/demos/photosurface/images/image0.png deleted file mode 100644 index 711b788..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/photosurface/images/image0.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/photosurface/images/image1.png b/basicsuite/Qt5Everywhere/demos/photosurface/images/image1.png deleted file mode 100644 index e9bfcdf..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/photosurface/images/image1.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/photosurface/images/image2.png b/basicsuite/Qt5Everywhere/demos/photosurface/images/image2.png deleted file mode 100644 index b37453c..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/photosurface/images/image2.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/photosurface/images/image3.png b/basicsuite/Qt5Everywhere/demos/photosurface/images/image3.png deleted file mode 100644 index 63d82e7..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/photosurface/images/image3.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/photosurface/images/image4.png b/basicsuite/Qt5Everywhere/demos/photosurface/images/image4.png deleted file mode 100644 index a499231..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/photosurface/images/image4.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/photosurface/images/qml-photosurface-example-small.png b/basicsuite/Qt5Everywhere/demos/photosurface/images/qml-photosurface-example-small.png deleted file mode 100644 index a0cd823..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/photosurface/images/qml-photosurface-example-small.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/photosurface/photosurface.qml b/basicsuite/Qt5Everywhere/demos/photosurface/photosurface.qml deleted file mode 100644 index 6ca2626..0000000 --- a/basicsuite/Qt5Everywhere/demos/photosurface/photosurface.qml +++ /dev/null @@ -1,131 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: root - visible: true - anchors.fill: parent - property int highestZ: 0 - property real defaultSize: 200 - - gradient: Gradient{ - GradientStop{position: 0.0; color: "#333333"} - GradientStop{position: 1.0; color: "#111111"} - } - - Repeater { -// model: FolderListModel { -// id: folderModel -// objectName: "folderModel" -// showDirs: false -// nameFilters: ["*.png", "*.jpg", "*.gif"] -// } - id: repeater - model: 5 - anchors.fill: parent - - clip: true - Rectangle { - id: photoFrame - width: image.width * image.scale + 20 - height: image.height * image.scale + 20 - border.color: "black" - border.width: 2 - smooth: true - antialiasing: true - x: Math.random() * root.width - defaultSize / 2 - y: Math.random() * root.height - defaultSize / 2 - rotation: Math.random() * 13 - 6 - Image { - id: image - anchors.centerIn: parent - fillMode: Image.PreserveAspectFit - source: "images/image"+index+".png" - scale: defaultSize / Math.max(sourceSize.width, sourceSize.height) - antialiasing: true - } - PinchArea { - anchors.fill: parent - pinch.target: photoFrame - pinch.minimumRotation: -360 - pinch.maximumRotation: 360 - pinch.minimumScale: 0.1 - pinch.maximumScale: 10 - onPinchFinished: photoFrame.border.color = "black"; - MouseArea { - id: dragArea - hoverEnabled: true - anchors.fill: parent - drag.target: photoFrame - onPressed: photoFrame.z = ++root.highestZ; - onEntered: photoFrame.border.color = "red"; - onExited: photoFrame.border.color = "black"; - onWheel: { - if (wheel.modifiers & Qt.ControlModifier) { - photoFrame.rotation += wheel.angleDelta.y / 120 * 5; - if (Math.abs(photoFrame.rotation) < 4) - photoFrame.rotation = 0; - } else { - photoFrame.rotation += wheel.angleDelta.x / 120; - if (Math.abs(photoFrame.rotation) < 0.6) - photoFrame.rotation = 0; - var scaleBefore = image.scale; - image.scale += image.scale * wheel.angleDelta.y / 120 / 10; - photoFrame.x -= image.width * (image.scale - scaleBefore) / 2.0; - photoFrame.y -= image.height * (image.scale - scaleBefore) / 2.0; - } - } - } - } - } - } -// Text { -// anchors.bottom: parent.bottom -// anchors.left: parent.left -// anchors.margins: 10 -// color: "darkgrey" -// text: "On a touchscreen: use two fingers to zoom and rotate, one finger to drag\n" + -// "With a mouse: drag normally, use the vertical wheel to zoom, horizontal wheel to rotate, or hold Ctrl while using the vertical wheel to rotate" -// wrapMode: Text.Wrap -// } - - //Component.onCompleted: fileDialog.open() -} diff --git a/basicsuite/Qt5Everywhere/demos/radio/VolumeButton.qml b/basicsuite/Qt5Everywhere/demos/radio/VolumeButton.qml deleted file mode 100644 index 76635b6..0000000 --- a/basicsuite/Qt5Everywhere/demos/radio/VolumeButton.qml +++ /dev/null @@ -1,185 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - width: size - height: size - - property int steps: 10 - property int size: 0 - property real volume: .5 - property bool playing: false - signal clicked(); - - Item { - id: bg - anchors.fill: parent - - Rectangle { - id: bgRect - - gradient: Gradient { - GradientStop {position: .0; color: "lightgray"} - GradientStop {position: 1.0; color: "white"} - } - - border {width:1; color: "#888888"} - radius: root.size/2 - anchors.centerIn: parent - width: parent.width - height: parent.height - } - - Rectangle { - gradient: Gradient { - GradientStop {position: .0; color: playButtonMouseArea.pressed ? "#052e41": "#095477"} - GradientStop {position: 1.0; color: playButtonMouseArea.pressed ? "#095477": "#052e41"} - } - - border {width:1; color: "#888888"} - radius: width/2 - anchors.centerIn: parent - width: parent.width*.6 - height: parent.height*.6 - - Image { - anchors {fill: parent; margins: parent.height*.3} - source: !root.playing ? "images/radio_btn_play.png" : "images/radio_btn_pause.png" - } - - MouseArea { - id: playButtonMouseArea - anchors.fill: parent - anchors.margins: parent.width*.2 - onClicked:{ - root.clicked() - } - } - } - } - - Item { - id: volumeIndicator - anchors.centerIn: root - width: root.size - height: root.size - z:2 - - Rectangle{ - id: volumeCircle - objectName: "volumeCircle" - anchors {horizontalCenter: parent.horizontalCenter; top: parent.top} - - gradient: Gradient { - GradientStop {position: .1; color: "#095477"} - GradientStop {position: 1.0; color: "#0e82b8"} - } - - width: root.size * .2 - height: width - radius: width/2 - border {width:1; color: "#888888"} - - Image { - anchors {fill: parent; margins: parent.height*.2} - source: "images/radio_sound_icon.png" - rotation: -volumeRotation.angle - } - } - - transform: Rotation { - id: volumeRotation - origin.x: volumeIndicator.width/2 - origin.y: volumeIndicator.height/2 - angle: 270.0*root.volume+225 - } - } - - MouseArea { - id: mouseArea - anchors.fill: volumeIndicator - property bool grabbed: false - anchors.margins: -root.size*.2 - z: -1 - - onPressed: { - var object = mapToItem(volumeIndicator, mouse.x, mouse.y) - var item = volumeIndicator.childAt(object.x,object.y) - if (item && item.objectName === 'volumeCircle') { - grabbed = true - return; - } else { - grabbed = false - } - - object = mapToItem(root, mouse.x, mouse.y) - item = root.childAt(object.x,object.y) - if (item && item.objectName === 'volumePoint') { - root.volume = item.level - } - } - - onPositionChanged: { - if (!grabbed) return; - var ang = (225+Math.atan2((mouse.y-mouseArea.height/2.0), (mouse.x-mouseArea.width/2.0))*180.0/Math.PI) - if (ang >360) ang-=360 - if (ang > 270) return; - root.volume = (ang)/270.0 - } - } - - function init(){ - for (var i=0; i<=root.steps; i++){ - var x=Math.cos(((i)*270/root.steps+135)*0.01745)*root.size*.40 - var y=Math.sin(((i)*270/root.steps+135)*0.01745)*root.size*.40 - var component = Qt.createComponent("VolumePoint.qml") - if (component.status === Component.Ready) { - var object = component.createObject(root); - object.size = root.size*.05 - object.x = root.size/2+x-object.size/2 - object.y = root.size/2+y-object.size/2 - object.level = i/root.steps - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/radio/VolumePoint.qml b/basicsuite/Qt5Everywhere/demos/radio/VolumePoint.qml deleted file mode 100644 index c107823..0000000 --- a/basicsuite/Qt5Everywhere/demos/radio/VolumePoint.qml +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: root - objectName: "volumePoint" - width: size - height: size - radius: size/2 - color: volume >= level ? "#0e82b8": "#095477" - border {width:1; color: "#888888"} - property int size: 10 - property real level: 0 - property real volume: parent.volume - - Behavior on color{ColorAnimation { duration: 500 }} - - Item { - id: pointClickArea - objectName: "pointClickArea" - property alias value: root.level - anchors.fill: parent - anchors.margins: -root.size*2 - } -} diff --git a/basicsuite/Qt5Everywhere/demos/radio/channels.xml b/basicsuite/Qt5Everywhere/demos/radio/channels.xml deleted file mode 100644 index 99522ab..0000000 --- a/basicsuite/Qt5Everywhere/demos/radio/channels.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - BBC World Service - http://vpr.streamguys.net/vpr24.mp3 - - - CBC Music Hard Rock - http://2903.live.streamtheworld.com:80/CBC_HAROCK_H_SC.mp3 - - - "JPR Classics" - http://jpr.streamguys.org:80/jpr-classics - - - VPR Classical - http://vprclassical.streamguys.net/vprclassical24.mp3 - - - VPR Jazz24 - http://vprjazz.streamguys.net/vprjazz24.mp3 - - - Radio Paradise - http://scfire-m26.websys.aol.com:80/radio_paradise_mp3_128kbps.mp3 - - diff --git a/basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_pause.png b/basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_pause.png deleted file mode 100644 index 5204834..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_pause.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_play.png b/basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_play.png deleted file mode 100644 index 92ee858..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_play.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_stop.png b/basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_stop.png deleted file mode 100644 index 187158a..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/radio/images/radio_btn_stop.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/radio/images/radio_sound_icon.png b/basicsuite/Qt5Everywhere/demos/radio/images/radio_sound_icon.png deleted file mode 100644 index ac0b61e..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/radio/images/radio_sound_icon.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/radio/images/volume.png b/basicsuite/Qt5Everywhere/demos/radio/images/volume.png deleted file mode 100644 index a098d82..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/radio/images/volume.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/radio/radio.qml b/basicsuite/Qt5Everywhere/demos/radio/radio.qml deleted file mode 100644 index 8615f9b..0000000 --- a/basicsuite/Qt5Everywhere/demos/radio/radio.qml +++ /dev/null @@ -1,261 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtMultimedia 5.0 -import QtQuick.XmlListModel 2.0 - -FocusScope { - id: scope - x: parent.x; y: parent.y - width: parent.width; height: parent.height - focus: true - property bool active: false - - Rectangle { - id: root - width:parent.width - height: parent.height - anchors.centerIn: parent - focus: true - color: "#262626" - - Audio { - id: playMusic - source: "" - volume: volumeButton.volume - onSourceChanged: { - if (volumeButton.playing) playMusic.play() - } - onAvailabilityChanged: { - if (availability === Audio.Available) { - if (volumeButton.playing) playMusic.play() - } - } - Component.onDestruction: { - volumeButton.playing = false - playMusic.stop() - playMusic.source = "" - } - } - - Rectangle { - id: playerRect - anchors.top: volumeButton.top - anchors.left: volumeButton.left - anchors.bottom: volumeButton.bottom - anchors.right: parent.right - anchors.rightMargin: parent.height*.05 - gradient: Gradient { - GradientStop {position: .1; color: "lightgrey"} - GradientStop {position: 1.0; color: "white"} - } - border {width:1; color: "#888888"} - radius: height/2 - - Rectangle { - id: displayRect - anchors.fill: parent - anchors.margins: parent.height*.1 - gradient: Gradient { - GradientStop {position: .0; color: "#095477"} - GradientStop {position: 1.0; color: "#052e41"} - } - border {width:1; color: "#888888"} - radius: height/2 - - - PathView { - enabled: root.activeFocus - id: stationList - anchors.fill:parent - anchors.leftMargin: parent.height*.9 - model: stationModel - pathItemCount: 6 - clip: true - property int openedIndex: -1 - - onMovementStarted: { - idleTimer.stop() - openedIndex = -1 - pathItemCount = 5 - } - onMovementEnded: idleTimer.restart() - - onOpenedIndexChanged: { - if (openedIndex === -1) return - idleTimer.lastIndex=openedIndex - positionViewAtIndex(openedIndex, PathView.Center) - } - - Timer { - id: idleTimer - interval: 5000 - property int lastIndex: -1 - onTriggered: { - stationList.openedIndex = idleTimer.lastIndex - } - } - - Timer { - id: browseTimer - interval: 500 - property string source:"" - onTriggered: playMusic.source = source - } - - path: Path { - startX: stationList.x; startY: 0 - PathArc { - id: pathArc - x: stationList.x; relativeY: stationList.height*1.1 - radiusX: volumeButton.height/2 - radiusY: volumeButton.height/2 - useLargeArc: false - } - } - - delegate: Item { - id: stationDelegate - property bool opened: stationList.openedIndex === index - width: stationList.width*.7 - height: opened? stationList.height*.4: stationList.height*.2 - - Behavior on height {NumberAnimation{duration:200}} - - Text { - id: delegateText - anchors.left: parent.left - anchors.top: parent.top - text: (index+1) +". " +title - font.pixelSize: stationDelegate.opened? stationList.height*.15 : stationList.height*.1 - font.weight: stationDelegate.opened? Font.Bold: Font.Normal - color: stationList.openedIndex ===-1 || opened? "white": "#0e82b8" - Behavior on font.pixelSize {NumberAnimation{duration:200}} - } - - Text { - id: statustextText - anchors.left: parent.left - anchors.top: delegateText.bottom - - text: playMusic.playbackState=== Audio.PlayingState ? "Playing...": - playMusic.status=== Audio.Buffering ? "Buffering...": - playMusic.status=== Audio.Loading ? "Loading...": - playMusic.playbackState=== Audio.StoppedState ? "Stopped":"Error" - - font.pixelSize: stationList.height*.1 - color: delegateText.color - opacity: opened? 1.0: .0 - Behavior on opacity {NumberAnimation{duration:200}} - } - - - MouseArea { - anchors.fill: parent - visible: root.activeFocus - - onClicked: { - if (opened){ - idleTimer.lastIndex=-1 - stationList.openedIndex=-1 - }else { - stationList.openedIndex= index - browseTimer.source = url - browseTimer.restart() - } - } - } - } - } - } - } - - XmlListModel { - id: stationModel - source: "http://qt-project.org/uploads/videos/qt5_radio_channels.xml" - query: "/radio/channel" - XmlRole {name: "title"; query: "title/string()"} - XmlRole {name: "url"; query: "url/string()"} - } - - VolumeButton { - id: volumeButton - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: size*.1 - size:parent.height*.5 - playing: playMusic.playbackState === Audio.PlayingState - onClicked: { - if (!playMusic.source) return; - if (!playing) { - playMusic.play() - }else { - playMusic.stop() - } - } - } - - Component.onCompleted: { - volumeButton.init() - scope.focus = true - } - - Keys.onPressed: { - if (event.key === Qt.Key_Down || event.key === Qt.Key_VolumeDown) { - event.accepted = true - if (volumeButton.volume > .1){ - volumeButton.volume-=.1 - }else{ - volumeButton.volume = 0.0 - } - } - - if (event.key === Qt.Key_Up || event.key === Qt.Key_VolumeUp) { - event.accepted = true - if (volumeButton.volume < .9){ - volumeButton.volume+=.1 - }else{ - volumeButton.volume = 1.0 - } - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/rssnews/content/BusyIndicator.qml b/basicsuite/Qt5Everywhere/demos/rssnews/content/BusyIndicator.qml deleted file mode 100644 index c16f582..0000000 --- a/basicsuite/Qt5Everywhere/demos/rssnews/content/BusyIndicator.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Image { - id: container - property bool on: false - - source: "images/busy.png"; visible: container.on - - NumberAnimation on rotation { - running: container.on; from: 0; to: 360; loops: Animation.Infinite; duration: 1200 - } -} diff --git a/basicsuite/Qt5Everywhere/demos/rssnews/content/CategoryDelegate.qml b/basicsuite/Qt5Everywhere/demos/rssnews/content/CategoryDelegate.qml deleted file mode 100644 index 2916d1b..0000000 --- a/basicsuite/Qt5Everywhere/demos/rssnews/content/CategoryDelegate.qml +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: delegate - property double margin: delegate.height * 0.2; - width: delegate.ListView.view.width; - height: 60 - - Text { - text: name - color: delegate.ListView.isCurrentItem ? "white" : "black" - font { family: "Helvetica"; pixelSize: delegate.height * 0.25; bold: true } - anchors { - left: parent.left; - leftMargin: margin - verticalCenter: parent.verticalCenter - } - } - - BusyIndicator { - scale: 0.6 - on: delegate.ListView.isCurrentItem && window.loading - anchors { right: parent.right; rightMargin: margin; verticalCenter: parent.verticalCenter } - } - - Rectangle { - width: delegate.width; height: 1; color: "#cccccc" - anchors.bottom: delegate.bottom - visible: delegate.ListView.isCurrentItem ? false : true - } - Rectangle { - width: delegate.width; height: 1; color: "white" - visible: delegate.ListView.isCurrentItem ? false : true - } - - MouseArea { - anchors.fill: delegate - onClicked: { - delegate.ListView.view.currentIndex = index - window.currentFeed = feed - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/rssnews/content/NewsDelegate.qml b/basicsuite/Qt5Everywhere/demos/rssnews/content/NewsDelegate.qml deleted file mode 100644 index 4050af6..0000000 --- a/basicsuite/Qt5Everywhere/demos/rssnews/content/NewsDelegate.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: delegate - height: column.height + 2*margin - width: delegate.ListView.view.width - - property double margin: width * 0.03 - - Column { - id: column - x: margin; y: margin - width: parent.width - 2*margin - - Text { - id: titleText - text: title; width: parent.width; wrapMode: Text.WordWrap - font { bold: true; family: "Helvetica"; pixelSize: 20} - } - - Text { - id: descriptionText - width: parent.width; text: description - wrapMode: Text.WordWrap - font.family: "Helvetica" - font.pixelSize: 12 - } - } - - Rectangle { - width: parent.width; height: 1; color: "#cccccc" - anchors.bottom: parent.bottom - } -} diff --git a/basicsuite/Qt5Everywhere/demos/rssnews/content/RssFeeds.qml b/basicsuite/Qt5Everywhere/demos/rssnews/content/RssFeeds.qml deleted file mode 100644 index da26d6a..0000000 --- a/basicsuite/Qt5Everywhere/demos/rssnews/content/RssFeeds.qml +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -ListModel { - id: rssFeeds - - ListElement { name: "Top Stories"; feed: "feeds.bbci.co.uk/news/rss.xml" } - ListElement { name: "Popular Stories"; feed: "finance.yahoo.com/rss/popularstories" } - ListElement { name: "Qt Blog"; feed: "blog.qt.digia.com/feed/" } - ListElement { name: "Planet Qt"; feed: "planet.qt-project.org/rss20.xml" } - ListElement { name: "World"; feed: "rss.news.yahoo.com/rss/world" } - ListElement { name: "Oceania"; feed: "rss.news.yahoo.com/rss/oceania" } - ListElement { name: "U.S. National"; feed: "rss.news.yahoo.com/rss/us" } - ListElement { name: "Business"; feed: "rss.news.yahoo.com/rss/business" } - ListElement { name: "Technology"; feed: "rss.news.yahoo.com/rss/tech" } - ListElement { name: "Entertainment"; feed: "rss.news.yahoo.com/rss/entertainment" } - ListElement { name: "Sports"; feed: "sports.yahoo.com/mlb/teams/bos/rss.xml" } -} diff --git a/basicsuite/Qt5Everywhere/demos/rssnews/content/ScrollBar.qml b/basicsuite/Qt5Everywhere/demos/rssnews/content/ScrollBar.qml deleted file mode 100644 index d3cf4a6..0000000 --- a/basicsuite/Qt5Everywhere/demos/rssnews/content/ScrollBar.qml +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: container - - property variant scrollArea - property variant orientation: Qt.Vertical - - opacity: 0 - - function position() - { - var ny = 0; - if (container.orientation == Qt.Vertical) - ny = scrollArea.visibleArea.yPosition * container.height; - else - ny = scrollArea.visibleArea.xPosition * container.width; - if (ny > 2) return ny; else return 2; - } - - function size() - { - var nh, ny; - - if (container.orientation == Qt.Vertical) - nh = scrollArea.visibleArea.heightRatio * container.height; - else - nh = scrollArea.visibleArea.widthRatio * container.width; - - if (container.orientation == Qt.Vertical) - ny = scrollArea.visibleArea.yPosition * container.height; - else - ny = scrollArea.visibleArea.xPosition * container.width; - - if (ny > 3) { - var t; - if (container.orientation == Qt.Vertical) - t = Math.ceil(container.height - 3 - ny); - else - t = Math.ceil(container.width - 3 - ny); - if (nh > t) return t; else return nh; - } else return nh + ny; - } - - Rectangle { anchors.fill: parent; color: "Black"; opacity: 0.3 } - - BorderImage { - source: "images/scrollbar.png" - border { left: 1; right: 1; top: 1; bottom: 1 } - x: container.orientation == Qt.Vertical ? 2 : position() - width: container.orientation == Qt.Vertical ? container.width - 4 : size() - y: container.orientation == Qt.Vertical ? position() : 2 - height: container.orientation == Qt.Vertical ? size() : container.height - 4 - } - - states: State { - name: "visible" - when: container.orientation == Qt.Vertical ? scrollArea.movingVertically : scrollArea.movingHorizontally - PropertyChanges { target: container; opacity: 1.0 } - } - - transitions: Transition { - from: "visible"; to: "" - NumberAnimation { properties: "opacity"; duration: 600 } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/rssnews/content/images/busy.png b/basicsuite/Qt5Everywhere/demos/rssnews/content/images/busy.png deleted file mode 100644 index 664c2b1..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/rssnews/content/images/busy.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/rssnews/content/images/scrollbar.png b/basicsuite/Qt5Everywhere/demos/rssnews/content/images/scrollbar.png deleted file mode 100644 index 0228dcf..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/rssnews/content/images/scrollbar.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/rssnews/rssnews.qml b/basicsuite/Qt5Everywhere/demos/rssnews/rssnews.qml deleted file mode 100644 index 5eae0a0..0000000 --- a/basicsuite/Qt5Everywhere/demos/rssnews/rssnews.qml +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.XmlListModel 2.0 -import "content" - -Rectangle { - id: window - anchors.fill: parent - gradient: Gradient { - GradientStop { position: 0.0; color: "#eeeeee" } - GradientStop { position: 0.1; color: "#ffffff" } - GradientStop { position: 0.9; color: "#ffffff" } - GradientStop { position: 1.0; color: "#bbbbbb" } - } - - property int listWidth: window.width*0.35 - property string currentFeed: "feeds.bbci.co.uk/news/rss.xml" - property bool loading: feedModel.status == XmlListModel.Loading - - RssFeeds { id: rssFeeds } - - XmlListModel { - id: feedModel - source: "http://" + window.currentFeed - query: "/rss/channel/item" - - XmlRole { name: "title"; query: "title/string()" } - XmlRole { name: "link"; query: "link/string()" } - XmlRole { name: "description"; query: "description/string()" } - } - - Row { - Rectangle { - id: categoryContent - width: window.listWidth; height: window.height - color: "#efefef" - - ListView { - id: categories - anchors.fill: parent - model: rssFeeds - delegate: CategoryDelegate {} - highlight: Rectangle { color: "steelblue" } - highlightMoveVelocity: 9999999 - } - ScrollBar { - scrollArea: categories; height: categories.height; width: 8 - anchors.right: categories.right - } - } - ListView { - id: list - width: window.width - window.listWidth; height: window.height - model: feedModel - delegate: NewsDelegate {} - } - } - - ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right } - Rectangle { x: window.listWidth; height: window.height; width: 1; color: "#cccccc" } -} diff --git a/basicsuite/Qt5Everywhere/demos/rssnews/rssnews.qmlproject b/basicsuite/Qt5Everywhere/demos/rssnews/rssnews.qmlproject deleted file mode 100644 index 5becbda..0000000 --- a/basicsuite/Qt5Everywhere/demos/rssnews/rssnews.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "rssnews.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/Block.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/Block.qml deleted file mode 100644 index 0b10b7f..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/Block.qml +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: block - property bool dying: false - property bool spawned: false - property int type: 0 - property ParticleSystem particleSystem - - Behavior on x { - enabled: spawned; - SpringAnimation{ spring: 2; damping: 0.2 } - } - Behavior on y { - SpringAnimation{ spring: 2; damping: 0.2 } - } - - Image { - id: img - source: { - if (type == 0){ - "gfx/red.png"; - } else if (type == 1) { - "gfx/blue.png"; - } else if (type == 2) { - "gfx/green.png"; - } else { - "gfx/yellow.png"; - } - } - opacity: 0 - Behavior on opacity { NumberAnimation { duration: 200 } } - anchors.fill: parent - } - - //Foreground particles - BlockEmitter { - id: particles - system: particleSystem - group: { - if (type == 0){ - "red"; - } else if (type == 1) { - "blue"; - } else if (type == 2) { - "green"; - } else { - "yellow"; - } - } - anchors.fill: parent - } - - //Paint particles on the background - PaintEmitter { - id: particles2 - system: particleSystem - } - - states: [ - State { - name: "AliveState"; when: spawned == true && dying == false - PropertyChanges { target: img; opacity: 1 } - }, - - State { - name: "DeathState"; when: dying == true - StateChangeScript { script: {particleSystem.paused = false; particles.pulse(100); particles2.pulse(100);} } - PropertyChanges { target: img; opacity: 0 } - StateChangeScript { script: block.destroy(1000); } - } - ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/BlockEmitter.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/BlockEmitter.qml deleted file mode 100644 index ba6261c..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/BlockEmitter.qml +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -import "../settings.js" as Settings - -Emitter { - property Item block: parent - velocity: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -40; magnitudeVariation: 40} - acceleration: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -100;} - shape: EllipseShape{fill:true} - enabled: false; - lifeSpan: 700; lifeSpanVariation: 100 - emitRate: 1000 - maximumEmitted: 100 //only fires 0.1s bursts (still 2x old number) - size: Settings.blockSize * 0.85 - endSize: Settings.blockSize * 0.85 /2 -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/Button.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/Button.qml deleted file mode 100644 index 4b825ba..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/Button.qml +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - property alias imgSrc: image.source - property alias system: emitter.system - property alias group: emitter.group - signal clicked - property bool rotatedButton: false - - width: image.width - height: image.sourceSize.height - Image { - id: image - height: parent.height - width: height/sourceSize.height * sourceSize.width - - anchors.horizontalCenter: parent.horizontalCenter - rotation: rotatedButton ? ((Math.random() * 3 + 2) * (Math.random() <= 0.5 ? -1 : 1)) : 0 - MenuEmitter { - id: emitter - anchors.fill: parent - //shape: MaskShape {source: image.source} - } - } - MouseArea { - anchors.fill: parent - onClicked: {parent.clicked(); emitter.burst(400);} - } -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/GameArea.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/GameArea.qml deleted file mode 100644 index 6e72161..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/GameArea.qml +++ /dev/null @@ -1,226 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "samegame.js" as Logic - -Item { - id: gameCanvas - property bool gameOver: true - property int score: 0 - property int highScore: 0 - property int moves: 0 - property string mode: "" - property ParticleSystem ps: particleSystem - //For easy theming - property alias backgroundVisible: bg.visible - property string background: "gfx/background.png" - property string blockFile: "Block.qml" - onBlockFileChanged: Logic.changeBlock(blockFile); - property alias particlePack: auxLoader.source - //For multiplayer - property int score2: 0 - property int curTurn: 1 - property bool autoTurnChange: false - signal swapPlayers - property bool swapping: false - //onSwapPlayers: if (autoTurnChange) Logic.turnChange();//Now implemented below - //For puzzle - property url level - property bool puzzleWon: false - signal puzzleLost //Since root is tracking the puzzle progress - function showPuzzleEnd (won) { - if (won) { - smokeParticle.color = Qt.rgba(0,1,0,0); - puzzleWin.play(); - } else { - smokeParticle.color = Qt.rgba(1,0,0,0); - puzzleFail.play(); - puzzleLost(); - } - } - function showPuzzleGoal (str) { - puzzleTextBubble.opacity = 1; - puzzleTextLabel.text = str; - } - Image { - id: bg - z: -1 - anchors.fill: parent - source: background; - fillMode: Image.PreserveAspectCrop - } - - MouseArea { - anchors.fill: parent; onClicked: { - if (puzzleTextBubble.opacity == 1) { - puzzleTextBubble.opacity = 0; - Logic.finishLoadingMap(); - } else if (!swapping) { - Logic.handleClick(mouse.x,mouse.y); - } - } - } - - Image { - id: highScoreTextBubble - opacity: mode == "arcade" && gameOver && gameCanvas.score == gameCanvas.highScore ? 1 : 0 - Behavior on opacity { NumberAnimation {} } - anchors.centerIn: parent - z: 10 - source: "gfx/bubble-highscore.png" - Image { - anchors.centerIn: parent - source: "gfx/text-highscore-new.png" - rotation: -10 - } - } - - Image { - id: puzzleTextBubble - anchors.centerIn: parent - opacity: 0 - Behavior on opacity { NumberAnimation {} } - z: 10 - source: "gfx/bubble-puzzle.png" - Connections { - target: gameCanvas - onModeChanged: if (mode != "puzzle" && puzzleTextBubble.opacity > 0) puzzleTextBubble.opacity = 0; - } - Text { - id: puzzleTextLabel - width: parent.width - 24 - anchors.centerIn: parent - horizontalAlignment: Text.AlignHCenter - color: "white" - font.pixelSize: 24 - font.bold: true - wrapMode: Text.WordWrap - } - } - onModeChanged: { - p1WonImg.opacity = 0; - p2WonImg.opacity = 0; - } - SmokeText { id: puzzleWin; source: "gfx/icon-ok.png"; system: particleSystem } - SmokeText { id: puzzleFail; source: "gfx/icon-fail.png"; system: particleSystem } - - onSwapPlayers: { - smokeParticle.color = "yellow" - Logic.turnChange(); - if (curTurn == 1) { - p1Text.play(); - } else { - p2Text.play(); - } - clickDelay.running = true; - } - SequentialAnimation { - id: clickDelay - ScriptAction { script: gameCanvas.swapping = true; } - PauseAnimation { duration: 750 } - ScriptAction { script: gameCanvas.swapping = false; } - } - - SmokeText { - id: p1Text; source: "gfx/text-p1-go.png"; - system: particleSystem; playerNum: 1 - opacity: p1WonImg.opacity + p2WonImg.opacity > 0 ? 0 : 1 - } - - SmokeText { - id: p2Text; source: "gfx/text-p2-go.png"; - system: particleSystem; playerNum: 2 - opacity: p1WonImg.opacity + p2WonImg.opacity > 0 ? 0 : 1 - } - - onGameOverChanged: { - if (gameCanvas.mode == "multiplayer") { - if (gameCanvas.score >= gameCanvas.score2) { - p1WonImg.opacity = 1; - } else { - p2WonImg.opacity = 1; - } - } - } - Image { - id: p1WonImg - source: "gfx/text-p1-won.png" - anchors.centerIn: parent - opacity: 0 - Behavior on opacity { NumberAnimation {} } - z: 10 - } - Image { - id: p2WonImg - source: "gfx/text-p2-won.png" - anchors.centerIn: parent - opacity: 0 - Behavior on opacity { NumberAnimation {} } - z: 10 - } - - ParticleSystem{ - id: particleSystem; - anchors.fill: parent - z: 5 - ImageParticle { - id: smokeParticle - groups: ["smoke"] - source: "gfx/particle-smoke.png" - alpha: 0.1 - alphaVariation: 0.1 - color: "yellow" - } - Loader { - id: auxLoader - anchors.fill: parent - source: "PrimaryPack.qml" - onItemChanged: { - if (item && "particleSystem" in item) - item.particleSystem = particleSystem - if (item && "gameArea" in item) - item.gameArea = gameCanvas - } - } - } -} - diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/LogoAnimation.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/LogoAnimation.qml deleted file mode 100644 index fb050e7..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/LogoAnimation.qml +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: container //Positioned where the 48x48 S/G should be - property alias running: mainAnim.running - property ParticleSystem particleSystem - property int dur: 500 - signal boomTime - Image { - id: s1 - source: "gfx/logo-s.png" - y: 0 - } - Image { - id: g1 - source: "gfx/logo-g.png" - y: -128 - } - Column { - Repeater { - model: 2 - Item { - width: 48 - height: 48 - BlockEmitter { - id: emitter - anchors.fill: parent - group: "red" - system: particleSystem - Connections { - target: container - onBoomTime: emitter.pulse(100); - } - } - } - } - } - SequentialAnimation { - id: mainAnim - running: true - loops: -1 - PropertyAction { target: g1; property: "y"; value: -128} - PropertyAction { target: g1; property: "opacity"; value: 1} - PropertyAction { target: s1; property: "y"; value: 0} - PropertyAction { target: s1; property: "opacity"; value: 1} - NumberAnimation { target: g1; property: "y"; from: -96; to: -48; duration: dur} - ParallelAnimation { - NumberAnimation { target: g1; property: "y"; from: -48; to: 0; duration: dur} - NumberAnimation { target: s1; property: "y"; from: 0; to: 48; duration: dur } - } - PauseAnimation { duration: dur } - ScriptAction { script: container.boomTime(); } - ParallelAnimation { - NumberAnimation { target: g1; property: "opacity"; to: 0; duration: dur } - NumberAnimation { target: s1; property: "opacity"; to: 0; duration: dur } - } - PropertyAction { target: s1; property: "y"; value: -128} - PropertyAction { target: s1; property: "opacity"; value: 1} - NumberAnimation { target: s1; property: "y"; from: -96; to: 0; duration: dur * 2} - } -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/MenuEmitter.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/MenuEmitter.qml deleted file mode 100644 index 93089fc..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/MenuEmitter.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Emitter { - anchors.fill: parent - velocity: AngleDirection{angleVariation: 360; magnitude: 140; magnitudeVariation: 40} - enabled: false; - lifeSpan: 500; - emitRate: 1 - size: 28 - endSize: 14 - group: "yellow" -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/PaintEmitter.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/PaintEmitter.qml deleted file mode 100644 index fe758af..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/PaintEmitter.qml +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "../settings.js" as Settings - -Emitter { - property Item block: parent - anchors.fill: parent - shape: EllipseShape { fill: true } - group: { - if (block.type == 0){ - "redspots"; - } else if (block.type == 1) { - "bluespots"; - } else if (block.type == 2) { - "greenspots"; - } else { - "yellowspots"; - } - } - size: Settings.blockSize * 2 - endSize: Settings.blockSize/2 - lifeSpan: 30000 - enabled: false - emitRate: 60 - maximumEmitted: 60 - velocity: PointDirection{ y: 4; yVariation: 4 } - /* Possibly better, but dependent on gerrit change,28212 - property real mainIntensity: 0.8 - property real subIntensity: 0.1 - property real colorVariation: 0.005 - onEmitParticles: {//One group, many colors, for better stacking - for (var i=0; i
    Clear in three moves..." - startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , - 0 , 0 , 0 , 0 , 0 , 1 , 1 , 2 , 1 , 1 , - 0 , 0 , 0 , 1 , 1 , 3 , 3 , 3 , 3 , 3 , - 0 , 1 , 1 , 3 , 3 , 3 , 1 , 3 , 1 , 1 , - 1 , 2 , 3 , 3 , 1 , 1 , 3 , 3 , 3 , 3 , - 1 , 3 , 3 , 2 , 3 , 3 , 3 , 3 , 1 , 1 , - 1 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level1.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level1.qml deleted file mode 100644 index 0b7a889..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level1.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - timeTarget: 10 - goalText: "2 of 10

    Clear in 10 seconds..." - startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 1 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 2 , 2 , - 1 , 2 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 2 , - 2 , 2 , 1 , 3 , 3 , 3 , 1 , 1 , 1 , 2 , - 2 , 1 , 1 , 1 , 3 , 3 , 3 , 1 , 2 , 2 , - 1 , 1 , 1 , 1 , 1 , 3 , 3 , 3 , 2 , 1 ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level2.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level2.qml deleted file mode 100644 index 986f217..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level2.qml +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - scoreTarget: 1200 - timeTarget: 60 - goalText: "3 of 10

    Score over 1200 points in one minute..." - mustClear: false - startingGrid: [ 3 , 1 , 2 , 1 , 1 , 2 , 1 , 1 , 3 , 3 , - 1 , 3 , 3 , 2 , 3 , 3 , 1 , 1 , 3 , 1 , - 3 , 1 , 3 , 3 , 2 , 3 , 3 , 3 , 1 , 2 , - 3 , 2 , 2 , 1 , 3 , 3 , 2 , 1 , 1 , 2 , - 3 , 1 , 2 , 2 , 2 , 2 , 2 , 1 , 3 , 1 , - 2 , 3 , 1 , 2 , 2 , 3 , 3 , 1 , 3 , 2 , - 3 , 2 , 1 , 1 , 3 , 3 , 3 , 2 , 2 , 1 , - 1 , 2 , 2 , 3 , 2 , 3 , 3 , 3 , 1 , 1 , - 1 , 3 , 3 , 3 , 1 , 2 , 2 , 3 , 3 , 1 , - 3 , 3 , 2 , 1 , 2 , 2 , 1 , 1 , 1 , 3 , - 2 , 1 , 3 , 2 , 3 , 2 , 3 , 2 , 2 , 1 , - 1 , 3 , 1 , 2 , 1 , 2 , 3 , 1 , 2 , 2 , - 1 , 2 , 2 , 2 , 1 , 1 , 2 , 3 , 1 , 2 ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level3.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level3.qml deleted file mode 100644 index eff5182..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level3.qml +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - scoreTarget: 3000 - timeTarget: 60 - goalText: "4 of 10
    Clear the board with over 3000 points in under a minute..." - startingGrid: [ 3 , 3 , 1 , 1 , 1 , 2 , 2 , 4 , 3 , 3 , - 4 , 3 , 1 , 4 , 2 , 2 , 2 , 4 , 3 , 4 , - 4 , 3 , 3 , 4 , 1 , 1 , 3 , 3 , 4 , 4 , - 3 , 3 , 3 , 3 , 3 , 1 , 3 , 2 , 2 , 4 , - 4 , 4 , 3 , 4 , 3 , 1 , 4 , 4 , 4 , 4 , - 4 , 4 , 3 , 4 , 1 , 1 , 4 , 4 , 3 , 3 , - 4 , 2 , 2 , 2 , 2 , 2 , 4 , 4 , 4 , 1 , - 4 , 4 , 2 , 4 , 2 , 2 , 1 , 1 , 1 , 1 , - 4 , 4 , 2 , 4 , 2 , 2 , 1 , 4 , 4 , 1 , - 4 , 1 , 1 , 4 , 3 , 3 , 4 , 2 , 4 , 1 , - 4 , 1 , 1 , 2 , 3 , 3 , 4 , 2 , 2 , 1 , - 1 , 1 , 2 , 2 , 2 , 3 , 3 , 3 , 2 , 1 , - 4 , 1 , 1 , 2 , 2 , 3 , 4 , 3 , 4 , 4 ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level4.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level4.qml deleted file mode 100644 index 4438de1..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level4.qml +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - goalText: "5 of 10

    Clear the level..." - startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 1 , 3 , 2 , 1 , 1 , 1 , 1 , 3 , 2 , 3 , - 1 , 2 , 3 , 1 , 3 , 2 , 2 , 1 , 1 , 2 , - 3 , 2 , 2 , 2 , 1 , 1 , 1 , 1 , 3 , 3 , - 2 , 1 , 1 , 3 , 2 , 1 , 1 , 2 , 1 , 3 , - 1 , 3 , 3 , 1 , 2 , 1 , 2 , 1 , 3 , 3 , - 1 , 3 , 2 , 2 , 2 , 1 , 1 , 3 , 2 , 3 , - 1 , 1 , 3 , 2 , 3 , 3 , 2 , 1 , 1 , 1 , - 1 , 2 , 2 , 3 , 2 , 2 , 1 , 3 , 1 , 3 ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level5.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level5.qml deleted file mode 100644 index ee48217..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level5.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - moveTarget: 4 - goalText: "6 of 10

    Clear in four or less moves..." - startingGrid: [ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , - 4 , 2 , 2 , 2 , 4 , 3 , 3 , 3 , 4 , 4 , - 4 , 2 , 4 , 4 , 4 , 3 , 2 , 3 , 4 , 4 , - 4 , 2 , 2 , 2 , 4 , 3 , 3 , 3 , 4 , 4 , - 4 , 4 , 4 , 2 , 4 , 3 , 4 , 3 , 4 , 4 , - 4 , 2 , 2 , 2 , 4 , 3 , 4 , 3 , 4 , 4 , - 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , - 4 , 3 , 4 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , - 4 , 3 , 3 , 3 , 4 , 2 , 4 , 4 , 4 , 3 , - 4 , 3 , 3 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , - 4 , 3 , 4 , 3 , 4 , 2 , 4 , 4 , 4 , 4 , - 4 , 3 , 4 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , - 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level6.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level6.qml deleted file mode 100644 index 2b34baa..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level6.qml +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - moveTarget: 20 - timeTarget: 40 - goalText: "7 of 10

    Clear with 20 moves in 40 seconds (or better)." - startingGrid: [ 1 , 3 , 1 , 1 , 1 , 1 , 2 , 1 , 2 , 2 , - 2 , 1 , 2 , 3 , 3 , 1 , 3 , 1 , 1 , 3 , - 3 , 1 , 1 , 1 , 2 , 2 , 3 , 2 , 3 , 1 , - 1 , 3 , 1 , 1 , 3 , 1 , 1 , 1 , 2 , 3 , - 2 , 1 , 1 , 1 , 3 , 2 , 3 , 3 , 2 , 3 , - 3 , 3 , 3 , 3 , 2 , 2 , 3 , 1 , 3 , 2 , - 2 , 2 , 3 , 2 , 2 , 3 , 2 , 2 , 2 , 2 , - 1 , 2 , 1 , 2 , 1 , 3 , 2 , 3 , 2 , 3 , - 1 , 1 , 2 , 3 , 3 , 3 , 3 , 1 , 1 , 2 , - 3 , 3 , 2 , 2 , 2 , 2 , 3 , 1 , 3 , 1 , - 1 , 2 , 3 , 3 , 3 , 1 , 3 , 2 , 1 , 2 , - 1 , 2 , 1 , 1 , 2 , 3 , 1 , 2 , 1 , 3 , - 3 , 1 , 2 , 2 , 1 , 3 , 3 , 1 , 3 , 2 ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level7.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level7.qml deleted file mode 100644 index 280bbb1..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level7.qml +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - goalText: "8 of 10

    Clear the grid." - startingGrid: [ 2 , 4 , 3 , 2 , 3 , 2 , 3 , 3 , 4 , 3 , - 2 , 2 , 3 , 3 , 1 , 4 , 3 , 3 , 3 , 2 , - 1 , 4 , 2 , 3 , 4 , 3 , 3 , 1 , 1 , 1 , - 2 , 1 , 2 , 4 , 4 , 2 , 2 , 3 , 2 , 1 , - 3 , 4 , 4 , 1 , 3 , 2 , 4 , 2 , 1 , 1 , - 2 , 2 , 3 , 1 , 2 , 4 , 1 , 2 , 1 , 2 , - 1 , 2 , 3 , 2 , 4 , 4 , 3 , 1 , 1 , 2 , - 4 , 4 , 2 , 1 , 2 , 4 , 2 , 2 , 4 , 3 , - 4 , 2 , 4 , 1 , 3 , 4 , 1 , 4 , 2 , 4 , - 4 , 3 , 4 , 1 , 4 , 3 , 1 , 3 , 1 , 1 , - 3 , 3 , 2 , 3 , 2 , 4 , 1 , 2 , 4 , 4 , - 3 , 4 , 2 , 2 , 4 , 3 , 4 , 1 , 3 , 2 , - 4 , 3 , 3 , 4 , 2 , 4 , 1 , 2 , 3 , 2 ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level8.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level8.qml deleted file mode 100644 index 7661485..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level8.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - scoreTarget: 1000 - goalText: "9 of 10

    Score over 1000 points" - startingGrid: [ 1 , 4 , 4 , 3 , 2 , 1 , 4 , 2 , 4 , 2 , - 2 , 3 , 4 , 4 , 1 , 1 , 1 , 4 , 4 , 4 , - 1 , 3 , 1 , 2 , 2 , 1 , 2 , 1 , 4 , 2 , - 4 , 3 , 4 , 2 , 1 , 4 , 1 , 2 , 2 , 3 , - 3 , 4 , 2 , 4 , 4 , 3 , 2 , 2 , 2 , 1 , - 4 , 4 , 3 , 2 , 4 , 4 , 2 , 1 , 1 , 1 , - 1 , 2 , 1 , 3 , 4 , 1 , 1 , 3 , 2 , 3 , - 3 , 4 , 2 , 2 , 1 , 3 , 2 , 2 , 4 , 2 , - 2 , 4 , 1 , 2 , 2 , 4 , 3 , 3 , 3 , 1 , - 1 , 2 , 2 , 4 , 1 , 2 , 2 , 3 , 3 , 3 , - 4 , 4 , 1 , 4 , 3 , 1 , 3 , 3 , 3 , 4 , - 1 , 2 , 4 , 1 , 2 , 1 , 1 , 4 , 2 , 1 , - 1 , 2 , 3 , 4 , 2 , 4 , 4 , 2 , 1 , 3 ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level9.qml b/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level9.qml deleted file mode 100644 index c75d8e5..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/levels/level9.qml +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TemplateBase{ - scoreTarget: 2000 - timeTarget: 60 - moveTarget: 20 - mustClear: false - goalText: "10 of 10

    Score 2000 in one minute with less than 20 moves!" - startingGrid: [ 3 , 2 , 3 , 1 , 3 , 3 , 4 , 1 , 3 , 3 , - 2 , 3 , 2 , 1 , 1 , 2 , 2 , 2 , 4 , 1 , - 2 , 4 , 4 , 4 , 3 , 1 , 4 , 4 , 4 , 1 , - 3 , 1 , 3 , 4 , 4 , 2 , 2 , 2 , 2 , 3 , - 2 , 1 , 4 , 4 , 3 , 3 , 1 , 1 , 3 , 2 , - 3 , 2 , 1 , 4 , 3 , 4 , 1 , 3 , 4 , 2 , - 3 , 3 , 1 , 4 , 4 , 4 , 2 , 1 , 2 , 3 , - 2 , 3 , 4 , 3 , 4 , 1 , 1 , 3 , 2 , 4 , - 4 , 4 , 1 , 2 , 4 , 3 , 2 , 2 , 2 , 4 , - 1 , 4 , 2 , 2 , 1 , 1 , 2 , 1 , 1 , 4 , - 1 , 4 , 3 , 3 , 3 , 1 , 3 , 4 , 4 , 2 , - 3 , 4 , 1 , 1 , 2 , 2 , 2 , 3 , 2 , 1 , - 3 , 3 , 4 , 3 , 1 , 1 , 1 , 4 , 4 , 3 ] -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/content/samegame.js b/basicsuite/Qt5Everywhere/demos/samegame/content/samegame.js deleted file mode 100644 index 96b8167..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/content/samegame.js +++ /dev/null @@ -1,581 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* This script file handles the game logic */ -.pragma library -.import QtQuick.LocalStorage 2.0 as Sql -.import "../settings.js" as Settings - -var maxColumn = 10; -var maxRow = 13; -var types = 3; -var maxIndex = maxColumn*maxRow; -var board = new Array(maxIndex); -var blockSrc = "Block.qml"; -var gameDuration; -var component = Qt.createComponent(blockSrc); -var gameCanvas; -var betweenTurns = false; - -var puzzleLevel = null; -var puzzlePath = ""; - -var gameMode = "arcade"; //Set in new game, then tweaks behavior of other functions -var gameOver = false; - -function changeBlock(src) -{ - blockSrc = src; - component = Qt.createComponent(blockSrc); -} - -// Index function used instead of a 2D array -function index(column, row) -{ - return column + row * maxColumn; -} - -function timeStr(msecs) -{ - var secs = Math.floor(msecs/1000); - var m = Math.floor(secs/60); - var ret = "" + m + "m " + (secs%60) + "s"; - return ret; -} - -function cleanUp() -{ - if (gameCanvas == undefined) - return; - // Delete blocks from previous game - for (var i = 0; i < maxIndex; i++) { - if (board[i] != null) - board[i].destroy(); - board[i] = null; - } - if (puzzleLevel != null){ - puzzleLevel.destroy(); - puzzleLevel = null; - } - gameCanvas.mode = "" -} - -function startNewGame(gc, mode, map) -{ - gameCanvas = gc; - if (mode == undefined) - gameMode = "arcade"; - else - gameMode = mode; - gameOver = false; - - cleanUp(); - - gc.gameOver = false; - gc.mode = gameMode; - // Calculate board size - maxColumn = Math.floor(gameCanvas.width/Settings.blockSize); - maxRow = Math.floor(gameCanvas.height/Settings.blockSize); - maxIndex = maxRow * maxColumn; - if (gameMode == "arcade") //Needs to be after board sizing - getHighScore(); - - - // Initialize Board - board = new Array(maxIndex); - gameCanvas.score = 0; - gameCanvas.score2 = 0; - gameCanvas.moves = 0; - gameCanvas.curTurn = 1; - if (gameMode == "puzzle") - loadMap(map); - else//Note that we load them in reverse order for correct visual stacking - for (var column = maxColumn - 1; column >= 0; column--) - for (var row = maxRow - 1; row >= 0; row--) - createBlock(column, row); - if (gameMode == "puzzle") - getLevelHistory();//Needs to be after map load - gameDuration = new Date(); -} - -var fillFound; // Set after a floodFill call to the number of blocks found -var floodBoard; // Set to 1 if the floodFill reaches off that node - -// NOTE: Be careful with vars named x,y, as the calling object's x,y are still in scope -function handleClick(x,y) -{ - if (betweenTurns || gameOver || gameCanvas == undefined) - return; - var column = Math.floor(x/Settings.blockSize); - var row = Math.floor(y/Settings.blockSize); - if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) - return; - if (board[index(column, row)] == null) - return; - // If it's a valid block, remove it and all connected (does nothing if it's not connected) - floodFill(column,row, -1); - if (fillFound <= 0) - return; - if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) - gameCanvas.score2 += (fillFound - 1) * (fillFound - 1); - else - gameCanvas.score += (fillFound - 1) * (fillFound - 1); - if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) - shuffleUp(); - else - shuffleDown(); - gameCanvas.moves += 1; - if (gameMode == "endless") - refill(); - else if (gameMode != "multiplayer") - victoryCheck(); - if (gameMode == "multiplayer" && !gc.gameOver){ - betweenTurns = true; - gameCanvas.swapPlayers();//signal, animate and call turnChange() when ready - } -} - -function floodFill(column,row,type) -{ - if (board[index(column, row)] == null) - return; - var first = false; - if (type == -1) { - first = true; - type = board[index(column,row)].type; - - // Flood fill initialization - fillFound = 0; - floodBoard = new Array(maxIndex); - } - if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) - return; - if (floodBoard[index(column, row)] == 1 || (!first && type != board[index(column, row)].type)) - return; - floodBoard[index(column, row)] = 1; - floodFill(column + 1, row, type); - floodFill(column - 1, row, type); - floodFill(column, row + 1, type); - floodFill(column, row - 1, type); - if (first == true && fillFound == 0) - return; // Can't remove single blocks - board[index(column, row)].dying = true; - board[index(column, row)] = null; - fillFound += 1; -} - -function shuffleDown() -{ - // Fall down - for (var column = 0; column < maxColumn; column++) { - var fallDist = 0; - for (var row = maxRow - 1; row >= 0; row--) { - if (board[index(column,row)] == null) { - fallDist += 1; - } else { - if (fallDist > 0) { - var obj = board[index(column, row)]; - obj.y = (row + fallDist) * Settings.blockSize; - board[index(column, row + fallDist)] = obj; - board[index(column, row)] = null; - } - } - } - } - // Fall to the left - fallDist = 0; - for (column = 0; column < maxColumn; column++) { - if (board[index(column, maxRow - 1)] == null) { - fallDist += 1; - } else { - if (fallDist > 0) { - for (row = 0; row < maxRow; row++) { - obj = board[index(column, row)]; - if (obj == null) - continue; - obj.x = (column - fallDist) * Settings.blockSize; - board[index(column - fallDist,row)] = obj; - board[index(column, row)] = null; - } - } - } - } -} - - -function shuffleUp() -{ - // Fall up - for (var column = 0; column < maxColumn; column++) { - var fallDist = 0; - for (var row = 0; row < maxRow; row++) { - if (board[index(column,row)] == null) { - fallDist += 1; - } else { - if (fallDist > 0) { - var obj = board[index(column, row)]; - obj.y = (row - fallDist) * Settings.blockSize; - board[index(column, row - fallDist)] = obj; - board[index(column, row)] = null; - } - } - } - } - // Fall to the left (or should it be right, so as to be left for P2?) - fallDist = 0; - for (column = 0; column < maxColumn; column++) { - if (board[index(column, 0)] == null) { - fallDist += 1; - } else { - if (fallDist > 0) { - for (row = 0; row < maxRow; row++) { - obj = board[index(column, row)]; - if (obj == null) - continue; - obj.x = (column - fallDist) * Settings.blockSize; - board[index(column - fallDist,row)] = obj; - board[index(column, row)] = null; - } - } - } - } -} - -function turnChange()//called by ui outside -{ - betweenTurns = false; - if (gameCanvas.curTurn == 1){ - shuffleUp(); - gameCanvas.curTurn = 2; - victoryCheck(); - }else{ - shuffleDown(); - gameCanvas.curTurn = 1; - victoryCheck(); - } -} - -function refill() -{ - for (var column = 0; column < maxColumn; column++) { - for (var row = 0; row < maxRow; row++) { - if (board[index(column, row)] == null) - createBlock(column, row); - } - } -} - -function victoryCheck() -{ - // Awards bonuses for no blocks left - var deservesBonus = true; - if (board[index(0,maxRow - 1)] != null || board[index(0,0)] != null) - deservesBonus = false; - // Checks for game over - if (deservesBonus){ - if (gameCanvas.curTurn = 1) - gameCanvas.score += 1000; - else - gameCanvas.score2 += 1000; - } - gameOver = deservesBonus; - if (gameCanvas.curTurn == 1){ - if (!(floodMoveCheck(0, maxRow - 1, -1))) - gameOver = true; - }else{ - if (!(floodMoveCheck(0, 0, -1, true))) - gameOver = true; - } - if (gameMode == "puzzle"){ - puzzleVictoryCheck(deservesBonus);//Takes it from here - return; - } - if (gameOver) { - var winnerScore = Math.max(gameCanvas.score, gameCanvas.score2); - if (gameMode == "multiplayer"){ - gameCanvas.score = winnerScore; - saveHighScore(gameCanvas.score2); - } - saveHighScore(gameCanvas.score); - gameDuration = new Date() - gameDuration; - gameCanvas.gameOver = true; - } -} - -// Only floods up and right, to see if it can find adjacent same-typed blocks -function floodMoveCheck(column, row, type, goDownInstead) -{ - if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) - return false; - if (board[index(column, row)] == null) - return false; - var myType = board[index(column, row)].type; - if (type == myType) - return true; - if (goDownInstead) - return floodMoveCheck(column + 1, row, myType, goDownInstead) || - floodMoveCheck(column, row + 1, myType, goDownInstead); - else - return floodMoveCheck(column + 1, row, myType) || - floodMoveCheck(column, row - 1, myType); -} - -function createBlock(column,row,type) -{ - // Note that we don't wait for the component to become ready. This will - // only work if the block QML is a local file. Otherwise the component will - // not be ready immediately. There is a statusChanged signal on the - // component you could use if you want to wait to load remote files. - if (component.status == 1){ - if (type == undefined) - type = Math.floor(Math.random() * types); - if (type < 0 || type > 4) { - console.log("Invalid type requested");//TODO: Is this triggered by custom levels much? - return; - } - var dynamicObject = component.createObject(gameCanvas, - {"type": type, - "x": column*Settings.blockSize, - "y": -1*Settings.blockSize, - "width": Settings.blockSize, - "height": Settings.blockSize, - "particleSystem": gameCanvas.ps}); - if (dynamicObject == null){ - console.log("error creating block"); - console.log(component.errorString()); - return false; - } - dynamicObject.y = row*Settings.blockSize; - dynamicObject.spawned = true; - - board[index(column,row)] = dynamicObject; - }else{ - console.log("error loading block component"); - console.log(component.errorString()); - return false; - } - return true; -} - -function showPuzzleError(str) -{ - //TODO: Nice user visible UI? - console.log(str); -} - -function loadMap(map) -{ - puzzlePath = map; - var levelComp = Qt.createComponent(puzzlePath); - if (levelComp.status != 1){ - console.log("Error loading level"); - showPuzzleError(levelComp.errorString()); - return; - } - puzzleLevel = levelComp.createObject(); - if (puzzleLevel == null || !puzzleLevel.startingGrid instanceof Array) { - showPuzzleError("Bugger!"); - return; - } - gameCanvas.showPuzzleGoal(puzzleLevel.goalText); - //showPuzzleGoal should call finishLoadingMap as the next thing it does, before handling more events -} - -function finishLoadingMap() -{ - for (var i in puzzleLevel.startingGrid) - if (! (puzzleLevel.startingGrid[i] >= 0 && puzzleLevel.startingGrid[i] <= 9) ) - puzzleLevel.startingGrid[i] = 0; - //TODO: Don't allow loading larger levels, leads to cheating - while (puzzleLevel.startingGrid.length > maxIndex) puzzleLevel.startingGrid.shift(); - while (puzzleLevel.startingGrid.length < maxIndex) puzzleLevel.startingGrid.unshift(0); - for (var i in puzzleLevel.startingGrid) - if (puzzleLevel.startingGrid[i] > 0) - createBlock(i % maxColumn, Math.floor(i / maxColumn), puzzleLevel.startingGrid[i] - 1); - - //### Experimental feature - allow levels to contain arbitrary QML scenes as well! - //while (puzzleLevel.children.length) - // puzzleLevel.children[0].parent = gameCanvas; - gameDuration = new Date(); //Don't start until we finish loading -} - -function puzzleVictoryCheck(clearedAll)//gameOver has also been set if no more moves -{ - var won = true; - var soFar = new Date() - gameDuration; - if (puzzleLevel.scoreTarget != -1 && gameCanvas.score < puzzleLevel.scoreTarget){ - won = false; - } if (puzzleLevel.scoreTarget != -1 && gameCanvas.score >= puzzleLevel.scoreTarget && !puzzleLevel.mustClear){ - gameOver = true; - } if (puzzleLevel.timeTarget != -1 && soFar/1000.0 > puzzleLevel.timeTarget){ - gameOver = true; - } if (puzzleLevel.moveTarget != -1 && gameCanvas.moves >= puzzleLevel.moveTarget){ - gameOver = true; - } if (puzzleLevel.mustClear && gameOver && !clearedAll) { - won = false; - } - - if (gameOver) { - gameCanvas.gameOver = true; - gameCanvas.showPuzzleEnd(won); - - if (won) { - // Store progress - saveLevelHistory(); - } - } -} - -function getHighScore() -{ - var db = Sql.LocalStorage.openDatabaseSync( - "SameGame", - "2.0", - "SameGame Local Data", - 100 - ); - db.transaction( - function(tx) { - tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(game TEXT, score NUMBER, gridSize TEXT, time NUMBER)'); - // Only show results for the current grid size - var rs = tx.executeSql('SELECT * FROM Scores WHERE gridSize = "' - + maxColumn + "x" + maxRow + '" AND game = "' + gameMode + '" ORDER BY score desc'); - if (rs.rows.length > 0) - gameCanvas.highScore = rs.rows.item(0).score; - else - gameCanvas.highScore = 0; - } - ); -} - -function saveHighScore(score) -{ - // Offline storage - var db = Sql.LocalStorage.openDatabaseSync( - "SameGame", - "2.0", - "SameGame Local Data", - 100 - ); - var dataStr = "INSERT INTO Scores VALUES(?, ?, ?, ?)"; - var data = [ - gameMode, - score, - maxColumn + "x" + maxRow, - Math.floor(gameDuration / 1000) - ]; - if (score >= gameCanvas.highScore)//Update UI field - gameCanvas.highScore = score; - - db.transaction( - function(tx) { - tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(game TEXT, score NUMBER, gridSize TEXT, time NUMBER)'); - tx.executeSql(dataStr, data); - } - ); -} - -function getLevelHistory() -{ - var db = Sql.LocalStorage.openDatabaseSync( - "SameGame", - "2.0", - "SameGame Local Data", - 100 - ); - db.transaction( - function(tx) { - tx.executeSql('CREATE TABLE IF NOT EXISTS Puzzle(level TEXT, score NUMBER, moves NUMBER, time NUMBER)'); - var rs = tx.executeSql('SELECT * FROM Puzzle WHERE level = "' + puzzlePath + '" ORDER BY score desc'); - if (rs.rows.length > 0) { - gameCanvas.puzzleWon = true; - gameCanvas.highScore = rs.rows.item(0).score; - } else { - gameCanvas.puzzleWon = false; - gameCanvas.highScore = 0; - } - } - ); -} - -function saveLevelHistory() -{ - var db = Sql.LocalStorage.openDatabaseSync( - "SameGame", - "2.0", - "SameGame Local Data", - 100 - ); - var dataStr = "INSERT INTO Puzzle VALUES(?, ?, ?, ?)"; - var data = [ - puzzlePath, - gameCanvas.score, - gameCanvas.moves, - Math.floor(gameDuration / 1000) - ]; - gameCanvas.puzzleWon = true; - - db.transaction( - function(tx) { - tx.executeSql('CREATE TABLE IF NOT EXISTS Puzzle(level TEXT, score NUMBER, moves NUMBER, time NUMBER)'); - tx.executeSql(dataStr, data); - } - ); -} - -function nuke() //For "Debug mode" -{ - for (var row = 1; row <= 5; row++) { - for (var col = 0; col < 5; col++) { - if (board[index(col, maxRow - row)] != null) { - board[index(col, maxRow - row)].dying = true; - board[index(col, maxRow - row)] = null; - } - } - } - if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) - shuffleUp(); - else - shuffleDown(); - if (gameMode == "endless") - refill(); - else - victoryCheck(); -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/samegame.qml b/basicsuite/Qt5Everywhere/demos/samegame/samegame.qml deleted file mode 100644 index 49eab55..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/samegame.qml +++ /dev/null @@ -1,371 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 -import "content/samegame.js" as Logic -import "settings.js" as Settings -import "content" - -Rectangle { - id: root - anchors.fill: parent - property int acc: 0 - - - function loadPuzzle() { - if (gameCanvas.mode != "") - Logic.cleanUp(); - Logic.startNewGame(gameCanvas,"puzzle","levels/level"+acc+".qml") - } - function nextPuzzle() { - acc = (acc + 1) % 10; - loadPuzzle(); - } - Timer { - id: gameOverTimer - interval: 1500 - running : gameCanvas.gameOver && gameCanvas.mode == "puzzle" //mode will be reset by cleanUp(); - repeat : false - onTriggered: { - Logic.cleanUp(); - nextPuzzle(); - } - } - - Image { - source: "content/gfx/background.png" - anchors.fill: parent - } - - GameArea { - id: gameCanvas - z: 1 - y: Settings.headerHeight - - width: parent.width - height: parent.height - Settings.headerHeight - Settings.footerHeight - - backgroundVisible: root.state == "in-game" - onModeChanged: if (gameCanvas.mode != "puzzle") puzzleWon = false; //UI has stricter constraints on this variable than the game does - Age { - groups: ["redspots", "greenspots", "bluespots", "yellowspots"] - enabled: root.state == "" - system: gameCanvas.ps - } - - onPuzzleLost: acc--;//So that nextPuzzle() reloads the current one - - } - - Item { - id: menu - z: 2 - width: parent.width; - anchors.top: parent.top - anchors.bottom: bottomBar.top - - LogoAnimation { - x: 64 - y: Settings.headerHeight - particleSystem: gameCanvas.ps - running: root.state == "" - } - Row { - x: 112 - y: 20 - Image { source: "content/gfx/logo-a.png" } - Image { source: "content/gfx/logo-m.png" } - Image { source: "content/gfx/logo-e.png" } - } - - Column { - y: 100 + 40 - spacing: Settings.menuButtonSpacing - - Button { - width: root.width - rotatedButton: true - imgSrc: "content/gfx/but-game-1.png" - onClicked: { - if (root.state == "in-game") - return //Prevent double clicking - root.state = "in-game" - gameCanvas.blockFile = "Block.qml" - gameCanvas.background = "gfx/background.png" - arcadeTimer.start(); - } - //Emitted particles don't fade out, because ImageParticle is on the GameArea - system: gameCanvas.ps - group: "green" - Timer { - id: arcadeTimer - interval: Settings.menuDelay - running : false - repeat : false - onTriggered: Logic.startNewGame(gameCanvas) - } - } - - Button { - width: root.width - rotatedButton: true - imgSrc: "content/gfx/but-game-2.png" - onClicked: { - if (root.state == "in-game") - return - root.state = "in-game" - gameCanvas.blockFile = "Block.qml" - gameCanvas.background = "gfx/background.png" - twopTimer.start(); - } - system: gameCanvas.ps - group: "green" - Timer { - id: twopTimer - interval: Settings.menuDelay - running : false - repeat : false - onTriggered: Logic.startNewGame(gameCanvas, "multiplayer") - } - } - - Button { - width: root.width - rotatedButton: true - imgSrc: "content/gfx/but-game-3.png" - onClicked: { - if (root.state == "in-game") - return - root.state = "in-game" - gameCanvas.blockFile = "SimpleBlock.qml" - gameCanvas.background = "gfx/background.png" - endlessTimer.start(); - } - system: gameCanvas.ps - group: "blue" - Timer { - id: endlessTimer - interval: Settings.menuDelay - running : false - repeat : false - onTriggered: Logic.startNewGame(gameCanvas, "endless") - } - } - - Button { - width: root.width - rotatedButton: true - imgSrc: "content/gfx/but-game-4.png" - group: "yellow" - onClicked: { - if (root.state == "in-game") - return - root.state = "in-game" - gameCanvas.blockFile = "PuzzleBlock.qml" - gameCanvas.background = "gfx/background.png" - puzzleTimer.start(); - } - Timer { - id: puzzleTimer - interval: Settings.menuDelay - running : false - repeat : false - onTriggered: loadPuzzle(); - } - system: gameCanvas.ps - } - } - } - - Image { - id: scoreBar - source: "content/gfx/bar.png" - width: parent.width - z: 6 - y: -Settings.headerHeight - height: Settings.headerHeight - Behavior on opacity { NumberAnimation {} } - SamegameText { - id: arcadeScore - anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} - text: 'P1: ' + gameCanvas.score - font.pixelSize: Settings.fontPixelSize - textFormat: Text.StyledText - color: "white" - opacity: gameCanvas.mode == "arcade" ? 1 : 0 - Behavior on opacity { NumberAnimation {} } - } - SamegameText { - id: arcadeHighScore - anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} - text: 'Highscore: ' + gameCanvas.highScore - opacity: gameCanvas.mode == "arcade" ? 1 : 0 - } - SamegameText { - id: p1Score - anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} - text: 'P1: ' + gameCanvas.score - opacity: gameCanvas.mode == "multiplayer" ? 1 : 0 - } - SamegameText { - id: p2Score - anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} - text: 'P2: ' + gameCanvas.score2 - opacity: gameCanvas.mode == "multiplayer" ? 1 : 0 - rotation: 180 - } - SamegameText { - id: puzzleMoves - anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} - text: 'Moves: ' + gameCanvas.moves - opacity: gameCanvas.mode == "puzzle" ? 1 : 0 - } - SamegameText { - Image { - source: "content/gfx/icon-time.png" - x: -20 - } - id: puzzleTime - anchors { topMargin: 3; top: parent.top; horizontalCenter: parent.horizontalCenter; horizontalCenterOffset: 20} - text: "00:00" - opacity: gameCanvas.mode == "puzzle" ? 1 : 0 - Timer { - interval: 1000 - repeat: true - running: gameCanvas.mode == "puzzle" && !gameCanvas.gameOver - onTriggered: { - var elapsed = Math.floor((new Date() - Logic.gameDuration)/ 1000.0); - var mins = Math.floor(elapsed/60.0); - var secs = (elapsed % 60); - puzzleTime.text = (mins < 10 ? "0" : "") + mins + ":" + (secs < 10 ? "0" : "") + secs; - } - } - } - SamegameText { - id: puzzleScore - anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} - text: 'Score: ' + gameCanvas.score - opacity: gameCanvas.mode == "puzzle" ? 1 : 0 - } - } - - Image { - id: bottomBar - width: parent.width - height: Settings.footerHeight - source: "content/gfx/bar.png" - y: parent.height - Settings.footerHeight; - z: 2 - /*Button { - id: quitButton - height: Settings.toolButtonHeight - imgSrc: "content/gfx/but-quit.png" - onClicked: {Qt.quit(); } - anchors { left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: 11 } - }*/ - Button { - id: menuButton - height: Settings.toolButtonHeight - imgSrc: "content/gfx/but-menu.png" - visible: (root.state == "in-game"); - onClicked: {root.state = ""; Logic.cleanUp(); gameCanvas.mode = ""} - anchors { left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: 0 } - } - Button { - id: againButton - height: Settings.toolButtonHeight - imgSrc: "content/gfx/but-game-new.png" - visible: (root.state == "in-game"); - opacity: gameCanvas.gameOver && (gameCanvas.mode == "arcade" || gameCanvas.mode == "multiplayer") - Behavior on opacity{ NumberAnimation {} } - onClicked: {if (gameCanvas.gameOver) { Logic.startNewGame(gameCanvas, gameCanvas.mode);}} - anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 11 } - } - Button { - id: nextButton - height: Settings.toolButtonHeight - imgSrc: "content/gfx/but-puzzle-next.png" - visible: (root.state == "in-game") && gameCanvas.mode == "puzzle" && gameCanvas.puzzleWon - opacity: gameCanvas.puzzleWon ? 1 : 0 - Behavior on opacity{ NumberAnimation {} } - onClicked: {if (gameCanvas.puzzleWon) nextPuzzle();} - anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 11 } - } - } - - Connections { - target: root - onStateChanged: stateChangeAnim.running = true - } - SequentialAnimation { - id: stateChangeAnim - ParallelAnimation { - NumberAnimation { target: bottomBar; property: "y"; to: root.height; duration: Settings.menuDelay/2; easing.type: Easing.OutQuad } - NumberAnimation { target: scoreBar; property: "y"; to: -Settings.headerHeight; duration: Settings.menuDelay/2; easing.type: Easing.OutQuad } - } - ParallelAnimation { - NumberAnimation { target: bottomBar; property: "y"; to: root.height - Settings.footerHeight; duration: Settings.menuDelay/2; easing.type: Easing.OutBounce} - NumberAnimation { target: scoreBar; property: "y"; to: root.state == "" ? -Settings.headerHeight : 0; duration: Settings.menuDelay/2; easing.type: Easing.OutBounce} - } - } - - states: [ - State { - name: "in-game" - PropertyChanges { - target: menu - opacity: 0 - visible: false - } - } - ] - - transitions: [ - Transition { - NumberAnimation {properties: "x,y,opacity"} - } - ] - - //"Debug mode" - focus: true - Keys.onAsteriskPressed: Logic.nuke(); - Keys.onSpacePressed: gameCanvas.puzzleWon = true; -} diff --git a/basicsuite/Qt5Everywhere/demos/samegame/samegame.qrc b/basicsuite/Qt5Everywhere/demos/samegame/samegame.qrc deleted file mode 100644 index 951b9d1..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/samegame.qrc +++ /dev/null @@ -1,72 +0,0 @@ - - - samegame.qml - settings.js - content/gfx/text-p1-won.png - content/gfx/background-puzzle.png - content/gfx/background.png - content/gfx/bar.png - content/gfx/blue-puzzle.png - content/gfx/blue.png - content/gfx/bubble-highscore.png - content/gfx/bubble-puzzle.png - content/gfx/but-game-1.png - content/gfx/but-game-2.png - content/gfx/but-game-3.png - content/gfx/but-game-4.png - content/gfx/but-game-new.png - content/gfx/but-menu.png - content/gfx/but-puzzle-next.png - content/gfx/but-quit.png - content/gfx/green-puzzle.png - content/gfx/green.png - content/gfx/icon-fail.png - content/gfx/icon-ok.png - content/gfx/icon-time.png - content/gfx/logo-a.png - content/gfx/logo-e.png - content/gfx/logo-g.png - content/gfx/logo-m.png - content/gfx/logo-s.png - content/gfx/logo.png - content/gfx/particle-brick.png - content/gfx/particle-paint.png - content/gfx/particle-smoke.png - content/gfx/red-puzzle.png - content/gfx/red.png - content/gfx/text-highscore-new.png - content/gfx/text-highscore.png - content/gfx/text-no-winner.png - content/gfx/text-p1-go.png - content/gfx/text-p1.png - content/gfx/text-p2-go.png - content/gfx/text-p2-won.png - content/gfx/text-p2.png - content/gfx/yellow-puzzle.png - content/gfx/yellow.png - content/levels/level0.qml - content/levels/level1.qml - content/levels/level2.qml - content/levels/level3.qml - content/levels/level4.qml - content/levels/level5.qml - content/levels/level6.qml - content/levels/level7.qml - content/levels/level8.qml - content/levels/level9.qml - content/levels/TemplateBase.qml - content/SamegameText.qml - content/SimpleBlock.qml - content/Block.qml - content/BlockEmitter.qml - content/Button.qml - content/GameArea.qml - content/LogoAnimation.qml - content/MenuEmitter.qml - content/PaintEmitter.qml - content/PrimaryPack.qml - content/PuzzleBlock.qml - content/samegame.js - content/SmokeText.qml - - diff --git a/basicsuite/Qt5Everywhere/demos/samegame/settings.js b/basicsuite/Qt5Everywhere/demos/samegame/settings.js deleted file mode 100644 index e09dee9..0000000 --- a/basicsuite/Qt5Everywhere/demos/samegame/settings.js +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Research In Motion -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -.pragma library - -//This should be switched over once a proper QML settings API exists - -var menuDelay = 500 - -var headerHeight = 20 // 70 on BB10 -var footerHeight = 44 // 100 on BB10 - -var fontPixelSize = 14 // 55 on BB10 - -var blockSize = 32 // 64 on BB10 - -var toolButtonHeight = 32 // 64 on BB10 - -var menuButtonSpacing = 0 // 15 on BB10 diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Content.qml b/basicsuite/Qt5Everywhere/demos/shaders/Content.qml deleted file mode 100755 index aae2337..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Content.qml +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: root - property alias effect: effectLoader.item - property string effectSource: "Effects/EffectPassThrough.qml" - signal contentSizeChanged(size contentSize) - - color: "black" - - ShaderEffectSource { - id: theSource - smooth: true - hideSource: true - } - - LogoContainer { - id: logoContainer - anchors.fill: root - } - - Loader { - id: effectLoader - source: effectSource - } - - onWidthChanged: { - if (effectLoader.item) - effectLoader.item.targetWidth = root.width - } - - onHeightChanged: { - if (effectLoader.item) - effectLoader.item.targetHeight = root.height - } - - onEffectSourceChanged: { - effectLoader.source = effectSource - updateSource() - } - - function updateSource() { - if (effectLoader.item) { - effectLoader.item.parent = root - effectLoader.item.targetWidth = root.width - effectLoader.item.targetHeight = root.height - effectLoader.item.anchors.fill = logoContainer - effectLoader.item.source = theSource - } - } - - function init() { - theSource.sourceItem = logoContainer - root.effectSource = "Effects/EffectPassThrough.qml" - effectLoader.source = root.effectSource - updateSource() - } -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/EffectSelectionPanel.qml b/basicsuite/Qt5Everywhere/demos/shaders/EffectSelectionPanel.qml deleted file mode 100755 index 93cdb5f..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/EffectSelectionPanel.qml +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: root - height: 78 - property int itemHeight: 25 - property string effectSource: "" - property string effectName: "No effect" - - signal clicked - QtObject { - id: d - property Item selectedItem - } - - ListModel { - id: sources - ListElement { name: "No effect"; source: "Effects/EffectPassThrough.qml" } - ListElement { name: "Billboard"; source: "Effects/EffectBillboard.qml" } - ListElement { name: "Black & white"; source: "Effects/EffectBlackAndWhite.qml" } - ListElement { name: "Blur"; source: "Effects/EffectGaussianBlur.qml" } - ListElement { name: "Edge detection"; source: "Effects/EffectSobelEdgeDetection1.qml" } - ListElement { name: "Emboss"; source: "Effects/EffectEmboss.qml" } - ListElement { name: "Glow"; source: "Effects/EffectGlow.qml" } - ListElement { name: "Isolate"; source: "Effects/EffectIsolate.qml" } - ListElement { name: "Pixelate"; source: "Effects/EffectPixelate.qml" } - ListElement { name: "Posterize"; source: "Effects/EffectPosterize.qml" } - ListElement { name: "Ripple"; source: "Effects/EffectRipple.qml" } - ListElement { name: "Sepia"; source: "Effects/EffectSepia.qml" } - ListElement { name: "Sharpen"; source: "Effects/EffectSharpen.qml" } - ListElement { name: "Shockwave"; source: "Effects/EffectShockwave.qml" } - ListElement { name: "Toon"; source: "Effects/EffectToon.qml" } - ListElement { name: "Warhol"; source: "Effects/EffectWarhol.qml" } - ListElement { name: "Wobble"; source: "Effects/EffectWobble.qml" } - ListElement { name: "Vignette"; source: "Effects/EffectVignette.qml" } - } - - Component { - id: sourceDelegate - Item { - id: sourceDelegateItem - width: root.width - height: itemHeight - - Text { - id: sourceSelectorItem - anchors.centerIn: parent - width: 0.9 * parent.width - height: 0.8 * itemHeight - text: name - color: "white" - } - - states: [ - State { - name: "selected" - PropertyChanges { - target: sourceSelectorItem - bgColor: "#ff8888" - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - ColorAnimation { - properties: "color" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - } - } - - MouseArea { - id: mouseAboveMonitor - anchors.fill: parent - hoverEnabled: true - } - - ListView { - id: list - anchors.fill: parent - clip: true - anchors.margins: root.width * 0.05 - model: sources - - currentIndex: 0 - - onCurrentIndexChanged : { - effectSource = model.get(currentIndex).source - effectName = model.get(currentIndex).name - root.clicked() - } - - delegate: Item { - id: item - width: parent.width - height: itemHeight - Rectangle { - anchors.fill: parent - border.color: index == list.currentIndex ? "#44ffffff" : "transparent" - color: index == list.currentIndex ? "#22ffffff" : "transparent" - radius: 3 - Text { color: "white" ; text: name ; anchors.centerIn: parent; font.pixelSize: item.height * 0.5 } - MouseArea { - anchors.fill: parent - onClicked: list.currentIndex = index - } - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/Effect.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/Effect.qml deleted file mode 100755 index 34eb07c..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/Effect.qml +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import ShaderReader 1.0 - -ShaderEffect { - id: effect - property variant source - property ListModel parameters: ListModel { } - property bool divider: false - property real dividerValue: 1.0 - property real targetWidth: 0 - property real targetHeight: 0 - property alias fragmentShaderFilename: shaderFileReader.fragmentShaderFilename - property alias vertexShaderFilename: shaderFileReader.vertexShaderFilename - //property string fragmentShaderFilename - //property string vertexShaderFilename - - QtObject { - id: d - property string fragmentShaderCommon: " - #ifdef GL_ES - precision mediump float; - #else - # define lowp - # define mediump - # define highp - #endif // GL_ES - " - } - - ShaderFileReader { - id: shaderFileReader - onFragmentShaderFilenameChanged: { - effect.fragmentShader = d.fragmentShaderCommon + shaderFileReader.fragmentShader - } - onVertexShaderFilenameChanged: { - effect.vertexShader = shaderFileReader.vertexShader - } - } - - // The following is a workaround for the fact that ShaderEffect - // doesn't provide a way for shader programs to be read from a file, - // rather than being inline in the QML file - - //onFragmentShaderFilenameChanged: - // fragmentShader = d.fragmentShaderCommon + shaderFileReader.readFile("qml/QtDemo/demos/shaders/" + fragmentShaderFilename) - //onVertexShaderFilenameChanged: - // vertexShader = shaderFileReader.readFile("qml/QtDemo/demos/shaders/" + vertexShaderFilename) -} - diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectBillboard.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectBillboard.qml deleted file mode 100755 index 124a2a1..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectBillboard.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "grid spacing" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real grid: parameters.get(0).value * 10 - - property real step_x: 0.0015625 - property real step_y: targetHeight ? (step_x * targetWidth / targetHeight) : 0.0 - - fragmentShaderFilename: "shaders/billboard.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml deleted file mode 100755 index 37a3b6e..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "threshold" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real threshold: parameters.get(0).value - - fragmentShaderFilename: "shaders/blackandwhite.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectEmboss.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectEmboss.qml deleted file mode 100755 index 4bf5771..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectEmboss.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - fragmentShaderFilename: "shaders/emboss.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectGaussianBlur.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectGaussianBlur.qml deleted file mode 100755 index e63e17a..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectGaussianBlur.qml +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.geeks3d.com/20100909/shader-library-gaussian-blur-post-processing-filter-in-glsl/ - -import QtQuick 2.0 - -Item { - id: root - property bool divider: true - property real dividerValue: 1 - property ListModel parameters: ListModel { - ListElement { - name: "radius" - value: 0.5 - } - } - - property alias targetWidth: verticalShader.targetWidth - property alias targetHeight: verticalShader.targetHeight - property alias source: verticalShader.source - - Effect { - id: verticalShader - anchors.fill: parent - dividerValue: parent.dividerValue - property real blurSize: 4.0 * parent.parameters.get(0).value / targetHeight - fragmentShaderFilename: "shaders/gaussianblur_v.fsh" - } - - Effect { - id: horizontalShader - anchors.fill: parent - dividerValue: parent.dividerValue - property real blurSize: 4.0 * parent.parameters.get(0).value / parent.targetWidth - fragmentShaderFilename: "shaders/gaussianblur_h.fsh" - source: horizontalShaderSource - - ShaderEffectSource { - id: horizontalShaderSource - sourceItem: verticalShader - smooth: true - hideSource: true - } - } -} - diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectGlow.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectGlow.qml deleted file mode 100755 index d6e987d..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectGlow.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - fragmentShaderFilename: "shaders/glow.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectIsolate.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectIsolate.qml deleted file mode 100755 index 2425a25..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectIsolate.qml +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "hue" - value: 0.5 - } - ListElement { - name: "width" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real targetHue: parameters.get(0).value * 360 - property real windowWidth: parameters.get(1).value * 60 - - fragmentShaderFilename: "shaders/isolate.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPassThrough.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPassThrough.qml deleted file mode 100755 index 1f259be..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPassThrough.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - divider: false -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPixelate.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPixelate.qml deleted file mode 100755 index 71f7da9..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPixelate.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "granularity" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real granularity: parameters.get(0).value * 20 - - fragmentShaderFilename: "shaders/pixelate.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPosterize.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPosterize.qml deleted file mode 100755 index 0cf16a0..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectPosterize.qml +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "gamma" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real gamma: parameters.get(0).value - - property real numColors: 8.0 - - fragmentShaderFilename: "shaders/posterize.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectRipple.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectRipple.qml deleted file mode 100755 index 0b7c48c..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectRipple.qml +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "amplitude" - value: 0.5 - } - ListElement { - name: "frequency" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real amplitude: parameters.get(0).value * 0.03 - property real n: parameters.get(1).value * 7 - - property real time: 0 - NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } - - fragmentShaderFilename: "shaders/ripple.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSepia.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSepia.qml deleted file mode 100755 index 446e779..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSepia.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - fragmentShaderFilename: "shaders/sepia.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSharpen.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSharpen.qml deleted file mode 100755 index 99ece3c..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSharpen.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "sharpness" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real amount: parameters.get(0).value * 18 - - fragmentShaderFilename: "shaders/sharpen.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectShockwave.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectShockwave.qml deleted file mode 100755 index fe91781..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectShockwave.qml +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - id: root - parameters: ListModel { - ListElement { - name: "amplitude" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real granularity: parameters.get(0).value * 20 - property real weight: parameters.get(0).value - - property real centerX - property real centerY - property real time - - SequentialAnimation { - running: true - loops: Animation.Infinite - ScriptAction { - script: { - centerX = Math.random() - centerY = Math.random() - } - } - NumberAnimation { - target: root - property: "time" - from: 0 - to: 1 - duration: 1000 - } - } - - fragmentShaderFilename: "shaders/shockwave.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml deleted file mode 100755 index 189d5d3..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "threshold" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real mixLevel: parameters.get(0).value - property real targetSize: 250 - (200 * mixLevel) // TODO: fix ... - property real resS: targetSize - property real resT: targetSize - - fragmentShaderFilename: "shaders/sobeledgedetection1.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectToon.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectToon.qml deleted file mode 100755 index 08f1849..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectToon.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "threshold" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real threshold: parameters.get(0).value - property real targetSize: 250 - (200 * threshold) // TODO: fix ... - property real resS: targetSize - property real resT: targetSize - - // TODO - property real magTol: 0.3 - property real quantize: 8.0 - - fragmentShaderFilename: "shaders/toon.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectVignette.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectVignette.qml deleted file mode 100755 index 1120161..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectVignette.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - fragmentShaderFilename: "shaders/vignette.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectWarhol.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectWarhol.qml deleted file mode 100755 index e96d052..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectWarhol.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - fragmentShaderFilename: "shaders/warhol.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectWobble.qml b/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectWobble.qml deleted file mode 100755 index 4cccf48..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Effects/EffectWobble.qml +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Effect { - parameters: ListModel { - ListElement { - name: "amplitude" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real amplitude: parameters.get(0).value * 0.05 - - property real frequency: 20 - property real time: 0 - - NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } - - fragmentShaderFilename: "shaders/wobble.fsh" -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Logo.qml b/basicsuite/Qt5Everywhere/demos/shaders/Logo.qml deleted file mode 100644 index 2e2617a..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Logo.qml +++ /dev/null @@ -1,191 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: root - - property int logoSize: Math.min(parent.height, parent.width) / 2 - property int logoSizeDivider: 1 - property int logoState: 1 - property double posX: parent.width / 2 - property double posY: parent.height / 2 - property double rot: 0 - property double dx: 10 - property double dy: 10 - property double drot: 1 - property string explodeColor: "#ff3333" - - function play() { - randomValues(); - animationTimer.restart() - } - - function logoClicked() { - switch(root.logoState) { - case 1: { - parent.createNewLogos(root.posX,root.posY,logoSize,2) - parent.decreaseCounter(); - logo.visible = false; - root.logoState = 2; - root.explodeColor = "#33ff33" - explodeAnimation.restart() - break; - } - default: { - // return true if we must destroy this logo - if (parent.decreaseCounter(root.posX,root.posY) === true) { - logo.visible = false; - root.logoState = 2; - root.dx = 0; - root.dy = 0; - root.drot = 0; - root.explodeColor = "#ff3333" - explodeAnimation.restart() - } - else { // It was last logo, we will keep it - root.logoState = 1 - root.logoSizeDivider = 1 - root.explodeColor = "#3333ff" - explodeAnimation.restart() - } - break; - } - } - - } - - function randomValues() { - root.dx = Math.random()*5 - root.dy = Math.random()*5 - root.drot = Math.floor(Math.random()*10) - 5 - } - - function move() { - var x = root.posX + root.dx; - var y = root.posY + root.dy; - var limit = logoSize / logoState; - - // Check x - if (x + limit >= parent.width) { - x = parent.width - limit; - root.dx = -root.dx; - } - else if (x <= 0) { - x = 0; - root.dx = -root.dx; - } - - // Check y - if (y + limit >= parent.height) { - y = parent.height - limit; - root.dy = -root.dy; - } - else if (y <= 0) { - y = 0; - root.dy = -root.dy; - } - - root.posX = x - root.posY = y - root.rot = root.rot + root.drot - } - - ParticleSystem{ - id: particleSystem; - anchors.fill: logo - - Emitter { - id: emitter - anchors.fill: particleSystem - enabled: false - emitRate: 1000 - lifeSpan: 500 - size: logo.height * .5 - endSize: logo.height * .1 - velocity: AngleDirection { angleVariation: 360; magnitudeVariation: 160 } - } - - ImageParticle { - id: smokeParticle - source: "images/particle-smoke.png" - alpha: 0.3 - alphaVariation: 0.1 - color: root.explodeColor - } - } - - Timer { - id: animationTimer - interval: 20 - running: false - repeat: true - onTriggered: move(); - } - - Image { - id: logo - width: (logoSize / logoSizeDivider) - height: (logoSize / logoSizeDivider) - x: root.posX - y: root.posY - rotation: root.rot - source: "images/qt-logo.png" - - MouseArea { - anchors.fill: parent - onClicked: logoClicked(); - } - } - - SequentialAnimation { - id: explodeAnimation - running: false - ScriptAction { script: emitter.pulse(100); } - PauseAnimation { duration: 600 } - onRunningChanged: { - if (!explodeAnimation.running && root.logoState > 1) - root.destroy(); - } - } - -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/LogoContainer.qml b/basicsuite/Qt5Everywhere/demos/shaders/LogoContainer.qml deleted file mode 100644 index 1237305..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/LogoContainer.qml +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - anchors.fill: parent - - property int logoCount: 0 - - Image { - id: background - source: "images/wallpaper.png" - anchors.fill: root - } - - function createNewLogo(x,y,logoState) { - logoCount++; - var component = Qt.createComponent("Logo.qml") - if (component.status === Component.Ready) { - var logo = component.createObject(root, {"posX": x, "posY": y, "logoState": logoState, "logoSizeDivider" : logoState, "objectName": "logo"}); - logo.play(); - } - } - - function createNewLogos(x, y, logoSize, logoState) { - var newSize = logoSize / logoState; - var temp = logoSize - newSize; - - createNewLogo(x, y, logoState); - createNewLogo(x+temp, y, logoState); - createNewLogo(x+temp, y+temp, logoState); - createNewLogo(x, y+temp, logoState); - createNewLogo(x+logoSize/2-newSize/2, y+logoSize/2-newSize/2, logoState); - } - - function decreaseCounter() { - if (logoCount > 1) { - logoCount--; - return true; - } - return false; - } - - Component.onCompleted: { - var logoSize = Math.min(root.height, root.width) / 2; - createNewLogo(root.width/2 - logoSize/2, root.height/2 - logoSize/2, 1) - } -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/ParameterPanel.qml b/basicsuite/Qt5Everywhere/demos/shaders/ParameterPanel.qml deleted file mode 100644 index 33dd5ea..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/ParameterPanel.qml +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: root - height: view.model.count * sliderHeight - color: "#BB333333" - property color lineColor: "black" - property real spacing: 10 - property real sliderHeight: 50 - property bool isMouseAbove: mouseAboveMonitor.containsMouse - - property ListModel model: ListModel { } - - MouseArea { - id: mouseAboveMonitor - anchors.fill: parent - hoverEnabled: true; - } - - Component { - id: editDelegate - - Item { - id: delegate - width: root.width - height: root.sliderHeight - - Text { - id: text - text: name - color: "white" - anchors { - top: parent.top - bottom: parent.bottom - left: parent.left - leftMargin: root.width * 0.05 - } - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - font.pixelSize: delegate.height * 0.3 - font.capitalization: Font.Capitalize - width: root.width * 0.35 - } - - Slider { - anchors { - verticalCenter: text.verticalCenter - left: text.right - leftMargin: root.width * 0.05 - right: parent.right - rightMargin: root.width * 0.05 - } - value: model.value - onValueChanged: view.model.setProperty(index, "value", value) - } - } - } - - ListView { - id: view - anchors.fill: parent - model: root.model - delegate: editDelegate - interactive: false - } -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/Slider.qml b/basicsuite/Qt5Everywhere/demos/shaders/Slider.qml deleted file mode 100644 index 5ceefcc..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/Slider.qml +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: slider - - height: handleBack.height - // value is read/write. - property real value: 0 - property real maximum: 1 - property real minimum: 0 - property int xMax: width - handle.width - onXMaxChanged: updatePos() - onMinimumChanged: updatePos() - onValueChanged: if (!pressed) updatePos() - property bool mutable: true - property alias pressed : backgroundMouse.pressed - - signal valueChangedByHandle(int newValue) - - function updatePos() { - if (maximum > minimum) { - var pos = 0 + (value - minimum) * slider.xMax / (maximum - minimum); - pos = Math.min(pos, width - handle.width - 0); - pos = Math.max(pos, 0); - handle.x = pos; - } else { - handle.x = 0; - } - } - - Rectangle { - id: background - width: slider.width - anchors.verticalCenter: slider.verticalCenter - height: 2 - color: "#666666" - - MouseArea { - id: backgroundMouse - anchors.fill: parent - anchors.topMargin: -24 - anchors.bottomMargin: -24 - enabled: slider.mutable - drag.target: handle - drag.axis: Drag.XAxis - drag.minimumX: 0 - drag.maximumX: slider.xMax - onPressedChanged: { - value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); - valueChangedByHandle(value); - updatePos(); - } - onPositionChanged: { - value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); - valueChangedByHandle(value); - } - onWheel: { - value = Math.max(minimum, Math.min(maximum, value + (wheel.angleDelta.y > 0 ? 1 : -1) * (10 / slider.xMax) * (slider.maximum - slider.minimum))); - valueChangedByHandle(value); - updatePos(); - } - } - } - - Rectangle { - id: progress - height: 5 - anchors.verticalCenter: background.verticalCenter - anchors.left: background.left - anchors.right: handle.right - anchors.rightMargin: handle.width / 2 - visible: slider.enabled - color: "#98c66c" - } - - Rectangle { - id: handleBack - width: 40 - height: width - radius: width / 2 - color: "#8898c66c" - antialiasing: true - anchors.centerIn: handle - visible: handle.visible - } - - Rectangle { - id: handle - width: 14 - height: width - radius: width / 2 - antialiasing: true - color: "#98c66c" - anchors.verticalCenter: background.verticalCenter - visible: slider.enabled - } -} - diff --git a/basicsuite/Qt5Everywhere/demos/shaders/images/particle-smoke.png b/basicsuite/Qt5Everywhere/demos/shaders/images/particle-smoke.png deleted file mode 100644 index b27f954..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/shaders/images/particle-smoke.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/shaders/images/qt-logo.png b/basicsuite/Qt5Everywhere/demos/shaders/images/qt-logo.png deleted file mode 100755 index 242bb28..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/shaders/images/qt-logo.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/shaders/images/wallpaper.png b/basicsuite/Qt5Everywhere/demos/shaders/images/wallpaper.png deleted file mode 100644 index a499231..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/shaders/images/wallpaper.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/shaders/import/import.pro b/basicsuite/Qt5Everywhere/demos/shaders/import/import.pro deleted file mode 100644 index d72fb60..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/import/import.pro +++ /dev/null @@ -1,13 +0,0 @@ -CXX_MODULE = qml -TARGET = shaderreader -TARGETPATH = ShaderReader -IMPORT_VERSION = 1.0 - -QT += quick - -SOURCES = main.cpp \ - shaderfilereader.cpp \ - -HEADERS = shaderfilereader.h \ - -load(qml_plugin) diff --git a/basicsuite/Qt5Everywhere/demos/shaders/import/main.cpp b/basicsuite/Qt5Everywhere/demos/shaders/import/main.cpp deleted file mode 100644 index 0475ea8..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/import/main.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include "shaderfilereader.h" - -QT_BEGIN_NAMESPACE - -class SensorExplorerDeclarativeModule : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json") -public: - virtual void registerTypes(const char *uri) - { - Q_ASSERT(QLatin1String(uri) == QLatin1String("ShaderReader")); - qmlRegisterType(uri, 1, 0, "ShaderFileReader"); - } -}; - -QT_END_NAMESPACE - -#include "main.moc" - diff --git a/basicsuite/Qt5Everywhere/demos/shaders/import/plugin.json b/basicsuite/Qt5Everywhere/demos/shaders/import/plugin.json deleted file mode 100644 index e69de29..0000000 diff --git a/basicsuite/Qt5Everywhere/demos/shaders/import/qmldir b/basicsuite/Qt5Everywhere/demos/shaders/import/qmldir deleted file mode 100644 index 0c53031..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/import/qmldir +++ /dev/null @@ -1,2 +0,0 @@ -module ShaderReader -plugin shaderreader diff --git a/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.cpp b/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.cpp deleted file mode 100644 index 36a3632..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include "shaderfilereader.h" -#include -#include - -ShaderFileReader::ShaderFileReader(QObject* parent) - : QObject(parent) -{ - if (qEnvironmentVariableIsEmpty("QT_SHADER_PATH")) - setenv("QT_SHADER_PATH", "/data/user/qt/Qt5Everywhere/demos/shaders/",1); -} - -ShaderFileReader::~ShaderFileReader() -{ -} - -void ShaderFileReader::setFragmentShaderFilename(const QString &name) -{ - m_fragmentShaderFilename = name; - Q_EMIT fragmentShaderFilenameChanged(); -} - -void ShaderFileReader::setVertexShaderFilename(const QString &name) -{ - m_vertexShaderFilename = name; - Q_EMIT vertexShaderFilenameChanged(); -} - -QString ShaderFileReader::fragmentShader() const -{ - return readShaderFile(m_fragmentShaderFilename); -} - -QString ShaderFileReader::vertexShader() const -{ - return readShaderFile(m_vertexShaderFilename); -} - -QString ShaderFileReader::readShaderFile(const QString &fileName) const -{ - QString content; - QString path = qgetenv("QT_SHADER_PATH"); - QFile file(path.append(fileName)); - if (file.open(QIODevice::ReadOnly)) { - QTextStream stream(&file); - content = stream.readAll(); - file.close(); - } - return content; -} - diff --git a/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.h b/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.h deleted file mode 100644 index bfa82f7..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/import/shaderfilereader.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef SHADERFILEREADER_H -#define SHADERFILEREADER_H - -#include -#include - -class ShaderFileReader : public QObject -{ - Q_OBJECT - Q_PROPERTY(QString fragmentShaderFilename READ fragmentShaderFilename - WRITE setFragmentShaderFilename NOTIFY fragmentShaderFilenameChanged) - Q_PROPERTY(QString vertexShaderFilename READ vertexShaderFilename - WRITE setVertexShaderFilename NOTIFY vertexShaderFilenameChanged) - - Q_PROPERTY(QString fragmentShader READ fragmentShader) - Q_PROPERTY(QString vertexShader READ vertexShader) - -public: - ShaderFileReader(QObject* parent = 0); - ~ShaderFileReader(); - - void setFragmentShaderFilename(const QString &name); - void setVertexShaderFilename(const QString &name); - QString fragmentShaderFilename() const { return m_fragmentShaderFilename; } - QString vertexShaderFilename() const { return m_vertexShaderFilename; } - - QString fragmentShader() const; - QString vertexShader() const; - -protected: - QString readShaderFile(const QString &fileName) const; - -Q_SIGNALS: - void fragmentShaderFilenameChanged(); - void vertexShaderFilenameChanged(); - -private: - QString m_fragmentShaderFilename; - QString m_vertexShaderFilename; -}; - -Q_DECLARE_METATYPE(ShaderFileReader*) - -#endif // SHADERFILEREADER_H diff --git a/basicsuite/Qt5Everywhere/demos/shaders/main.qml b/basicsuite/Qt5Everywhere/demos/shaders/main.qml deleted file mode 100755 index c5f5d4c..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/main.qml +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: applicationWindow - anchors.fill:parent - color: "black" - property int margin: applicationWindow.height * 0.02 - - Content { - id: content - anchors.fill: parent - } - - Rectangle { - id: fx - anchors.right: applicationWindow.right - anchors.bottom: applicationWindow.bottom - anchors.margins: applicationWindow.margin - width: applicationWindow.width * 0.25 - height: applicationWindow.height * 0.08 - color: "#333333" - border.color: "#777777" - opacity: 0.5 - - Text { - anchors.centerIn: fx - color: "#ffffff" - text: effectSelectionPanel.effectName - font.pixelSize: fx.height * 0.5 - } - - MouseArea { - anchors.fill: parent - onPressed: fx.color = "#555555" - onReleased: fx.color = "#333333" - onClicked: effectSelectionPanel.visible = !effectSelectionPanel.visible; - } - } - - ParameterPanel { - id: parameterPanel - opacity: 0.7 - visible: effectSelectionPanel.visible && model.count !== 0 - width: applicationWindow.width * 0.4 - sliderHeight: applicationWindow.height * 0.15 - anchors { - bottom: effectSelectionPanel.bottom - right: effectSelectionPanel.left - } - } - - EffectSelectionPanel { - id: effectSelectionPanel - visible: false - opacity: 0.7 - anchors { - top: applicationWindow.top - right: applicationWindow.right - margins: applicationWindow.margin - } - width: fx.width - height: applicationWindow.height - fx.height - 2*applicationWindow.margin - itemHeight: fx.height - color: fx.color - - onClicked: { - content.effectSource = effectSource - parameterPanel.model = content.effect.parameters - } - } - - Component.onCompleted: { - content.init() - } -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders.pro b/basicsuite/Qt5Everywhere/demos/shaders/shaders.pro deleted file mode 100644 index de580fd..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS += \ - import \ diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/billboard.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/billboard.fsh deleted file mode 100755 index baa9554..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/billboard.fsh +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float grid; -uniform float dividerValue; -uniform float step_x; -uniform float step_y; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - float offx = floor(uv.x / (grid * step_x)); - float offy = floor(uv.y / (grid * step_y)); - vec3 res = texture2D(source, vec2(offx * grid * step_x , offy * grid * step_y)).rgb; - vec2 prc = fract(uv / vec2(grid * step_x, grid * step_y)); - vec2 pw = pow(abs(prc - 0.5), vec2(2.0)); - float rs = pow(0.45, 2.0); - float gr = smoothstep(rs - 0.1, rs + 0.1, pw.x + pw.y); - float y = (res.r + res.g + res.b) / 3.0; - vec3 ra = res / y; - float ls = 0.3; - float lb = ceil(y / ls); - float lf = ls * lb + 0.3; - res = lf * res; - vec3 col = mix(res, vec3(0.1, 0.1, 0.1), gr); - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * texture2D(source, uv); -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/blackandwhite.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/blackandwhite.fsh deleted file mode 100755 index 40756c4..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/blackandwhite.fsh +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float threshold; -uniform float dividerValue; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 orig = texture2D(source, uv); - vec3 col = orig.rgb; - float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b; - y = y < threshold ? 0.0 : 1.0; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(y, y, y, 1.0); - else - gl_FragColor = qt_Opacity * orig; -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/emboss.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/emboss.fsh deleted file mode 100755 index bd13a0b..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/emboss.fsh +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -const float step_w = 0.0015625; -const float step_h = 0.0027778; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; - vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; - vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; - vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; - vec3 t5 = texture2D(source, uv).rgb; - vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; - vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; - vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; - vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; - vec3 rr = -4.0 * t1 - 4.0 * t2 - 4.0 * t4 + 12.0 * t5; - float y = (rr.r + rr.g + rr.b) / 3.0; - vec3 col = vec3(y, y, y) + 0.3; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * texture2D(source, uv); -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/gaussianblur_h.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/gaussianblur_h.fsh deleted file mode 100755 index 96ae8e4..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/gaussianblur_h.fsh +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -uniform float dividerValue; -uniform float blurSize; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - c += texture2D(source, uv - vec2(4.0*blurSize, 0.0)) * 0.05; - c += texture2D(source, uv - vec2(3.0*blurSize, 0.0)) * 0.09; - c += texture2D(source, uv - vec2(2.0*blurSize, 0.0)) * 0.12; - c += texture2D(source, uv - vec2(1.0*blurSize, 0.0)) * 0.15; - c += texture2D(source, uv) * 0.18; - c += texture2D(source, uv + vec2(1.0*blurSize, 0.0)) * 0.15; - c += texture2D(source, uv + vec2(2.0*blurSize, 0.0)) * 0.12; - c += texture2D(source, uv + vec2(3.0*blurSize, 0.0)) * 0.09; - c += texture2D(source, uv + vec2(4.0*blurSize, 0.0)) * 0.05; - } else { - c = texture2D(source, qt_TexCoord0); - } - gl_FragColor = qt_Opacity * c; -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/gaussianblur_v.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/gaussianblur_v.fsh deleted file mode 100755 index 6bc7b8b..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/gaussianblur_v.fsh +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -uniform float dividerValue; -uniform float blurSize; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - c += texture2D(source, uv - vec2(0.0, 4.0*blurSize)) * 0.05; - c += texture2D(source, uv - vec2(0.0, 3.0*blurSize)) * 0.09; - c += texture2D(source, uv - vec2(0.0, 2.0*blurSize)) * 0.12; - c += texture2D(source, uv - vec2(0.0, 1.0*blurSize)) * 0.15; - c += texture2D(source, uv) * 0.18; - c += texture2D(source, uv + vec2(0.0, 1.0*blurSize)) * 0.15; - c += texture2D(source, uv + vec2(0.0, 2.0*blurSize)) * 0.12; - c += texture2D(source, uv + vec2(0.0, 3.0*blurSize)) * 0.09; - c += texture2D(source, uv + vec2(0.0, 4.0*blurSize)) * 0.05; - } else { - c = texture2D(source, qt_TexCoord0); - } - // First pass we don't apply opacity - gl_FragColor = c; -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/glow.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/glow.fsh deleted file mode 100755 index e0adcfd..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/glow.fsh +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -const float step_w = 0.0015625; -const float step_h = 0.0027778; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; - vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; - vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; - vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; - vec3 t5 = texture2D(source, uv).rgb; - vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; - vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; - vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; - vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; - vec3 xx = t1 + 2.0*t2 + t3 - t7 - 2.0*t8 - t9; - vec3 yy = t1 - t3 + 2.0*t4 - 2.0*t6 + t7 - t9; - vec3 rr = sqrt(xx * xx + yy * yy); - vec3 col = rr * 2.0 * t5; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * texture2D(source, uv); -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/isolate.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/isolate.fsh deleted file mode 100755 index 0f25bfa..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/isolate.fsh +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float targetHue; -uniform float windowWidth; -uniform float dividerValue; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void rgb2hsl(vec3 rgb, out float h, out float s, float l) -{ - float maxval = max(rgb.r, max(rgb.g, rgb.b)); - float minval = min(rgb.r, min(rgb.g, rgb.b)); - float delta = maxval - minval; - l = (minval + maxval) / 2.0; - s = 0.0; - if (l > 0.0 && l < 1.0) - s = delta / (l < 0.5 ? 2.0 * l : 2.0 - 2.0 * l); - h = 0.0; - if (delta > 0.0) - { - if (rgb.r == maxval && rgb.g != maxval) - h += (rgb.g - rgb.b ) / delta; - if (rgb.g == maxval && rgb.b != maxval) - h += 2.0 + (rgb.b - rgb.r) / delta; - if (rgb.b == maxval && rgb.r != maxval) - h += 4.0 + (rgb.r - rgb.g) / delta; - h *= 60.0; - } -} - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec3 col = texture2D(source, uv).rgb; - float h, s, l; - rgb2hsl(col, h, s, l); - float h2 = (h > targetHue) ? h - 360.0 : h + 360.0; - float y = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b; - vec3 result; - if (uv.x > dividerValue || (abs(h - targetHue) < windowWidth) || (abs(h2 - targetHue) < windowWidth)) - result = col; - else - result = vec3(y, y, y); - gl_FragColor = qt_Opacity * vec4(result, 1.0); -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/pixelate.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/pixelate.fsh deleted file mode 100755 index 922d79b..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/pixelate.fsh +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.geeks3d.com/20101029/shader-library-pixelation-post-processing-effect-glsl/ - -uniform float dividerValue; -uniform float granularity; -uniform float targetWidth; -uniform float targetHeight; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec2 tc = qt_TexCoord0; - if (uv.x < dividerValue && granularity > 0.0) { - float dx = granularity / targetWidth; - float dy = granularity / targetHeight; - tc = vec2(dx*(floor(uv.x/dx) + 0.5), - dy*(floor(uv.y/dy) + 0.5)); - } - gl_FragColor = qt_Opacity * texture2D(source, tc); -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/posterize.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/posterize.fsh deleted file mode 100755 index e5c77ce..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/posterize.fsh +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.geeks3d.com/20091027/shader-library-posterization-post-processing-effect-glsl/ - -uniform float dividerValue; -uniform float gamma; -uniform float numColors; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - vec3 x = texture2D(source, uv).rgb; - x = pow(x, vec3(gamma, gamma, gamma)); - x = x * numColors; - x = floor(x); - x = x / numColors; - x = pow(x, vec3(1.0/gamma)); - c = vec4(x, 1.0); - } else { - c = texture2D(source, uv); - } - gl_FragColor = qt_Opacity * c; -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/ripple.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/ripple.fsh deleted file mode 100755 index 6d4187c..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/ripple.fsh +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://labs.qt.nokia.com/2011/03/22/the-convenient-power-of-qml-scene-graph/ - -uniform float dividerValue; -uniform float targetWidth; -uniform float targetHeight; -uniform float time; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -const float PI = 3.1415926535; -const int ITER = 7; -const float RATE = 0.1; -uniform float amplitude; -uniform float n; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec2 tc = uv; - vec2 p = vec2(-1.0 + 2.0 * gl_FragCoord.x / targetWidth, -(-1.0 + 2.0 * gl_FragCoord.y / targetHeight)); - float diffx = 0.0; - float diffy = 0.0; - vec4 col; - if (uv.x < dividerValue) { - for (int i=0; i= (time - shock.z))) { - float diff = (distance - time); - float powDiff = 1.0 - pow(abs(diff*shock.x), shock.y*weight); - float diffTime = diff * powDiff; - vec2 diffUV = normalize(uv - center); - tc += (diffUV * diffTime); - } - } - gl_FragColor = qt_Opacity * texture2D(source, tc); -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/sobeledgedetection1.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/sobeledgedetection1.fsh deleted file mode 100755 index 96732fa..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/sobeledgedetection1.fsh +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on "Graphics Shaders: Theory and Practice" (http://cgeducation.org/ShadersBook/) - -uniform float dividerValue; -uniform float mixLevel; -uniform float resS; -uniform float resT; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - vec2 st = qt_TexCoord0.st; - vec3 irgb = texture2D(source, st).rgb; - vec2 stp0 = vec2(1.0 / resS, 0.0); - vec2 st0p = vec2(0.0 , 1.0 / resT); - vec2 stpp = vec2(1.0 / resS, 1.0 / resT); - vec2 stpm = vec2(1.0 / resS, -1.0 / resT); - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - float i00 = dot(texture2D(source, st).rgb, W); - float im1m1 = dot(texture2D(source, st-stpp).rgb, W); - float ip1p1 = dot(texture2D(source, st+stpp).rgb, W); - float im1p1 = dot(texture2D(source, st-stpm).rgb, W); - float ip1m1 = dot(texture2D(source, st+stpm).rgb, W); - float im10 = dot(texture2D(source, st-stp0).rgb, W); - float ip10 = dot(texture2D(source, st+stp0).rgb, W); - float i0m1 = dot(texture2D(source, st-st0p).rgb, W); - float i0p1 = dot(texture2D(source, st+st0p).rgb, W); - float h = -1.0*im1p1 - 2.0*i0p1 - 1.0*ip1p1 + 1.0*im1m1 + 2.0*i0m1 + 1.0*ip1m1; - float v = -1.0*im1m1 - 2.0*im10 - 1.0*im1p1 + 1.0*ip1m1 + 2.0*ip10 + 1.0*ip1p1; - float mag = 1.0 - length(vec2(h, v)); - vec3 target = vec3(mag, mag, mag); - c = vec4(target, 1.0); - } else { - c = texture2D(source, qt_TexCoord0); - } - gl_FragColor = qt_Opacity * c; -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/toon.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/toon.fsh deleted file mode 100755 index 2814dfb..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/toon.fsh +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.geeks3d.com/20101029/shader-library-pixelation-post-processing-effect-glsl/ - -uniform float dividerValue; -uniform float threshold; -uniform float resS; -uniform float resT; -uniform float magTol; -uniform float quantize; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec4 color = vec4(1.0, 0.0, 0.0, 1.1); - vec2 uv = qt_TexCoord0.xy; - if (uv.x < dividerValue) { - vec2 st = qt_TexCoord0.st; - vec3 rgb = texture2D(source, st).rgb; - vec2 stp0 = vec2(1.0/resS, 0.0); - vec2 st0p = vec2(0.0 , 1.0/resT); - vec2 stpp = vec2(1.0/resS, 1.0/resT); - vec2 stpm = vec2(1.0/resS, -1.0/resT); - float i00 = dot( texture2D(source, st).rgb, vec3(0.2125,0.7154,0.0721)); - float im1m1 = dot( texture2D(source, st-stpp).rgb, vec3(0.2125,0.7154,0.0721)); - float ip1p1 = dot( texture2D(source, st+stpp).rgb, vec3(0.2125,0.7154,0.0721)); - float im1p1 = dot( texture2D(source, st-stpm).rgb, vec3(0.2125,0.7154,0.0721)); - float ip1m1 = dot( texture2D(source, st+stpm).rgb, vec3(0.2125,0.7154,0.0721)); - float im10 = dot( texture2D(source, st-stp0).rgb, vec3(0.2125,0.7154,0.0721)); - float ip10 = dot( texture2D(source, st+stp0).rgb, vec3(0.2125,0.7154,0.0721)); - float i0m1 = dot( texture2D(source, st-st0p).rgb, vec3(0.2125,0.7154,0.0721)); - float i0p1 = dot( texture2D(source, st+st0p).rgb, vec3(0.2125,0.7154,0.0721)); - float h = -1.*im1p1 - 2.*i0p1 - 1.*ip1p1 + 1.*im1m1 + 2.*i0m1 + 1.*ip1m1; - float v = -1.*im1m1 - 2.*im10 - 1.*im1p1 + 1.*ip1m1 + 2.*ip10 + 1.*ip1p1; - float mag = sqrt(h*h + v*v); - if (mag > magTol) { - color = vec4(0.0, 0.0, 0.0, 1.0); - } - else { - rgb.rgb *= quantize; - rgb.rgb += vec3(0.5, 0.5, 0.5); - ivec3 irgb = ivec3(rgb.rgb); - rgb.rgb = vec3(irgb) / quantize; - color = vec4(rgb, 1.0); - } - } else { - color = texture2D(source, uv); - } - gl_FragColor = qt_Opacity * color; -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/vignette.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/vignette.fsh deleted file mode 100755 index bd20c8e..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/vignette.fsh +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 orig = texture2D(source, uv); - float cr = pow(0.1, 2.0); - float pt = pow(uv.x - 0.5, 2.0) + pow(uv.y - 0.5, 2.0); - float d = pt - cr; - float cf = 1.0; - if (d > 0.0) - cf = 1.0 - 2.0 * d; - vec3 col = cf * orig.rgb; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * orig; -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/warhol.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/warhol.fsh deleted file mode 100755 index 6852495..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/warhol.fsh +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 orig = texture2D(source, uv); - vec3 col = orig.rgb; - float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b; - y = y < 0.3 ? 0.0 : (y < 0.6 ? 0.5 : 1.0); - if (y == 0.5) - col = vec3(0.8, 0.0, 0.0); - else if (y == 1.0) - col = vec3(0.9, 0.9, 0.0); - else - col = vec3(0.0, 0.0, 0.0); - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * orig; -} diff --git a/basicsuite/Qt5Everywhere/demos/shaders/shaders/wobble.fsh b/basicsuite/Qt5Everywhere/demos/shaders/shaders/wobble.fsh deleted file mode 100755 index 1670de3..0000000 --- a/basicsuite/Qt5Everywhere/demos/shaders/shaders/wobble.fsh +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://labs.qt.nokia.com/2011/03/22/the-convenient-power-of-qml-scene-graph/ - -uniform float amplitude; -uniform float dividerValue; -uniform float frequency; -uniform float time; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec2 tc = qt_TexCoord0; - if (uv.x < dividerValue) { - vec2 p = sin(time + frequency * qt_TexCoord0); - tc += amplitude * vec2(p.y, -p.x); - } - gl_FragColor = qt_Opacity * texture2D(source, tc); -} diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/content/AndroidDelegate.qml b/basicsuite/Qt5Everywhere/demos/touchgallery/content/AndroidDelegate.qml deleted file mode 100644 index 21160eb..0000000 --- a/basicsuite/Qt5Everywhere/demos/touchgallery/content/AndroidDelegate.qml +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 - -Item { - id: root - width: parent.width - height: app.height*.1 - - property alias text: textitem.text - signal clicked - - Rectangle { - anchors.fill: parent - color: "#11ffffff" - visible: mouse.pressed - } - - Text { - id: textitem - color: "white" - font.pixelSize: root.height*.6 - text: modelData - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: 30 - } - - Rectangle { - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: 15 - height: 1 - color: "#424246" - } - - Image { - anchors.right: parent.right - anchors.rightMargin: 20 - anchors.verticalCenter: parent.verticalCenter - height: root.height*.8 - width: height - source: "../images/navigation_next_item.png" - } - - MouseArea { - id: mouse - anchors.fill: parent - onClicked: root.clicked() - - } -} diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/content/ButtonPage.qml b/basicsuite/Qt5Everywhere/demos/touchgallery/content/ButtonPage.qml deleted file mode 100644 index 63f9646..0000000 --- a/basicsuite/Qt5Everywhere/demos/touchgallery/content/ButtonPage.qml +++ /dev/null @@ -1,121 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - width: parent.width - height: parent.height - anchors {leftMargin: width*.1; rightMargin: width*.1} - - property real progress: 0 - SequentialAnimation on progress { - loops: Animation.Infinite - running: true - NumberAnimation { - from: 0 - to: 1 - duration: 3000 - } - NumberAnimation { - from: 1 - to: 0 - duration: 3000 - } - } - - Column { - spacing: 40 - anchors.centerIn: parent - - Button { - anchors.margins: 20 - text: "Press me" - style: touchStyle - } - - Button { - anchors.margins: 20 - style: touchStyle - text: "Press me too" - } - - Button { - anchors.margins: 20 - style: touchStyle - text: "Dont press me" - onClicked: if (pageStack) pageStack.pop() - } - - } - - Component { - id: touchStyle - ButtonStyle { - panel: Item { - implicitHeight: 50 - implicitWidth: 320 - BorderImage { - anchors.fill: parent - antialiasing: true - border.bottom: 8 - border.top: 8 - border.left: 8 - border.right: 8 - anchors.margins: control.pressed ? -4 : 0 - source: control.pressed ? "../images/button_pressed.png" : "../images/button_default.png" - Text { - text: control.text - anchors.centerIn: parent - color: "white" - font.pixelSize: 23 - renderType: Text.NativeRendering - } - } - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/content/CustomAppWindow.qml b/basicsuite/Qt5Everywhere/demos/touchgallery/content/CustomAppWindow.qml deleted file mode 100644 index e0e7bcd..0000000 --- a/basicsuite/Qt5Everywhere/demos/touchgallery/content/CustomAppWindow.qml +++ /dev/null @@ -1,181 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick.Window 2.1 -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Layouts 1.0 -import QtQuick.Controls.Private 1.0 - -/*! - \qmltype ApplicationWindow - \since QtQuick.Controls 1.0 - \inqmlmodule QtQuick.Controls 1.0 - \ingroup applicationwindow - \brief Provides a top-level application window. - - ApplicationWindow is a \l Window that adds convenience for positioning items, - such as \l MenuBar, \l ToolBar, and \l StatusBar in a platform independent - manner. - - \code - ApplicationWindow { - id: window - menuBar: MenuBar { - Menu { MenuItem {...} } - Menu { MenuItem {...} } - } - - toolBar: ToolBar { - RowLayout { - anchors.fill: parent - ToolButton {...} - } - } - - TabView { - id: myContent - anchors.fill: parent - ... - } - } - \endcode -*/ - -Rectangle { - id: root - - /*! - \qmlproperty MenuBar ApplicationWindow::menuBar - - This property holds the \l MenuBar. - - By default, this value is not set. - */ - property MenuBar menuBar: null - - /*! - \qmlproperty Item ApplicationWindow::toolBar - - This property holds the toolbar \l Item. - - It can be set to any Item type, but is generally used with \l ToolBar. - - By default, this value is not set. When you set the toolbar item, it will - be anchored automatically into the application window. - */ - property Item toolBar - - /*! - \qmlproperty Item ApplicationWindow::statusBar - - This property holds the status bar \l Item. - - It can be set to any Item type, but is generally used with \l StatusBar. - - By default, this value is not set. When you set the status bar item, it - will be anchored automatically into the application window. - */ - property Item statusBar - - onToolBarChanged: { if (toolBar) { toolBar.parent = toolBarArea } } - - onStatusBarChanged: { if (statusBar) { statusBar.parent = statusBarArea } } - - /*! \internal */ - default property alias data: contentArea.data - - color: syspal.window - - SystemPalette {id: syspal} - - Item { - id: backgroundItem - anchors.fill: parent - - Item { - id: toolBarArea - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - height: childrenRect.height - } - - Item { - id: contentArea - anchors.top: toolBarArea.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: statusBarArea.top - } - - Item { - id: statusBarArea - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - height: childrenRect.height - } - - onVisibleChanged: if (visible && menuBar) menuBar.__parentWindow = root - - states: State { - name: "hasMenuBar" - when: menuBar && !menuBar.__isNative - - ParentChange { - target: menuBar.__contentItem - parent: backgroundItem - } - - PropertyChanges { - target: menuBar.__contentItem - x: 0 - y: 0 - width: backgroundItem.width - } - - AnchorChanges { - target: toolBarArea - anchors.top: menuBar.__contentItem.bottom - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/content/ProgressBarPage.qml b/basicsuite/Qt5Everywhere/demos/touchgallery/content/ProgressBarPage.qml deleted file mode 100644 index dc0f552..0000000 --- a/basicsuite/Qt5Everywhere/demos/touchgallery/content/ProgressBarPage.qml +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - width: parent.width - height: parent.height - - property real progress: 0 - SequentialAnimation on progress { - loops: Animation.Infinite - running: true - NumberAnimation { - from: 0 - to: 1 - duration: 3000 - } - NumberAnimation { - from: 1 - to: 0 - duration: 3000 - } - } - - Column { - spacing: 40 - anchors.centerIn: parent - - ProgressBar { - anchors.margins: 20 - style: touchStyle - width: 400 - value: progress - } - - ProgressBar { - anchors.margins: 20 - style: touchStyle - width: 400 - value: 1 - progress - } - - ProgressBar { - anchors.margins: 20 - style: touchStyle - value: 1 - width: 400 - } - - } - - Component { - id: touchStyle - ProgressBarStyle { - panel: Rectangle { - implicitHeight: 15 - implicitWidth: 400 - color: "#444" - opacity: 0.8 - Rectangle { - antialiasing: true - radius: 1 - color: "#468bb7" - height: parent.height - width: parent.width * control.value / control.maximumValue - } - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/content/SliderPage.qml b/basicsuite/Qt5Everywhere/demos/touchgallery/content/SliderPage.qml deleted file mode 100644 index a1c0045..0000000 --- a/basicsuite/Qt5Everywhere/demos/touchgallery/content/SliderPage.qml +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - id: root - width: parent.width - height: parent.height - - Column { - spacing: 12 - anchors.centerIn: parent - - Slider { - anchors.margins: 20 - style: touchStyle - value: 0 - } - Slider { - anchors.margins: 20 - style: touchStyle - value: 0.5 - } - Slider { - anchors.margins: 20 - style: touchStyle - value: 1.0 - } - } - - Component { - id: touchStyle - SliderStyle { - handle: Rectangle { - width: 30 - height: 30 - radius: height - antialiasing: true - color: Qt.lighter("#468bb7", 1.2) - } - - groove: Item { - implicitHeight: 50 - implicitWidth: root.width - Rectangle { - height: 8 - width: parent.width - anchors.verticalCenter: parent.verticalCenter - color: "#444" - opacity: 0.8 - Rectangle { - antialiasing: true - radius: 1 - color: "#468bb7" - height: parent.height - width: parent.width * control.value / control.maximumValue - } - } - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/content/TabBarPage.qml b/basicsuite/Qt5Everywhere/demos/touchgallery/content/TabBarPage.qml deleted file mode 100644 index c96314b..0000000 --- a/basicsuite/Qt5Everywhere/demos/touchgallery/content/TabBarPage.qml +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - width: parent.width - height: parent.height - - TabView { - anchors.fill: parent - style: touchStyle - Tab { - title: "Buttons" - ButtonPage{ visible: true } - } - Tab { - title: "Sliders" - SliderPage{ visible: true } - } - Tab { - title: "Progress" - ProgressBarPage{ visible: true } - } - } - - Component { - id: touchStyle - TabViewStyle { - tabsAlignment: Qt.AlignVCenter - tabOverlap: 0 - frame: Item { } - tab: Item { - implicitWidth: control.width/control.count - implicitHeight: 50 - BorderImage { - anchors.fill: parent - border.bottom: 8 - border.top: 8 - source: tab.selected ? "../images/tab_selected.png":"../images/tabs_standard.png" - Text { - anchors.centerIn: parent - color: "white" - text: tab.title.toUpperCase() - font.pixelSize: 16 - } - Rectangle { - visible: index > 0 - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.margins: 10 - width:1 - color: "#3a3a3a" - } - } - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/content/TextInputPage.qml b/basicsuite/Qt5Everywhere/demos/touchgallery/content/TextInputPage.qml deleted file mode 100644 index 605afef..0000000 --- a/basicsuite/Qt5Everywhere/demos/touchgallery/content/TextInputPage.qml +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Controls.Styles 1.0 - -Item { - width: parent.width - height: parent.height - - property real progress: 0 - SequentialAnimation on progress { - loops: Animation.Infinite - running: true - NumberAnimation { - from: 0 - to: 1 - duration: 3000 - } - NumberAnimation { - from: 1 - to: 0 - duration: 3000 - } - } - - Column { - spacing: 40 - anchors.centerIn: parent - - TextField { - anchors.margins: 20 - text: "Text input" - style: touchStyle - } - - TextField { - anchors.margins: 20 - text: "Readonly Text input" - style: touchStyle - readOnly: true - } - } - Component { - id: touchStyle - - TextFieldStyle { - textColor: "white" - font.pixelSize: 28 - background: Item { - implicitHeight: 50 - implicitWidth: 320 - BorderImage { - source: "../images/textinput.png" - border.left: 8 - border.right: 8 - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - } - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/images/NOTICE.txt b/basicsuite/Qt5Everywhere/demos/touchgallery/images/NOTICE.txt deleted file mode 100644 index 93a9afc..0000000 --- a/basicsuite/Qt5Everywhere/demos/touchgallery/images/NOTICE.txt +++ /dev/null @@ -1,2 +0,0 @@ -Notice some of these images are derived from Google applications resources. They were provided under the following license: -You may use the materials in this directory without restriction to develop your apps and to use in your apps. diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/images/button_default.png b/basicsuite/Qt5Everywhere/demos/touchgallery/images/button_default.png deleted file mode 100644 index 6d6cfd9..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/touchgallery/images/button_default.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/images/button_pressed.png b/basicsuite/Qt5Everywhere/demos/touchgallery/images/button_pressed.png deleted file mode 100644 index ab78b6e..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/touchgallery/images/button_pressed.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/images/navigation_next_item.png b/basicsuite/Qt5Everywhere/demos/touchgallery/images/navigation_next_item.png deleted file mode 100644 index 6665c9d..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/touchgallery/images/navigation_next_item.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/images/navigation_previous_item.png b/basicsuite/Qt5Everywhere/demos/touchgallery/images/navigation_previous_item.png deleted file mode 100644 index f8be011..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/touchgallery/images/navigation_previous_item.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/images/tab_selected.png b/basicsuite/Qt5Everywhere/demos/touchgallery/images/tab_selected.png deleted file mode 100644 index 2345f7a..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/touchgallery/images/tab_selected.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/images/tabs_standard.png b/basicsuite/Qt5Everywhere/demos/touchgallery/images/tabs_standard.png deleted file mode 100644 index 7140ab7..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/touchgallery/images/tabs_standard.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/images/textinput.png b/basicsuite/Qt5Everywhere/demos/touchgallery/images/textinput.png deleted file mode 100644 index b0256db..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/touchgallery/images/textinput.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/images/toolbar.png b/basicsuite/Qt5Everywhere/demos/touchgallery/images/toolbar.png deleted file mode 100644 index e9eba4c..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/touchgallery/images/toolbar.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/touchgallery/main.qml b/basicsuite/Qt5Everywhere/demos/touchgallery/main.qml deleted file mode 100644 index 95d737b..0000000 --- a/basicsuite/Qt5Everywhere/demos/touchgallery/main.qml +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import "content" - -CustomAppWindow { - id: app - anchors.fill: parent - color: "black" - - toolBar: BorderImage { - border.bottom: 8 - source: "images/toolbar.png" - width: parent.width - height: app.height*.1 - - Rectangle { - id: backButton - width: opacity ? height : 0 - anchors.left: parent.left - anchors.leftMargin: 20 - opacity: pageStack.depth > 1 ? 1 : 0 - anchors.verticalCenter: parent.verticalCenter - antialiasing: true - height: parent.height* .8 - radius: 4 - color: backmouse.pressed ? "#222" : "transparent" - Behavior on opacity { NumberAnimation{} } - Image { - anchors.verticalCenter: parent.verticalCenter - source: "images/navigation_previous_item.png" - height: parent.height*.8 - width: height - } - MouseArea { - id: backmouse - anchors.fill: parent - anchors.margins: -10 - onClicked: pageStack.pop() - } - } - - Text { - font.pixelSize: app.height*.07 - Behavior on x { NumberAnimation{ easing.type: Easing.OutCubic} } - x: backButton.x + backButton.width + 20 - anchors.verticalCenter: parent.verticalCenter - color: "white" - text: "Widget Gallery" - } -} - - ListModel { - id: pageModel - ListElement { - title: "Buttons" - page: "content/ButtonPage.qml" - } - ListElement { - title: "Sliders" - page: "content/SliderPage.qml" - } - ListElement { - title: "ProgressBar" - page: "content/ProgressBarPage.qml" - } - ListElement { - title: "Tabs" - page: "content/TabBarPage.qml" - } - ListElement { - title: "TextInput" - page: "content/TextInputPage.qml" - } - } - - StackView { - id: pageStack - anchors.fill: parent - - initialItem: Item { - width: parent.width - height: parent.height - ListView { - model: pageModel - anchors.fill: parent - clip: true - delegate: AndroidDelegate { - text: title - onClicked: pageStack.push(Qt.resolvedUrl(page)) - } - } - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/video/Content.qml b/basicsuite/Qt5Everywhere/demos/video/Content.qml deleted file mode 100644 index de25f13..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/Content.qml +++ /dev/null @@ -1,67 +0,0 @@ - /**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtMultimedia 5.0 - -Rectangle { - id: root - property alias videoPlayer: videoContent - - color: "black" - - ContentVideo { - id: videoContent - anchors.fill: root - visible: mediaSource == "" ? false : true - } - - function openVideo(path) { - stop(); - videoContent.mediaSource = path - } - - function stop() { - if (videoContent.mediaSource !== undefined) { - videoContent.stop(); - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/video/ContentVideo.qml b/basicsuite/Qt5Everywhere/demos/video/ContentVideo.qml deleted file mode 100644 index 83c9ab7..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/ContentVideo.qml +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtMultimedia 5.0 - -VideoOutput { - id: videoOutput - source: mediaPlayer - fillMode: VideoOutput.PreserveAspectFit - property alias mediaSource: mediaPlayer.source - property alias mediaPlayer: mediaPlayer - property bool isPlaying: false - - MediaPlayer { - id: mediaPlayer - autoLoad: true - autoPlay: true - - onPlaybackStateChanged: { - if (playbackState === MediaPlayer.PlayingState) - videoOutput.isPlaying = true; - else - videoOutput.isPlaying = false; - } - - Component.onDestruction: { - mediaPlayer.stop() - } - } - function play() { mediaPlayer.play() } - function stop() { mediaPlayer.stop() } -} diff --git a/basicsuite/Qt5Everywhere/demos/video/ControlBar.qml b/basicsuite/Qt5Everywhere/demos/video/ControlBar.qml deleted file mode 100644 index c8e3b97..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/ControlBar.qml +++ /dev/null @@ -1,290 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtMultimedia 5.0 - -Item { - id: controlBar - anchors.fill: parent - - property MediaPlayer mediaPlayer: null - property bool isMouseAbove: false - property int margin: applicationWindow.width * 0.01 - - signal openURL() - - state: "VISIBLE" - - onMediaPlayerChanged: { - if (mediaPlayer === null) - return; - volumeControl.volume = mediaPlayer.volume; - } - - function updateStatusText() - { - var strText = "" - switch (mediaPlayer.status) { - case MediaPlayer.NoMedia: strText = "No Media"; break; - case MediaPlayer.Loading: strText = "Loading..."; break; - case MediaPlayer.Buffering: strText = "Buffering..."; break; - case MediaPlayer.Stalled: strText = "Stalled"; break; - case MediaPlayer.EndOfMedia: strText = "EndOfMedia"; break; - case MediaPlayer.InvalidMedia: strText = "InvalidMedia"; break; - case MediaPlayer.UnknownStatus: strText = "UnknownStatus"; break; - default: strText = ""; break; - } - - statusText.text = strText; - } - - Rectangle { - anchors.right: parent.right - anchors.top: parent.top - width: applicationWindow.height * 0.12 - height: width - color: "#88333333" - - Image { - id: closeImage - source: "images/CloseButton.png" - anchors.centerIn: parent - width: 0.5*parent.height - height: width - opacity: closeMouseArea.pressed ? 0.6 : 1 - smooth: true - } - - MouseArea { - id: closeMouseArea - anchors.fill: parent - onClicked: { - if (mediaPlayer !== null) { - mediaPlayer.stop(); - mediaPlayer.source = ""; - } - - videoSelector.show(); - } - } - } - - Rectangle { - id: bottomBar - height: parent.height * 0.2 - color: "#88333333" - anchors.left: parent.left - anchors.bottom: parent.bottom - anchors.right: parent.right - - property double playBackHeight: height*0.48 - property double seekHeight: height*0.48 - - VolumeControl { - id: volumeControl - anchors.verticalCenter: playbackControl.verticalCenter - anchors.left: bottomBar.left - anchors.leftMargin: bottomBar.margin - height: bottomBar.playBackHeight - width: parent.width * 0.3 - onVolumeChanged: { - if (mediaPlayer !== null) - mediaPlayer.volume = volume - } - - Connections { - target: mediaPlayer - onVolumeChanged: volumeControl.volume = mediaPlayer.volume - } - } - - //Playback Controls - PlaybackControl { - id: playbackControl - anchors.horizontalCenter: bottomBar.horizontalCenter - anchors.top: bottomBar.top - anchors.topMargin: bottomBar.margin - height: bottomBar.playBackHeight - - onPlayButtonPressed: { - if (mediaPlayer === null) - return; - - if (isPlaying) { - mediaPlayer.pause(); - } else { - mediaPlayer.play(); - } - } - } - - Text { - id: statusText - anchors.right: parent.right - anchors.verticalCenter: playbackControl.verticalCenter - anchors.rightMargin: bottomBar.margin - verticalAlignment: Text.AlignVCenter - height: bottomBar.playBackHeight - font.pixelSize: playbackControl.height * 0.5 - color: "white" - } - - //Seek controls - SeekControl { - id: seekControl - anchors.bottom: bottomBar.bottom - anchors.right: bottomBar.right - anchors.left: bottomBar.left - height: bottomBar.seekHeight - anchors.leftMargin: bottomBar.margin - anchors.rightMargin: bottomBar.margin - - enabled: playbackControl.isPlaybackEnabled - duration: mediaPlayer !== null ? mediaPlayer.duration : 0 - - onSeekValueChanged: { - if (mediaPlayer !== null) { - mediaPlayer.seek(newPosition); - position = mediaPlayer.position; - } - } - - Component.onCompleted: { - if (mediaPlayer !== null) - seekable = mediaPlayer.seekable; - } - } - - Connections { - target: mediaPlayer - onPositionChanged: { - if (!seekControl.pressed) seekControl.position = mediaPlayer.position; - } - onStatusChanged: { - if ((mediaPlayer.status == MediaPlayer.Loaded) || (mediaPlayer.status == MediaPlayer.Buffered) || mediaPlayer.status === MediaPlayer.Buffering || mediaPlayer.status === MediaPlayer.EndOfMedia) - playbackControl.isPlaybackEnabled = true; - else - playbackControl.isPlaybackEnabled = false; - updateStatusText(); - } - onErrorChanged: { - updateStatusText(); - } - - onPlaybackStateChanged: { - if (mediaPlayer.playbackState === MediaPlayer.PlayingState) { - playbackControl.isPlaying = true; - applicationWindow.resetTimer(); - } else { - show(); - playbackControl.isPlaying = false; - } - } - - onSeekableChanged: { - seekControl.seekable = mediaPlayer.seekable; - } - } - } - - //Usage: give the value you wish to modify position, - //returns a value between 0 and duration - function normalizeSeek(value) { - var newPosition = mediaPlayer.position + value; - if (newPosition < 0) - newPosition = 0; - else if (newPosition > mediaPlayer.duration) - newPosition = mediaPlayer.duration; - return newPosition; - } - - function hide() { - controlBar.state = "HIDDEN"; - } - - function show() { - controlBar.state = "VISIBLE"; - } - - states: [ - State { - name: "HIDDEN" - PropertyChanges { - target: controlBar - opacity: 0.0 - } - }, - State { - name: "VISIBLE" - PropertyChanges { - target: controlBar - opacity: 0.95 - } - } - ] - - transitions: [ - Transition { - from: "HIDDEN" - to: "VISIBLE" - NumberAnimation { - id: showAnimation - target: controlBar - properties: "opacity" - from: 0.0 - to: 1.0 - duration: 200 - } - }, - Transition { - from: "VISIBLE" - to: "HIDDEN" - NumberAnimation { - id: hideAnimation - target: controlBar - properties: "opacity" - from: 0.95 - to: 0.0 - duration: 200 - } - } - ] -} diff --git a/basicsuite/Qt5Everywhere/demos/video/ImageButton.qml b/basicsuite/Qt5Everywhere/demos/video/ImageButton.qml deleted file mode 100644 index 937a075..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/ImageButton.qml +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - - height: parent.height * 0.8 - width: image.width * image.scale - - property alias enabled: mouseArea.enabled - property alias imageSource: image.source - - property bool checkable: false - property bool checked: false - property alias hover: mouseArea.containsMouse - property alias pressed: mouseArea.pressed - property double imageSize: 0.9*root.height - - opacity: enabled ? 1.0 : 0.3 - signal clicked - - Image { - id: image - anchors.centerIn: parent - scale: root.height / height - visible: true - opacity: pressed ? 0.6 : 1 - smooth: true - } - - MouseArea { - id: mouseArea - hoverEnabled: true - anchors.fill: root - onPositionChanged: applicationWindow.resetTimer() - onClicked: root.clicked(); - } -} diff --git a/basicsuite/Qt5Everywhere/demos/video/PlaybackControl.qml b/basicsuite/Qt5Everywhere/demos/video/PlaybackControl.qml deleted file mode 100644 index 9716825..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/PlaybackControl.qml +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Row { - id: root - spacing: controlBar.margin - - property bool isPlaybackEnabled: false - property bool isPlaying: false - - signal playButtonPressed() - - ImageButton { - id: playButton - enabled: isPlaybackEnabled - imageSource: !isPlaying ? "images/PlayButton.png" : "images/PauseButton.png" - anchors.verticalCenter: root.verticalCenter - onClicked: { - playButtonPressed(); - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/video/ScrollBar.qml b/basicsuite/Qt5Everywhere/demos/video/ScrollBar.qml deleted file mode 100644 index 37c2eab..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/ScrollBar.qml +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: scrollBar - - // The properties that define the scrollbar's state. - // position and pageSize are in the range 0.0 - 1.0. They are relative to the - // height of the page, i.e. a pageSize of 0.5 means that you can see 50% - // of the height of the view. - property real position - property real pageSize - - // A light, semi-transparent background - Rectangle { - id: background - anchors.fill: parent - radius: width/2 - 1 - color: "transparent" - } - - Rectangle { - x: scrollBar.position * (scrollBar.width-2) + 1 - y: 1 - width: scrollBar.pageSize * (scrollBar.width-2) - height: parent.height - radius: height/2 - 1 - color: "#22aa22" - } -} diff --git a/basicsuite/Qt5Everywhere/demos/video/SeekControl.qml b/basicsuite/Qt5Everywhere/demos/video/SeekControl.qml deleted file mode 100644 index 8003951..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/SeekControl.qml +++ /dev/null @@ -1,125 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - - property int position: 0 - property int duration: 0 - property bool seekable: false - property alias pressed : seekSlider.pressed - property bool enabled - - signal seekValueChanged(int newPosition) - - onPositionChanged: { - elapsedText.text = formatTime(position); - seekSlider.value = position; - } - - onDurationChanged: { - remainingText.text = formatTime(duration); - } - - Text { - id: elapsedText - anchors.verticalCenter: seekSlider.verticalCenter - anchors.left: root.left - verticalAlignment: Text.AlignVCenter - height: parent.height - text: "00:00" - font.pixelSize: height * 0.4 - color: "#cccccc" - } - - Slider { - id: seekSlider - anchors.left: elapsedText.right - anchors.right: remainingText.left - anchors.verticalCenter: root.verticalCenter - mutable: root.seekable - enabled: root.enabled - height: parent.height - - minimum: 0.0 - maximum: root.duration !== 0 ? root.duration : 1 - - onValueChangedByHandle: { - seekValueChanged(newValue); - applicationWindow.resetTimer() - } - } - - Text { - id: remainingText - anchors.verticalCenter: seekSlider.verticalCenter - anchors.right: root.right - verticalAlignment: Text.AlignVCenter - height: parent.height - text: "00:00" - font.pixelSize: height * 0.4 - color: "#cccccc" - } - - function formatTime(time) { - time = time / 1000 - var hours = Math.floor(time / 3600); - time = time - hours * 3600; - var minutes = Math.floor(time / 60); - var seconds = Math.floor(time - minutes * 60); - - if (hours > 0) - return formatTimeBlock(hours) + ":" + formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); - else - return formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); - - } - - function formatTimeBlock(time) { - if (time === 0) - return "00" - if (time < 10) - return "0" + time; - else - return time.toString(); - } -} diff --git a/basicsuite/Qt5Everywhere/demos/video/Slider.qml b/basicsuite/Qt5Everywhere/demos/video/Slider.qml deleted file mode 100644 index 8a99cfe..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/Slider.qml +++ /dev/null @@ -1,140 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: slider - - anchors.leftMargin: handleBack.radius - anchors.rightMargin: handleBack.radius - - // value is read/write. - property real value: 0 - property real maximum: 1 - property real minimum: 0 - property int xMax: width - handle.width - onXMaxChanged: updatePos() - onMinimumChanged: updatePos() - onValueChanged: if (!pressed) updatePos() - property bool mutable: true - property alias pressed : backgroundMouse.pressed - - signal valueChangedByHandle(int newValue) - - function updatePos() { - if (maximum > minimum) { - var pos = 0 + (value - minimum) * slider.xMax / (maximum - minimum); - pos = Math.min(pos, width - handle.width - 0); - pos = Math.max(pos, 0); - handle.x = pos; - } else { - handle.x = 0; - } - } - - Rectangle { - id: background - width: slider.width - anchors.verticalCenter: slider.verticalCenter - height: 2 - color: "#666666" - - MouseArea { - id: backgroundMouse - anchors.fill: parent - anchors.topMargin: -24 - anchors.bottomMargin: -24 - enabled: slider.mutable - drag.target: handle - drag.axis: Drag.XAxis - drag.minimumX: 0 - drag.maximumX: slider.xMax - onPressedChanged: { - value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); - valueChangedByHandle(value); - updatePos(); - } - onPositionChanged: { - value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); - valueChangedByHandle(value); - } - onWheel: { - value = Math.max(minimum, Math.min(maximum, value + (wheel.angleDelta.y > 0 ? 1 : -1) * (10 / slider.xMax) * (slider.maximum - slider.minimum))); - valueChangedByHandle(value); - updatePos(); - } - } - } - - Rectangle { - id: progress - height: 5 - anchors.verticalCenter: background.verticalCenter - anchors.left: background.left - anchors.right: handle.right - anchors.rightMargin: handle.width / 2 - visible: slider.enabled - color: "#98c66c" - } - - Rectangle { - id: handleBack - width: Math.max(10, Math.min(50, slider.height)) - height: width - radius: width / 2 - color: "#8898c66c" - antialiasing: true - anchors.centerIn: handle - visible: handle.visible - } - - Rectangle { - id: handle - width: Math.max(3,handleBack.height / 3) - height: width - radius: width / 2 - antialiasing: true - color: "#98c66c" - anchors.verticalCenter: background.verticalCenter - visible: slider.enabled - } -} - diff --git a/basicsuite/Qt5Everywhere/demos/video/VideoDelegate.qml b/basicsuite/Qt5Everywhere/demos/video/VideoDelegate.qml deleted file mode 100644 index 6109f81..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/VideoDelegate.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: delegate - height: grid.cellHeight - width: grid.cellWidth - property int tileMargin: videoSelector.tileMargin - - signal videoSelected(string link) - - Rectangle { - anchors.left: parent.left - anchors.top: parent.top - anchors.topMargin: parent.tileMargin/2 - width: parent.width - tileMargin - height: parent.height - tileMargin - color: videoSelector.tileBackground - - MouseArea { - anchors.fill: parent - onClicked: { - grid.currentIndex = index - delegate.videoSelected(link) - } - } - - states: [ - State { - name: "selected" - when: delegate.GridView.isCurrentItem - } - ] - - - Image { - id: iconImage - source: thumbnail - width: parent.width - height: parent.height - } - - Rectangle{ - width: parent.width - height: titleText.height + tileMargin - anchors.top: titleText.top - anchors.bottom: parent.bottom - color: "Black" - opacity: 0.5 - visible: iconImage.source - - } - - Text { - id: titleText - anchors.left: parent.left - anchors.leftMargin: tileMargin/3 - anchors.bottom: parent.bottom - anchors.bottomMargin: tileMargin/3 - anchors.right: parent.right - anchors.rightMargin: tileMargin/3 - - color: videoSelector.textColor - text: title - width: parent.width; - wrapMode: Text.WordWrap; - smooth: true - font { family: videoSelector.uiFont; pixelSize: videoSelector.tileFontSize } - } - } -} - diff --git a/basicsuite/Qt5Everywhere/demos/video/VideoSelector.qml b/basicsuite/Qt5Everywhere/demos/video/VideoSelector.qml deleted file mode 100644 index aa54e33..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/VideoSelector.qml +++ /dev/null @@ -1,158 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.XmlListModel 2.0 - -Item { - id: videoSelector - - property int tileHeight: parseInt(grid.height / 2) - property int tileMargin: tileHeight * 0.1 - property int tileFontSize: tileHeight * 0.08 - property string tileBackground: "#262626" - property string textColor: "white" - property string uiFont: "Segoe UI" - - signal selectVideo(string link) - - state: "VISIBLE" - - onOpacityChanged: { - if (state === "HIDDEN" && opacity <= 0.05) - visible = false; - } - - XmlListModel { - id: videoModel - source: "http://qt-project.org/uploads/videos/qt5_videos.xml" - query: "/videolist/item" - XmlRole { name: "thumbnail"; query: "thumbnail/string()" } - XmlRole { name: "title"; query: "title/string()" } - XmlRole { name: "link"; query: "link/string()" } - } - - // Grid view - GridView { - id: grid - anchors.fill: parent - flow: GridView.TopToBottom - cellHeight: tileHeight - cellWidth: parseInt(tileHeight * 1.5) - cacheBuffer: cellWidth - clip: false - focus: true - model: videoModel - delegate: VideoDelegate { onVideoSelected: videoSelector.selectVideo(link); } - - // Only show the scrollbars when the view is moving. - states: State { - when: grid.movingHorizontally - PropertyChanges { target: horizontalScrollBar; opacity: 1 } - } - - transitions: Transition { - NumberAnimation { properties: "opacity"; duration: 400 } - } - } - - ScrollBar { - id: horizontalScrollBar - width: parent.width; height: 6 - anchors.bottom: parent.bottom - anchors.left: parent.left - opacity: 0 - position: grid.visibleArea.xPosition - pageSize: grid.visibleArea.widthRatio - } - - function hide() { - videoSelector.state = "HIDDEN"; - } - - function show() { - videoSelector.visible = true; - videoSelector.state = "VISIBLE"; - } - - states: [ - State { - name: "HIDDEN" - PropertyChanges { - target: videoSelector - opacity: 0.0 - } - }, - State { - name: "VISIBLE" - PropertyChanges { - target: videoSelector - opacity: 0.95 - } - } - ] - - transitions: [ - Transition { - from: "HIDDEN" - to: "VISIBLE" - NumberAnimation { - id: showAnimation - target: videoSelector - properties: "opacity" - from: 0.0 - to: 1.0 - duration: 200 - } - }, - Transition { - from: "VISIBLE" - to: "HIDDEN" - NumberAnimation { - id: hideAnimation - target: videoSelector - properties: "opacity" - from: 0.95 - to: 0.0 - duration: 200 - } - } - ] -} diff --git a/basicsuite/Qt5Everywhere/demos/video/VolumeControl.qml b/basicsuite/Qt5Everywhere/demos/video/VolumeControl.qml deleted file mode 100644 index 6e75fd2..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/VolumeControl.qml +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - id: root - property alias volume: volumeSlider.value - - //Volume Controls - ImageButton { - id: volumeDown - height: parent.height * 0.5 - imageSource: "images/VolumeDown.png" - anchors.verticalCenter: root.verticalCenter - anchors.left: root.left - onClicked: { - root.volume = 0.0; - } - } - Slider { - id: volumeSlider - anchors.left: volumeDown.right - anchors.right: volumeUp.left - height: root.height - maximum: 1.0 - minimum: 0.0 - anchors.verticalCenter: root.verticalCenter - anchors.verticalCenterOffset: 1 - } - - ImageButton { - id: volumeUp - height: parent.height * 0.5 - imageSource: "images/VolumeUp.png" - anchors.verticalCenter: root.verticalCenter - anchors.verticalCenterOffset: 1 - anchors.right: root.right - onClicked: { - root.volume = 1.0 - } - } -} diff --git a/basicsuite/Qt5Everywhere/demos/video/images/CloseButton.png b/basicsuite/Qt5Everywhere/demos/video/images/CloseButton.png deleted file mode 100644 index 24407fe..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/images/CloseButton.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/images/PauseButton.png b/basicsuite/Qt5Everywhere/demos/video/images/PauseButton.png deleted file mode 100644 index b58ceb4..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/images/PauseButton.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/images/PlayButton.png b/basicsuite/Qt5Everywhere/demos/video/images/PlayButton.png deleted file mode 100644 index 247fe32..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/images/PlayButton.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/images/RateButtonForward.png b/basicsuite/Qt5Everywhere/demos/video/images/RateButtonForward.png deleted file mode 100644 index ebfca0d..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/images/RateButtonForward.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/images/RateButtonReverse.png b/basicsuite/Qt5Everywhere/demos/video/images/RateButtonReverse.png deleted file mode 100644 index 1837bfd..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/images/RateButtonReverse.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/images/StopButton.png b/basicsuite/Qt5Everywhere/demos/video/images/StopButton.png deleted file mode 100644 index 76bcbc8..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/images/StopButton.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/images/VolumeDown.png b/basicsuite/Qt5Everywhere/demos/video/images/VolumeDown.png deleted file mode 100644 index 38b1013..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/images/VolumeDown.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/images/VolumeUp.png b/basicsuite/Qt5Everywhere/demos/video/images/VolumeUp.png deleted file mode 100644 index cffe961..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/images/VolumeUp.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/main.qml b/basicsuite/Qt5Everywhere/demos/video/main.qml deleted file mode 100644 index 5987843..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/main.qml +++ /dev/null @@ -1,161 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtMultimedia 5.0 - -Rectangle { - id: applicationWindow - focus: true - color: "black" - anchors.fill:parent - - MouseArea { - id: mouseActivityMonitor - anchors.fill: parent - - hoverEnabled: true - onClicked: { - if (controlBar.state === "VISIBLE") { - controlBar.hide(); - } else { - controlBar.show(); - controlBarTimer.restart(); - } - } - } - - signal resetTimer - onResetTimer: { - controlBar.show(); - controlBarTimer.restart(); - } - - Content { - id: content - anchors.fill: parent - } - - VideoSelector { - id: videoSelector - anchors.fill: parent - anchors.margins: applicationWindow.width * 0.02 - visible: true - onSelectVideo: { - videoSelector.hide() - content.openVideo(link) - content.videoPlayer.play() - } - onVisibleChanged: { - if (visible) - controlBar.hide() - else - controlBar.show() - } - } - - Timer { - id: controlBarTimer - interval: 4000 - running: false - - onTriggered: hideToolBars(); - } - - ControlBar { - id: controlBar - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: applicationWindow.bottom - mediaPlayer: content.videoPlayer.mediaPlayer - } - - Component.onCompleted: { - controlBar.hide() - } - - property real volumeBeforeMuted: 1.0 - - Keys.onPressed: { - applicationWindow.resetTimer(); - if (event.key === Qt.Key_Up || event.key === Qt.Key_VolumeUp) { - content.videoPlayer.mediaPlayer.volume = Math.min(1, content.videoPlayer.mediaPlayer.volume + 0.1); - return; - } else if (event.key === Qt.Key_Down || event.key === Qt.Key_VolumeDown) { - if (event.modifiers & Qt.ControlModifier) { - if (content.videoPlayer.mediaPlayer.volume) { - volumeBeforeMuted = content.videoPlayer.mediaPlayer.volume; - content.videoPlayer.mediaPlayer.volume = 0 - } else { - content.videoPlayer.mediaPlayer.volume = volumeBeforeMuted; - } - } else { - content.videoPlayer.mediaPlayer.volume = Math.max(0, content.videoPlayer.mediaPlayer.volume - 0.1); - } - return; - } - - // What's next should be handled only if there's a loaded media - if (content.videoPlayer.mediaPlayer.status !== MediaPlayer.Loaded - && content.videoPlayer.mediaPlayer.status !== MediaPlayer.Buffered) - return; - - if (event.key === Qt.Key_Space) { - if (content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.PlayingState) - content.videoPlayer.mediaPlayer.pause() - else if (content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.PausedState - || content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.StoppedState) - content.videoPlayer.mediaPlayer.play() - } else if (event.key === Qt.Key_Left) { - content.videoPlayer.mediaPlayer.seek(Math.max(0, content.videoPlayer.mediaPlayer.position - 30000)); - return; - } else if (event.key === Qt.Key_Right) { - content.videoPlayer.mediaPlayer.seek(Math.min(content.videoPlayer.mediaPlayer.duration, content.videoPlayer.mediaPlayer.position + 30000)); - return; - } - } - - function hideToolBars() { - if (!controlBar.isMouseAbove && content.videoPlayer.isPlaying) - controlBar.hide(); - } - -} diff --git a/basicsuite/Qt5Everywhere/demos/video/qt5_video_jens.png b/basicsuite/Qt5Everywhere/demos/video/qt5_video_jens.png deleted file mode 100644 index 84f3bce..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/qt5_video_jens.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/qt5_video_kenneth.png b/basicsuite/Qt5Everywhere/demos/video/qt5_video_kenneth.png deleted file mode 100644 index eecb297..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/qt5_video_kenneth.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/qt5_video_lars.png b/basicsuite/Qt5Everywhere/demos/video/qt5_video_lars.png deleted file mode 100644 index 51e0701..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/qt5_video_lars.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/qt5_video_samuel.png b/basicsuite/Qt5Everywhere/demos/video/qt5_video_samuel.png deleted file mode 100644 index 1ed97c1..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/qt5_video_samuel.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/qt5_video_simon.png b/basicsuite/Qt5Everywhere/demos/video/qt5_video_simon.png deleted file mode 100644 index 583c564..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/qt5_video_simon.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/qt5_video_thiago.png b/basicsuite/Qt5Everywhere/demos/video/qt5_video_thiago.png deleted file mode 100644 index abf8522..0000000 Binary files a/basicsuite/Qt5Everywhere/demos/video/qt5_video_thiago.png and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/demos/video/qt5_videos.xml b/basicsuite/Qt5Everywhere/demos/video/qt5_videos.xml deleted file mode 100644 index 420e476..0000000 --- a/basicsuite/Qt5Everywhere/demos/video/qt5_videos.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - Lars Knoll: The Making of Qt 5 - qt5_video_lars.png - http://download.qt-project.org/learning/videos/Lars_Knoll_The_Making_of_Qt_5.mp4 - - - Qt 5: Jens Bache-Wiig on Qt 5 and Qt Quick - qt5_video_jens.png - http://download.qt-project.org/learning/videos/Qt5_Jens_Bache-Wiig_on_Qt5_Qt_Quick.mp4 - - - Qt 5: Simon Hausmann on Qt WebKit - qt5_video_simon.png - http://download.qt-project.org/learning/videos/Qt_5_Simon_Hausmann_on_Qt_WebKit.mp4 - - - Qt 5: Qt Developer Kenneth Christiansen on Qt WebKit - qt5_video_kenneth.png - http://download.qt-project.org/learning/videos/Qt5_Kenneth_Christiansen_on_Qt_WebKit.mp4 - - - Qt 5: Thiago Macieira on Qt Core - qt5_video_thiago.png - http://download.qt-project.org/learning/videos/Qt5_Thiago_Macieira_on_Qt_Core.mp4 - - - Qt 5: Samuel Rodal on Qt GUI, Qt Quick and Qt Open GL - qt5_video_samuel.png - http://download.qt-project.org/learning/videos/Qt5_Samuel_Rodal_on_Qt_GUI_OpenGL.mp4 - - diff --git a/basicsuite/Qt5Everywhere/description.txt b/basicsuite/Qt5Everywhere/description.txt deleted file mode 100644 index efa4b99..0000000 --- a/basicsuite/Qt5Everywhere/description.txt +++ /dev/null @@ -1 +0,0 @@ -This demo contains several Qt Quick 2 applications which you can launch by tapping the devices. diff --git a/basicsuite/Qt5Everywhere/engine.js b/basicsuite/Qt5Everywhere/engine.js deleted file mode 100644 index 2618807..0000000 --- a/basicsuite/Qt5Everywhere/engine.js +++ /dev/null @@ -1,302 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -var positions = [ - {x:-1100, y:-1650, gid: 0, url: "demos/rssnews/rssnews.qml", device: 3, name: "Rss Reader"}, - {x:-2100, y:-1550, gid: 0, url: "demos/gridrssnews/main.qml", device: 7, name: "Rss Reader"}, - - {x:1300, y:-1600, gid: 1, url: "demos/canvasclock/canvasClock.qml", device: 4, name: "Canvas\n Clock"}, - {x:2020, y:-1520, gid: 1, url: "demos/heartmonitor/main.qml", device: 5, name: " Heart\nMonitor"}, - - {x:1000, y:-300, gid: 2, url: "demos/calqlatr/Calqlatr.qml", device: 0, name: "Calqlatr"}, - {x:-500, y:-250, gid: 2, url: "demos/touchgallery/main.qml", device: 2, name: "Widget\nGallery"}, - {x:200, y:-200, gid: 2, url: "demos/photosurface/photosurface.qml", device: 6, name: " Photo\nSurface"}, - - {x:-1800, y:0, gid: 3, url: "demos/maroon/Maroon.qml", device: 1, name: "Maroon in\n Trouble"}, - {x:-2500, y:100, gid: 3, url: "demos/samegame/samegame.qml", device: 1, name: "SameGame"}, - - {x:1200, y:1200, gid: 5, url: "demos/shaders/main.qml", device: 6, name: "Shaders"}, - {x:2200, y:1400, gid: 5, url: "demos/particledemo/particledemo.qml", device: 7, name: "Particle\n Paint"}, - - {x:-800, y:1180, gid: 4, url: "demos/video/main.qml", device: 8, name: "Video"}, - {x:-1600, y:1500, gid: 4, url: "demos/radio/radio.qml", device: 4, name: "Internet\n Radio"} - ] - -var groupPositions = [ - {x:-2880, y:-2100, width: 2400, height: 1200, textX: 50, textY: 50, name: "Feeds"}, - {x:700, y:-2100, width: 1700, height: 1200, textX: 50, textY: 50, name: "Canvas"}, - {x:-900, y:-800, width: 2650, height: 1300, textX: 50, textY: 50, name: "Applications"}, - {x:-3000, y:-500, width: 1750, height: 1150, textX: 50, textY: 50, name: "Games"}, - {x:-2200, y:850, width: 2050, height: 1150, textX: 50, textY: 150, name: "Multimedia"}, - {x:510, y:600, width: 2450, height: 1500, textX: 50, textY: 50, name: "Particles & Shaders"} - ] - -var imageSources = ["phone1.png","phone2.png", "phone3.png","tablet1.png", "car_device.png", "medical_device.png", "laptop1.png", "laptop2.png", "tv.png"] -var widths = [300, 360, 366, 758, 625, 600, 918, 923, 800] -var heights = [605, 706, 720, 564, 386, 488, 600, 600, 638] -var scales = [0.8, 0.8, 0.6, 0.9, 1.0, 1.0, 0.9, 1.0, 1.0] -var demoWidths = [269, 322, 322, 642, 480, 482, 688, 691, 726] -var demoHeights = [404, 482, 482, 402, 320, 322, 431, 432, 456] -var maskHorizontalOffsets = [1, 1, 1, 1, -52, 1, 1, 1, 1] -var maskVerticalOffsets = [20, 32, 15, 24, 15, 45, 59, 57, 56] -var navigationList = [1,0,2,3,4,6,5,7,8,12,11,9,10] -var groupNavigationList = [0,1,2,3,4,5] -var currentDemoIndex = -1 -var currentGroupIndex = -1 -var objects = [] -var groups = [] - -function initSlides(){ - positions.forEach(function(pos){ - createSlide(pos.x,pos.y, pos.gid, pos.url, pos.device, pos.name) - }) -} - -function createSlide(x,y,gid,url,device,name){ - var component = Qt.createComponent("Slide.qml") - if (component.status === Component.Ready){ - var object=component.createObject(canvas) - object.device = device - object.imageSource = "images/" + imageSources[device] - object.width = widths[device] - object.height = heights[device] - object.scale = scales[device] - object.demoWidth = demoWidths[device] - object.demoHeight = demoHeights[device] - object.maskVerticalOffset = maskVerticalOffsets[device] - object.maskHorizontalOffset = maskHorizontalOffsets[device] - object.uid = objects.length - object.gid = gid - object.name = name - object.x = x-object.width/2 - object.y = y-object.height/2 - object.createElements(); - - if (url){ - object.url = url; - } - objects.push(object) - } -} - -function initGroups(){ - groupPositions.forEach(function(pos){ - createGroup(pos.x, pos.y, pos.width, pos.height, pos.textX, pos.textY, pos.textSource, pos.name) - }) -} - -function createGroup(x,y,width,height,textX,textY,textSource,name){ - var component = Qt.createComponent("Group.qml") - if (component.status === Component.Ready){ - var object=component.createObject(canvas) - object.uid = groups.length - object.x = x - object.y = y - object.width = width - object.height = height - object.textX = textX - object.textY = textY - object.name = name - - groups.push(object) - } -} - -function loadCurrentDemo(){ - - // Load current demo and release all others possible running demos - if (currentDemoIndex != -1) { - for (var i=0; i < objects.length; i++){ - if (currentDemoIndex == i){ - objects[navigationList[currentDemoIndex]].loadDemo(); - } - } - } -} - -function releaseDemos() -{ - for (var i=0; i < objects.length; i++) - objects[i].releaseDemo(); -} - -function getCurrent() -{ - if (currentDemoIndex < 0 || currentDemoIndex >= objects.length) - return null; - - return selectTarget(navigationList[currentDemoIndex]); -} - -function getNext() -{ - currentDemoIndex++; - if (currentDemoIndex >= objects.length) - currentDemoIndex = 0; - - return selectTarget(navigationList[currentDemoIndex]); -} - -function getPrevious() -{ - currentDemoIndex--; - if (currentDemoIndex < 0) - currentDemoIndex = objects.length-1; - - return selectTarget(navigationList[currentDemoIndex]); -} - -function selectTarget(uid){ - - var idx = -1; - - for (var i=0; i < objects.length; i++){ - if (uid >= 0 && objects[i].uid === uid){ - idx = i; - } else { - objects[i].releaseDemo(); - } - } - if (idx !== -1){ - currentDemoIndex = navigationList.indexOf(idx) - currentGroupIndex = objects[idx].gid - return {"x": positions[idx].x, - "y": positions[idx].y, - "targetScale": objects[idx].targetScale, - "navState": 2} - } - - return null; -} - -function getPosition(idx){ - return {"x": positions[idx].x, "y": positions[idx].y} -} - -function getCurrentGroup() -{ - if (currentGroupIndex < 0 || currentGroupIndex >= groups.length) - return null; - - return selectGroup(groupNavigationList[currentGroupIndex]); -} - -function getNextGroup() -{ - currentGroupIndex++; - if (currentGroupIndex >= groups.length) - currentGroupIndex = 0; - - return selectGroup(groupNavigationList[currentGroupIndex]); -} - -function getPreviousGroup() -{ - currentGroupIndex--; - if (currentGroupIndex < 0) - currentGroupIndex = groups.length-1; - - return selectGroup(groupNavigationList[currentGroupIndex]); -} - -function selectGroup(id){ - - var idx = -1; - - for (var i=0; i < groups.length; i++){ - if (id >= 0 && groups[i].uid === id){ - idx = i; - break; - } - } - - if (idx !== -1){ - currentGroupIndex = groupNavigationList.indexOf(idx) - return {"x": groupPositions[idx].x + groupPositions[idx].width/2, - "y": groupPositions[idx].y + groupPositions[idx].height/2, - "targetScale": groups[idx].targetScale, - "navState": 1} - } - - return null; -} - -function boundingBox(){ - var minX = 0, maxX = 0, minY = 0, maxY = 0; - - for (var i=0; i maxX) - maxX = right; - - if (top < minY) - minY = top; - else if (bottom > maxY) - maxY = bottom; - } - - return {"x": minX, "y": minY, "width": maxX-minX, "height": maxY-minY, "centerX": (minX+maxX)/2, "centerY": (minY+maxY)/2}; -} - -function scaleToBox(destWidth, destHeight, sourceWidth, sourceHeight) -{ - return Math.min(destWidth / sourceWidth, destHeight / sourceHeight); -} - -function updateObjectScales(destWidth, destHeight) -{ - for (var i=0; i 0 && app.height > 0){ - var bbox = Engine.boundingBox(); - app.homeScaleFactor = Engine.scaleToBox(app.width*0.85, app.height*0.85, bbox.width, bbox.height); - app.homeCenterX = bbox.centerX; - app.homeCenterY = bbox.centerY; - app.minScaleFactor = app.homeScaleFactor / 10; - app.maxScaleFactor = app.homeScaleFactor * 20; - Engine.updateObjectScales(app.width*0.9, app.height*0.9); - Engine.updateGroupScales(app.width, app.height); - tapLimitX = Math.max(1,app.width * 0.02); - tapLimitY = Math.max(1,app.height * 0.02); - - - var target = Engine.getCurrentGroup() - if (app.useGroups && navigationState == 1) { - if (target !== null) - canvas.goTo(target, true) - else - canvas.goHome() - } - else if (navigationState == 2) { - target = Engine.getCurrent() - if (target !== null) - canvas.goTo(target, true) - else - canvas.goHome() - } - else - canvas.goHome() - - navigationPanel.checkOrientation() - } - } - - function selectTarget(uid) { - return Engine.selectTarget(uid) - } - - function selectGroup(uid) { - return Engine.selectGroup(uid) - } - - function getCurrentGroup() { - return Engine.getCurrentGroup() - } - - function getNext() { - if (app.useGroups && app.navigationState == 1) - return Engine.getNextGroup() - else - return Engine.getNext() - } - - function getPrevious() { - if (app.useGroups && app.navigationState == 1) - return Engine.getPreviousGroup() - else - return Engine.getPrevious() - } - - onWidthChanged: calculateScales(); - onHeightChanged: calculateScales(); - - FontLoader { - id: fontLoader - source: "fonts/PatrickHandSC-Regular.ttf" - } - - gradient: Gradient { - GradientStop { position: 0.0; color: "#89d4ff" } - GradientStop { position: 1.0; color: "#f3fbff" } - } - - Cloud { id: cloud1; sourceImage: "images/cloud1.png"} - Cloud { id: cloud2; sourceImage: "images/cloud1.png"} - Cloud { id: cloud3; sourceImage: "images/cloud1.png"} - Cloud { id: cloud4; sourceImage: "images/cloud2.png"} - Cloud { id: cloud5; sourceImage: "images/cloud2.png"} - Cloud { id: cloud6; sourceImage: "images/cloud2.png"} - - WorldMouseArea { id: worldMouseArea } - WorldCanvas { id:canvas } - NavigationPanel{ id: navigationPanel } - - HelpScreen { - id: helpscreen - visible: false - } - function getPosition(index){ - return Engine.getPosition(index) - } - - QuitDialog { - id: quitDialog - visible: false - - onYes: Qt.quit() - onNo: visible = false - } - - SmoothedAnimation { - id: zoomAnimation - target: canvas; - property: "scalingFactor"; - duration: Style.APP_ANIMATION_DELAY - velocity: -1 - to:canvas.zoomInTarget - - onRunningChanged: { - if (!running) { - if (app.navigationState === 2) - Engine.loadCurrentDemo(); - else - Engine.releaseDemos(); - } - } - } - - SequentialAnimation { - id: navigationAnimation - - property int animCounter: 0 - - function restartAnimation() { - navigationAnimation.animCounter++; - restart(); - } - - NumberAnimation { - id: zoomOutAnimation - target: canvas; - property: "scalingFactor"; - duration: Style.APP_ANIMATION_DELAY/2; - to: app.homeScaleFactor*1.3 - easing.type: Easing.OutCubic - } - - NumberAnimation { - id: zoomInAnimation - target: canvas; - property: "scalingFactor"; - duration: Style.APP_ANIMATION_DELAY/2; - to: canvas.zoomInTarget - easing.type: Easing.InCubic - } - - onRunningChanged: { - if (!running) - animCounter-- - - if (animCounter === 0 && navigationState === 2) - Engine.loadCurrentDemo(); - } - } - - Keys.onReleased: { - // Handle back-key - if (event.key === Qt.Key_Back) { - event.accepted = true; - - if (app.navigationState !== 0) - canvas.goBack(); - else - quitDialog.visible = true - } - } - - Component.onCompleted: { - if (app.useGroups) - Engine.initGroups() - - Engine.initSlides() - cloud1.start(); - cloud2.start(); - cloud3.start(); - cloud4.start(); - cloud5.start(); - cloud6.start(); - } -} diff --git a/basicsuite/Qt5Everywhere/preview_l.jpg b/basicsuite/Qt5Everywhere/preview_l.jpg deleted file mode 100644 index 1bb40bf..0000000 Binary files a/basicsuite/Qt5Everywhere/preview_l.jpg and /dev/null differ diff --git a/basicsuite/Qt5Everywhere/style.js b/basicsuite/Qt5Everywhere/style.js deleted file mode 100644 index a6a2966..0000000 --- a/basicsuite/Qt5Everywhere/style.js +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -var APP_WIDTH = 800 -var APP_HEIGHT = 1280 - -var APP_ANIMATION_DELAY = 1000 - -var LOGO_WIDTH = 800 //1006 -var LOGO_HEIGHT = 960 //1200 - -var FONT_FAMILY = "Patrick Hand SC" diff --git a/basicsuite/Qt5Everywhere/title.txt b/basicsuite/Qt5Everywhere/title.txt deleted file mode 100644 index 2f1f4ce..0000000 --- a/basicsuite/Qt5Everywhere/title.txt +++ /dev/null @@ -1 +0,0 @@ -Qt5 Everywhere diff --git a/basicsuite/SensorExplorer/SensorExplorer.pro b/basicsuite/SensorExplorer/SensorExplorer.pro deleted file mode 100644 index 175b966..0000000 --- a/basicsuite/SensorExplorer/SensorExplorer.pro +++ /dev/null @@ -1,4 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS += \ - imports - diff --git a/basicsuite/SensorExplorer/description.txt b/basicsuite/SensorExplorer/description.txt deleted file mode 100644 index 606dc9b..0000000 --- a/basicsuite/SensorExplorer/description.txt +++ /dev/null @@ -1 +0,0 @@ -This example provides a list of all available sensors installed on the system for which Qt has a backend. Start a sensor to see how values change depending from environment and user-device interaction. diff --git a/basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc b/basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc deleted file mode 100644 index 001642f..0000000 --- a/basicsuite/SensorExplorer/doc/src/sensor_explorer.qdoc +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the documentation of the Qt Toolkit. -** -** $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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/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 SensorExplorer - \title Sensor Explorer - \brief The Sensor Explorer example demonstrates how to read the meta-data of available sensors. - \ingroup b2qt-demos - - \section2 Sensor Explorer in QML - - - This example is divided into two parts: - - \list - \li A C++ plug-in that provides QML alternatives for QSensorExplorer, QPropertyInfo and the QSensorItem classes. - \li A QML Application that uses the QML alternatives to read the sensors meta-data and present it. - \endlist - - - This is a pure QML application that can be run from Qt Creator or directly using the - \c qmlscene binary. You should install the other C++ plug-in before trying to run - this example, otherwise it will not find its dependencies. - - \code - qmlscene main.qml - \endcode - - To write a QML application that will use the Explorer QML type you need to do the following steps: - - Import the Explorer 1.0 declarative plugin: - - \snippet SensorExplorer/main.qml 0 - - Create a SensorExplorer QML item: - - \snippet SensorExplorer/main.qml 1 - - You can retrieve a list of all available sensors using the SensorExplorer: - - \snippet SensorExplorer/main.qml 2 - - To retrieve the properties of a SensorItem use: - - \snippet SensorExplorer/main.qml 3 - - Changing a property value can be done like: - - \snippet SensorExplorer/main.qml 4 - - Starting and stopping a sensor can be done like: - - \snippet SensorExplorer/main.qml 5 -*/ - diff --git a/basicsuite/SensorExplorer/imports/explorer.cpp b/basicsuite/SensorExplorer/imports/explorer.cpp deleted file mode 100644 index f9edc90..0000000 --- a/basicsuite/SensorExplorer/imports/explorer.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "explorer.h" -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -/* - \class QSensorExplorer - \brief The QSensorExplorer type provides an easy access for reading all avalaible sensors installed on the system. -*/ - -/* - Construct a QSensorExplorer object with parent \a parent -*/ -QSensorExplorer::QSensorExplorer(QObject* parent) - : QObject(parent) - , _selectedSensorItem(0) -{ - loadSensors(); -} - -/* - Destructor of a QSensorExplorer -*/ -QSensorExplorer::~QSensorExplorer() -{ -} - -/* - Load all available sensors and store it in a list. -*/ -void QSensorExplorer::loadSensors() -{ - _availableSensors.clear(); - foreach (const QByteArray &type, QSensor::sensorTypes()) { - foreach (const QByteArray &identifier, QSensor::sensorsForType(type)) { - // Don't put in sensors we can't connect to - QSensor* sensor = new QSensor(type, this); - //sensor->setIdentifier(identifier); - if (!sensor->connectToBackend()) { - qWarning() << "Couldn't connect to" << sensor->description(); - continue; - } - _availableSensors.append(new QSensorItem(sensor, this)); - } - } - emit availableSensorsChanged(); -} - -/* - \fn QSensorExplorer::availableSensorsChanged() - Notifies the client if the list of the available sensors was changed -*/ - -/* - \property QSensorExplorer::availableSensors - Returns a list of all available sensor. -*/ -QQmlListProperty QSensorExplorer::availableSensors() -{ - return QQmlListProperty(this,_availableSensors); -} - -/* - \fn QSensorExplorer::selectedSensorItemChanged() - Notifies the client if the selected sensor has been changed -*/ - -/* - \property QSensorExplorer::selectedSensorItem - Returns the current selected sensor item. -*/ -QSensorItem* QSensorExplorer::selectedSensorItem() -{ - return _selectedSensorItem; -} - -/* - \fn QSensorExplorer::setSelectedSensorItem(QSensorItem* selitem) - Sets the QSensorItem \a selitem as the current selected QSensorItem. -*/ -void QSensorExplorer::setSelectedSensorItem(QSensorItem* selitem) -{ - if (selitem && _selectedSensorItem != selitem) { - if (_selectedSensorItem) - _selectedSensorItem->unSelect(); - _selectedSensorItem = selitem; - _selectedSensorItem->select(); - emit selectedSensorItemChanged(); - } -} - -QT_END_NAMESPACE diff --git a/basicsuite/SensorExplorer/imports/explorer.h b/basicsuite/SensorExplorer/imports/explorer.h deleted file mode 100644 index d9d9546..0000000 --- a/basicsuite/SensorExplorer/imports/explorer.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSEONSOREXPLORER_H -#define QSEONSOREXPLORER_H - -#include -#include -#include "sensoritem.h" - -QT_BEGIN_NAMESPACE - -class QSensorExplorer : public QObject -{ - Q_OBJECT - Q_PROPERTY(QQmlListProperty availableSensors READ availableSensors NOTIFY availableSensorsChanged) - Q_PROPERTY(QSensorItem* selectedSensorItem READ selectedSensorItem WRITE setSelectedSensorItem NOTIFY selectedSensorItemChanged) -public: - QSensorExplorer(QObject* parent = 0); - virtual ~QSensorExplorer(); - -private: - QQmlListProperty availableSensors(); - void loadSensors(); - void setSelectedSensorItem(QSensorItem* selitem); - QSensorItem* selectedSensorItem(); - -Q_SIGNALS: - void availableSensorsChanged(); - void selectedSensorItemChanged(); - -private: - QList _availableSensors; - QSensorItem* _selectedSensorItem; -}; - -QT_END_NAMESPACE - -QML_DECLARE_TYPE(QSensorExplorer) - -#endif // QSEONSOREXPLORER_H diff --git a/basicsuite/SensorExplorer/imports/imports.pro b/basicsuite/SensorExplorer/imports/imports.pro deleted file mode 100644 index c596185..0000000 --- a/basicsuite/SensorExplorer/imports/imports.pro +++ /dev/null @@ -1,17 +0,0 @@ -CXX_MODULE = qml -TARGET = sensorexplorer -TARGETPATH = Explorer -IMPORT_VERSION = 1.0 - -QT += qml sensors - -SOURCES = main.cpp \ - explorer.cpp \ - sensoritem.cpp \ - propertyinfo.cpp \ - -HEADERS = explorer.h \ - sensoritem.h \ - propertyinfo.h \ - -load(qml_plugin) diff --git a/basicsuite/SensorExplorer/imports/main.cpp b/basicsuite/SensorExplorer/imports/main.cpp deleted file mode 100644 index 3a8f506..0000000 --- a/basicsuite/SensorExplorer/imports/main.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include "explorer.h" - -QT_BEGIN_NAMESPACE - -class SensorExplorerDeclarativeModule : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json") -public: - virtual void registerTypes(const char *uri) - { - Q_ASSERT(QLatin1String(uri) == QLatin1String("Explorer")); - qmlRegisterType(uri, 1, 0, "SensorExplorer"); - qmlRegisterType(uri, 1, 0, "SensorItem"); - qmlRegisterType(uri, 1, 0, "PropertyInfo"); - } -}; - -QT_END_NAMESPACE - -#include "main.moc" diff --git a/basicsuite/SensorExplorer/imports/plugin.json b/basicsuite/SensorExplorer/imports/plugin.json deleted file mode 100644 index 0967ef4..0000000 --- a/basicsuite/SensorExplorer/imports/plugin.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/basicsuite/SensorExplorer/imports/propertyinfo.cpp b/basicsuite/SensorExplorer/imports/propertyinfo.cpp deleted file mode 100644 index 0481d4d..0000000 --- a/basicsuite/SensorExplorer/imports/propertyinfo.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "sensoritem.h" -#include -#include - -QT_BEGIN_NAMESPACE - -/* - \class QPropertyInfo - \brief The QPropertyInfo type provides an easy access for reading and writing the property values. -*/ - -/* - Construct a QPropertyInfo object with parent \a parent -*/ -QPropertyInfo::QPropertyInfo(QObject* parent) - : QObject(parent) - , _index(0) - , _isWriteable(false) - , _name("") - , _typeName("") - , _value("") -{} - -/* - Construct a QPropertyInfo object with parent \a parent, property name \a name, property index \a index, - property write access \a writeable, property type \a typeName and property value \a value -*/ -QPropertyInfo::QPropertyInfo(const QString& name, int index, bool writeable, const QString& typeName, const QString& value, QObject* parent) - : QObject(parent) - , _index(index) - , _isWriteable(writeable) - , _name(name) - , _typeName(typeName) - , _value(value) -{} - -/* - \property QPropertyInfo::name - Returns the name of the property -*/ -QString QPropertyInfo::name() -{ - return _name; -} - -/* - \property QPropertyInfo::typeName - Returns the type of the property -*/ -QString QPropertyInfo::typeName() -{ - return _typeName; -} - -/* - \property QPropertyInfo::value - Returns the current value of the property -*/ -QString QPropertyInfo::value() -{ - return _value; -} - -/* - \fn void QPropertyInfo::valueChanged() - Signal that notifies the client if the property value was changed. -*/ - -/* - \fn QPropertyInfo::setValue(const QString& value) - Sets the value \a value of the property -*/ -void QPropertyInfo::setValue(const QString& value) -{ - if (value != _value){ - _value = value; - emit valueChanged(); - } -} - -/* - \fn QPropertyInfo::index() - Returns the meta-data index of the property -*/ -int QPropertyInfo::index() -{ - return _index; -} - -/* - \property QPropertyInfo::isWriteable - Returns true if the property is writeable false if property is read only -*/ -bool QPropertyInfo::isWriteable() -{ - return _isWriteable; -} - -QT_END_NAMESPACE diff --git a/basicsuite/SensorExplorer/imports/propertyinfo.h b/basicsuite/SensorExplorer/imports/propertyinfo.h deleted file mode 100644 index 72ce640..0000000 --- a/basicsuite/SensorExplorer/imports/propertyinfo.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QPROPERTYINFO_H -#define QPROPERTYINFO_H - -#include -#include - -QT_BEGIN_NAMESPACE - -class QPropertyInfo : public QObject -{ - Q_OBJECT - Q_PROPERTY(QString name READ name CONSTANT) - Q_PROPERTY(QString typeName READ typeName CONSTANT) - Q_PROPERTY(QString value READ value NOTIFY valueChanged) - Q_PROPERTY(bool isWriteable READ isWriteable CONSTANT) - -public: - QPropertyInfo(QObject* parent = 0); - QPropertyInfo(const QString& name, int index, bool writeable, const QString& typeName, const QString& value, QObject* parent=0); - QString name(); - QString typeName(); - QString value(); - void setValue(const QString& value); - int index(); - bool isWriteable(); - -Q_SIGNALS: - void valueChanged(); - -private: - int _index; - bool _isWriteable; - QString _name; - QString _typeName; - QString _value; -}; - -QT_END_NAMESPACE - -QML_DECLARE_TYPE(QPropertyInfo) - -#endif // QPROPERTYINFO_H diff --git a/basicsuite/SensorExplorer/imports/qmldir b/basicsuite/SensorExplorer/imports/qmldir deleted file mode 100644 index ad67d81..0000000 --- a/basicsuite/SensorExplorer/imports/qmldir +++ /dev/null @@ -1,2 +0,0 @@ -module Explorer -plugin sensorexplorer diff --git a/basicsuite/SensorExplorer/imports/sensoritem.cpp b/basicsuite/SensorExplorer/imports/sensoritem.cpp deleted file mode 100644 index cd33549..0000000 --- a/basicsuite/SensorExplorer/imports/sensoritem.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "sensoritem.h" -#include -#include - -QT_BEGIN_NAMESPACE - -/* - \class QSensorItem - \brief The QSensorItem type provides information about the meta-data from a sensors installed on the system. -*/ - -/* - Construct a QSensorItem object with parent \a parent -*/ -QSensorItem::QSensorItem(QObject* parent) - : QObject(parent) - , _qsensor(0) -{ -} - -/* - Construct a QSensorItem object with QSensor \a sensor and parent \a parent -*/ -QSensorItem::QSensorItem(QSensor* sensor, QObject* parent) - : QObject(parent) - , _qsensor(sensor) -{ -} - -/* - Destructor of a QSensorItem -*/ -QSensorItem::~QSensorItem() -{ -} - -/* - \fn QSensorItem::startChanged() - Notifies the client if the sensors has changed its start active status -*/ - -/* - \property QSensorItem::start - This property starts or stops the sensor -*/ -bool QSensorItem::start() -{ - return (_qsensor ? _qsensor->isActive() : false); -} - -void QSensorItem::setStart(bool run) -{ - if (_qsensor) - _qsensor->setActive(run); -} - -/* - \property QSensorItem::id - Returns the sensor id of the sensor item -*/ -QString QSensorItem::id() -{ - return (_qsensor ? _qsensor->description() : ""); -} - -/* - Set the new value \a val to the QPropertyInfo object \a property -*/ -void QSensorItem::changePropertyValue(QPropertyInfo* property, const QString& val) -{ - if (_qsensor && _sensorProperties.contains(property)){ - if ( _qsensor->setProperty(property->name().toLatin1().constData(), QVariant(val))) - updateSensorPropertyValues(); - else - qWarning() << "new property value couldn't be set"; - } -} - -/* - Reading the meta-data and activates the sensor. -*/ -void QSensorItem::select() -{ - if (_sensorProperties.isEmpty()) { - // Probe the reading using Qt's meta-object facilities - //Read properties from reader - QSensorReading *reading = _qsensor->reading(); - const QMetaObject *mo = reading->metaObject(); - int firstProperty = QSensorReading::staticMetaObject.propertyOffset(); - - for (int i = firstProperty; i < mo->propertyCount(); ++i) { - QString typeName = QLatin1String(mo->property(i).typeName()); - int crap = typeName.lastIndexOf("::"); - if (crap != -1) - typeName = typeName.mid(crap + 2); - - QPropertyInfo* pi = new QPropertyInfo(mo->property(i).name() - , i - , isWriteable(mo->property(i).name()) - , typeName - , "-" - , this); - _readerProperties.append(pi); - } - - //Read properties from sensor - const QMetaObject *mo1 = _qsensor->metaObject(); - firstProperty = QSensorReading::staticMetaObject.propertyOffset(); - - for (int i = firstProperty; i < mo1->propertyCount(); ++i) { - QString propertyname = mo1->property(i).name(); - if (ignoreProperty(propertyname)) - continue; - - QString typeName = QLatin1String(mo1->property(i).typeName()); - int crap = typeName.lastIndexOf("::"); - if (crap != -1) - typeName = typeName.mid(crap + 2); - - QPropertyInfo* pi = new QPropertyInfo(propertyname - , i - , isWriteable(propertyname) - , typeName - , "-" - , this); - _sensorProperties.append(pi); - } - updateSensorPropertyValues(); - connect(_qsensor, SIGNAL(readingChanged()), this, SLOT(sensorReadingChanged())); - } - connect(_qsensor, SIGNAL(activeChanged()), SIGNAL(startChanged())); -} - -/* - Unselect the sensor by stopping the sensor. -*/ -void QSensorItem::unSelect() -{ - _qsensor->stop(); - disconnect(_qsensor, SIGNAL(activeChanged()), this , SIGNAL(startChanged())); -} - -/* - Updates the property values from QSensor -*/ -void QSensorItem::updateSensorPropertyValues() -{ - if (_qsensor){ - const QMetaObject *mo = _qsensor->metaObject(); - for (int i = 0; i < _sensorProperties.count(); i++){ - QVariant val = mo->property(_sensorProperties[i]->index()).read(_qsensor); - _sensorProperties[i]->setValue(convertValue(_sensorProperties[i]->typeName(), val)); - } - } -} - -/* - \fn QSensorItem::propertiesChanged() - Notifies the client if the list of the properties was changed -*/ - -/* - Updates the property values from the QSensorReader -*/ -void QSensorItem::sensorReadingChanged() -{ - QSensorReading *reading = _qsensor->reading(); - const QMetaObject *mo = reading->metaObject(); - for (int i = 0; i < _readerProperties.count(); i++){ - QVariant val = mo->property(_readerProperties[i]->index()).read(reading); - _readerProperties[i]->setValue(convertValue(_readerProperties[i]->typeName(), val)); - } -} - -/* - Returns true if the property with the name \a propertyname should be ignored -*/ -bool QSensorItem::ignoreProperty(const QString& propertyname) -{ - if (propertyname == "reading" || - propertyname == "active" || - propertyname == "identifier" || - propertyname == "connectedToBackend" || - propertyname == "busy") - return true; - - return false; -} - -/* - Returns true if the property with the name \a propertyname is writeable -*/ -bool QSensorItem::isWriteable(const QString& propertyname) -{ - if (_qsensor){ - const QMetaObject *mo = _qsensor->metaObject(); - int propertyindex = mo->indexOfProperty(propertyname.toLocal8Bit().constData()); - if (propertyindex >= 0){ - QMetaProperty prop = mo->property(propertyindex); - return prop.isWritable(); - } - else { - QSensorReading *reading = _qsensor->reading(); - const QMetaObject *moreader = reading->metaObject(); - propertyindex = moreader->indexOfProperty(propertyname.toLocal8Bit().constData()); - if (propertyindex >= 0){ - QMetaProperty prop = mo->property(propertyindex); - return prop.isWritable(); - } - } - } - - return false; -} - -/* - Convert the variant \a val dependent on the type \a type and returns the converted value as a QString -*/ -QString QSensorItem::convertValue(const QString& type, const QVariant& val) -{ - if (type == "LightLevel"){ - switch (val.toInt()) { - case 1: return "Dark"; - case 2: return "Twilight"; - case 3: return "Light"; - case 4: return "Bright"; - case 5: return "Sunny"; - default: return "Undefined"; - } - } - else if (type == "Orientation"){ - switch (val.toInt()) { - case 1: return "TopUp"; - case 2: return "TopDown"; - case 3: return "LeftUp"; - case 4: return "RightUp"; - case 5: return "FaceUp"; - case 6: return "FaceDown"; - default: return "Undefined"; - } - } - else if (type == "qrangelist"){ - qrangelist rangelist = val.value(); - QStringList ranges; - foreach (const qrange &r, rangelist) { - if (r.first == r.second) - ranges << QString("%1 Hz").arg(r.first); - else - ranges << QString("%1-%2 Hz").arg(r.first).arg(r.second); - } - if (ranges.count() > 0) - return ranges.join(", "); - return "-"; - } - else if (type == "qoutputrangelist") { - qoutputrangelist rangelist = val.value(); - QStringList ranges; - foreach (const qoutputrange &r, rangelist) { - ranges << QString("(%1, %2) += %3").arg(r.minimum).arg(r.maximum).arg(r.accuracy); - } - if (ranges.count() > 0) - return ranges.join(", "); - return "-"; - } - - return val.toString(); -} - -/* - \property QSensorItem::properties - Returns a list of all properties from the sensor -*/ -QQmlListProperty QSensorItem::properties() -{ - _properties.clear(); - _properties.append(_sensorProperties); - _properties.append(_readerProperties); - return QQmlListProperty (this, _properties); -} - -QT_END_NAMESPACE diff --git a/basicsuite/SensorExplorer/imports/sensoritem.h b/basicsuite/SensorExplorer/imports/sensoritem.h deleted file mode 100644 index b17d8ed..0000000 --- a/basicsuite/SensorExplorer/imports/sensoritem.h +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QSENSORITEM_H -#define QSENSORITEM_H - -#include -#include -#include "propertyinfo.h" - -QT_BEGIN_NAMESPACE - -class QSensor; -class QSensorItem : public QObject -{ - Q_OBJECT - Q_PROPERTY(bool start READ start WRITE setStart NOTIFY startChanged) - Q_PROPERTY(QString id READ id CONSTANT) - Q_PROPERTY(QQmlListProperty properties READ properties NOTIFY propertiesChanged) -public: - QSensorItem(QObject* parent = 0); - QSensorItem(QSensor* sensor, QObject* parent = 0); - virtual ~QSensorItem(); - -public slots: - void select(); - void unSelect(); - void changePropertyValue(QPropertyInfo* property, const QString& val); - -private slots: - void sensorReadingChanged(); - -private: - QString id(); - bool start(); - void setStart(bool run); - QQmlListProperty properties(); - QString convertValue(const QString& type, const QVariant& val); - bool isWriteable(const QString& propertyname); - bool ignoreProperty(const QString& propertyname); - void updateSensorPropertyValues(); - -Q_SIGNALS: - void propertiesChanged(); - void startChanged(); - -private: - QSensor* _qsensor; - QList _properties; - QList _readerProperties; - QList _sensorProperties; -}; - -QT_END_NAMESPACE - -QML_DECLARE_TYPE(QSensorItem) - -#endif // QSENSORITEM_H diff --git a/basicsuite/SensorExplorer/main.qml b/basicsuite/SensorExplorer/main.qml deleted file mode 100644 index 2a58709..0000000 --- a/basicsuite/SensorExplorer/main.qml +++ /dev/null @@ -1,224 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 1.0 -import QtSensors 5.0 - -//! [0] -import Explorer 1.0 -//! [0] - -Item { - id: root - width: 800 - height: 1280 - - Rectangle { - id: main - width: root.width - height: root.height - anchors.centerIn: parent - - //! [1] - SensorExplorer { - id: explorer - } - //! [1] - - Column { - anchors.fill: parent - anchors.margins: 8 - spacing: 8 - - GroupBox { - id: topBox - title: qsTr("Available Sensors") - width: parent.width - height: main.height * 0.4 - - TableView { - id: sensorList - width: parent.width - height: parent.height * 0.80 - anchors.top: parent.top - anchors.topMargin: 22 - //! [2] - model: explorer.availableSensors - //! [2] - - TableViewColumn { role: "id"; title: qsTr("ID"); width: main.width * 0.7 } - TableViewColumn { role: "start"; title: qsTr("Running"); width: main.width * 0.15 } - - onClicked: { - explorer.selectedSensorItem = explorer.availableSensors[row] - //! [3] - propertyList.model = explorer.selectedSensorItem.properties - //! [3] - button.update() - } - } - - Button { - id: button - anchors.top: sensorList.bottom - anchors.right: parent.right - anchors.topMargin: 8 - text: qsTr("Start") - enabled: explorer.selectedSensorItem !== null - - function update() { - text = (explorer.selectedSensorItem !== null ? - (explorer.selectedSensorItem.start === true ? - qsTr("Stop") : qsTr("Start")) : qsTr("Start")) - } - - onClicked: { - if (explorer.selectedSensorItem !== null) { - //! [5] - if (text === "Start") { - explorer.selectedSensorItem.start = true; - text = "Stop"; - } - else { - explorer.selectedSensorItem.start = false; - text = "Start"; - } - //! [5] - } - } - } - - } - - GroupBox { - title: qsTr("Properties") - width: parent.width - height: main.height - topBox.height - 30 - enabled: explorer.selectedSensorItem != null - - TableView { - id: propertyList - property PropertyInfo selectedItem: null - - anchors.fill: parent - anchors.topMargin: 22 - - TableViewColumn { role: "name"; title: qsTr("Name"); width: 140 } - TableViewColumn { role: "value"; title: qsTr("Value"); width: 140 } - - onClicked: { - selectedItem = model[row] - } - - itemDelegate: { - if (selectedItem && selectedItem.isWriteable) - return editableDelegate; - return readOnlyDelegate; - } - - Component { - id: readOnlyDelegate - Item { - Text { - width: parent.width - anchors.margins: 4 - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value - color: propertyList.model[styleData.row].isWriteable ? - styleData.textColor : Qt.lighter(styleData.textColor) - } - } - } - - Component { - id: editableDelegate - Item { - Text { - width: parent.width - anchors.margins: 4 - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value - color: styleData.textColor - visible: !styleData.selected || styleData.column === 0 - } - Loader { // Initialize text editor lazily to improve performance - id: loaderEditor - anchors.margins: 4 - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - Connections { - target: loaderEditor.item - onAccepted: { - //! [4] - explorer.selectedSensorItem.changePropertyValue(propertyList.selectedItem, loaderEditor.item.text); - //! [4] - } - } - - // Load the editor for selected 'Value' cell - sourceComponent: (styleData.selected && styleData.column === 1) ? editor : null - - Component { - id: editor - TextInput { // ### TODO - this needs to utilize a virtual keyboard - id: textinput - color: styleData.textColor - text: styleData.value - MouseArea { - id: mouseArea - anchors.fill: parent - hoverEnabled: true - onClicked: textinput.forceActiveFocus() - } - } - } - } - } - } - } - } - } - } -} diff --git a/basicsuite/SensorExplorer/preview_l.jpg b/basicsuite/SensorExplorer/preview_l.jpg deleted file mode 100644 index b0469e5..0000000 Binary files a/basicsuite/SensorExplorer/preview_l.jpg and /dev/null differ diff --git a/basicsuite/SensorExplorer/title.txt b/basicsuite/SensorExplorer/title.txt deleted file mode 100644 index c56fed8..0000000 --- a/basicsuite/SensorExplorer/title.txt +++ /dev/null @@ -1 +0,0 @@ -Sensor Explorer diff --git a/basicsuite/Sensors/1.png b/basicsuite/Sensors/1.png deleted file mode 100644 index 8dd146b..0000000 Binary files a/basicsuite/Sensors/1.png and /dev/null differ diff --git a/basicsuite/Sensors/2.png b/basicsuite/Sensors/2.png deleted file mode 100644 index 362abaf..0000000 Binary files a/basicsuite/Sensors/2.png and /dev/null differ diff --git a/basicsuite/Sensors/3.png b/basicsuite/Sensors/3.png deleted file mode 100644 index c8d3f8c..0000000 Binary files a/basicsuite/Sensors/3.png and /dev/null differ diff --git a/basicsuite/Sensors/Accelbubble.qml b/basicsuite/Sensors/Accelbubble.qml deleted file mode 100644 index d0ab880..0000000 --- a/basicsuite/Sensors/Accelbubble.qml +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtSensors 5.0 - -Item { - Rectangle { - id: field - color: "lightblue" - border.width: 1 - border.color: "darkblue" - width: parent.width - height: parent.height - Accelerometer { - id: accel - active:true - onReadingChanged: { - var newX = (bubble.x + calcRoll(accel.reading.x, accel.reading.y, accel.reading.z) * .1) - var newY = (bubble.y - calcPitch(accel.reading.x, accel.reading.y, accel.reading.z) * .1) - - if (newX < 0) - newX = 0 - if (newY < 0) - newY = 0 - - var right = field.width - bubble.width - var bottom = field.height - bubble.height - - if (newX > right) - newX = right - if (newY > bottom) - newY = bottom - - bubble.x = newX - bubble.y = newY - } - } - - Image { - id: bubble - source: "bluebubble.png" - property real centerX: parent.width / 2 - property real centerY: parent.height / 2; - property real bubbleCenter: bubble.width / 2 - x: centerX - bubbleCenter - y: centerY - bubbleCenter - smooth: true - - Behavior on y { - SmoothedAnimation { - easing.type: Easing.Linear - duration: 100 - } - } - Behavior on x { - SmoothedAnimation { - easing.type: Easing.Linear - duration: 100 - } - } - } - } - - function calcPitch(x,y,z) { - return Math.atan(y / Math.sqrt(x*x + z*z)) * 57.2957795; - } - function calcRoll(x,y,z) { - return Math.atan(x / Math.sqrt(y*y + z*z)) * 57.2957795; - } -} diff --git a/basicsuite/Sensors/Light.qml b/basicsuite/Sensors/Light.qml deleted file mode 100644 index fd71790..0000000 --- a/basicsuite/Sensors/Light.qml +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtSensors 5.0 - -Item { - rotation: 180 - Rectangle { - id: bg - width: parent.width - height: parent.height - Text { - id: illuminanceLevel - anchors.horizontalCenter: parent.horizontalCenter - font.pointSize: 26 - anchors.top: parent.top - } - Image { - id: avatar - anchors.top: illuminanceLevel.bottom - anchors.topMargin: 30 - anchors.centerIn: parent - } - - AmbientLightSensor { - active: true - onReadingChanged: { - if (reading.lightLevel === AmbientLightReading.Dark) { - avatar.source = "3.png" - bg.color = "midnightblue" - } else if (reading.lightLevel === AmbientLightReading.Twilight - || reading.lightLevel === AmbientLightReading.Light) { - avatar.source = "2.png" - bg.color = "steelblue" - } else if (reading.lightLevel === AmbientLightReading.Bright - || reading.lightLevel === AmbientLightReading.Sunny) { - avatar.source = "1.png" - bg.color = "yellow" - } else { - avatar.text = "Unknown light level" - } - } - } - - LightSensor { - active: true - onReadingChanged: { - illuminanceLevel.text = "Illuminance: " + reading.illuminance - } - } - } -} diff --git a/basicsuite/Sensors/Sensors.qmlproject b/basicsuite/Sensors/Sensors.qmlproject deleted file mode 100644 index 4d32f75..0000000 --- a/basicsuite/Sensors/Sensors.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/Sensors/bluebubble.png b/basicsuite/Sensors/bluebubble.png deleted file mode 100644 index f96126e..0000000 Binary files a/basicsuite/Sensors/bluebubble.png and /dev/null differ diff --git a/basicsuite/Sensors/description.txt b/basicsuite/Sensors/description.txt deleted file mode 100644 index f6048cc..0000000 --- a/basicsuite/Sensors/description.txt +++ /dev/null @@ -1,4 +0,0 @@ -This demo utilizes the accelerometer and light sensor readings in an application. - -For the accelometer, tilting the device moves the bubble around. For the light sensor, -exposing the device to different lighting conditions changes the display. diff --git a/basicsuite/Sensors/main.qml b/basicsuite/Sensors/main.qml deleted file mode 100644 index 359306c..0000000 --- a/basicsuite/Sensors/main.qml +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import QtSensors 5.0 -import QtSensors 5.0 as Sensors - -Item { - id: root - width: 800 - height: 1280 - - Component { - id: sensorExample - Rectangle { - id: main - width: root.height - height: root.width - rotation: 90 - border.width: 1 - Light { - id: lys - width: main.width - height: main.height / 2 - } - - Accelbubble { - width: main.width - height: main.height / 2 - anchors.top: lys.bottom - } - } - } - - Component { - id: message - Rectangle { - width: root.width - height: root.height - Text { - font.pixelSize: 22 - anchors.centerIn: parent - text: "It appears that this device doesn't provide the required sensors!" - } - } - } - - Loader { - id: pageLoader - anchors.centerIn: parent - } - - Component.onCompleted: { - var typesList = Sensors.QmlSensors.sensorTypes(); - var count = 0 - for (var i = 0; i < typesList.length; ++i) { - if (typesList[i] == "QAccelerometer") - count++ - if (typesList[i] == "QLightSensor") - count++ - } - - if (count > 1) - pageLoader.sourceComponent = sensorExample - else - pageLoader.sourceComponent = message - } -} diff --git a/basicsuite/Sensors/preview_l.jpg b/basicsuite/Sensors/preview_l.jpg deleted file mode 100644 index 7ce979d..0000000 Binary files a/basicsuite/Sensors/preview_l.jpg and /dev/null differ diff --git a/basicsuite/Text Input/ScrollBar.qml b/basicsuite/Text Input/ScrollBar.qml deleted file mode 100644 index e6a8143..0000000 --- a/basicsuite/Text Input/ScrollBar.qml +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Item { - property var scrollArea: parent - - width: 6 - opacity: scrollArea && scrollArea.movingVertically ? 1.0 : 0.0 - visible: scrollArea && scrollArea.contentHeight >= scrollArea.height - anchors { right: parent.right; top: parent.top; bottom: parent.bottom; margins: 2 } - - Behavior on opacity { NumberAnimation { properties: "opacity"; duration: 600 } } - - function size() { - var nh = scrollArea.visibleArea.heightRatio * height - var ny = scrollArea.visibleArea.yPosition * height - return ny > 3 ? Math.min(nh, Math.ceil(height - 3 - ny)) : nh + ny - } - Rectangle { - x: 1 - y: scrollArea ? Math.max(2, scrollArea.visibleArea.yPosition * parent.height) : 0 - height: scrollArea ? size() : 0 - width: parent.width - 2 - color: Qt.rgba(1.0, 1.0, 1.0, 0.5) - radius: 1 - } -} diff --git a/basicsuite/Text Input/Text Input.qmlproject b/basicsuite/Text Input/Text Input.qmlproject deleted file mode 100644 index 4d32f75..0000000 --- a/basicsuite/Text Input/Text Input.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ "../exampleplugin" ] -} diff --git a/basicsuite/Text Input/TextArea.qml b/basicsuite/Text Input/TextArea.qml deleted file mode 100644 index cf337f6..0000000 --- a/basicsuite/Text Input/TextArea.qml +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TextBase { - id: textArea - - property alias color: textEdit.color - property alias text: textEdit.text - property alias textWidth: textEdit.width - property alias readOnly: textEdit.readOnly - property alias inputMethodHints: textEdit.inputMethodHints - - editor: textEdit - - Repeater { - model: Math.floor((parent.height - 30) / editor.cursorRectangle.height) - Rectangle { - x: 8 - y: (index+1)*editor.cursorRectangle.height+6 - height: 1; width: textArea.width-24 - color: Qt.rgba(1.0, 1.0, 1.0, 0.5) - } - } - TextEdit { - id: textEdit - - property alias enterKeyText: textArea.enterKeyText - property alias enterKeyEnabled: textArea.enterKeyEnabled - - y: 6 - focus: true - color: "#EEEEEE" - wrapMode: TextEdit.Wrap - cursorVisible: activeFocus - height: Math.max(implicitHeight, 60) - font.pixelSize: textArea.fontPixelSize - selectionColor: Qt.rgba(1.0, 1.0, 1.0, 0.5) - selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8) - anchors { left: parent.left; right: parent.right; margins: 12 } - cursorDelegate: Rectangle { - width: 2 - opacity: 0.7 - color: "#EEEEEE" - visible: textEdit.activeFocus - } - - onActiveFocusChanged: if (!activeFocus) deselect() - } -} diff --git a/basicsuite/Text Input/TextBase.qml b/basicsuite/Text Input/TextBase.qml deleted file mode 100644 index a26c6c6..0000000 --- a/basicsuite/Text Input/TextBase.qml +++ /dev/null @@ -1,95 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -FocusScope { - id: textBase - - property var editor - property bool previewTextActive: !editor.activeFocus && text.length === 0 - property int fontPixelSize: 32 - property string previewText - property string enterKeyText - property bool enterKeyEnabled: true - property alias mouseParent: mouseArea.parent - - implicitHeight: editor.height + 12 - - signal enterKeyClicked - - Keys.onReleased: { - if (event.key === Qt.Key_Return) - enterKeyClicked() - } - - Rectangle { - // background - radius: 5.0 - anchors.fill: parent - color: Qt.rgba(1.0, 1.0, 1.0, 0.2) - border { width: editor.activeFocus ? 2 : 0; color: "#CCCCCC" } - } - Text { - id: previewText - - y: 8 - color: "#CCCCCC" - visible: previewTextActive - text: textBase.previewText - font.pixelSize: 28 - anchors { left: parent.left; right: parent.right; margins: 12 } - - } - MouseArea { - id: mouseArea - - z: 1 - parent: textBase - anchors.fill: parent - onClicked: { - var positionInEditor = mapToItem(editor, mouseX, mouseY) - var cursorPosition = editor.positionAt(positionInEditor.x, positionInEditor.y) - editor.cursorPosition = cursorPosition - editor.forceActiveFocus() - Qt.inputMethod.show() - } - } -} diff --git a/basicsuite/Text Input/TextField.qml b/basicsuite/Text Input/TextField.qml deleted file mode 100644 index aa6768e..0000000 --- a/basicsuite/Text Input/TextField.qml +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -TextBase { - id: textField - - property alias color: textInput.color - property alias text: textInput.text - property alias textWidth: textInput.width - property alias readOnly: textInput.readOnly - property alias inputMethodHints: textInput.inputMethodHints - property alias validator: textInput.validator - property alias echoMode: textInput.echoMode - - editor: textInput - mouseParent: flickable - - Flickable { - id: flickable - - x: 12 - clip: true - width: parent.width-24 - height: parent.height - flickableDirection: Flickable.HorizontalFlick - interactive: contentWidth - 4 > width - - contentWidth: textInput.width+2 - contentHeight: textInput.height - TextInput { - id: textInput - - property alias enterKeyText: textField.enterKeyText - property alias enterKeyEnabled: textField.enterKeyEnabled - - y: 6 - focus: true - color: "#EEEEEE" - cursorVisible: activeFocus - passwordCharacter: "\u2022" - font.pixelSize: textField.fontPixelSize - selectionColor: Qt.rgba(1.0, 1.0, 1.0, 0.5) - selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8) - width: Math.max(flickable.width, implicitWidth)-2 - cursorDelegate: Rectangle { - width: 2 - opacity: 0.7 - color: "#EEEEEE" - visible: textInput.activeFocus - } - onActiveFocusChanged: if (!activeFocus) deselect() - } - } -} diff --git a/basicsuite/Text Input/description.txt b/basicsuite/Text Input/description.txt deleted file mode 100644 index c60d036..0000000 --- a/basicsuite/Text Input/description.txt +++ /dev/null @@ -1,6 +0,0 @@ -This examples illustrates how Qt can handle input on touch devices. - -The launcher loads a custom platform input context plugin and contains a virtual keyboard. When a text control in Qt Quick gets focus, the input context will trigger the virtual keyboard to show on screen and clicks in the virtual keyboard are delegated to the text control. - -Our demo virtual keyboard has support for english, finnish and arabic. The input context API is plugin based and users can replace existing plugins with whatever they desire. Qt has a ready made plugin for Maliit, an open-source, cross-platform input method framework for mobile and embedded. - diff --git a/basicsuite/Text Input/main.qml b/basicsuite/Text Input/main.qml deleted file mode 100644 index b67d960..0000000 --- a/basicsuite/Text Input/main.qml +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Flickable { - id: flickable - - property real scrollMarginVertical: 20 - - anchors.fill: parent - contentWidth: content.width - contentHeight: content.height - interactive: contentHeight > height - flickableDirection: Flickable.VerticalFlick - children: ScrollBar {} - - MouseArea { - id: content - - width: flickable.width - height: textEditors.height + 24 - - onClicked: focus = true - - Column { - id: textEditors - spacing: 15 - x: 12; y: 12 - width: parent.width - 26 - - Text { - color: "#EEEEEE" - text: "Tap fields to enter text" - anchors.horizontalCenter: parent.horizontalCenter - font.pixelSize: 22 - } - TextField { - width: parent.width - previewText: "One line field" - enterKeyText: "Next" - enterKeyEnabled: text.length > 0 - onEnterKeyClicked: passwordField.focus = true - } - TextField { - id: passwordField - - width: parent.width - echoMode: TextInput.PasswordEchoOnEdit - previewText: "Password field" - inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText - enterKeyText: "Next" - enterKeyEnabled: text.length > 0 - onEnterKeyClicked: numberField.focus = true - } - TextField { - id: numberField - - validator: RegExpValidator { regExp: /^[0-9\+\-\#\*\ ]{6,}$/ } - width: parent.width - previewText: "Phone number field" - inputMethodHints: Qt.ImhDialableCharactersOnly - enterKeyText: "Next" - enterKeyEnabled: text.length > 0 - onEnterKeyClicked: textArea.focus = true - } - TextArea { - id: textArea - - width: parent.width - previewText: "Multiple lines field" - height: Math.max(206, implicitHeight) - } - } - } -} diff --git a/basicsuite/Text Input/preview_l.jpg b/basicsuite/Text Input/preview_l.jpg deleted file mode 100644 index f415a86..0000000 Binary files a/basicsuite/Text Input/preview_l.jpg and /dev/null differ diff --git a/basicsuite/about-b2qt/AboutBoot2Qt.qml b/basicsuite/about-b2qt/AboutBoot2Qt.qml new file mode 100644 index 0000000..b97ac3b --- /dev/null +++ b/basicsuite/about-b2qt/AboutBoot2Qt.qml @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Column { + + id: root + + width: parent.width + + spacing: engine.smallFontSize() + + Title { + id: title + text: "Boot to Qt" + } + + ContentText { + id: brief + width: parent.width + text: '

    Boot to Qt is a light-weight UI stack for embedded systems, based on the Qt Framework by Digia, + offering an elegant means of developing beautiful and performant embedded devices. It supports two different + operating systems: +

      +
    • Boot to Qt for embedded Android places Qt on top of an Android (version 4.1 or higher) + kernel/baselayer.
    • +
    • Boot to Qt for embedded Linux places Qt on top of an Linux kernel/baselayer, built using + Yocto 1.4 \'Dylan\' release.
    • +
    + Both versions have been tested and verified on a number of different hardware configurations. + Boot to Qt support is not limited to the devices used as reference platforms, it can be made to run on a + variety of hardware. + +

    Boot to Qt is part of a commercial-only SDK offering which includes a ready-made stack + with full Qt Creator integration. The SDK allows building and running on device + with just a button. Embedded development has never been this easy!' + } + + Column { + id: diagram + spacing: 1 + width: parent.width * 0.5 + anchors.horizontalCenter: parent.horizontalCenter + Box { text: "Application"; accentColor: "coral" } + Box { text: "Qt Framework"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } + Box { text: "Android/Linux Baselayer"; accentColor: "steelblue" } + Box { text: "Embedded Hardware"; accentColor: "steelblue"} + } + + ContentText { + id: description + + width: parent.width + + text: '

    Boot to Qt has been tested and verified on + a number of different hardware configurations, including: +

      +
    • Google Nexus 7 - NVIDIA Tegra3 Quad Core, 1 GB RAM
    • +
    • Beagle Board xM - ARM Coretex A8 1GHz, 512 MB RAM, PowerVR SGX 530
    • +
    • Freescale i.MX 6 - ARM Cortex A9 1.2GHz, 1 GB RAM, Vivante GC2000
    • +
    + Rough minimal requirements for running Boot to Qt are: +
      +
    • 256Mb of RAM
    • +
    • 500Mhz CPU, 1Ghz preferred for 60 FPS velvet UIs
    • +
    • OpenGL ES 2.0 support
    • +
    • Android 4.0+ compatible hardware
    • +
    + ' + } +} diff --git a/basicsuite/about-b2qt/Box.qml b/basicsuite/about-b2qt/Box.qml new file mode 100644 index 0000000..283ed9f --- /dev/null +++ b/basicsuite/about-b2qt/Box.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Rectangle { + id: root + + width: parent.width + height: label.font.pixelSize * 3 + + radius: 4 + + antialiasing: true + + property alias text: label.text; + + property color accentColor: "palegreen" + + gradient: Gradient { + GradientStop { position: 0; color: root.accentColor; } + GradientStop { position: 1; color: "black"; } + } + + Text { + id: label + font.pixelSize: engine.smallFontSize() + font.bold: true; + color: "white" + anchors.centerIn: parent + } + +} diff --git a/basicsuite/about-b2qt/ContentText.qml b/basicsuite/about-b2qt/ContentText.qml new file mode 100644 index 0000000..55d3e36 --- /dev/null +++ b/basicsuite/about-b2qt/ContentText.qml @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Text { + color: "white" + font.pixelSize: engine.smallFontSize() + textFormat: Text.RichText + wrapMode: Text.WordWrap +} diff --git a/basicsuite/about-b2qt/QtForAndroid.qml b/basicsuite/about-b2qt/QtForAndroid.qml new file mode 100644 index 0000000..9c1aa38 --- /dev/null +++ b/basicsuite/about-b2qt/QtForAndroid.qml @@ -0,0 +1,93 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Column { + id: root + + width: parent.width + + spacing: engine.smallFontSize() + + Title { + text: "Boot to Qt vs Qt for Android" + } + + ContentText { + width: parent.width + text: '

    Qt for Android is a port of the Qt Framework to be used + for application development on the Android platform. Its + purpose is to enable development of applications that + can run on Android devices. For developers writing applications + for the Android ecosystem, Qt for Android is the right choice. + +

    Boot to Qt for embedded Android tries to strip down + the Android stack to the bare minimum, relying only on basic Linux features. + The majority of the Android stack, such as Dalvik virtual machine is + not running in Boot to Qt, resulting in faster startup times, lower memory consumption + and overall better performance.' + } + + Column { + id: diagram + spacing: 1 + width: parent.width * 0.66 + anchors.horizontalCenter: parent.horizontalCenter + Box { text: "Application"; accentColor: "coral" } + Box { text: "Qt for Android"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } + Row { + width: parent.width + height: b.height + Box { id: b; width: parent.width / 2; text: "Qt Framework"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } + Box { width: parent.width / 2; text: "Android (Dalvik)"; accentColor: "steelblue" } + } + + Box { text: "Android Baselayer"; accentColor: "steelblue" } + Box { text: "Embedded Hardware"; accentColor: "steelblue"} + } + + ContentText { + width: parent.width + text: '

    Boot to Qt for embedded Linux is build from scratch using + Yocto 1.4 tools to contain only components required in the embedded device, + resulting in smaller image sizes while keeping valuable development tools available.' + } +} diff --git a/basicsuite/about-b2qt/QtFramework.qml b/basicsuite/about-b2qt/QtFramework.qml new file mode 100644 index 0000000..7085469 --- /dev/null +++ b/basicsuite/about-b2qt/QtFramework.qml @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Column { + id: root + + width: parent.width + + spacing: engine.smallFontSize() + + Title { + text: "Qt Framework" + } + + ContentText { + id: brief + width: parent.width + text: '

    Qt is a full development framework with tools designed to streamline + the creation of applications and user interfaces for desktop, embedded + and mobile platforms. +

      +
    • Qt Framework - intuitive APIs for C++ and CSS/JavaScript-like + programming with Qt Quick for rapid UI creation<\li> +
    • Qt Creator IDE - powerful cross-platform integrated + development environment, including UI designer tools and on-device debugging
    • +
    • Tools and toolchains - internationalization support, embedded toolchains + and more.
    • +
    +

    With Qt, you can reuse code efficiently to target multiple platforms + with one code base. The modular C++ class library and developer tools + easily enables developers to create applications for one platform and + easily build and run to deploy on another platform.' + } + + +} diff --git a/basicsuite/about-b2qt/Title.qml b/basicsuite/about-b2qt/Title.qml new file mode 100644 index 0000000..62d0ba7 --- /dev/null +++ b/basicsuite/about-b2qt/Title.qml @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Text { + font.pixelSize: engine.titleFontSize() + font.italic: true + color: "white" + anchors.horizontalCenter: parent.horizontalCenter +} diff --git a/basicsuite/about-b2qt/about-b2qt.pro b/basicsuite/about-b2qt/about-b2qt.pro new file mode 100644 index 0000000..175be57 --- /dev/null +++ b/basicsuite/about-b2qt/about-b2qt.pro @@ -0,0 +1,12 @@ +TARGET = about-b2qt + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + *.png +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content diff --git a/basicsuite/about-b2qt/codeless.png b/basicsuite/about-b2qt/codeless.png new file mode 100644 index 0000000..53e4806 Binary files /dev/null and b/basicsuite/about-b2qt/codeless.png differ diff --git a/basicsuite/about-b2qt/description.txt b/basicsuite/about-b2qt/description.txt new file mode 100644 index 0000000..676a166 --- /dev/null +++ b/basicsuite/about-b2qt/description.txt @@ -0,0 +1,3 @@ +The "About Boot to Qt" provides an introduction to what Boot to Qt is all about. + +It talks briefly about how the software stack is built up, rough hardware requirements and how Boot to Qt differs from the more traditional Qt editions. diff --git a/basicsuite/about-b2qt/dummy.cpp b/basicsuite/about-b2qt/dummy.cpp new file mode 100644 index 0000000..e69de29 diff --git a/basicsuite/about-b2qt/main.qml b/basicsuite/about-b2qt/main.qml new file mode 100644 index 0000000..ba726d5 --- /dev/null +++ b/basicsuite/about-b2qt/main.qml @@ -0,0 +1,175 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: root + + width: 1280 + height: 800 + +// Rectangle { +// anchors.fill: parent +// color: "black" +// } + + Flickable { + id: flick + property real inertia: 0.4 + + property real cellWidth; + property real cellHeight; + + width: parent.width + height: parent.height + anchors.horizontalCenter: parent.horizontalCenter + + contentHeight: content.height + + flickableDirection: Flickable.VerticalFlick + + property real topOvershoot: Math.max(0, contentItem.y); + property real bottomOvershoot: Math.max(0, root.height - (contentItem.height + contentItem.y)); +// onTopOvershootChanged: print("Top Overshoot:", topOvershoot); +// onBottomOvershootChanged: print("Bottom Overshoot:", bottomOvershoot); + + Item { + id: shiftTrickery + + width: flick.width + height: content.height + + Column { + id: content; + + y: -flick.contentItem.y + offsetY; + width: flick.width * 2 / 3 + anchors.horizontalCenter: parent.horizontalCenter + + property real offsetY: 0; + property real inertia: flick.inertia; + property real t; + NumberAnimation on t { + id: animation; + from: 0; + to: 1; + duration: 1000; + loops: Animation.Infinite + running: Math.abs(content.y) > 0.001 || Math.abs(content.x) > 0.001 + } + + onTChanged: { + offsetY += (flick.contentItem.y - offsetY) * inertia + } + + + spacing: engine.smallFontSize() * 2 + + Item { width: 1; height: engine.smallFontSize() } + AboutBoot2Qt { } + QtFramework { } + QtForAndroid { } + Image { + id: codeLessImage + source: "codeless.png" + anchors.horizontalCenter: parent.horizontalCenter + } + Item { width: 1; height: engine.smallFontSize() } + } + + } + } + + ParticleSystem { + + anchors.fill: parent + + ImageParticle { + id: imageParticle + source: "particle.png" + color: "#80c342" + alpha: 0 + colorVariation: 0.3 + entryEffect: ImageParticle.None + } + + Emitter { + id: topEmitter + width: root.width + height: 1 + x: 0 + y: -1 + shape: EllipseShape { fill: true } + + emitRate: 300 + lifeSpan: 1000 + size: 20 + sizeVariation: 4 + endSize: 0 + + enabled: flick.topOvershoot > 0 + + velocity: PointDirection { xVariation: 10; yVariation: 50; y: Math.sqrt(flick.topOvershoot) * 10; } + acceleration: PointDirection { y: 50 } + } + + Emitter { + id: bottomEmitter + width: root.width + height: 1 + x: 0 + y: root.height + 1 + shape: EllipseShape { fill: true } + + emitRate: 300 + lifeSpan: 1000 + size: 20 + sizeVariation: 4 + endSize: 0 + + enabled: flick.bottomOvershoot > 0 + + velocity: PointDirection { xVariation: 10; yVariation: -50; y: Math.sqrt(flick.bottomOvershoot) * -10; } + acceleration: PointDirection { y: -50 } + } + } +} diff --git a/basicsuite/about-b2qt/particle.png b/basicsuite/about-b2qt/particle.png new file mode 100644 index 0000000..5c83896 Binary files /dev/null and b/basicsuite/about-b2qt/particle.png differ diff --git a/basicsuite/about-b2qt/preview_l.jpg b/basicsuite/about-b2qt/preview_l.jpg new file mode 100644 index 0000000..f2eb2e0 Binary files /dev/null and b/basicsuite/about-b2qt/preview_l.jpg differ diff --git a/basicsuite/about-b2qt/qt-logo.png b/basicsuite/about-b2qt/qt-logo.png new file mode 100644 index 0000000..748392d Binary files /dev/null and b/basicsuite/about-b2qt/qt-logo.png differ diff --git a/basicsuite/about-b2qt/title.txt b/basicsuite/about-b2qt/title.txt new file mode 100644 index 0000000..9b133f7 --- /dev/null +++ b/basicsuite/about-b2qt/title.txt @@ -0,0 +1 @@ +About Boot to Qt diff --git a/basicsuite/basicsuite.pro b/basicsuite/basicsuite.pro index 672cb4c..54a59f2 100644 --- a/basicsuite/basicsuite.pro +++ b/basicsuite/basicsuite.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs SUBDIRS += \ - Qt5Everywhere \ - Camera \ - SensorExplorer + qt5-everywhere \ + camera \ + sensorexplorer diff --git a/basicsuite/camera/CameraControlButton.qml b/basicsuite/camera/CameraControlButton.qml new file mode 100644 index 0000000..a740be7 --- /dev/null +++ b/basicsuite/camera/CameraControlButton.qml @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +MouseArea { + id: buttonRoot + property alias title: titleTxt.text + property alias subtitle: valueTxt.text + property bool toggled: false + + width: 78 * root.contentScale + height: 78 * root.contentScale + opacity: pressed ? 0.3 : 1.0 + rotation: root.contentRotation + Behavior on rotation { NumberAnimation { } } + + Rectangle { + anchors.fill: parent + color: toggled ? "#8898c66c" : "#77333333" + radius: 5 * root.contentScale + } + + Column { + id: expModeControls + spacing: 2 * root.contentScale + anchors.centerIn: parent + + Text { + id: titleTxt + anchors.horizontalCenter: expModeControls.horizontalCenter + font.pixelSize: 22 * root.contentScale + font.letterSpacing: -1 + color: "white" + font.bold: true + } + + Text { + id: valueTxt + anchors.horizontalCenter: expModeControls.horizontalCenter + height: 22 * root.contentScale + verticalAlignment: Text.AlignVCenter + color: "white" + + Connections { + target: root + onContentScaleChanged: valueTxt.font.pixelSize = Math.round(18 * root.contentScale) + } + + onTextChanged: font.pixelSize = Math.round(18 * root.contentScale) + onPaintedWidthChanged: { + if (paintedWidth > buttonRoot.width - (8 * root.contentScale)) + font.pixelSize -= Math.round(2 * root.contentScale); + } + } + } +} diff --git a/basicsuite/camera/CameraSetting.qml b/basicsuite/camera/CameraSetting.qml new file mode 100644 index 0000000..0912c38 --- /dev/null +++ b/basicsuite/camera/CameraSetting.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Item { + width: button.width + height: button.height + visible: enabled && picker.count > 1 + + property alias title: button.title + property alias selectedValue: picker.value + property alias currentIndex: picker.currentIndex + property alias model: picker.model + property alias count: picker.count + + CameraControlButton { + id: button + anchors.centerIn: parent + + subtitle: picker.name + toggled: picker.visible + + onClicked: picker.visible = true + } + + Picker { + id: picker + } + +} diff --git a/basicsuite/camera/CaptureControl.qml b/basicsuite/camera/CaptureControl.qml new file mode 100644 index 0000000..7d09151 --- /dev/null +++ b/basicsuite/camera/CaptureControl.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtMultimedia 5.0 + +Rectangle { + id: controlRoot + + signal clicked + + property bool videoMode: camera.captureMode === Camera.CaptureVideo + + width: 180 * root.contentScale + height: width + radius: width / 2 + color: mouser.pressed ? (controlRoot.videoMode ? "#77fa334f" : "#7798c66c") : "#77333333" + visible: enabled + + Rectangle { + id: center + anchors.centerIn: parent + width: parent.width * 0.45 + height: width + radius: width / 2 + opacity: mouser.pressed ? 0.7 : 1 + color: controlRoot.videoMode ? "#fa334f" : "#98c66c" + } + + Rectangle { + anchors.centerIn: parent + color: "white" + visible: camera.videoRecorder.recorderStatus === CameraRecorder.RecordingStatus + width: center.width * 0.3 + height: width + } + + MouseArea { + id: mouser + anchors.fill: parent + onClicked: controlRoot.clicked() + } +} diff --git a/basicsuite/camera/CapturePreview.qml b/basicsuite/camera/CapturePreview.qml new file mode 100644 index 0000000..64c5f79 --- /dev/null +++ b/basicsuite/camera/CapturePreview.qml @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Rectangle { + id: root + anchors.fill: parent + color: "black" + opacity: 0 + enabled: opacity !== 0 + + property string previewSrc: "" + + onOpacityChanged: { + if (opacity === 1 && previewSrc !== "") { + previewImage.source = previewSrc; + previewSrc = ""; + } + } + + Behavior on opacity { NumberAnimation { duration: 100 } } + + function show() { + previewImage.source = ""; + opacity = 1; + } + + function setPreview(preview) { + if (root.opacity === 1) + previewImage.source = preview; + else + root.previewSrc = preview; + } + + Image { + id: previewImage + anchors.fill: parent + fillMode: Image.PreserveAspectFit + } + + MouseArea { + anchors.fill: parent + onClicked: { + root.opacity = 0; + } + } +} diff --git a/basicsuite/camera/Controls.qml b/basicsuite/camera/Controls.qml new file mode 100644 index 0000000..bd0db07 --- /dev/null +++ b/basicsuite/camera/Controls.qml @@ -0,0 +1,199 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtMultimedia 5.0 + +Item { + id: controlsRoot + anchors.fill: parent + +// property alias cameraMode: cameraModeControl.selectedValue + + property alias requestedZoom: zoomControl.requestedZoom + property alias actualZoom: zoomControl.actualZoom + property alias maximumZoom: zoomControl.maximumZoom + + property alias flashMode: flashControl.selectedValue + property alias focusMode: focusModeControl.selectedValue + property alias exposureMode: expModeControl.selectedValue + property alias exposureCompensation: expCompControl.selectedValue + property alias whiteBalanceMode: wbControl.selectedValue + property alias resolution: resControl.selectedValue + + property bool captureReady: false + + signal capture + signal searchAndLock + + FocusControl { + id: focusControl + anchors.fill: parent + onSearchAndLock: controlsRoot.searchAndLock() + enabled: camera.captureMode === Camera.CaptureStillImage + } + + ZoomControl { + id: zoomControl + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 50 + } + +// CameraSetting { +// id: cameraModeControl +// anchors.right: parent.right +// anchors.rightMargin: 20 +// anchors.bottom: parent.bottom +// anchors.bottomMargin: 20 +// title: "MODE" +// model: ListModel { +// ListElement { +// name: "Picture" +// value: Camera.CaptureStillImage +// } +// ListElement { +// name: "Video" +// value: Camera.CaptureVideo +// } +// } +// onCountChanged: currentIndex = 0 +// enabled: controlsRoot.captureReady +// } + + RecordingTime { + anchors.right: parent.right + anchors.rightMargin: 40 + anchors.bottom: parent.bottom + anchors.bottomMargin: 60 * root.contentScale + visible: camera.videoRecorder.recorderStatus === CameraRecorder.RecordingStatus + } + + Row { + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.top: parent.top + anchors.topMargin: 20 + height: 84 + spacing: 20 + + CameraSetting { + id: flashControl + title: "FLASH" + model: cameraUtils.supportedFlashModes + } + + CameraSetting { + id: focusModeControl + title: "FOCUS" + model: cameraUtils.supportedFocusModes + enabled: camera.captureMode === Camera.CaptureStillImage + } + + CameraSetting { + id: expModeControl + title: "SCENE" + model: cameraUtils.supportedSceneModes + } + + CameraSetting { + id: expCompControl + title: "EV" + model: ListModel { + ListElement { + name: "+2" + value: 2 + } + ListElement { + name: "+1" + value: 1 + } + ListElement { + name: "0" + value: 0 + } + ListElement { + name: "-1" + value: -1 + } + ListElement { + name: "-2" + value: -2 + } + } + } + + CameraSetting { + id: wbControl + title: "WB" + model: cameraUtils.supportedWhiteBalanceModes + } + + CameraSetting { + id: resControl + title: "SIZE" + model: cameraUtils.supportedCaptureResolutions +// onCountChanged: currentIndex = 1 + + Component.onCompleted: currentIndex = 1 + + Connections { + target: camera + onCaptureModeChanged: { + if (camera.captureMode === Camera.CaptureStillImage) { + resControl.model = cameraUtils.supportedCaptureResolutions; + } else { + resControl.model = cameraUtils.supportedVideoResolutions; + } + } + } + } + } + + CaptureControl { + id: captureControl + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: -30 + enabled: controlsRoot.captureReady || camera.videoRecorder.recorderStatus === CameraRecorder.RecordingStatus + + onClicked: controlsRoot.capture() + } +} diff --git a/basicsuite/camera/FocusControl.qml b/basicsuite/camera/FocusControl.qml new file mode 100644 index 0000000..5245cfe --- /dev/null +++ b/basicsuite/camera/FocusControl.qml @@ -0,0 +1,151 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtMultimedia 5.0 + +MouseArea { + id: focusRoot + + signal searchAndLock + + onClicked: { + camera.focus.focusPointMode = Camera.FocusPointCustom + camera.focus.customFocusPoint = viewfinder.mapPointToSourceNormalized(Qt.point(mouse.x, mouse.y)) + focusRoot.searchAndLock() + } + + Item { + id: zones + anchors.fill: parent + + property color focusAreaColor + property real focusAreaScale: 1 + + Repeater { + model: camera.focus.focusZones + + Rectangle { + border { + width: Math.round(2 * root.contentScale) + color: zones.focusAreaColor + } + radius: 8 * root.contentScale + color: "transparent" + scale: zones.focusAreaScale + + // Map from the relative, normalized frame coordinates + property rect mappedRect: viewfinder.mapNormalizedRectToItem(area); + + Connections { + target: viewfinder + onContentRectChanged: { + mappedRect = viewfinder.mapNormalizedRectToItem(area); + } + } + + x: mappedRect.x - (width - mappedRect.width) / 2 + y: mappedRect.y - (height - mappedRect.height) / 2 + width: Math.round(120 * root.contentScale) + height: width + + Rectangle { + anchors.fill: parent + anchors.margins: -1.5 + color: "transparent" + border.width: 1 + border.color: "black" + radius: parent.radius + 2 + } + + Rectangle { + anchors.fill: parent + anchors.margins: 1 + parent.border.width / 2 + 0.5 + color: "transparent" + border.width: 1 + border.color: "black" + radius: parent.radius - 3 + } + } + } + + states: [ + State { + name: "unlocked"; when: camera.lockStatus === Camera.Unlocked + PropertyChanges { target: zones; opacity: 0; focusAreaColor: "red" } + }, + State { + name: "searching"; when: camera.lockStatus === Camera.Searching + PropertyChanges { target: zones; opacity: 1; focusAreaColor: "white" } + }, + State { + name: "locked"; when: camera.lockStatus === Camera.Locked + PropertyChanges { target: zones; opacity: 0; focusAreaColor: "green" } + } + ] + + transitions: [ + Transition { + to: "searching" + NumberAnimation { properties: "opacity"; duration: 60 } + SequentialAnimation { + NumberAnimation { + target: zones; property: "focusAreaScale"; from: 1; to: 1.3; duration: 150 + } + PauseAnimation { duration: 20 } + NumberAnimation { + target: zones; property: "focusAreaScale"; easing.period: 1; easing.amplitude: 1.4 + easing.type: Easing.OutElastic; from: 1.3; to: 1 + duration: 450 + } + } + }, + Transition { + from: "searching" + SequentialAnimation { + PauseAnimation { duration: 1500 } + NumberAnimation { properties: "opacity"; duration: 60 } + } + } + + ] + } + +} diff --git a/basicsuite/camera/Picker.qml b/basicsuite/camera/Picker.qml new file mode 100644 index 0000000..9cbf27f --- /dev/null +++ b/basicsuite/camera/Picker.qml @@ -0,0 +1,129 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +MouseArea { + id: pickerRoot + + parent: root + anchors.fill: parent + + onClicked: visible = false + visible: false + + property alias contentWidth: back.width + property real contentHeight: 350 * root.contentScale + property alias model: list.model + property variant value: null + property string name: "" + property alias currentIndex: list.currentIndex + property alias count: list.count + + onValueChanged: { + for (var i = 0; i < list.count; ++i) { + var data = list.model[i]; + if (data === undefined) + data = list.model.get(i); + if (data.value === pickerRoot.value) { + list.currentIndex = i; + return; + } + } + list.currentIndex = -1; + } + + Rectangle { + id: back + color: "#77333333" + width: 200 * root.contentScale + height: Math.min(pickerRoot.contentHeight, list.contentHeight + list.anchors.margins * 2) + anchors.centerIn: parent + property int itemHeight: 25 * root.contentScale + rotation: root.contentRotation + Behavior on rotation { NumberAnimation { } } + + ListView { + id: list + anchors.fill: parent + clip: true + anchors.margins: 14 * root.contentScale + + currentIndex: -1 + + onCurrentIndexChanged: { + if (list.currentIndex >= 0) { + var data = list.model[list.currentIndex]; + if (data === undefined) + data = list.model.get(list.currentIndex); + pickerRoot.value = data.value; + pickerRoot.name = data.name; + } else { + pickerRoot.value = null + pickerRoot.name = "" + } + } + + delegate: Item { + height: 40 * root.contentScale + width: parent.width + Rectangle { + anchors.fill: parent + border.color: index == list.currentIndex ? "#44ffffff" : "transparent" + color: index == list.currentIndex ? "#22ffffff" : "transparent" + radius: 3 * root.contentScale + Text { + color: "white" + text: (typeof modelData === 'undefined' ? name : modelData.name) + anchors.centerIn: parent + font.pixelSize: Math.round(20 * root.contentScale) + } + MouseArea { + anchors.fill: parent + onClicked: { + list.currentIndex = index; + } + } + } + } + } + } +} + diff --git a/basicsuite/camera/README b/basicsuite/camera/README new file mode 100644 index 0000000..e249fae --- /dev/null +++ b/basicsuite/camera/README @@ -0,0 +1,2 @@ +You need to compile and intall the included qml plugin for this demo to work. + diff --git a/basicsuite/camera/RecordingTime.qml b/basicsuite/camera/RecordingTime.qml new file mode 100644 index 0000000..2156b74 --- /dev/null +++ b/basicsuite/camera/RecordingTime.qml @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Rectangle { + id: recRoot + width: row.width + 14 * root.contentScale + height: circle.height + 14 * root.contentScale + color: "#77333333" + radius: 5 * root.contentScale + rotation: root.contentRotation + Behavior on rotation { NumberAnimation { } } + + Row { + id: row + anchors.centerIn: parent + spacing: 10 * root.contentScale + + Item { + anchors.verticalCenter: timeText.verticalCenter + width: 18 * root.contentScale + height: width + + Rectangle { + id: circle + width: parent.width + height: parent.height + radius: width / 2 + color: "#fa334f" + + SequentialAnimation { + loops: Animation.Infinite + running: recRoot.visible + PropertyAction { target: circle; property: "visible"; value: true } + PauseAnimation { duration: 1000 } + PropertyAction { target: circle; property: "visible"; value: false } + PauseAnimation { duration: 1000 } + } + } + } + + Text { + id: timeText + color: "white" + font.pixelSize: 24 * root.contentScale + text: formatTime(camera.videoRecorder.duration) + } + } + + function formatTime(time) { + time = time / 1000 + var hours = Math.floor(time / 3600); + time = time - hours * 3600; + var minutes = Math.floor(time / 60); + var seconds = Math.floor(time - minutes * 60); + + if (hours > 0) + return formatTimeBlock(hours) + ":" + formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); + else + return formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); + + } + + function formatTimeBlock(time) { + if (time === 0) + return "00" + if (time < 10) + return "0" + time; + else + return time.toString(); + } +} diff --git a/basicsuite/camera/Slider.qml b/basicsuite/camera/Slider.qml new file mode 100644 index 0000000..a9d3c10 --- /dev/null +++ b/basicsuite/camera/Slider.qml @@ -0,0 +1,133 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Item { + id: slider + + height: handleBack.height + // value is read/write. + property real value: 0 + property real maximum: 1 + property real minimum: 0 + property int xMax: width - handle.width + onXMaxChanged: updatePos() + onMinimumChanged: updatePos() + onValueChanged: if (!pressed) updatePos() + property bool mutable: true + property alias pressed : backgroundMouse.pressed + + signal valueChangedByHandle(int newValue) + + function updatePos() { + if (maximum > minimum) { + var pos = 0 + (value - minimum) * slider.xMax / (maximum - minimum); + pos = Math.min(pos, width - handle.width - 0); + pos = Math.max(pos, 0); + handle.x = pos; + } else { + handle.x = 0; + } + } + + Rectangle { + id: background + width: slider.width + anchors.verticalCenter: slider.verticalCenter + height: 4 * root.contentScale + color: "#666666" + + MouseArea { + id: backgroundMouse + anchors.fill: parent + anchors.topMargin: -24 * root.contentScale + anchors.bottomMargin: -24 * root.contentScale + enabled: slider.mutable + drag.target: handle + drag.axis: Drag.XAxis + drag.minimumX: 0 + drag.maximumX: slider.xMax + onPressedChanged: { + value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); + valueChangedByHandle(value); + updatePos(); + } + onPositionChanged: { + value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); + valueChangedByHandle(value); + } + } + } + + Rectangle { + id: progress + height: 8 * root.contentScale + anchors.verticalCenter: background.verticalCenter + anchors.left: background.left + anchors.right: handle.right + anchors.rightMargin: handle.width / 2 + visible: slider.enabled + color: "#98c66c" + } + + Rectangle { + id: handleBack + width: 40 * root.contentScale + height: width + radius: width / 2 + color: "#8898c66c" + antialiasing: true + anchors.centerIn: handle + visible: handle.visible + } + + Rectangle { + id: handle + width: 14 * root.contentScale + height: width + radius: width / 2 + antialiasing: true + color: "#98c66c" + anchors.verticalCenter: background.verticalCenter + visible: slider.enabled + } +} + diff --git a/basicsuite/camera/ZoomControl.qml b/basicsuite/camera/ZoomControl.qml new file mode 100644 index 0000000..15f2875 --- /dev/null +++ b/basicsuite/camera/ZoomControl.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Column { + width: 400 * root.contentScale + spacing: 20 * root.contentScale + visible: maximumZoom > 1 + + property alias maximumZoom: zoomSlider.maximum + property alias requestedZoom: zoomSlider.value + property real actualZoom: 1 + + Rectangle { + anchors.horizontalCenter: zoomSlider.horizontalCenter + width: zoomText.width + 10 * root.contentScale + height: zoomText.height + 10 * root.contentScale + color: "#77333333" + radius: 5 * root.contentScale + rotation: root.contentRotation + Behavior on rotation { NumberAnimation { } } + + Text { + id: zoomText + anchors.centerIn: parent + font.pixelSize: Math.round(24 * root.contentScale) + color: "white" + font.bold: true + text: (Math.round(actualZoom * 100) / 100) + "x" + } + } + + Slider { + id: zoomSlider + width: parent.width + rotation: root.contentRotation === -90 ? 180 : (root.contentRotation === 90 ? 0 : root.contentRotation) + + minimum: 1 + maximum: 1 + value: 1 + } +} diff --git a/basicsuite/camera/app.pro b/basicsuite/camera/app.pro new file mode 100644 index 0000000..70633a5 --- /dev/null +++ b/basicsuite/camera/app.pro @@ -0,0 +1,12 @@ +TARGET = camera + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + *.png +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content diff --git a/basicsuite/camera/camera.pro b/basicsuite/camera/camera.pro new file mode 100644 index 0000000..7d9c9f1 --- /dev/null +++ b/basicsuite/camera/camera.pro @@ -0,0 +1,7 @@ +TEMPLATE = subdirs +CONFIG += ordered + +SUBDIRS += \ + camerautils \ + app.pro + diff --git a/basicsuite/camera/camerautils/camerautils.cpp b/basicsuite/camera/camerautils/camerautils.cpp new file mode 100644 index 0000000..f6b6672 --- /dev/null +++ b/basicsuite/camera/camerautils/camerautils.cpp @@ -0,0 +1,229 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "camerautils.h" + +#include +#include +#include +#include +#include +#include + +static QList g_commonResolutions; +static QList g_commonVideoResolutions; +static QList g_whiteBalanceModes; +static QList g_sceneModes; +static QList g_flashModes; +static QList g_focusModes; + +QDebug operator<<(QDebug dbg, const CameraSettingsValue &r) { + dbg.nospace() << "CameraSettingsValue(" << r.name() << ", " << r.value() << ')'; + return dbg.space(); +} + +CameraUtils::CameraUtils(QObject *parent) + : QObject(parent) + , m_camera(0) +{ + if (g_commonResolutions.isEmpty()) { + g_commonResolutions << new CameraSettingsValue(QStringLiteral("QVGA"), QSize(320, 240)) + << new CameraSettingsValue(QStringLiteral("0.3M"), QSize(640, 480)) + << new CameraSettingsValue(QStringLiteral("0.8M"), QSize(1024, 768)) + << new CameraSettingsValue(QStringLiteral("1.2M"), QSize(1280, 960)) + << new CameraSettingsValue(QStringLiteral("2M"), QSize(1600, 1200)) + << new CameraSettingsValue(QStringLiteral("5M"), QSize(2560, 1920)) + << new CameraSettingsValue(QStringLiteral("8M"), QSize(3264, 2448)); + + g_commonVideoResolutions << new CameraSettingsValue(QStringLiteral("1080p (16:9)"), QSize(1920, 1080)) + << new CameraSettingsValue(QStringLiteral("1080p (16:9)"), QSize(1920, 1088)) + << new CameraSettingsValue(QStringLiteral("1080p (4:3)"), QSize(1440, 1080)) + << new CameraSettingsValue(QStringLiteral("1080p (4:3)"), QSize(1440, 1088)) + << new CameraSettingsValue(QStringLiteral("720p (16:9)"), QSize(1280, 720)) + << new CameraSettingsValue(QStringLiteral("720p (4:3)"), QSize(960, 720)) + << new CameraSettingsValue(QStringLiteral("480p (16:9)"), QSize(720, 480)) + << new CameraSettingsValue(QStringLiteral("480p (4:3)"), QSize(640, 480)) + << new CameraSettingsValue(QStringLiteral("QVGA"), QSize(320, 240)); + + g_whiteBalanceModes << new CameraSettingsValue(QStringLiteral("Auto"), QCameraImageProcessing::WhiteBalanceAuto) + << new CameraSettingsValue(QStringLiteral("Manual"), QCameraImageProcessing::WhiteBalanceManual) + << new CameraSettingsValue(QStringLiteral("Sunlight"), QCameraImageProcessing::WhiteBalanceSunlight) + << new CameraSettingsValue(QStringLiteral("Cloudy"), QCameraImageProcessing::WhiteBalanceCloudy) + << new CameraSettingsValue(QStringLiteral("Shade"), QCameraImageProcessing::WhiteBalanceShade) + << new CameraSettingsValue(QStringLiteral("Tungsten"), QCameraImageProcessing::WhiteBalanceTungsten) + << new CameraSettingsValue(QStringLiteral("Fluorescent"), QCameraImageProcessing::WhiteBalanceFluorescent) + << new CameraSettingsValue(QStringLiteral("Flash"), QCameraImageProcessing::WhiteBalanceFlash) + << new CameraSettingsValue(QStringLiteral("Sunset"), QCameraImageProcessing::WhiteBalanceSunset); + + g_sceneModes << new CameraSettingsValue(QStringLiteral("Auto"), QCameraExposure::ExposureAuto) + << new CameraSettingsValue(QStringLiteral("Manual"), QCameraExposure::ExposureManual) + << new CameraSettingsValue(QStringLiteral("Portrait"), QCameraExposure::ExposurePortrait) + << new CameraSettingsValue(QStringLiteral("Night"), QCameraExposure::ExposureNight) + << new CameraSettingsValue(QStringLiteral("Backlight"), QCameraExposure::ExposureBacklight) + << new CameraSettingsValue(QStringLiteral("Spotlight"), QCameraExposure::ExposureSpotlight) + << new CameraSettingsValue(QStringLiteral("Sports"), QCameraExposure::ExposureSports) + << new CameraSettingsValue(QStringLiteral("Snow"), QCameraExposure::ExposureSnow) + << new CameraSettingsValue(QStringLiteral("Beach"), QCameraExposure::ExposureBeach) + << new CameraSettingsValue(QStringLiteral("Large Aperture"), QCameraExposure::ExposureLargeAperture) + << new CameraSettingsValue(QStringLiteral("Small Aperture"), QCameraExposure::ExposureSmallAperture); + + g_flashModes << new CameraSettingsValue(QStringLiteral("Auto"), QCameraExposure::FlashAuto) + << new CameraSettingsValue(QStringLiteral("Off"), QCameraExposure::FlashOff) + << new CameraSettingsValue(QStringLiteral("On"), QCameraExposure::FlashOn) + << new CameraSettingsValue(QStringLiteral("Red-Eye"), QCameraExposure::FlashRedEyeReduction) + << new CameraSettingsValue(QStringLiteral("Torch"), QCameraExposure::FlashVideoLight); + + g_focusModes << new CameraSettingsValue(QStringLiteral("Auto"), QCameraFocus::AutoFocus) + << new CameraSettingsValue(QStringLiteral("Continuous"), QCameraFocus::ContinuousFocus) + << new CameraSettingsValue(QStringLiteral("Hyperfocal"), QCameraFocus::HyperfocalFocus) + << new CameraSettingsValue(QStringLiteral("Infinity"), QCameraFocus::InfinityFocus) + << new CameraSettingsValue(QStringLiteral("Macro"), QCameraFocus::MacroFocus) + << new CameraSettingsValue(QStringLiteral("Off"), QCameraFocus::ManualFocus); + } + +} + +CameraUtils::~CameraUtils() +{ +} + +void CameraUtils::init() +{ + m_camera = new QCamera; + connect(m_camera, SIGNAL(statusChanged(QCamera::Status)), this, SLOT(onCameraStatusChanged())); + connect(m_camera, SIGNAL(error(QCamera::Error)), this, SLOT(onError())); + m_camera->load(); +} + +void CameraUtils::setCamera(QObject *obj) +{ + QObject *mediaObject = qvariant_cast(obj->property("mediaObject")); + if (!mediaObject) + return; + + m_camera = qobject_cast(mediaObject); + if (!m_camera) + return; + + if (m_camera->status() >= QCamera::LoadedStatus) + onCameraStatusChanged(); + else + connect(m_camera, SIGNAL(statusChanged(QCamera::Status)), this, SLOT(onCameraStatusChanged())); +} + +void CameraUtils::onError() +{ + if (m_camera && m_camera->status() == QCamera::UnavailableStatus) { + delete m_camera; + m_camera = 0; + + emit done(); + } +} + +void CameraUtils::onCameraStatusChanged() +{ + if (!m_camera || m_camera->status() < QCamera::LoadedStatus) + return; + + disconnect(m_camera, SIGNAL(statusChanged(QCamera::Status)), this, SLOT(onCameraStatusChanged())); + + QCameraImageCapture *imageCapture = new QCameraImageCapture(m_camera); + QCameraImageProcessing *imageProc = m_camera->imageProcessing(); + QCameraExposure *exposure = m_camera->exposure(); + QCameraFocus *focus = m_camera->focus(); + QMediaRecorder rec(m_camera); + + // Supported image resolutions + QList resolutions = imageCapture->supportedResolutions(); + for (int i = resolutions.size() - 1; i >= 0; --i) { + QSize reso = resolutions.at(i); + int mp = reso.width() * reso.height(); + CameraSettingsValue *r = new CameraSettingsValue(QString::number(mp / double(1000000), 'f', 1) + QLatin1String("M"), reso); + m_supportedResolutions.append(r); + } + + // Supported video resolutions + QList suppRes = rec.supportedResolutions(); + for (int i = 0; i < g_commonVideoResolutions.size(); ++i) { + CameraSettingsValue *r = g_commonVideoResolutions.at(i); + if (suppRes.contains(r->value().toSize())) + m_supportedVideoResolutions.append(r); + } + + + // Supported white balance modes + for (int i = 0; i < g_whiteBalanceModes.size(); ++i) { + CameraSettingsValue *m = g_whiteBalanceModes.at(i); + if (imageProc->isWhiteBalanceModeSupported(QCameraImageProcessing::WhiteBalanceMode(m->value().toInt()))) + m_supportedWhiteBalanceModes.append(m); + } + + // Supported scene modes + for (int i = 0; i < g_sceneModes.size(); ++i) { + CameraSettingsValue *sm = g_sceneModes.at(i); + if (exposure->isExposureModeSupported(QCameraExposure::ExposureMode(sm->value().toInt()))) + m_supportedSceneModes.append(sm); + } + + // Supported flash modes + for (int i = 0; i < g_flashModes.size(); ++i) { + CameraSettingsValue *sm = g_flashModes.at(i); + if (exposure->isFlashModeSupported(QCameraExposure::FlashModes(sm->value().toInt()))) + m_supportedFlashModes.append(sm); + } + + // Supported focus modes + for (int i = 0; i < g_focusModes.size(); ++i) { + CameraSettingsValue *sm = g_focusModes.at(i); + if (focus->isFocusModeSupported(QCameraFocus::FocusModes(sm->value().toInt()))) + m_supportedFocusModes.append(sm); + } + + delete imageCapture; + + emit supportedCaptureResolutionsChanged(); + emit supportedVideoResolutionsChanged(); + emit supportedWhiteBalanceModesChanged(); + emit supportedSceneModesChanged(); + emit supportedFlashModesChanged(); +} + + diff --git a/basicsuite/camera/camerautils/camerautils.h b/basicsuite/camera/camerautils/camerautils.h new file mode 100644 index 0000000..1f61c7c --- /dev/null +++ b/basicsuite/camera/camerautils/camerautils.h @@ -0,0 +1,127 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef CAMERAUTILS_H +#define CAMERAUTILS_H + +#include +#include + +class QCamera; + +class CameraSettingsValue : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) + Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged) + +public: + CameraSettingsValue(const QString &n, const QVariant &v) + : QObject() + , m_name(n) + , m_value(v) + { } + + QString name() const { return m_name; } + void setName(const QString &n) { m_name = n; emit nameChanged(); } + + QVariant value() const { return m_value; } + void setValue(const QVariant &v) { m_value = v; emit valueChanged(); } + +Q_SIGNALS: + void nameChanged(); + void valueChanged(); + +private: + QString m_name; + QVariant m_value; +}; + +QDebug operator<<(QDebug, const CameraSettingsValue &); + +class CameraUtils : public QObject +{ + Q_OBJECT + Q_PROPERTY(QList supportedCaptureResolutions READ supportedCaptureResolutions NOTIFY supportedCaptureResolutionsChanged) + Q_PROPERTY(QList supportedWhiteBalanceModes READ supportedWhiteBalanceModes NOTIFY supportedWhiteBalanceModesChanged) + Q_PROPERTY(QList supportedSceneModes READ supportedSceneModes NOTIFY supportedSceneModesChanged) + Q_PROPERTY(QList supportedFlashModes READ supportedFlashModes NOTIFY supportedFlashModesChanged) + Q_PROPERTY(QList supportedFocusModes READ supportedFocusModes NOTIFY supportedFocusModesChanged) + Q_PROPERTY(QList supportedVideoResolutions READ supportedVideoResolutions NOTIFY supportedVideoResolutionsChanged) +public: + explicit CameraUtils(QObject *parent = 0); + ~CameraUtils(); + + Q_INVOKABLE void init(); + Q_INVOKABLE void setCamera(QObject *cam); + + QList supportedCaptureResolutions() const { return m_supportedResolutions; } + QList supportedVideoResolutions() const { return m_supportedVideoResolutions; } + QList supportedWhiteBalanceModes() const { return m_supportedWhiteBalanceModes; } + QList supportedSceneModes() const { return m_supportedSceneModes; } + QList supportedFlashModes() const { return m_supportedFlashModes; } + QList supportedFocusModes() const { return m_supportedFocusModes; } + +Q_SIGNALS: + void supportedCaptureResolutionsChanged(); + void supportedWhiteBalanceModesChanged(); + void supportedSceneModesChanged(); + void supportedFlashModesChanged(); + void supportedFocusModesChanged(); + void supportedVideoResolutionsChanged(); + + void done(); + +private Q_SLOTS: + void onCameraStatusChanged(); + void onError(); + +private: + QCamera *m_camera; + + QList m_supportedResolutions; + QList m_supportedVideoResolutions; + QList m_supportedWhiteBalanceModes; + QList m_supportedSceneModes; + QList m_supportedFlashModes; + QList m_supportedFocusModes; +}; + +#endif // CAMERAUTILS_H diff --git a/basicsuite/camera/camerautils/camerautils.pro b/basicsuite/camera/camerautils/camerautils.pro new file mode 100644 index 0000000..938a0a9 --- /dev/null +++ b/basicsuite/camera/camerautils/camerautils.pro @@ -0,0 +1,19 @@ +TEMPLATE = lib +CONFIG += plugin +QT += qml multimedia + +TARGET = camerautilsplugin + +SOURCES += plugin.cpp \ + camerautils.cpp + +HEADERS += camerautils.h + +pluginfiles.files += \ + qmldir \ + +target.path += $$[QT_INSTALL_QML]/CameraUtils +pluginfiles.path += $$[QT_INSTALL_QML]/CameraUtils + +INSTALLS += target pluginfiles + diff --git a/basicsuite/camera/camerautils/plugin.cpp b/basicsuite/camera/camerautils/plugin.cpp new file mode 100644 index 0000000..2a8c3ea --- /dev/null +++ b/basicsuite/camera/camerautils/plugin.cpp @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +#include "camerautils.h" + +class QExampleQmlPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri) + { + qmlRegisterType(uri, 1, 0, "CameraUtils"); + } +}; + + +#include "plugin.moc" diff --git a/basicsuite/camera/camerautils/qmldir b/basicsuite/camera/camerautils/qmldir new file mode 100644 index 0000000..a5ab412 --- /dev/null +++ b/basicsuite/camera/camerautils/qmldir @@ -0,0 +1,2 @@ +module CameraUtils +plugin camerautilsplugin diff --git a/basicsuite/camera/description.txt b/basicsuite/camera/description.txt new file mode 100644 index 0000000..71c3c44 --- /dev/null +++ b/basicsuite/camera/description.txt @@ -0,0 +1,5 @@ +This example demonstrates the use of the camera features of Qt Multimedia with Qt Quick. + +Demo can be used to take pictures. Files are saved inside the /data/images/ folder and can be viewed with the "Photo Gallery" application. + +Camera parameters such as flash mode, scene mode or white balance can be changed. The availability of parameters depends on what the camera driver provides. diff --git a/basicsuite/camera/exclude.txt b/basicsuite/camera/exclude.txt new file mode 100644 index 0000000..5716448 --- /dev/null +++ b/basicsuite/camera/exclude.txt @@ -0,0 +1 @@ +android-beagleboard:linux-iMX6:linux-raspberrypi: diff --git a/basicsuite/camera/main.qml b/basicsuite/camera/main.qml new file mode 100644 index 0000000..b7437de --- /dev/null +++ b/basicsuite/camera/main.qml @@ -0,0 +1,263 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtMultimedia 5.0 +//import QtSensors 5.0 +import CameraUtils 1.0 + +Rectangle { + id: root + color: "black" + + property real contentScale: root.width / 1280 + property int contentRotation: 0 + + Text { + anchors.centerIn: parent + color: "white" + font.pixelSize: 30 + text: "Camera service is not available..." + visible: camera.cameraStatus === Camera.UnavailableStatus + } + + CameraUtils { + id: cameraUtils + } + + Camera { + id: camera + property bool updateFocusPointMode: true + property bool captureWhenLocked: false + + Component.onCompleted: cameraUtils.setCamera(camera) + + digitalZoom: controls.requestedZoom + captureMode: Camera.CaptureStillImage + + onCaptureModeChanged: { + if (camera.captureMode === Camera.CaptureVideo) { + controls.focusMode = Camera.FocusContinuous; + camera.unlock(); + } else { + controls.focusMode = Camera.FocusAuto; + } + } + + onLockStatusChanged: { + if (camera.lockStatus === Camera.Locked && captureWhenLocked) { + camera.imageCapture.captureToLocation("/data/images/"); + captureWhenLocked = false; + } + } + + focus { + onFocusModeChanged: { + camera.unlock(); + if (camera.updateFocusPointMode) + camera.focus.focusPointMode = Camera.FocusPointAuto + } + onCustomFocusPointChanged: { + if (camera.focus.focusPointMode === Camera.FocusPointCustom + && camera.focus.focusMode !== Camera.FocusAuto + && camera.focus.focusMode !== Camera.FocusMacro) { + camera.updateFocusPointMode = false; + camera.focus.focusMode = Camera.FocusAuto + controls.focusMode = Camera.FocusAuto + camera.updateFocusPointMode = true; + } + } + } + + onCameraStatusChanged: { + if (cameraStatus === Camera.ActiveStatus) { + controls.exposureMode = camera.exposure.exposureMode + controls.exposureCompensation = camera.exposure.exposureCompensation + controls.whiteBalanceMode = camera.imageProcessing.whiteBalanceMode + controls.flashMode = Camera.FlashAuto + if (camera.captureMode === Camera.CaptureStillImage) + controls.focusMode = camera.focus.focusMode + else + camera.focus.focusMode = Camera.FocusContinuous + } + } + + imageCapture { + onImageExposed: capturePreview.show() + onImageCaptured: { + camera.unlock(); + capturePreview.setPreview(preview); + } + onCaptureFailed: print(requestId + " " + message) + } + + videoRecorder { + // mediaContainer: "mp4" + // audioCodec: "aac" + // audioSampleRate: 48000 + // audioBitRate: 192000 + // audioChannels: 2 + // videoCodec: "h264" + // resolution: Qt.size(960, 720) + onResolutionChanged: { + if (camera.videoRecorder.resolution == Qt.size(1920, 1080)) + camera.videoRecorder.videoBitRate = 20000000; + else if (camera.videoRecorderresolution == Qt.size(1280, 720)) + camera.videoRecorder.videoBitRate = 10000000; + else + camera.videoRecorder.videoBitRate = 5000000; + } + } + + } + + VideoOutput { + id: viewfinder + source: camera + anchors.fill: parent + fillMode: VideoOutput.PreserveAspectFit + } + + // OrientationSensor { + // active: true + // onReadingChanged: { + // if (reading.orientation === OrientationReading.TopUp) + // root.contentRotation = -90; + // else if (reading.orientation === OrientationReading.RightUp) + // root.contentRotation = 0; + // else if (reading.orientation === OrientationReading.LeftUp) + // root.contentRotation = 180; + // else if (reading.orientation === OrientationReading.TopDown) + // root.contentRotation = 90; + // } + // } + + // RotationSensor { + // active: (camera.cameraStatus === Camera.ActiveStatus) + // dataRate: 20 + // property real lastxvalue: 0 + // property real lastyvalue: 0 + // property real lastzvalue: 0 + + // onActiveChanged: { + // lastxvalue = 0 + // lastyvalue = 0 + // lastzvalue = 0 + // } + + // onReadingChanged: { + // if (lastxvalue != 0 && camera.focus.focusMode === Camera.FocusContinuous && camera.lockStatus === Camera.Locked && camera.imageCapture.ready) { + // if (Math.abs(reading.x - lastxvalue) > 3 || Math.abs(reading.y - lastyvalue) > 3 || Math.abs(reading.z - lastzvalue) > 3) + // camera.unlock(); + // } + // lastxvalue = reading.x; + // lastyvalue = reading.y; + // lastzvalue = reading.z; + // } + // } + + Controls { + id: controls + visible: camera.cameraStatus === Camera.ActiveStatus + + actualZoom: camera.digitalZoom + maximumZoom: camera.maximumDigitalZoom + + //onCameraModeChanged: camera.captureMode = controls.cameraMode + + onFlashModeChanged: if (visible) camera.flash.mode = controls.flashMode + onFocusModeChanged: if (visible) camera.focus.focusMode = controls.focusMode + onExposureModeChanged: if (visible) camera.exposure.exposureMode = controls.exposureMode + onExposureCompensationChanged: if (visible) camera.exposure.exposureCompensation = controls.exposureCompensation + onWhiteBalanceModeChanged: if (visible) camera.imageProcessing.whiteBalanceMode = controls.whiteBalanceMode + onResolutionChanged: { + if (controls.resolution != null) { + if (camera.captureMode === Camera.CaptureStillImage) + camera.imageCapture.resolution = controls.resolution; + else + camera.videoRecorder.resolution = controls.resolution; + } + } + + onSearchAndLock: { + camera.searchAndLock(); + } + + captureReady: camera.imageCapture.ready + onCapture: { + if (camera.captureMode === Camera.CaptureVideo) { + if (camera.videoRecorder.recorderState === CameraRecorder.RecordingState) { + camera.videoRecorder.stop(); + } else { + camera.videoRecorder.record(); + } + } else { + if ((camera.focus.focusMode === Camera.FocusAuto || camera.focus.focusMode === Camera.FocusMacro) + && camera.focus.focusPointMode === Camera.FocusPointAuto + && camera.lockStatus === Camera.Unlocked) { + camera.captureWhenLocked = true; + camera.searchAndLock(); + } else { + camera.imageCapture.captureToLocation("/data/images/"); + } + } + } + } + + // CameraControlButton { + // anchors.left: parent.left + // anchors.leftMargin: 30 + // anchors.bottom: parent.bottom + // anchors.bottomMargin: 20 + // title: camera.cameraStatus === Camera.ActiveStatus ? "Stop" : "Start" + + // onClicked: { + // if (camera.cameraStatus === Camera.ActiveStatus) + // camera.cameraState = Camera.UnloadedState + // else + // camera.start(); + // } + // } + + CapturePreview { + id: capturePreview + } + +} diff --git a/basicsuite/camera/preview_l.jpg b/basicsuite/camera/preview_l.jpg new file mode 100644 index 0000000..3f15310 Binary files /dev/null and b/basicsuite/camera/preview_l.jpg differ diff --git a/basicsuite/camera/title.txt b/basicsuite/camera/title.txt new file mode 100644 index 0000000..10a226d --- /dev/null +++ b/basicsuite/camera/title.txt @@ -0,0 +1 @@ +Camera diff --git a/basicsuite/controls-layouts/controls-layouts.pro b/basicsuite/controls-layouts/controls-layouts.pro new file mode 100644 index 0000000..bbf91d5 --- /dev/null +++ b/basicsuite/controls-layouts/controls-layouts.pro @@ -0,0 +1,10 @@ +TARGET = controls-layouts + +include(../shared/shared.pri) + +content.files = *.qml +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/controls-layouts/description.txt b/basicsuite/controls-layouts/description.txt new file mode 100644 index 0000000..393f0dd --- /dev/null +++ b/basicsuite/controls-layouts/description.txt @@ -0,0 +1,3 @@ +The "Controls Layout" demonstration aims to show some of the features available in the layout system of the Qt Quick Controls. The layout system in Qt Quick Controls adds GridLayout, RowLayout and ColumnLayout which interact with size-hints from individual controls, making it possible to create interfaces that adapt to various dimensions and still look good. + +The example has been adapted slightly to run inside this launcher, the original is available in the Qt Quick Controls repository. diff --git a/basicsuite/controls-layouts/main.qml b/basicsuite/controls-layouts/main.qml new file mode 100644 index 0000000..b12b6c8 --- /dev/null +++ b/basicsuite/controls-layouts/main.qml @@ -0,0 +1,118 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Layouts 1.0 + +Rectangle { + + gradient: Gradient { + GradientStop { position: 0; color: "white" } + GradientStop { position: 1; color: "lightgray" } + } + + property int margin: 11 + width: 1280 + height: 720 + + ColumnLayout { + id: mainLayout + anchors.fill: parent + anchors.margins: margin + GroupBox { + id: rowBox + title: "Row layout" + Layout.fillWidth: true + + RowLayout { + id: rowLayout + anchors.fill: parent + TextField { + placeholderText: "This wants to grow horizontally" + Layout.fillWidth: true + } + Button { + text: "Button" + } + } + } + + GroupBox { + id: gridBox + title: "Grid layout" + Layout.fillWidth: true + + GridLayout { + id: gridLayout + rows: 3 + flow: GridLayout.TopToBottom + anchors.fill: parent + + Label { text: "Line 1" } + Label { text: "Line 2" } + Label { text: "Line 3" } + + TextField { } + TextField { } + TextField { } + + TextArea { + text: "This widget spans over three rows in the GridLayout.\n" + + "All items in the GridLayout are implicitly positioned from top to bottom." + Layout.rowSpan: 3 + Layout.fillHeight: true + Layout.fillWidth: true + } + } + } + TextArea { + id: t3 + text: "This fills the whole cell" + Layout.minimumHeight: 30 + Layout.fillHeight: true + Layout.fillWidth: true + } + } +} diff --git a/basicsuite/controls-layouts/preview_l.jpg b/basicsuite/controls-layouts/preview_l.jpg new file mode 100644 index 0000000..03df43a Binary files /dev/null and b/basicsuite/controls-layouts/preview_l.jpg differ diff --git a/basicsuite/controls-layouts/title.txt b/basicsuite/controls-layouts/title.txt new file mode 100644 index 0000000..914d6c2 --- /dev/null +++ b/basicsuite/controls-layouts/title.txt @@ -0,0 +1 @@ +Controls: Layouts diff --git a/basicsuite/controls-touch/content/AndroidDelegate.qml b/basicsuite/controls-touch/content/AndroidDelegate.qml new file mode 100644 index 0000000..36a439a --- /dev/null +++ b/basicsuite/controls-touch/content/AndroidDelegate.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 + +Item { + id: root + width: parent.width + height: 88 + + property alias text: textitem.text + signal clicked + + Rectangle { + anchors.fill: parent + color: "#11ffffff" + visible: mouse.pressed + } + + Text { + id: textitem + color: "white" + font.pixelSize: 32 + text: modelData + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: 30 + } + + Rectangle { + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: 15 + height: 1 + color: "#424246" + } + + Image { + anchors.right: parent.right + anchors.rightMargin: 20 + anchors.verticalCenter: parent.verticalCenter + source: "../images/navigation_next_item.png" + } + + MouseArea { + id: mouse + anchors.fill: parent + onClicked: root.clicked() + + } +} diff --git a/basicsuite/controls-touch/content/ButtonPage.qml b/basicsuite/controls-touch/content/ButtonPage.qml new file mode 100644 index 0000000..f431a52 --- /dev/null +++ b/basicsuite/controls-touch/content/ButtonPage.qml @@ -0,0 +1,120 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + property real progress: 0 + SequentialAnimation on progress { + loops: Animation.Infinite + running: true + NumberAnimation { + from: 0 + to: 1 + duration: 3000 + } + NumberAnimation { + from: 1 + to: 0 + duration: 3000 + } + } + + Column { + spacing: 40 + anchors.centerIn: parent + + Button { + anchors.margins: 20 + text: "Press me" + style: touchStyle + } + + Button { + anchors.margins: 20 + style: touchStyle + text: "Press me too" + } + + Button { + anchors.margins: 20 + style: touchStyle + text: "Dont press me" + onClicked: if (stackView) stackView.pop() + } + + } + + Component { + id: touchStyle + ButtonStyle { + panel: Item { + implicitHeight: 50 + implicitWidth: 320 + BorderImage { + anchors.fill: parent + antialiasing: true + border.bottom: 8 + border.top: 8 + border.left: 8 + border.right: 8 + anchors.margins: control.pressed ? -4 : 0 + source: control.pressed ? "../images/button_pressed.png" : "../images/button_default.png" + Text { + text: control.text + anchors.centerIn: parent + color: "white" + font.pixelSize: 23 + renderType: Text.NativeRendering + } + } + } + } + } +} diff --git a/basicsuite/controls-touch/content/ProgressBarPage.qml b/basicsuite/controls-touch/content/ProgressBarPage.qml new file mode 100644 index 0000000..dc0f552 --- /dev/null +++ b/basicsuite/controls-touch/content/ProgressBarPage.qml @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + property real progress: 0 + SequentialAnimation on progress { + loops: Animation.Infinite + running: true + NumberAnimation { + from: 0 + to: 1 + duration: 3000 + } + NumberAnimation { + from: 1 + to: 0 + duration: 3000 + } + } + + Column { + spacing: 40 + anchors.centerIn: parent + + ProgressBar { + anchors.margins: 20 + style: touchStyle + width: 400 + value: progress + } + + ProgressBar { + anchors.margins: 20 + style: touchStyle + width: 400 + value: 1 - progress + } + + ProgressBar { + anchors.margins: 20 + style: touchStyle + value: 1 + width: 400 + } + + } + + Component { + id: touchStyle + ProgressBarStyle { + panel: Rectangle { + implicitHeight: 15 + implicitWidth: 400 + color: "#444" + opacity: 0.8 + Rectangle { + antialiasing: true + radius: 1 + color: "#468bb7" + height: parent.height + width: parent.width * control.value / control.maximumValue + } + } + } + } +} diff --git a/basicsuite/controls-touch/content/SliderPage.qml b/basicsuite/controls-touch/content/SliderPage.qml new file mode 100644 index 0000000..8eb9190 --- /dev/null +++ b/basicsuite/controls-touch/content/SliderPage.qml @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + Column { + spacing: 12 + anchors.centerIn: parent + + Slider { + anchors.margins: 20 + style: touchStyle + value: 0 + } + Slider { + anchors.margins: 20 + style: touchStyle + value: 0.5 + } + Slider { + anchors.margins: 20 + style: touchStyle + value: 1.0 + } + + } + + Component { + id: touchStyle + SliderStyle { + handle: Rectangle { + width: 30 + height: 30 + radius: height + antialiasing: true + color: Qt.lighter("#468bb7", 1.2) + } + + groove: Item { + implicitHeight: 50 + implicitWidth: 400 + Rectangle { + height: 8 + width: parent.width + anchors.verticalCenter: parent.verticalCenter + color: "#444" + opacity: 0.8 + Rectangle { + antialiasing: true + radius: 1 + color: "#468bb7" + height: parent.height + width: parent.width * control.value / control.maximumValue + } + } + } + } + } +} diff --git a/basicsuite/controls-touch/content/TabBarPage.qml b/basicsuite/controls-touch/content/TabBarPage.qml new file mode 100644 index 0000000..7651a3c --- /dev/null +++ b/basicsuite/controls-touch/content/TabBarPage.qml @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + TabView { + anchors.fill: parent + style: touchStyle + Tab { + title: "Buttons" + ButtonPage{ visible: true } + } + Tab { + title: "Sliders" + SliderPage{ visible: true } + } + Tab { + title: "Progress" + ProgressBarPage{ visible: true } + } + } + + Component { + id: touchStyle + TabViewStyle { + tabsAlignment: Qt.AlignVCenter + tabOverlap: 0 + frame: Item { } + tab: Item { + implicitWidth: control.width/control.count + implicitHeight: 50 + BorderImage { + anchors.fill: parent + border.bottom: 8 + border.top: 8 + source: styleData.selected ? "../images/tab_selected.png":"../images/tabs_standard.png" + Text { + anchors.centerIn: parent + color: "white" + text: styleData.title.toUpperCase() + font.pixelSize: 16 + } + Rectangle { + visible: index > 0 + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.margins: 10 + width:1 + color: "#3a3a3a" + } + } + } + } + } +} diff --git a/basicsuite/controls-touch/content/TextInputPage.qml b/basicsuite/controls-touch/content/TextInputPage.qml new file mode 100644 index 0000000..605afef --- /dev/null +++ b/basicsuite/controls-touch/content/TextInputPage.qml @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + property real progress: 0 + SequentialAnimation on progress { + loops: Animation.Infinite + running: true + NumberAnimation { + from: 0 + to: 1 + duration: 3000 + } + NumberAnimation { + from: 1 + to: 0 + duration: 3000 + } + } + + Column { + spacing: 40 + anchors.centerIn: parent + + TextField { + anchors.margins: 20 + text: "Text input" + style: touchStyle + } + + TextField { + anchors.margins: 20 + text: "Readonly Text input" + style: touchStyle + readOnly: true + } + } + Component { + id: touchStyle + + TextFieldStyle { + textColor: "white" + font.pixelSize: 28 + background: Item { + implicitHeight: 50 + implicitWidth: 320 + BorderImage { + source: "../images/textinput.png" + border.left: 8 + border.right: 8 + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + } + } + } + } +} diff --git a/basicsuite/controls-touch/controls-touch.pro b/basicsuite/controls-touch/controls-touch.pro new file mode 100644 index 0000000..cf4b6fa --- /dev/null +++ b/basicsuite/controls-touch/controls-touch.pro @@ -0,0 +1,13 @@ +TARGET = controls-touch + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + *.png \ + content +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/controls-touch/description.txt b/basicsuite/controls-touch/description.txt new file mode 100644 index 0000000..5106dff --- /dev/null +++ b/basicsuite/controls-touch/description.txt @@ -0,0 +1,3 @@ +The purpose of this example is to show Qt Quick Controls in practice. The example uses a StackView to navigate between pages and illustrates the use of many of the controls provided by Qt Quick Control, including Button, Slider, ProgressBar, TabBar and TextInput types. The style in the example is a custom style made to look like the Android theme, it is written purely in QML. + +The example has been adapted slightly to run inside this launcher, the original is available in the Qt Quick Controls repository. diff --git a/basicsuite/controls-touch/images/NOTICE.txt b/basicsuite/controls-touch/images/NOTICE.txt new file mode 100644 index 0000000..93a9afc --- /dev/null +++ b/basicsuite/controls-touch/images/NOTICE.txt @@ -0,0 +1,2 @@ +Notice some of these images are derived from Google applications resources. They were provided under the following license: +You may use the materials in this directory without restriction to develop your apps and to use in your apps. diff --git a/basicsuite/controls-touch/images/button_default.png b/basicsuite/controls-touch/images/button_default.png new file mode 100644 index 0000000..6d6cfd9 Binary files /dev/null and b/basicsuite/controls-touch/images/button_default.png differ diff --git a/basicsuite/controls-touch/images/button_pressed.png b/basicsuite/controls-touch/images/button_pressed.png new file mode 100644 index 0000000..ab78b6e Binary files /dev/null and b/basicsuite/controls-touch/images/button_pressed.png differ diff --git a/basicsuite/controls-touch/images/navigation_next_item.png b/basicsuite/controls-touch/images/navigation_next_item.png new file mode 100644 index 0000000..6665c9d Binary files /dev/null and b/basicsuite/controls-touch/images/navigation_next_item.png differ diff --git a/basicsuite/controls-touch/images/navigation_previous_item.png b/basicsuite/controls-touch/images/navigation_previous_item.png new file mode 100644 index 0000000..f8be011 Binary files /dev/null and b/basicsuite/controls-touch/images/navigation_previous_item.png differ diff --git a/basicsuite/controls-touch/images/tab_selected.png b/basicsuite/controls-touch/images/tab_selected.png new file mode 100644 index 0000000..2345f7a Binary files /dev/null and b/basicsuite/controls-touch/images/tab_selected.png differ diff --git a/basicsuite/controls-touch/images/tabs_standard.png b/basicsuite/controls-touch/images/tabs_standard.png new file mode 100644 index 0000000..7140ab7 Binary files /dev/null and b/basicsuite/controls-touch/images/tabs_standard.png differ diff --git a/basicsuite/controls-touch/images/textinput.png b/basicsuite/controls-touch/images/textinput.png new file mode 100644 index 0000000..b0256db Binary files /dev/null and b/basicsuite/controls-touch/images/textinput.png differ diff --git a/basicsuite/controls-touch/images/toolbar.png b/basicsuite/controls-touch/images/toolbar.png new file mode 100644 index 0000000..e9eba4c Binary files /dev/null and b/basicsuite/controls-touch/images/toolbar.png differ diff --git a/basicsuite/controls-touch/main.qml b/basicsuite/controls-touch/main.qml new file mode 100644 index 0000000..e4d2562 --- /dev/null +++ b/basicsuite/controls-touch/main.qml @@ -0,0 +1,148 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import "content" + +Item { + width: 800 + height: 1280 + + Rectangle { + color: "#212126" + anchors.fill: parent + } + + // Implements back key navigation + Keys.onReleased: { + if (event.key === Qt.Key_Back) { + if (stackView.depth > 1) { + stackView.pop(); + event.accepted = true; + } else { Qt.quit(); } + } + } + + BorderImage { + id: toolbar + border.bottom: 8 + source: "images/toolbar.png" + width: parent.width + height: 100 + + Rectangle { + id: backButton + width: opacity ? 60 : 0 + anchors.left: parent.left + anchors.leftMargin: 20 + opacity: stackView.depth > 1 ? 1 : 0 + anchors.verticalCenter: parent.verticalCenter + antialiasing: true + height: 60 + radius: 4 + color: backmouse.pressed ? "#222" : "transparent" + Behavior on opacity { NumberAnimation{} } + Image { + anchors.verticalCenter: parent.verticalCenter + source: "images/navigation_previous_item.png" + } + MouseArea { + id: backmouse + anchors.fill: parent + anchors.margins: -10 + onClicked: stackView.pop() + } + } + + Text { + font.pixelSize: 42 + Behavior on x { NumberAnimation{ easing.type: Easing.OutCubic} } + x: backButton.x + backButton.width + 20 + anchors.verticalCenter: parent.verticalCenter + color: "white" + text: "Widget Gallery" + } + } + + ListModel { + id: pageModel + ListElement { + title: "Buttons" + page: "content/ButtonPage.qml" + } + ListElement { + title: "Sliders" + page: "content/SliderPage.qml" + } + ListElement { + title: "ProgressBar" + page: "content/ProgressBarPage.qml" + } + ListElement { + title: "Tabs" + page: "content/TabBarPage.qml" + } + ListElement { + title: "TextInput" + page: "content/TextInputPage.qml" + } + } + + StackView { + id: stackView + anchors.fill: parent + anchors.topMargin: toolbar.height + + initialItem: Item { + width: parent.width + height: parent.height + ListView { + model: pageModel + anchors.fill: parent + delegate: AndroidDelegate { + text: title + onClicked: stackView.push(Qt.resolvedUrl(page)) + } + } + } + } + +} diff --git a/basicsuite/controls-touch/preview_l.jpg b/basicsuite/controls-touch/preview_l.jpg new file mode 100644 index 0000000..c57eac3 Binary files /dev/null and b/basicsuite/controls-touch/preview_l.jpg differ diff --git a/basicsuite/controls-touch/title.txt b/basicsuite/controls-touch/title.txt new file mode 100644 index 0000000..cc2e76a --- /dev/null +++ b/basicsuite/controls-touch/title.txt @@ -0,0 +1 @@ +Controls: Touch diff --git a/basicsuite/graphicaleffects/Checkers.qml b/basicsuite/graphicaleffects/Checkers.qml new file mode 100644 index 0000000..9e42b1c --- /dev/null +++ b/basicsuite/graphicaleffects/Checkers.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + + +// The checkers background +ShaderEffect { + + property real tileSize: 16 + property color color1: Qt.rgba(0.7, 0.7, 0.7, 1); + property color color2: Qt.rgba(0.6, 0.6, 0.6, 1); + + property size _pixelSize: Qt.size(Math.PI * width / tileSize, Math.PI * height / tileSize); + + fragmentShader: + " + uniform lowp vec4 color1; + uniform lowp vec4 color2; + uniform lowp float qt_Opacity; + uniform highp vec2 _pixelSize; + varying highp vec2 qt_TexCoord0; + void main() { + highp vec2 tc = sign(sin(qt_TexCoord0 * _pixelSize)); + if (tc.x != tc.y) + gl_FragColor = color1 * qt_Opacity; + else + gl_FragColor = color2 * qt_Opacity; + } + " +} diff --git a/basicsuite/graphicaleffects/description.txt b/basicsuite/graphicaleffects/description.txt new file mode 100644 index 0000000..e2d3acf --- /dev/null +++ b/basicsuite/graphicaleffects/description.txt @@ -0,0 +1,2 @@ +This example shows the Qt Quick 2.0 ShaderEffect type and the QtGraphicalEffect module. Qt Quick 2.0 provides the ability to use inline GLSL in your Qt Quick applications to create stunning visual effects. However, as UIs typically reuse many of the same effects, the QtGraphicalEffects module provides a set of predefined, commonly used effects. This includes blur, drop-shadows, glow, blending, opacity masks and more. + diff --git a/basicsuite/graphicaleffects/effect_BrightnessContrast.qml b/basicsuite/graphicaleffects/effect_BrightnessContrast.qml new file mode 100644 index 0000000..fb8302d --- /dev/null +++ b/basicsuite/graphicaleffects/effect_BrightnessContrast.qml @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + + id: root + + property real inputX: 0.7; + property real feedbackX: effect.brightness + property string nameX: "Brightness" + + property real inputY: 0.8; + property real feedbackY: effect.contrast + property string nameY: "Contrast" + + Image { + id: image + source: "images/bug.jpg" + anchors.centerIn: parent + visible: false + } + + BrightnessContrast { + id: effect; + + source: image + anchors.fill: source + + scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; + + brightness: inputX * 2 - 1; + contrast: inputY * 2 - 1; + } + +} diff --git a/basicsuite/graphicaleffects/effect_Colorize.qml b/basicsuite/graphicaleffects/effect_Colorize.qml new file mode 100644 index 0000000..4244f21 --- /dev/null +++ b/basicsuite/graphicaleffects/effect_Colorize.qml @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + id: root + + property real inputX: 0.6; + property real feedbackX: effect.hue + property string nameX: "Hue" + + property real inputY: 0.7 + property real feedbackY: effect.saturation + property string nameY: "Saturation" + + Image { + id: image + source: "images/bug.jpg" + width: Math.min(root.width, root.height) * 0.8; + height: width + sourceSize: Qt.size(width, height); + anchors.centerIn: parent + } + + Colorize { + id: effect; + + source: image + anchors.fill: source + scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; + + hue: root.inputX * 2 - 1; + saturation: root.inputY + } +} diff --git a/basicsuite/graphicaleffects/effect_CustomDissolve.qml b/basicsuite/graphicaleffects/effect_CustomDissolve.qml new file mode 100644 index 0000000..43be640 --- /dev/null +++ b/basicsuite/graphicaleffects/effect_CustomDissolve.qml @@ -0,0 +1,165 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Item { + + + width: 700 + height: 600 + id: root + + property real inputX: 0.5; + property real feedbackX: inputX + property string nameX: "Dissolution" + + property real inputY: 0.5; + property real feedbackY: effect.amplitude + property string nameY: "Amplitude" + + Rectangle { + id: sourceItem + anchors.centerIn: parent + width: text.width + 50 + height: text.height + 20 + gradient: Gradient { + GradientStop { position: 0; color: "steelblue" } + GradientStop { position: 1; color: "black" } + } + border.color: "lightsteelblue" + border.width: 2 + +//? color: "transparent" + + radius: 10 + + layer.enabled: true + layer.smooth: true + layer.sourceRect: Qt.rect(-1, -1, width + 2, height + 2); + + visible: false + + Text { + id: text + font.pixelSize: root.height * 0.08 + anchors.centerIn: parent; + text: "Code Less, Create More!" + color: "lightsteelblue" + style: Text.Raised + + } + } + + ShaderEffect { + + id: effect + + anchors.fill: sourceItem; + + property variant source: sourceItem; + + property real t: (1 + tlength) * (1 - root.inputX) - tlength; + property real tlength: 1.0 + property real amplitude: 2.0 * height * root.inputY; + + mesh: "40x4" + + vertexShader: + " + uniform highp mat4 qt_Matrix; + uniform lowp float t; + uniform lowp float tlength; + uniform highp float amplitude; + + attribute highp vec4 qt_Vertex; + attribute highp vec2 qt_MultiTexCoord0; + + varying highp vec2 vTexCoord; + varying lowp float vOpacity; + + void main() { + vTexCoord = qt_MultiTexCoord0; + + vec4 pos = qt_Vertex; + + lowp float tt = smoothstep(t, t+tlength, qt_MultiTexCoord0.x); + + vOpacity = 1.0 - tt; + + pos.y += (amplitude * (qt_MultiTexCoord0.y * 2.0 - 1.0) * (-2.0 * tt) + + 3.0 * amplitude * (qt_MultiTexCoord0.y * 2.0 - 1.0) + + amplitude * sin(0.0 + tt * 2.14152 * qt_MultiTexCoord0.x) + + amplitude * sin(0.0 + tt * 7.4567) + ) * tt; + + pos.x += amplitude * sin(6.0 + tt * 4.4567) * tt; + + gl_Position = qt_Matrix * pos; + } + " + fragmentShader: + " + uniform sampler2D source; + + uniform lowp float t; + uniform lowp float tlength; + uniform lowp float qt_Opacity; + + varying highp vec2 vTexCoord; + varying lowp float vOpacity; + + // Noise function from: http://stackoverflow.com/questions/4200224/random-noise-functions-for-glsl + highp float rand(vec2 n) { + return fract(sin(dot(n.xy, vec2(12.9898, 78.233))) * 43758.5453); + } + + void main() { + lowp vec4 tex = texture2D(source, vTexCoord); + lowp float opacity = 1.0 - smoothstep(0.9, 1.0, vOpacity); + lowp float particlify = smoothstep(1.0 - vOpacity, 1.0, rand(vTexCoord)) * vOpacity; + gl_FragColor = tex * mix(vOpacity, particlify, opacity) * qt_Opacity; + } + + " + + } + +} diff --git a/basicsuite/graphicaleffects/effect_CustomWave.qml b/basicsuite/graphicaleffects/effect_CustomWave.qml new file mode 100644 index 0000000..5bde628 --- /dev/null +++ b/basicsuite/graphicaleffects/effect_CustomWave.qml @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Item { + id: root + + property real inputX: 0.9; + property real feedbackX: shader.zrot + property string nameX: "Rotation" + + property real inputY: 0.7 + property real feedbackY: shader.amp + property string nameY: "Amplitude" + + + ShaderEffect { + id: shader + width: height + height: parent.height + anchors.centerIn: parent; + scale: height > root.height * 0.8 ? root.height * 0.8 / height : 1; + + blending: true + + mesh: "50x50" + + property variant size: Qt.size(width, height); + + property variant source: Image { source: "images/bug.jpg" } + + property real amp: root.inputY * 0.1; + + property real xrot: 2 / 8 * Math.PI; + + property real zrot: -root.inputX * Math.PI * 2 + + property real time: 0 + NumberAnimation on time { + id: timeAnimation + from: 0; + to: Math.PI * 2; + duration: 3457; + loops: Animation.Infinite + running: true; + } + + vertexShader: " + attribute highp vec4 qt_Vertex; + attribute highp vec2 qt_MultiTexCoord0; + uniform highp mat4 qt_Matrix; + uniform highp float xrot; + uniform highp float zrot; + uniform highp vec2 size; + uniform highp float time; + uniform highp float amp; + varying lowp vec2 v_TexCoord; + varying lowp float v_light; + void main() { + highp float xcosa = cos(xrot); + highp float xsina = sin(xrot); + + highp mat4 xrot = mat4(1, 0, 0, 0, + 0, xcosa, xsina, 0, + 0, -xsina, xcosa, 0, + 0, 0, 0, 1); + + highp float zcosa = cos(zrot); + highp float zsina = sin(zrot); + + highp mat4 zrot = mat4(zcosa, zsina, 0, 0, + -zsina, zcosa, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + highp float near = 2.; + highp float far = 6.; + highp float fmn = far - near; + + highp mat4 proj = mat4(near, 0, 0, 0, + 0, near, 0, 0, + 0, 0, -(far + near) / fmn, -1., + 0, 0, -2. * far * near / fmn, 1); + + highp mat4 model = mat4(2, 0, 0, 0, + 0, 2, 0, 0, + 0, 0, 2, 0, + 0, -.5, -4, 1); + + vec4 nLocPos = vec4(qt_Vertex.xy * 2.0 / size - 1.0, 0, 1); + nLocPos.z = cos(nLocPos.x * 5. + time) * amp; + + vec4 pos = proj * model * xrot * zrot * nLocPos; + pos = vec4(pos.xyx/pos.w, 1); + + gl_Position = qt_Matrix * vec4((pos.xy + 1.0) / 2.0 * size , 0, 1); + + v_TexCoord = qt_MultiTexCoord0; + + + v_light = dot(normalize(vec3(-sin(nLocPos.x * 5.0 + time) * 5.0 * amp, 0, -1)), vec3(0, 0, -1)); + } + " + + fragmentShader: " + uniform lowp sampler2D source; + uniform lowp float qt_Opacity; + varying highp vec2 v_TexCoord; + varying lowp float v_light; + void main() { + highp vec4 c = texture2D(source, v_TexCoord); + gl_FragColor = (vec4(pow(v_light, 16.0)) * 0.3 + c) * qt_Opacity; + } + " + + } + +} + + diff --git a/basicsuite/graphicaleffects/effect_Displacement.qml b/basicsuite/graphicaleffects/effect_Displacement.qml new file mode 100644 index 0000000..3c7b6d0 --- /dev/null +++ b/basicsuite/graphicaleffects/effect_Displacement.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + + id: root + + property real inputX: 0.1; + + property real feedbackX: effect.displacement + + property string nameX: "Displacement" + + Image { + id: image + source: "images/bug.jpg" + anchors.centerIn: parent + visible: false + } + + Image { + id: displacementMap + source: "images/glass_normal.png" + smooth: true + visible: false + } + + Displace { + id: effect; + + source: image + displacementSource: displacementMap + anchors.fill: source + + scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; + + displacement: inputX + } + +} diff --git a/basicsuite/graphicaleffects/effect_DropShadow.qml b/basicsuite/graphicaleffects/effect_DropShadow.qml new file mode 100644 index 0000000..0dd3c48 --- /dev/null +++ b/basicsuite/graphicaleffects/effect_DropShadow.qml @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + + id: root + + property real inputX: 0.5; + property real inputY: 0.2; + + property real feedbackX: effect.radius + property real feedbackY: effect.spread + + property string nameX: "Radius" + property string nameY: "Spread" + + Image { + id: image + source: "images/butterfly.png" + anchors.centerIn: parent + visible: false + } + + DropShadow { + id: effect; + + source: image + anchors.fill: source + + scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; + + samples: 4 + + radius: root.inputX * 7 + spread: root.inputY; + + color: Qt.rgba(0, 0, 0, 0.4); + + verticalOffset: 30.5 + horizontalOffset: 30.5 + } + +} diff --git a/basicsuite/graphicaleffects/effect_GaussianBlur.qml b/basicsuite/graphicaleffects/effect_GaussianBlur.qml new file mode 100644 index 0000000..7acfa3b --- /dev/null +++ b/basicsuite/graphicaleffects/effect_GaussianBlur.qml @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + + id: root + + property real inputX: 0.5; + property real inputY: 1 + + property real feedbackX: effect.radius + property real feedbackY: effect.deviation + + property string nameX: "Radius" + property string nameY: "Deviation" + + Image { + id: image + source: "images/bug.jpg" + width: Math.min(root.width, root.height) * 0.8; + height: width + sourceSize: Qt.size(width, height); + anchors.centerIn: parent + } + + GaussianBlur { + id: effect; + + source: image + anchors.fill: source + + scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; + samples: 4 + + deviation: root.inputY * 20; + radius: root.inputX * 7 + } + +} diff --git a/basicsuite/graphicaleffects/effect_Glow.qml b/basicsuite/graphicaleffects/effect_Glow.qml new file mode 100644 index 0000000..728f8cc --- /dev/null +++ b/basicsuite/graphicaleffects/effect_Glow.qml @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + + id: root + + property real inputX: 0.5; + property real inputY: 0.2; + + property real feedbackX: effect.radius + property real feedbackY: effect.spread + + property string nameX: "Radius" + property string nameY: "Spread" + + Image { + id: image + source: "images/butterfly.png" + anchors.centerIn: parent + visible: false + } + + Glow { + id: effect; + + source: image + anchors.fill: source + + scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; + + samples: 4 + + radius: root.inputX * 7 + spread: root.inputY; + + color: Qt.rgba(1, 0, 1, 1); + } +} diff --git a/basicsuite/graphicaleffects/effect_HueSaturation.qml b/basicsuite/graphicaleffects/effect_HueSaturation.qml new file mode 100644 index 0000000..e6ba039 --- /dev/null +++ b/basicsuite/graphicaleffects/effect_HueSaturation.qml @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + id: root + + property real inputX: 0.6; + property real feedbackX: effect.hue + property string nameX: "Hue" + + property real inputY: 0.2 + property real feedbackY: effect.saturation + property string nameY: "Saturation" + + Image { + id: image + source: "images/bug.jpg" + width: Math.min(root.width, root.height) * 0.8; + height: width + sourceSize: Qt.size(width, height); + anchors.centerIn: parent + } + + HueSaturation { + id: effect; + + source: image + anchors.fill: source + scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; + + hue: root.inputX * 2 - 1; + saturation: root.inputY * 2 - 1 + } +} diff --git a/basicsuite/graphicaleffects/effect_OpacityMask.qml b/basicsuite/graphicaleffects/effect_OpacityMask.qml new file mode 100644 index 0000000..47df139 --- /dev/null +++ b/basicsuite/graphicaleffects/effect_OpacityMask.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + + id: root + + Image { + id: image + source: "images/bug.jpg" + anchors.centerIn: parent + visible: false + } + + Image { + id: mask + source: "images/butterfly.png" + visible: false + } + + OpacityMask { + id: effect; + + source: image + maskSource: mask + anchors.fill: source + + scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; + } +} diff --git a/basicsuite/graphicaleffects/effect_ThresholdMask.qml b/basicsuite/graphicaleffects/effect_ThresholdMask.qml new file mode 100644 index 0000000..18cb07b --- /dev/null +++ b/basicsuite/graphicaleffects/effect_ThresholdMask.qml @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + + id: root + + property real inputX: 0.5; + property real inputY: 0.2; + + property real feedbackX: effect.threshold + property real feedbackY: effect.spread + + property string nameX: "Threshold" + property string nameY: "Spread" + + Image { + id: image + source: "images/bug.jpg" + anchors.centerIn: parent + visible: false + } + + Image { + id: mask + source: "images/fog.png" + visible: false + } + + ThresholdMask { + id: effect; + + source: image + maskSource: mask; + anchors.fill: source + + scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1; + + threshold: root.inputX + spread: root.inputY + } + +} diff --git a/basicsuite/graphicaleffects/graphicaleffects.pro b/basicsuite/graphicaleffects/graphicaleffects.pro new file mode 100644 index 0000000..8f9c8cf --- /dev/null +++ b/basicsuite/graphicaleffects/graphicaleffects.pro @@ -0,0 +1,12 @@ +TARGET = graphicaleffects + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + images +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/graphicaleffects/images/bug.jpg b/basicsuite/graphicaleffects/images/bug.jpg new file mode 100755 index 0000000..43e3676 Binary files /dev/null and b/basicsuite/graphicaleffects/images/bug.jpg differ diff --git a/basicsuite/graphicaleffects/images/butterfly.png b/basicsuite/graphicaleffects/images/butterfly.png new file mode 100644 index 0000000..ce544f2 Binary files /dev/null and b/basicsuite/graphicaleffects/images/butterfly.png differ diff --git a/basicsuite/graphicaleffects/images/fog.png b/basicsuite/graphicaleffects/images/fog.png new file mode 100644 index 0000000..f462222 Binary files /dev/null and b/basicsuite/graphicaleffects/images/fog.png differ diff --git a/basicsuite/graphicaleffects/images/glass_normal.png b/basicsuite/graphicaleffects/images/glass_normal.png new file mode 100755 index 0000000..ba360ef Binary files /dev/null and b/basicsuite/graphicaleffects/images/glass_normal.png differ diff --git a/basicsuite/graphicaleffects/main.qml b/basicsuite/graphicaleffects/main.qml new file mode 100644 index 0000000..66c97ff --- /dev/null +++ b/basicsuite/graphicaleffects/main.qml @@ -0,0 +1,231 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Item { + id: root + + width: 1280 + height: 720 + + Checkers { + id: checkers; + anchors.fill: parent + anchors.leftMargin: list.width + tileSize: 32 + } + + Loader { + id: loader + anchors.fill: checkers; + } + + Rectangle { + id: listBackground + anchors.left: parent.left + anchors.right: checkers.left + anchors.top: parent.top + anchors.bottom: parent.bottom + color: "black" + } + + ListModel { + id: listModel + ListElement { name: "Brignthness / Contrast"; file: "effect_BrightnessContrast.qml" } + ListElement { name: "Colorize"; file: "effect_Colorize.qml" } + ListElement { name: "Displacement"; file: "effect_Displacement.qml" } + ListElement { name: "Drop Shadow"; file: "effect_DropShadow.qml" } + ListElement { name: "Gaussian Blur"; file: "effect_GaussianBlur.qml" } + ListElement { name: "Glow"; file: "effect_Glow.qml" } + ListElement { name: "Hue / Saturation"; file: "effect_HueSaturation.qml" } + ListElement { name: "Opacity Mask"; file: "effect_OpacityMask.qml" } + ListElement { name: "Threshold Mask"; file: "effect_ThresholdMask.qml" } + ListElement { name: "Wave (custom)"; file: "effect_CustomWave.qml" } + ListElement { name: "Dissolve (custom)"; file: "effect_CustomDissolve.qml" } + } + + ListView + { + id: list + anchors.top: parent.top + anchors.left: parent.left + width: parent.width / 4 + height: parent.height - width + + clip: true + focus: true + + highlightMoveDuration: 0 + + onCurrentItemChanged: { + var entry = listModel.get(currentIndex); + loader.source = entry.file; + } + + model: listModel + + highlight: Rectangle { + color: "steelblue" + } + + delegate: Item { + id: delegateRoot + + width: list.width + height: root.height * 0.05 + + Rectangle { + width: parent.width + height: 3 + anchors.bottom: parent.bottom + gradient: Gradient { + GradientStop { position: 0; color: "transparent" } + GradientStop { position: 0.5; color: "lightgray" } + GradientStop { position: 1; color: "transparent" } + } + } + + Text { + color: "white" + font.pixelSize: parent.height * 0.5 + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: -2 + x: parent.width * 0.1 + text: name + } + + MouseArea { + anchors.fill: parent + onClicked: list.currentIndex = index; + } + } + } + + Canvas { + id: canvas + anchors.fill: controller + anchors.margins: 10 + + property real padding: 20 + + onPaint: { + var ctx = canvas.getContext("2d"); + + var w = canvas.width + var h = canvas.height; + + + ctx.fillStyle = "rgb(50, 50, 50)" + ctx.beginPath(); + ctx.roundedRect(0, 0, w, h, w * 0.1, w * 0.1); + ctx.fill(); + + var margin = canvas.padding; + var segmentSize = 4 + ctx.strokeStyle = "gray" + ctx.beginPath(); + ctx.moveTo(margin, margin); + ctx.lineTo(margin, h-margin); + ctx.moveTo(margin, h - margin); + ctx.lineTo(w-margin, h - margin); + + var segmentCount = 11 + for (var i = 0; i mediaPlayer.duration) + newPosition = mediaPlayer.duration; + return newPosition; + } + + states: [ + State { + name: "HIDDEN" + PropertyChanges { + target: controlBar + opacity: 0.0 + } + }, + State { + name: "VISIBLE" + PropertyChanges { + target: controlBar + opacity: 0.95 + } + } + ] + + transitions: [ + Transition { + from: "HIDDEN" + to: "VISIBLE" + NumberAnimation { + id: showAnimation + target: controlBar + properties: "opacity" + from: 0.0 + to: 1.0 + duration: 200 + } + }, + Transition { + from: "VISIBLE" + to: "HIDDEN" + NumberAnimation { + id: hideAnimation + target: controlBar + properties: "opacity" + from: 0.95 + to: 0.0 + duration: 200 + } + } + ] +} diff --git a/basicsuite/mediaplayer/EffectSelectionPanel.qml b/basicsuite/mediaplayer/EffectSelectionPanel.qml new file mode 100755 index 0000000..4f7e161 --- /dev/null +++ b/basicsuite/mediaplayer/EffectSelectionPanel.qml @@ -0,0 +1,162 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Rectangle { + id: root + color: "#BB333333" + height: 78 + property int itemHeight: 25 + property string effectSource: "" + property bool isMouseAbove: mouseAboveMonitor.containsMouse + + Keys.onEscapePressed: visible = false + + signal clicked + QtObject { + id: d + property Item selectedItem + } + + ListModel { + id: sources + ListElement { name: "No effect"; source: "Effects/EffectPassThrough.qml" } + ListElement { name: "Billboard"; source: "Effects/EffectBillboard.qml" } + ListElement { name: "Black & white"; source: "Effects/EffectBlackAndWhite.qml" } + ListElement { name: "Blur"; source: "Effects/EffectGaussianBlur.qml" } + ListElement { name: "Edge detection"; source: "Effects/EffectSobelEdgeDetection1.qml" } + ListElement { name: "Emboss"; source: "Effects/EffectEmboss.qml" } + ListElement { name: "Glow"; source: "Effects/EffectGlow.qml" } + ListElement { name: "Isolate"; source: "Effects/EffectIsolate.qml" } + //ListElement { name: "Magnify"; source: "Effects/EffectMagnify.qml" } +// ListElement { name: "Page curl"; source: "Effects/EffectPageCurl.qml" } + ListElement { name: "Pixelate"; source: "Effects/EffectPixelate.qml" } + ListElement { name: "Posterize"; source: "Effects/EffectPosterize.qml" } +// ListElement { name: "Ripple"; source: "Effects/EffectRipple.qml" } + ListElement { name: "Sepia"; source: "Effects/EffectSepia.qml" } + ListElement { name: "Sharpen"; source: "Effects/EffectSharpen.qml" } + ListElement { name: "Shockwave"; source: "Effects/EffectShockwave.qml" } +// ListElement { name: "Tilt shift"; source: "Effects/EffectTiltShift.qml" } + ListElement { name: "Toon"; source: "Effects/EffectToon.qml" } + ListElement { name: "Warhol"; source: "Effects/EffectWarhol.qml" } + ListElement { name: "Wobble"; source: "Effects/EffectWobble.qml" } + ListElement { name: "Vignette"; source: "Effects/EffectVignette.qml" } + } + + Component { + id: sourceDelegate + Item { + id: sourceDelegateItem + width: root.width + height: itemHeight + + Text { + id: sourceSelectorItem + anchors.centerIn: parent + width: 0.9 * parent.width + height: 0.8 * itemHeight + text: name + color: "white" + } + + states: [ + State { + name: "selected" + PropertyChanges { + target: sourceSelectorItem + bgColor: "#ff8888" + } + } + ] + + transitions: [ + Transition { + from: "*" + to: "*" + ColorAnimation { + properties: "color" + easing.type: Easing.OutQuart + duration: 500 + } + } + ] + } + } + + MouseArea { + id: mouseAboveMonitor + anchors.fill: parent + hoverEnabled: true + } + + ListView { + id: list + anchors.fill: parent + clip: true + anchors.margins: 14 + model: sources + focus: root.visible && root.opacity && urlBar.opacity === 0 + + currentIndex: 0 + + onCurrentIndexChanged : { + effectSource = model.get(currentIndex).source + root.clicked() + applicationWindow.resetTimer() + } + + delegate: Item { + height: 40 + width: parent.width + Rectangle { + anchors.fill: parent + border.color: index == list.currentIndex ? "#44ffffff" : "transparent" + color: index == list.currentIndex ? "#22ffffff" : "transparent" + radius: 3 + Text { color: "white" ; text: name ; anchors.centerIn: parent; font.pixelSize: 20 } + MouseArea { + anchors.fill: parent + onClicked: list.currentIndex = index + } + } + } + } +} diff --git a/basicsuite/mediaplayer/Effects/Effect.qml b/basicsuite/mediaplayer/Effects/Effect.qml new file mode 100755 index 0000000..99308fd --- /dev/null +++ b/basicsuite/mediaplayer/Effects/Effect.qml @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +ShaderEffect { + property variant source + property ListModel parameters: ListModel { } + property bool divider: false + property real dividerValue: 1.0 + property real targetWidth: 0 + property real targetHeight: 0 + property string fragmentShaderSrc + property string vertexShaderSrc + + QtObject { + id: d + property string fragmentShaderCommon: " + #ifdef GL_ES + precision mediump float; + #else + # define lowp + # define mediump + # define highp + #endif // GL_ES + " + } + + // The following is a workaround for the fact that ShaderEffect + // doesn't provide a way for shader programs to be read from a file, + // rather than being inline in the QML file + + onFragmentShaderSrcChanged: + fragmentShader = d.fragmentShaderCommon + fragmentShaderSrc + onVertexShaderSrcChanged: + vertexShader = vertexShaderSrc +} diff --git a/basicsuite/mediaplayer/Effects/EffectBillboard.qml b/basicsuite/mediaplayer/Effects/EffectBillboard.qml new file mode 100755 index 0000000..947209e --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectBillboard.qml @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "grid spacing" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real grid: parameters.get(0).value * 10 + + property real step_x: 0.0015625 + property real step_y: targetHeight ? (step_x * targetWidth / targetHeight) : 0.0 + + fragmentShaderSrc: "uniform float grid; + uniform float dividerValue; + uniform float step_x; + uniform float step_y; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + float offx = floor(uv.x / (grid * step_x)); + float offy = floor(uv.y / (grid * step_y)); + vec3 res = texture2D(source, vec2(offx * grid * step_x , offy * grid * step_y)).rgb; + vec2 prc = fract(uv / vec2(grid * step_x, grid * step_y)); + vec2 pw = pow(abs(prc - 0.5), vec2(2.0)); + float rs = pow(0.45, 2.0); + float gr = smoothstep(rs - 0.1, rs + 0.1, pw.x + pw.y); + float y = (res.r + res.g + res.b) / 3.0; + vec3 ra = res / y; + float ls = 0.3; + float lb = ceil(y / ls); + float lf = ls * lb + 0.3; + res = lf * res; + vec3 col = mix(res, vec3(0.1, 0.1, 0.1), gr); + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(col, 1.0); + else + gl_FragColor = qt_Opacity * texture2D(source, uv); + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectBlackAndWhite.qml b/basicsuite/mediaplayer/Effects/EffectBlackAndWhite.qml new file mode 100755 index 0000000..8cbba60 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectBlackAndWhite.qml @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "threshold" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real threshold: parameters.get(0).value + + fragmentShaderSrc: "uniform float threshold; + uniform float dividerValue; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec4 orig = texture2D(source, uv); + vec3 col = orig.rgb; + float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b; + y = y < threshold ? 0.0 : 1.0; + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(y, y, y, 1.0); + else + gl_FragColor = qt_Opacity * orig; + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectEmboss.qml b/basicsuite/mediaplayer/Effects/EffectEmboss.qml new file mode 100755 index 0000000..23ef1cb --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectEmboss.qml @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + fragmentShaderSrc: "uniform float dividerValue; + const float step_w = 0.0015625; + const float step_h = 0.0027778; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; + vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; + vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; + vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; + vec3 t5 = texture2D(source, uv).rgb; + vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; + vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; + vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; + vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; + vec3 rr = -4.0 * t1 - 4.0 * t2 - 4.0 * t4 + 12.0 * t5; + float y = (rr.r + rr.g + rr.b) / 3.0; + vec3 col = vec3(y, y, y) + 0.3; + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(col, 1.0); + else + gl_FragColor = qt_Opacity * texture2D(source, uv); + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectGaussianBlur.qml b/basicsuite/mediaplayer/Effects/EffectGaussianBlur.qml new file mode 100755 index 0000000..f866524 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectGaussianBlur.qml @@ -0,0 +1,136 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://www.geeks3d.com/20100909/shader-library-gaussian-blur-post-processing-filter-in-glsl/ + +import QtQuick 2.0 + +Item { + id: root + property bool divider: true + property real dividerValue: 1 + property ListModel parameters: ListModel { + ListElement { + name: "radius" + value: 0.5 + } + } + + property alias targetWidth: verticalShader.targetWidth + property alias targetHeight: verticalShader.targetHeight + property alias source: verticalShader.source + + Effect { + id: verticalShader + anchors.fill: parent + dividerValue: parent.dividerValue + property real blurSize: 4.0 * parent.parameters.get(0).value / targetHeight + fragmentShaderSrc: "uniform float dividerValue; + uniform float blurSize; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec4 c = vec4(0.0); + if (uv.x < dividerValue) { + c += texture2D(source, uv - vec2(0.0, 4.0*blurSize)) * 0.05; + c += texture2D(source, uv - vec2(0.0, 3.0*blurSize)) * 0.09; + c += texture2D(source, uv - vec2(0.0, 2.0*blurSize)) * 0.12; + c += texture2D(source, uv - vec2(0.0, 1.0*blurSize)) * 0.15; + c += texture2D(source, uv) * 0.18; + c += texture2D(source, uv + vec2(0.0, 1.0*blurSize)) * 0.15; + c += texture2D(source, uv + vec2(0.0, 2.0*blurSize)) * 0.12; + c += texture2D(source, uv + vec2(0.0, 3.0*blurSize)) * 0.09; + c += texture2D(source, uv + vec2(0.0, 4.0*blurSize)) * 0.05; + } else { + c = texture2D(source, qt_TexCoord0); + } + // First pass we don't apply opacity + gl_FragColor = c; + }" + } + + Effect { + id: horizontalShader + anchors.fill: parent + dividerValue: parent.dividerValue + property real blurSize: 4.0 * parent.parameters.get(0).value / parent.targetWidth + fragmentShaderSrc: "uniform float dividerValue; + uniform float blurSize; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec4 c = vec4(0.0); + if (uv.x < dividerValue) { + c += texture2D(source, uv - vec2(4.0*blurSize, 0.0)) * 0.05; + c += texture2D(source, uv - vec2(3.0*blurSize, 0.0)) * 0.09; + c += texture2D(source, uv - vec2(2.0*blurSize, 0.0)) * 0.12; + c += texture2D(source, uv - vec2(1.0*blurSize, 0.0)) * 0.15; + c += texture2D(source, uv) * 0.18; + c += texture2D(source, uv + vec2(1.0*blurSize, 0.0)) * 0.15; + c += texture2D(source, uv + vec2(2.0*blurSize, 0.0)) * 0.12; + c += texture2D(source, uv + vec2(3.0*blurSize, 0.0)) * 0.09; + c += texture2D(source, uv + vec2(4.0*blurSize, 0.0)) * 0.05; + } else { + c = texture2D(source, qt_TexCoord0); + } + gl_FragColor = qt_Opacity * c; + }" + source: horizontalShaderSource + + ShaderEffectSource { + id: horizontalShaderSource + sourceItem: verticalShader + smooth: true + hideSource: true + } + } +} + diff --git a/basicsuite/mediaplayer/Effects/EffectGlow.qml b/basicsuite/mediaplayer/Effects/EffectGlow.qml new file mode 100755 index 0000000..2cfee3b --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectGlow.qml @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + fragmentShaderSrc: "uniform float dividerValue; + const float step_w = 0.0015625; + const float step_h = 0.0027778; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; + vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; + vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; + vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; + vec3 t5 = texture2D(source, uv).rgb; + vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; + vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; + vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; + vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; + vec3 xx = t1 + 2.0*t2 + t3 - t7 - 2.0*t8 - t9; + vec3 yy = t1 - t3 + 2.0*t4 - 2.0*t6 + t7 - t9; + vec3 rr = sqrt(xx * xx + yy * yy); + vec3 col = rr * 2.0 * t5; + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(col, 1.0); + else + gl_FragColor = qt_Opacity * texture2D(source, uv); + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectIsolate.qml b/basicsuite/mediaplayer/Effects/EffectIsolate.qml new file mode 100755 index 0000000..4c569a5 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectIsolate.qml @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "hue" + value: 0.5 + } + ListElement { + name: "width" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real targetHue: parameters.get(0).value * 360 + property real windowWidth: parameters.get(1).value * 60 + + fragmentShaderSrc: "uniform float targetHue; + uniform float windowWidth; + uniform float dividerValue; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void rgb2hsl(vec3 rgb, out float h, out float s, float l) + { + float maxval = max(rgb.r, max(rgb.g, rgb.b)); + float minval = min(rgb.r, min(rgb.g, rgb.b)); + float delta = maxval - minval; + l = (minval + maxval) / 2.0; + s = 0.0; + if (l > 0.0 && l < 1.0) + s = delta / (l < 0.5 ? 2.0 * l : 2.0 - 2.0 * l); + h = 0.0; + if (delta > 0.0) + { + if (rgb.r == maxval && rgb.g != maxval) + h += (rgb.g - rgb.b ) / delta; + if (rgb.g == maxval && rgb.b != maxval) + h += 2.0 + (rgb.b - rgb.r) / delta; + if (rgb.b == maxval && rgb.r != maxval) + h += 4.0 + (rgb.r - rgb.g) / delta; + h *= 60.0; + } + } + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec3 col = texture2D(source, uv).rgb; + float h, s, l; + rgb2hsl(col, h, s, l); + float h2 = (h > targetHue) ? h - 360.0 : h + 360.0; + float y = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b; + vec3 result; + if (uv.x > dividerValue || (abs(h - targetHue) < windowWidth) || (abs(h2 - targetHue) < windowWidth)) + result = col; + else + result = vec3(y, y, y); + gl_FragColor = qt_Opacity * vec4(result, 1.0); + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectMagnify.qml b/basicsuite/mediaplayer/Effects/EffectMagnify.qml new file mode 100755 index 0000000..01f33a5 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectMagnify.qml @@ -0,0 +1,117 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + id: root + divider: false + parameters: ListModel { + ListElement { + name: "radius" + value: 0.5 + } + ListElement { + name: "diffraction" + value: 0.5 + } + } + + property real posX: -1 + property real posY: -1 + + QtObject { + id: d + property real oldTargetWidth: root.targetWidth + property real oldTargetHeight: root.targetHeight + } + + // Transform slider values, and bind result to shader uniforms + property real radius: parameters.get(0).value * 100 + property real diffractionIndex: parameters.get(1).value + + onTargetWidthChanged: { + if (posX == -1) + posX = targetWidth / 2 + else if (d.oldTargetWidth != 0) + posX *= (targetWidth / d.oldTargetWidth) + d.oldTargetWidth = targetWidth + } + + onTargetHeightChanged: { + if (posY == -1) + posY = targetHeight / 2 + else if (d.oldTargetHeight != 0) + posY *= (targetHeight / d.oldTargetHeight) + d.oldTargetHeight = targetHeight + } + + fragmentShaderSrc: "uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + uniform float radius; + uniform float diffractionIndex; + uniform float targetWidth; + uniform float targetHeight; + uniform float posX; + uniform float posY; + + void main() + { + vec2 tc = qt_TexCoord0; + vec2 center = vec2(posX, posY); + vec2 xy = gl_FragCoord.xy - center.xy; + float r = sqrt(xy.x * xy.x + xy.y * xy.y); + if (r < radius) { + float h = diffractionIndex * 0.5 * radius; + vec2 new_xy = r < radius ? xy * (radius - h) / sqrt(radius * radius - r * r) : xy; + vec2 targetSize = vec2(targetWidth, targetHeight); + tc = (new_xy + center) / targetSize; + tc.y = 1.0 - tc.y; + } + gl_FragColor = qt_Opacity * texture2D(source, tc); + }" + + MouseArea { + anchors.fill: parent + onPositionChanged: { root.posX = mouse.x; root.posY = root.targetHeight - mouse.y } + } +} diff --git a/basicsuite/mediaplayer/Effects/EffectPageCurl.qml b/basicsuite/mediaplayer/Effects/EffectPageCurl.qml new file mode 100755 index 0000000..39947d9 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectPageCurl.qml @@ -0,0 +1,196 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + divider: false + parameters: ListModel { + ListElement { + name: "extent" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real curlExtent: 1.0 - parameters.get(0).value + + fragmentShaderSrc: "uniform float dividerValue; + uniform float curlExtent; + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + const float minAmount = -0.16; + const float maxAmount = 1.3; + const float PI = 3.141592653589793; + const float scale = 512.0; + const float sharpness = 3.0; + const vec4 bgColor = vec4(1.0, 1.0, 0.8, 1.0); + + float amount = curlExtent * (maxAmount - minAmount) + minAmount; + float cylinderCenter = amount; + // 360 degrees * amount + float cylinderAngle = 2.0 * PI * amount; + const float cylinderRadius = 1.0 / PI / 2.0; + + vec3 hitPoint(float hitAngle, float yc, vec3 point, mat3 rrotation) + { + float hitPoint = hitAngle / (2.0 * PI); + point.y = hitPoint; + return rrotation * point; + } + + vec4 antiAlias(vec4 color1, vec4 color2, float distance) + { + distance *= scale; + if (distance < 0.0) return color2; + if (distance > 2.0) return color1; + float dd = pow(1.0 - distance / 2.0, sharpness); + return ((color2 - color1) * dd) + color1; + } + + float distanceToEdge(vec3 point) + { + float dx = abs(point.x > 0.5 ? 1.0 - point.x : point.x); + float dy = abs(point.y > 0.5 ? 1.0 - point.y : point.y); + if (point.x < 0.0) dx = -point.x; + if (point.x > 1.0) dx = point.x - 1.0; + if (point.y < 0.0) dy = -point.y; + if (point.y > 1.0) dy = point.y - 1.0; + if ((point.x < 0.0 || point.x > 1.0) && (point.y < 0.0 || point.y > 1.0)) return sqrt(dx * dx + dy * dy); + return min(dx, dy); + } + + vec4 seeThrough(float yc, vec2 p, mat3 rotation, mat3 rrotation) + { + float hitAngle = PI - (acos(yc / cylinderRadius) - cylinderAngle); + vec3 point = hitPoint(hitAngle, yc, rotation * vec3(p, 1.0), rrotation); + if (yc <= 0.0 && (point.x < 0.0 || point.y < 0.0 || point.x > 1.0 || point.y > 1.0)) + return bgColor; + if (yc > 0.0) + return texture2D(source, p); + vec4 color = texture2D(source, point.xy); + vec4 tcolor = vec4(0.0); + return antiAlias(color, tcolor, distanceToEdge(point)); + } + + vec4 seeThroughWithShadow(float yc, vec2 p, vec3 point, mat3 rotation, mat3 rrotation) + { + float shadow = distanceToEdge(point) * 30.0; + shadow = (1.0 - shadow) / 3.0; + if (shadow < 0.0) + shadow = 0.0; + else + shadow *= amount; + vec4 shadowColor = seeThrough(yc, p, rotation, rrotation); + shadowColor.r -= shadow; + shadowColor.g -= shadow; + shadowColor.b -= shadow; + return shadowColor; + } + + vec4 backside(float yc, vec3 point) + { + vec4 color = texture2D(source, point.xy); + float gray = (color.r + color.b + color.g) / 15.0; + gray += (8.0 / 10.0) * (pow(1.0 - abs(yc / cylinderRadius), 2.0 / 10.0) / 2.0 + (5.0 / 10.0)); + color.rgb = vec3(gray); + return color; + } + + void main(void) + { + const float angle = 30.0 * PI / 180.0; + float c = cos(-angle); + float s = sin(-angle); + mat3 rotation = mat3( + c, s, 0, + -s, c, 0, + 0.12, 0.258, 1 + ); + c = cos(angle); + s = sin(angle); + mat3 rrotation = mat3( + c, s, 0, + -s, c, 0, + 0.15, -0.5, 1 + ); + vec3 point = rotation * vec3(qt_TexCoord0, 1.0); + float yc = point.y - cylinderCenter; + vec4 color = vec4(1.0, 0.0, 0.0, 1.0); + if (yc < -cylinderRadius) { + // See through to background + color = bgColor; + } else if (yc > cylinderRadius) { + // Flat surface + color = texture2D(source, qt_TexCoord0); + } else { + float hitAngle = (acos(yc / cylinderRadius) + cylinderAngle) - PI; + float hitAngleMod = mod(hitAngle, 2.0 * PI); + if ((hitAngleMod > PI && amount < 0.5) || (hitAngleMod > PI/2.0 && amount < 0.0)) { + color = seeThrough(yc, qt_TexCoord0, rotation, rrotation); + } else { + point = hitPoint(hitAngle, yc, point, rrotation); + if (point.x < 0.0 || point.y < 0.0 || point.x > 1.0 || point.y > 1.0) { + color = seeThroughWithShadow(yc, qt_TexCoord0, point, rotation, rrotation); + } else { + color = backside(yc, point); + vec4 otherColor; + if (yc < 0.0) { + float shado = 1.0 - (sqrt(pow(point.x - 0.5, 2.0) + pow(point.y - 0.5, 2.0)) / 0.71); + shado *= pow(-yc / cylinderRadius, 3.0); + shado *= 0.5; + otherColor = vec4(0.0, 0.0, 0.0, shado); + } else { + otherColor = texture2D(source, qt_TexCoord0); + } + color = antiAlias(color, otherColor, cylinderRadius - abs(yc)); + + // This second antialiasing step causes the shader to fail to render, on + // Symbian devices (tested so far using IVE3.5). Running out of scratch + // memory? + } + } + } + gl_FragColor = qt_Opacity * color; + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectPassThrough.qml b/basicsuite/mediaplayer/Effects/EffectPassThrough.qml new file mode 100755 index 0000000..1f259be --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectPassThrough.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + divider: false +} diff --git a/basicsuite/mediaplayer/Effects/EffectPixelate.qml b/basicsuite/mediaplayer/Effects/EffectPixelate.qml new file mode 100755 index 0000000..4bc73d3 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectPixelate.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "granularity" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real granularity: parameters.get(0).value * 20 + + fragmentShaderSrc: "uniform float dividerValue; + uniform float granularity; + uniform float targetWidth; + uniform float targetHeight; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec2 tc = qt_TexCoord0; + if (uv.x < dividerValue && granularity > 0.0) { + float dx = granularity / targetWidth; + float dy = granularity / targetHeight; + tc = vec2(dx*(floor(uv.x/dx) + 0.5), + dy*(floor(uv.y/dy) + 0.5)); + } + gl_FragColor = qt_Opacity * texture2D(source, tc); + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectPosterize.qml b/basicsuite/mediaplayer/Effects/EffectPosterize.qml new file mode 100755 index 0000000..4b661a5 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectPosterize.qml @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "gamma" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real gamma: parameters.get(0).value + + property real numColors: 8.0 + + fragmentShaderSrc: "uniform float dividerValue; + uniform float gamma; + uniform float numColors; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec4 c = vec4(0.0); + if (uv.x < dividerValue) { + vec3 x = texture2D(source, uv).rgb; + x = pow(x, vec3(gamma, gamma, gamma)); + x = x * numColors; + x = floor(x); + x = x / numColors; + x = pow(x, vec3(1.0/gamma)); + c = vec4(x, 1.0); + } else { + c = texture2D(source, uv); + } + gl_FragColor = qt_Opacity * c; + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectRipple.qml b/basicsuite/mediaplayer/Effects/EffectRipple.qml new file mode 100755 index 0000000..7a82f50 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectRipple.qml @@ -0,0 +1,98 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "amplitude" + value: 0.5 + } + ListElement { + name: "frequency" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real amplitude: parameters.get(0).value * 0.03 + property real n: parameters.get(1).value * 7 + + property real time: 0 + NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } + + fragmentShaderSrc: "uniform float dividerValue; + uniform float targetWidth; + uniform float targetHeight; + uniform float time; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + const float PI = 3.1415926535; + const int ITER = 7; + const float RATE = 0.1; + uniform float amplitude; + uniform float n; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec2 tc = uv; + vec2 p = vec2(-1.0 + 2.0 * gl_FragCoord.x / targetWidth, -(-1.0 + 2.0 * gl_FragCoord.y / targetHeight)); + float diffx = 0.0; + float diffy = 0.0; + vec4 col; + if (uv.x < dividerValue) { + for (int i=0; i= (time - shock.z))) { + float diff = (distance - time); + float powDiff = 1.0 - pow(abs(diff*shock.x), shock.y*weight); + float diffTime = diff * powDiff; + vec2 diffUV = normalize(uv - center); + tc += (diffUV * diffTime); + } + } + gl_FragColor = qt_Opacity * texture2D(source, tc); + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectSobelEdgeDetection1.qml b/basicsuite/mediaplayer/Effects/EffectSobelEdgeDetection1.qml new file mode 100755 index 0000000..56f4869 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectSobelEdgeDetection1.qml @@ -0,0 +1,98 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "threshold" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real mixLevel: parameters.get(0).value + property real targetSize: 250 - (200 * mixLevel) // TODO: fix ... + property real resS: targetSize + property real resT: targetSize + + fragmentShaderSrc: "uniform float dividerValue; + uniform float mixLevel; + uniform float resS; + uniform float resT; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec4 c = vec4(0.0); + if (uv.x < dividerValue) { + vec2 st = qt_TexCoord0.st; + vec3 irgb = texture2D(source, st).rgb; + vec2 stp0 = vec2(1.0 / resS, 0.0); + vec2 st0p = vec2(0.0 , 1.0 / resT); + vec2 stpp = vec2(1.0 / resS, 1.0 / resT); + vec2 stpm = vec2(1.0 / resS, -1.0 / resT); + const vec3 W = vec3(0.2125, 0.7154, 0.0721); + float i00 = dot(texture2D(source, st).rgb, W); + float im1m1 = dot(texture2D(source, st-stpp).rgb, W); + float ip1p1 = dot(texture2D(source, st+stpp).rgb, W); + float im1p1 = dot(texture2D(source, st-stpm).rgb, W); + float ip1m1 = dot(texture2D(source, st+stpm).rgb, W); + float im10 = dot(texture2D(source, st-stp0).rgb, W); + float ip10 = dot(texture2D(source, st+stp0).rgb, W); + float i0m1 = dot(texture2D(source, st-st0p).rgb, W); + float i0p1 = dot(texture2D(source, st+st0p).rgb, W); + float h = -1.0*im1p1 - 2.0*i0p1 - 1.0*ip1p1 + 1.0*im1m1 + 2.0*i0m1 + 1.0*ip1m1; + float v = -1.0*im1m1 - 2.0*im10 - 1.0*im1p1 + 1.0*ip1m1 + 2.0*ip10 + 1.0*ip1p1; + float mag = 1.0 - length(vec2(h, v)); + vec3 target = vec3(mag, mag, mag); + c = vec4(target, 1.0); + } else { + c = texture2D(source, qt_TexCoord0); + } + gl_FragColor = qt_Opacity * c; + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectSobelEdgeDetection2.qml b/basicsuite/mediaplayer/Effects/EffectSobelEdgeDetection2.qml new file mode 100755 index 0000000..938912d --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectSobelEdgeDetection2.qml @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "threshold" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real weight: parameters.get(0).value + + fragmentShaderSrc: "#version 130 + uniform sampler2D source; + uniform float dividerValue; + uniform float weight; + mat3 G[2] = mat3[]( + mat3( 1.0, 2.0, 1.0, 0.0, 0.0, 0.0, -1.0, -2.0, -1.0 ), + mat3( 1.0, 0.0, -1.0, 2.0, 0.0, -2.0, 1.0, 0.0, -1.0 ) + ); + uniform lowp float qt_Opacity; + in vec2 qt_TexCoord0; + out vec4 FragmentColor; + void main() { + vec2 uv = qt_TexCoord0.xy; + vec4 c = vec4(0.0); + if (uv.x < dividerValue) { + mat3 intensity; + float conv[2]; + vec3 sample; + for (int i=0; i<3; ++i) { + for (int j=0; j<3; ++j) { + sample = texelFetch(source, ivec2(gl_FragCoord) + ivec2(i-1, j-1), 0).rgb; + intensity[i][j] = length(sample) * weight; + } + } + for (int i=0; i<2; ++i) { + float dp3 = dot(G[i][0], intensity[0]) + dot(G[i][1], intensity[1]) + dot(G[i][2], intensity[2]); + conv[i] = dp3 * dp3; + } + c = vec4(0.5 * sqrt(conv[0]*conv[0] + conv[1]*conv[1])); + } else { + c = texture2D(source, qt_TexCoord0); + } + FragmentColor = qt_Opacity * c; + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectTiltShift.qml b/basicsuite/mediaplayer/Effects/EffectTiltShift.qml new file mode 100755 index 0000000..d0cf9c4 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectTiltShift.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + fragmentShaderSrc: "uniform float dividerValue; + const float step_w = 0.0015625; + const float step_h = 0.0027778; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + vec3 blur() + { + vec2 uv = qt_TexCoord0.xy; + float y = uv.y < 0.4 ? uv.y : 1.0 - uv.y; + float dist = 8.0 - 20.0 * y; + vec3 acc = vec3(0.0, 0.0, 0.0); + for (float y=-2.0; y<=2.0; ++y) { + for (float x=-2.0; x<=2.0; ++x) { + acc += texture2D(source, vec2(uv.x + dist * x * step_w, uv.y + 0.5 * dist * y * step_h)).rgb; + } + } + return acc / 25.0; + } + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec3 col; + if (uv.x > dividerValue || (uv.y >= 0.4 && uv.y <= 0.6)) + col = texture2D(source, uv).rgb; + else + col = blur(); + gl_FragColor = qt_Opacity * vec4(col, 1.0); + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectToon.qml b/basicsuite/mediaplayer/Effects/EffectToon.qml new file mode 100755 index 0000000..a17ad1c --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectToon.qml @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "threshold" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real threshold: parameters.get(0).value + property real targetSize: 250 - (200 * threshold) // TODO: fix ... + property real resS: targetSize + property real resT: targetSize + + // TODO + property real magTol: 0.3 + property real quantize: 8.0 + + fragmentShaderSrc: "uniform float dividerValue; + uniform float threshold; + uniform float resS; + uniform float resT; + uniform float magTol; + uniform float quantize; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec4 color = vec4(1.0, 0.0, 0.0, 1.1); + vec2 uv = qt_TexCoord0.xy; + if (uv.x < dividerValue) { + vec2 st = qt_TexCoord0.st; + vec3 rgb = texture2D(source, st).rgb; + vec2 stp0 = vec2(1.0/resS, 0.0); + vec2 st0p = vec2(0.0 , 1.0/resT); + vec2 stpp = vec2(1.0/resS, 1.0/resT); + vec2 stpm = vec2(1.0/resS, -1.0/resT); + float i00 = dot( texture2D(source, st).rgb, vec3(0.2125,0.7154,0.0721)); + float im1m1 = dot( texture2D(source, st-stpp).rgb, vec3(0.2125,0.7154,0.0721)); + float ip1p1 = dot( texture2D(source, st+stpp).rgb, vec3(0.2125,0.7154,0.0721)); + float im1p1 = dot( texture2D(source, st-stpm).rgb, vec3(0.2125,0.7154,0.0721)); + float ip1m1 = dot( texture2D(source, st+stpm).rgb, vec3(0.2125,0.7154,0.0721)); + float im10 = dot( texture2D(source, st-stp0).rgb, vec3(0.2125,0.7154,0.0721)); + float ip10 = dot( texture2D(source, st+stp0).rgb, vec3(0.2125,0.7154,0.0721)); + float i0m1 = dot( texture2D(source, st-st0p).rgb, vec3(0.2125,0.7154,0.0721)); + float i0p1 = dot( texture2D(source, st+st0p).rgb, vec3(0.2125,0.7154,0.0721)); + float h = -1.*im1p1 - 2.*i0p1 - 1.*ip1p1 + 1.*im1m1 + 2.*i0m1 + 1.*ip1m1; + float v = -1.*im1m1 - 2.*im10 - 1.*im1p1 + 1.*ip1m1 + 2.*ip10 + 1.*ip1p1; + float mag = sqrt(h*h + v*v); + if (mag > magTol) { + color = vec4(0.0, 0.0, 0.0, 1.0); + } + else { + rgb.rgb *= quantize; + rgb.rgb += vec3(0.5, 0.5, 0.5); + ivec3 irgb = ivec3(rgb.rgb); + rgb.rgb = vec3(irgb) / quantize; + color = vec4(rgb, 1.0); + } + } else { + color = texture2D(source, uv); + } + gl_FragColor = qt_Opacity * color; + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectVignette.qml b/basicsuite/mediaplayer/Effects/EffectVignette.qml new file mode 100755 index 0000000..5ec5090 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectVignette.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + fragmentShaderSrc: "uniform float dividerValue; + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec4 orig = texture2D(source, uv); + float cr = pow(0.1, 2.0); + float pt = pow(uv.x - 0.5, 2.0) + pow(uv.y - 0.5, 2.0); + float d = pt - cr; + float cf = 1.0; + if (d > 0.0) + cf = 1.0 - 2.0 * d; + vec3 col = cf * orig.rgb; + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(col, 1.0); + else + gl_FragColor = qt_Opacity * orig; + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectWarhol.qml b/basicsuite/mediaplayer/Effects/EffectWarhol.qml new file mode 100755 index 0000000..1e40b30 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectWarhol.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + fragmentShaderSrc: "uniform float dividerValue; + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec4 orig = texture2D(source, uv); + vec3 col = orig.rgb; + float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b; + y = y < 0.3 ? 0.0 : (y < 0.6 ? 0.5 : 1.0); + if (y == 0.5) + col = vec3(0.8, 0.0, 0.0); + else if (y == 1.0) + col = vec3(0.9, 0.9, 0.0); + else + col = vec3(0.0, 0.0, 0.0); + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(col, 1.0); + else + gl_FragColor = qt_Opacity * orig; + }" +} diff --git a/basicsuite/mediaplayer/Effects/EffectWobble.qml b/basicsuite/mediaplayer/Effects/EffectWobble.qml new file mode 100755 index 0000000..4b07639 --- /dev/null +++ b/basicsuite/mediaplayer/Effects/EffectWobble.qml @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "amplitude" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real amplitude: parameters.get(0).value * 0.05 + + property real frequency: 20 + property real time: 0 + + NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } + + fragmentShaderSrc: "uniform float amplitude; + uniform float dividerValue; + uniform float frequency; + uniform float time; + + uniform sampler2D source; + uniform lowp float qt_Opacity; + varying vec2 qt_TexCoord0; + + void main() + { + vec2 uv = qt_TexCoord0.xy; + vec2 tc = qt_TexCoord0; + if (uv.x < dividerValue) { + vec2 p = sin(time + frequency * qt_TexCoord0); + tc += amplitude * vec2(p.y, -p.x); + } + gl_FragColor = qt_Opacity * texture2D(source, tc); + }" +} diff --git a/basicsuite/mediaplayer/FileBrowser.qml b/basicsuite/mediaplayer/FileBrowser.qml new file mode 100644 index 0000000..f9f2f81 --- /dev/null +++ b/basicsuite/mediaplayer/FileBrowser.qml @@ -0,0 +1,415 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import Qt.labs.folderlistmodel 2.0 + +Rectangle { + id: fileBrowser + color: "transparent" + + property string folder: "file:///data/videos" + + signal fileSelected(string file) + + function selectFile(file) { + if (file != "") + folder = loader.item.folders.folder + loader.sourceComponent = undefined + if (file != "") + fileBrowser.fileSelected("file://" + file) + } + + Loader { + id: loader + } + + function show() { + loader.sourceComponent = fileBrowserComponent + loader.item.parent = fileBrowser + loader.item.anchors.fill = fileBrowser + loader.item.folder = fileBrowser.folder + } + + Component { + id: fileBrowserComponent + + Rectangle { + id: root + gradient: Gradient { + GradientStop { position: 0; color: "#111111" } + GradientStop { position: 1; color: "#222222"} + } + property bool showFocusHighlight: false + property variant folders: folders1 + property variant view: view1 + property alias folder: folders1.folder + property color textColor: "white" + + FolderListModel { + id: folders1 + folder: folder + } + + FolderListModel { + id: folders2 + folder: folder + } + + SystemPalette { + id: palette + } + + Component { + id: folderDelegate + + Rectangle { + id: wrapper + function launch() { + if (folders.isFolder(index)) + down(filePath); + else + fileBrowser.selectFile(filePath) + } + width: root.width + height: 50 + color: "transparent" + + Rectangle { + id: highlight; visible: false + anchors.fill: parent + color: palette.highlight + gradient: Gradient { + GradientStop { id: t1; position: 0.0; color: palette.highlight } + GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } + } + } + + Item { + width: 40; height: 40 + y: 3 + x: 5 + Image { + source: "images/FileButton.png" + width: 34; height: 34 + anchors.centerIn: parent + visible: folders.isFolder(index) + } + } + + Text { + id: nameText + anchors.fill: parent; verticalAlignment: Text.AlignVCenter + text: fileName + anchors.leftMargin: 54 + font.pixelSize: 24 + color: (wrapper.ListView.isCurrentItem && root.showFocusHighlight) ? palette.highlightedText : textColor + elide: Text.ElideRight + } + + MouseArea { + id: mouseRegion + anchors.fill: parent + onPressed: { + root.showFocusHighlight = false; + wrapper.ListView.view.currentIndex = index; + } + onClicked: { if (folders == wrapper.ListView.view.model) launch() } + } + + states: [ + State { + name: "pressed" + when: mouseRegion.pressed + PropertyChanges { target: highlight; visible: true } + PropertyChanges { target: nameText; color: palette.highlightedText } + } + ] + } + } + + ListView { + id: view1 + anchors.top: titleBar.bottom + anchors.topMargin: 15 + anchors.bottom: parent.bottom + x: 0 + width: parent.width + model: folders1 + delegate: folderDelegate + highlight: Rectangle { + color: palette.highlight + visible: root.showFocusHighlight && view1.count != 0 + gradient: Gradient { + GradientStop { id: t1; position: 0.0; color: palette.highlight } + GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } + } + width: view1.currentItem == null ? 0 : view1.currentItem.width + } + highlightMoveVelocity: 1000 + pressDelay: 100 + focus: true + state: "current" + states: [ + State { + name: "current" + PropertyChanges { target: view1; x: 0 } + }, + State { + name: "exitLeft" + PropertyChanges { target: view1; x: -root.width } + }, + State { + name: "exitRight" + PropertyChanges { target: view1; x: root.width } + } + ] + transitions: [ + Transition { + to: "current" + SequentialAnimation { + NumberAnimation { properties: "x"; duration: 250 } + } + }, + Transition { + NumberAnimation { properties: "x"; duration: 250 } + NumberAnimation { properties: "x"; duration: 250 } + } + ] + Keys.onPressed: root.keyPressed(event.key) + } + + ListView { + id: view2 + anchors.top: titleBar.bottom + anchors.topMargin: 15 + anchors.bottom: parent.bottom + x: parent.width + width: parent.width + model: folders2 + delegate: folderDelegate + highlight: Rectangle { + color: palette.highlight + visible: root.showFocusHighlight && view2.count != 0 + gradient: Gradient { + GradientStop { id: t1; position: 0.0; color: palette.highlight } + GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } + } + width: view1.currentItem == null ? 0 : view1.currentItem.width + } + highlightMoveVelocity: 1000 + pressDelay: 100 + states: [ + State { + name: "current" + PropertyChanges { target: view2; x: 0 } + }, + State { + name: "exitLeft" + PropertyChanges { target: view2; x: -root.width } + }, + State { + name: "exitRight" + PropertyChanges { target: view2; x: root.width } + } + ] + transitions: [ + Transition { + to: "current" + SequentialAnimation { + NumberAnimation { properties: "x"; duration: 250 } + } + }, + Transition { + NumberAnimation { properties: "x"; duration: 250 } + } + ] + Keys.onPressed: root.keyPressed(event.key) + } + + Keys.onPressed: { + root.keyPressed(event.key); + if (event.key == Qt.Key_Return || event.key == Qt.Key_Select || event.key == Qt.Key_Right) { + view.currentItem.launch(); + event.accepted = true; + } else if (event.key == Qt.Key_Left) { + up(); + } + } + + Rectangle { + width: parent.width; + height: 70 + color: "#111111" + y: -7 + id: titleBar + + Rectangle { + id: upButton + width: 90 + height: titleBar.height - 7 + color: "transparent" + Image { anchors.centerIn: parent; source: "images/up.png"; width: 32; height: 32 } + MouseArea { id: upRegion; anchors.centerIn: parent + anchors.fill: parent + onClicked: if (folders.parentFolder != "") up() + } + states: [ + State { + name: "pressed" + when: upRegion.pressed + PropertyChanges { target: upButton; color: palette.highlight } + } + ] + } + +// Rectangle { +// color: "gray" +// x: 70 +// width: 1 +// height: 63 +// } + + Rectangle { + id: cancelButton + width: 100 + height: titleBar.height - 7 + color: "transparent" + anchors { left: upButton.right; leftMargin: 1; } + + Text { + anchors { fill: parent; topMargin: 3 } + text: "Cancel" + color: "white" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + font.pixelSize: 22 + } + + MouseArea { + id: cancelRegion + anchors.fill: parent + onClicked: fileBrowser.selectFile("") + } + + states: [ + State { + name: "pressed" + when: cancelRegion.pressed + PropertyChanges { target: cancelButton; color: palette.highlight } + } + ] + } + +// Rectangle { +// color: "gray" +// x: 171 +// width: 1 +// height: 63 +// } + + Text { + anchors.left: cancelButton.right; anchors.right: parent.right; height: parent.height + anchors.leftMargin: 4; anchors.rightMargin: 4 + text: String(folders.folder).replace("file://", "") + color: "white" + elide: Text.ElideLeft; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignVCenter + font.pixelSize: 28 + } + + Rectangle { + width: parent.width + anchors.bottom: parent.bottom + anchors.bottomMargin: 3 + height: 2 + color: palette.highlight + } + } + + function down(path) { + if (folders == folders1) { + view = view2 + folders = folders2; + view1.state = "exitLeft"; + } else { + view = view1 + folders = folders1; + view2.state = "exitLeft"; + } + view.x = root.width; + view.state = "current"; + view.focus = true; + folders.folder = "file://" + path; + } + + function up() { + var path = folders.parentFolder; + if (folders == folders1) { + view = view2 + folders = folders2; + view1.state = "exitRight"; + } else { + view = view1 + folders = folders1; + view2.state = "exitRight"; + } + view.x = -root.width; + view.state = "current"; + view.focus = true; + folders.folder = path; + } + + function keyPressed(key) { + switch (key) { + case Qt.Key_Up: + case Qt.Key_Down: + case Qt.Key_Left: + case Qt.Key_Right: + root.showFocusHighlight = true; + break; + default: + // do nothing + break; + } + } + } + } +} diff --git a/basicsuite/mediaplayer/ImageButton.qml b/basicsuite/mediaplayer/ImageButton.qml new file mode 100755 index 0000000..3644f37 --- /dev/null +++ b/basicsuite/mediaplayer/ImageButton.qml @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + + property alias enabled: mouseArea.enabled + property alias imageSource: image.source + + property bool checkable: false + property bool checked: false + property alias hover: mouseArea.containsMouse + property alias pressed: mouseArea.pressed + + opacity: enabled ? 1.0 : 0.3 + signal clicked + + width: image.width + height: image.height + + Image { + id: image + anchors.centerIn: parent + visible: true + opacity: pressed ? 0.6 : 1 + smooth: true + } + +// ColorOverlay { +// id: glowEffect +// anchors.fill: image +// source: image +// color: pressed ? "#22000000" : checked ? "orange" : "white" +// visible: checked || hover || pressed +// } + + MouseArea { + id: mouseArea + hoverEnabled: true + anchors.fill: root + onPositionChanged: applicationWindow.resetTimer() + onClicked: root.clicked(); + } +} diff --git a/basicsuite/mediaplayer/Intro.qml b/basicsuite/mediaplayer/Intro.qml new file mode 100644 index 0000000..5e1332f --- /dev/null +++ b/basicsuite/mediaplayer/Intro.qml @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Rectangle { + id: root + color: "#111111" + +// Image { +// anchors.fill: parent +// source: "images/gradient.png" +// } + + Image { + id: logo + anchors.centerIn: root + anchors.verticalCenterOffset: -60 + source: "images/qt-logo.png" + opacity: 0.5 + + } +// Rectangle { +// id: button +// opacity: mouse.containsMouse ? 1 : 0 +// Behavior on opacity {NumberAnimation{duration: 100}} +// color: mouse.pressed ? "#11000000" : "#11ffffff" +// anchors.top: logo.bottom +// anchors.horizontalCenter: parent.horizontalCenter +// border.color: "#33ffffff" +// width: text.width + 40 +// height: text.height + 4 +// antialiasing: true +// radius: 4 +// MouseArea { +// id: mouse +// anchors.fill: parent +// hoverEnabled: true +// onClicked: applicationWindow.openVideo() +// } +// } + +// Text { +// id: text +// color: "#44ffffff" +// text: "Open File" +// font.bold: true +// font.pixelSize: 18 +// anchors.centerIn: button +// } +} diff --git a/basicsuite/mediaplayer/MetadataView.qml b/basicsuite/mediaplayer/MetadataView.qml new file mode 100644 index 0000000..4d45b75 --- /dev/null +++ b/basicsuite/mediaplayer/MetadataView.qml @@ -0,0 +1,213 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Rectangle { + id: root + + property variant mediaPlayer: null + + anchors.fill: parent + color: "#AA000000" + Behavior on opacity { NumberAnimation { } } + opacity: 0 + + Rectangle { + height: column.height + 30 + width: 500 + color: "#BB222222" + anchors.centerIn: parent + anchors.verticalCenterOffset: -50 + + + Column { + id: column + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: 15 + spacing: 12 + + Text { + text: "Media Type: " + (mediaPlayer ? mediaPlayer.metaData.mediaType : "") + visible: mediaPlayer && mediaPlayer.metaData.mediaType !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Title: " + (mediaPlayer ? mediaPlayer.metaData.title : "") + visible: mediaPlayer && mediaPlayer.metaData.title !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Artist: " + (mediaPlayer ? mediaPlayer.metaData.leadPerformer : "") + visible: mediaPlayer && mediaPlayer.metaData.leadPerformer !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Artist: " + (mediaPlayer ? mediaPlayer.metaData.contributingArtist : "") + visible: mediaPlayer && mediaPlayer.metaData.contributingArtist !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Album: " + (mediaPlayer ? mediaPlayer.metaData.albumTitle : "") + visible: mediaPlayer && mediaPlayer.metaData.albumTitle !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Album Artist: " + (mediaPlayer ? mediaPlayer.metaData.albumArtist : "") + visible: mediaPlayer && mediaPlayer.metaData.albumArtist !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Author: " + (mediaPlayer ? mediaPlayer.metaData.author : "") + visible: mediaPlayer && mediaPlayer.metaData.author !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Composer: " + (mediaPlayer ? mediaPlayer.metaData.composer : "") + visible: mediaPlayer && mediaPlayer.metaData.composer !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Writer: " + (mediaPlayer ? mediaPlayer.metaData.writer : "") + visible: mediaPlayer && mediaPlayer.metaData.writer !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Genre: " + (mediaPlayer ? mediaPlayer.metaData.genre : "") + visible: mediaPlayer && mediaPlayer.metaData.genre !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Track Number: " + (mediaPlayer ? mediaPlayer.metaData.trackNumber : "") + visible: mediaPlayer && mediaPlayer.metaData.trackNumber !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Year: " + (mediaPlayer ? mediaPlayer.metaData.year : "") + visible: mediaPlayer && mediaPlayer.metaData.year !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Duration: " + (mediaPlayer ? Qt.formatTime(new Date(mediaPlayer.metaData.duration), mediaPlayer.metaData.duration >= 3600000 ? "H:mm:ss" : "m:ss") : "") + visible: mediaPlayer && mediaPlayer.metaData.duration !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Resolution: " + (mediaPlayer && mediaPlayer.metaData.resolution !== undefined ? (mediaPlayer.metaData.resolution.width + "x" + mediaPlayer.metaData.resolution.height) : "") + visible: mediaPlayer && mediaPlayer.metaData.resolution !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Audio Bitrate: " + (mediaPlayer ? Math.round(mediaPlayer.metaData.audioBitRate / 1000) + " kbps" : "") + visible: mediaPlayer && mediaPlayer.metaData.audioBitRate !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Video Bitrate: " + (mediaPlayer ? Math.round(mediaPlayer.metaData.videoBitRate / 1000) + " kbps" : "") + visible: mediaPlayer && mediaPlayer.metaData.videoBitRate !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + Text { + text: "Date: " + (mediaPlayer ? Qt.formatDate(mediaPlayer.metaData.date) : "") + visible: mediaPlayer && mediaPlayer.metaData.date !== undefined + color: "white" + font.pixelSize: 24 + width: parent.width + wrapMode: Text.WordWrap + } + } + } + + MouseArea { + anchors.fill: parent + onClicked: root.opacity = 0 + enabled: root.opacity !== 0 + } +} diff --git a/basicsuite/mediaplayer/ParameterPanel.qml b/basicsuite/mediaplayer/ParameterPanel.qml new file mode 100644 index 0000000..51b9938 --- /dev/null +++ b/basicsuite/mediaplayer/ParameterPanel.qml @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: root + height: view.model.count * sliderHeight + color: "#BB333333" + property color lineColor: "black" + property real spacing: 10 + property real sliderHeight: 50 + property bool isMouseAbove: mouseAboveMonitor.containsMouse + + property ListModel model: ListModel { } + + MouseArea { + id: mouseAboveMonitor + anchors.fill: parent + hoverEnabled: true; + } + + Component { + id: editDelegate + + Rectangle { + id: delegate + width: parent.width + height: root.sliderHeight + color: "transparent" + + Text { + id: text + text: name + color: "white" + anchors { + top: parent.top + bottom: parent.bottom + leftMargin: 15 + left: parent.left + } + horizontalAlignment: Text.AlignRight + verticalAlignment: Text.AlignVCenter + font.pixelSize: 20 + font.capitalization: Font.Capitalize + width: 90 + } + + Slider { + anchors { + verticalCenter: text.verticalCenter + verticalCenterOffset: 3 + left: text.right + leftMargin: 20 + right: parent.right + rightMargin: 20 + } + value: model.value + onValueChanged: view.model.setProperty(index, "value", value) + } + } + } + + ListView { + id: view + anchors.fill: parent + anchors.margins: 8 + model: root.model + delegate: editDelegate + interactive: false + } +} diff --git a/basicsuite/mediaplayer/PlaybackControl.qml b/basicsuite/mediaplayer/PlaybackControl.qml new file mode 100755 index 0000000..f83f358 --- /dev/null +++ b/basicsuite/mediaplayer/PlaybackControl.qml @@ -0,0 +1,100 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Row { + id: root + spacing: 26 + height: playButton.height + + property bool isPlaybackEnabled: false + property bool isPlaying: false + + signal forwardButtonPressed() + signal reverseButtonPressed() + signal playButtonPressed() + signal stopButtonPressed() + + //Playback Controls + ImageButton { + id: rateReverseButton + enabled: isPlaybackEnabled + imageSource: "images/RateButtonReverse.png" + anchors.verticalCenter: root.verticalCenter + onClicked: { + reverseButtonPressed(); + } + } + ImageButton { + id: playButton + enabled: isPlaybackEnabled + imageSource: !isPlaying ? "images/PlayButton.png" : "images/PauseButton.png" + anchors.verticalCenter: root.verticalCenter +// anchors.right: rateForwardButton.left +// anchors.rightMargin: 10 + onClicked: { + playButtonPressed(); + } + } +// Rectangle{ +// enabled: isPlaybackEnabled +// color: "white" +// opacity: enabled ? 1 : 0.3 +// width: playButton.width +// height: width +// anchors.verticalCenter: root.verticalCenter +// MouseArea { +// anchors.fill: parent +// onClicked: stopButtonPressed(); +// } +// } + + ImageButton { + id: rateForwardButton + enabled: isPlaybackEnabled + imageSource: "images/RateButtonForward.png" + anchors.verticalCenter: root.verticalCenter + onClicked: { + forwardButtonPressed(); + } + } +} diff --git a/basicsuite/mediaplayer/SeekControl.qml b/basicsuite/mediaplayer/SeekControl.qml new file mode 100755 index 0000000..19a1fb7 --- /dev/null +++ b/basicsuite/mediaplayer/SeekControl.qml @@ -0,0 +1,123 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Item { + id: root + height: seekSlider.height + + property int position: 0 + property int duration: 0 + property bool seekable: false + property alias pressed : seekSlider.pressed + property bool enabled + + signal seekValueChanged(int newPosition) + + onPositionChanged: { + elapsedText.text = formatTime(position); + seekSlider.value = position; + } + + onDurationChanged: { + remainingText.text = formatTime(duration); + } + + Text { + id: elapsedText + anchors.verticalCenter: seekSlider.verticalCenter + anchors.left: root.left + text: "00:00" + font.pixelSize: 20 + color: "#cccccc" + } + + Slider { + id: seekSlider + anchors.leftMargin: 30 + anchors.rightMargin: 30 + anchors.left: elapsedText.right + anchors.right: remainingText.left + anchors.verticalCenter: root.verticalCenter + mutable: root.seekable + enabled: root.enabled + + minimum: 0.0 + maximum: root.duration !== 0 ? root.duration : 1 + + onValueChangedByHandle: { + seekValueChanged(newValue); + applicationWindow.resetTimer() + } + } + + Text { + id: remainingText + anchors.verticalCenter: seekSlider.verticalCenter + anchors.right: root.right + text: "00:00" + font.pixelSize: 20 + color: "#cccccc" + } + + function formatTime(time) { + time = time / 1000 + var hours = Math.floor(time / 3600); + time = time - hours * 3600; + var minutes = Math.floor(time / 60); + var seconds = Math.floor(time - minutes * 60); + + if (hours > 0) + return formatTimeBlock(hours) + ":" + formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); + else + return formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); + + } + + function formatTimeBlock(time) { + if (time === 0) + return "00" + if (time < 10) + return "0" + time; + else + return time.toString(); + } +} diff --git a/basicsuite/mediaplayer/Slider.qml b/basicsuite/mediaplayer/Slider.qml new file mode 100644 index 0000000..da9732f --- /dev/null +++ b/basicsuite/mediaplayer/Slider.qml @@ -0,0 +1,138 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Item { + id: slider + + height: handleBack.height + // value is read/write. + property real value: 0 + property real maximum: 1 + property real minimum: 0 + property int xMax: width - handle.width + onXMaxChanged: updatePos() + onMinimumChanged: updatePos() + onValueChanged: if (!pressed) updatePos() + property bool mutable: true + property alias pressed : backgroundMouse.pressed + + signal valueChangedByHandle(int newValue) + + function updatePos() { + if (maximum > minimum) { + var pos = 0 + (value - minimum) * slider.xMax / (maximum - minimum); + pos = Math.min(pos, width - handle.width - 0); + pos = Math.max(pos, 0); + handle.x = pos; + } else { + handle.x = 0; + } + } + + Rectangle { + id: background + width: slider.width + anchors.verticalCenter: slider.verticalCenter + height: 2 + color: "#666666" + + MouseArea { + id: backgroundMouse + anchors.fill: parent + anchors.topMargin: -24 + anchors.bottomMargin: -24 + enabled: slider.mutable + drag.target: handle + drag.axis: Drag.XAxis + drag.minimumX: 0 + drag.maximumX: slider.xMax + onPressedChanged: { + value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); + valueChangedByHandle(value); + updatePos(); + } + onPositionChanged: { + value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); + valueChangedByHandle(value); + } + onWheel: { + value = Math.max(minimum, Math.min(maximum, value + (wheel.angleDelta.y > 0 ? 1 : -1) * (10 / slider.xMax) * (slider.maximum - slider.minimum))); + valueChangedByHandle(value); + updatePos(); + } + } + } + + Rectangle { + id: progress + height: 5 + anchors.verticalCenter: background.verticalCenter + anchors.left: background.left + anchors.right: handle.right + anchors.rightMargin: handle.width / 2 + visible: slider.enabled + color: "#98c66c" + } + + Rectangle { + id: handleBack + width: 40 + height: width + radius: width / 2 + color: "#8898c66c" + antialiasing: true + anchors.centerIn: handle + visible: handle.visible + } + + Rectangle { + id: handle + width: 14 + height: width + radius: width / 2 + antialiasing: true + color: "#98c66c" + anchors.verticalCenter: background.verticalCenter + visible: slider.enabled + } +} + diff --git a/basicsuite/mediaplayer/UrlBar.qml b/basicsuite/mediaplayer/UrlBar.qml new file mode 100644 index 0000000..c3cd648 --- /dev/null +++ b/basicsuite/mediaplayer/UrlBar.qml @@ -0,0 +1,120 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Rectangle { + id: root + height: 50 + signal urlAccepted(string text) + color: "#cc222222" + Behavior on opacity { NumberAnimation{} } + onOpacityChanged: { + if (opacity == 1) + urlInput.focus = true + else if (opacity == 0) + urlInput.focus = false + } + + Keys.onEscapePressed: root.opacity = 0 + + MouseArea { + anchors.fill: parent + onClicked: root.opacity = 0 + } + + Text { + anchors.bottom: urlBar.top + anchors.left: urlBar.left + anchors.bottomMargin: 8 + text: "Enter URL" + color: "white" + font.pixelSize: 20 + } + + BorderImage { + id: urlBar + source: "images/ControlBar.png" + border.top: 12 + border.bottom: 12 + border.left: 12 + border.right: 12 + height: 70 + anchors.centerIn: parent + anchors.verticalCenterOffset: -170 + width: 600 + + Rectangle { + anchors.fill: parent + anchors.margins: 16 + color: "#66ffffff" + border.color: "#bbffffff" + radius: 2 + antialiasing: true + + TextInput { + id: urlInput + selectionColor: "#aaffffff" + selectedTextColor: "black" + selectByMouse: true + anchors.fill: parent + anchors.margins: 5 + font.pixelSize: 24 + color: "black" + text: "http://" + onAccepted: root.urlAccepted(urlInput.text); + + } + } + } + +// Rectangle { +// anchors.right: urlBar.left +// anchors.rightMargin: 32 +// anchors.verticalCenter: urlBar.verticalCenter +// height: 70 +// width: 70 +// color: "gray" +// MouseArea { +// anchors.fill: parent +// onClicked: { urlInput.text = ""; urlInput.paste(); } +// } +// } +} diff --git a/basicsuite/mediaplayer/VolumeControl.qml b/basicsuite/mediaplayer/VolumeControl.qml new file mode 100755 index 0000000..62375f1 --- /dev/null +++ b/basicsuite/mediaplayer/VolumeControl.qml @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + width: 210 + height: volumeUp.height + + property alias volume: volumeSlider.value + + //Volume Controls + ImageButton { + id: volumeDown + imageSource: "images/VolumeDown.png" + anchors.verticalCenter: root.verticalCenter + anchors.left: root.left + scale: 1.4 + onClicked: { + root.volume = 0.0; + } + } + Slider { + id: volumeSlider + anchors.left: volumeDown.right + anchors.leftMargin: 22 + anchors.rightMargin: 22 + anchors.right: volumeUp.left + maximum: 1.0 + minimum: 0.0 + anchors.verticalCenter: root.verticalCenter + anchors.verticalCenterOffset: 1 + } + + ImageButton { + id: volumeUp + imageSource: "images/VolumeUp.png" + anchors.verticalCenter: root.verticalCenter + anchors.verticalCenterOffset: 1 + anchors.right: root.right + scale: 1.4 + onClicked: { + root.volume = 1.0 + } + } +} diff --git a/basicsuite/mediaplayer/description.txt b/basicsuite/mediaplayer/description.txt new file mode 100644 index 0000000..bf034e5 --- /dev/null +++ b/basicsuite/mediaplayer/description.txt @@ -0,0 +1,3 @@ +The Media Player example demonstrates the use of the media playback features of Qt Multimedia with Qt Quick. + +It can play from a file or from Internet, both videos and music. diff --git a/basicsuite/mediaplayer/exclude.txt b/basicsuite/mediaplayer/exclude.txt new file mode 100644 index 0000000..952c994 --- /dev/null +++ b/basicsuite/mediaplayer/exclude.txt @@ -0,0 +1 @@ +android-beagleboard: diff --git a/basicsuite/mediaplayer/images/CameraButton.png b/basicsuite/mediaplayer/images/CameraButton.png new file mode 100644 index 0000000..d950f78 Binary files /dev/null and b/basicsuite/mediaplayer/images/CameraButton.png differ diff --git a/basicsuite/mediaplayer/images/ControlBar.png b/basicsuite/mediaplayer/images/ControlBar.png new file mode 100644 index 0000000..8b5f545 Binary files /dev/null and b/basicsuite/mediaplayer/images/ControlBar.png differ diff --git a/basicsuite/mediaplayer/images/FXButton.png b/basicsuite/mediaplayer/images/FXButton.png new file mode 100644 index 0000000..04530f4 Binary files /dev/null and b/basicsuite/mediaplayer/images/FXButton.png differ diff --git a/basicsuite/mediaplayer/images/FileButton.png b/basicsuite/mediaplayer/images/FileButton.png new file mode 100644 index 0000000..d65e681 Binary files /dev/null and b/basicsuite/mediaplayer/images/FileButton.png differ diff --git a/basicsuite/mediaplayer/images/FullscreenButton.png b/basicsuite/mediaplayer/images/FullscreenButton.png new file mode 100755 index 0000000..413872a Binary files /dev/null and b/basicsuite/mediaplayer/images/FullscreenButton.png differ diff --git a/basicsuite/mediaplayer/images/PauseButton.png b/basicsuite/mediaplayer/images/PauseButton.png new file mode 100644 index 0000000..0d3e2d1 Binary files /dev/null and b/basicsuite/mediaplayer/images/PauseButton.png differ diff --git a/basicsuite/mediaplayer/images/PlayButton.png b/basicsuite/mediaplayer/images/PlayButton.png new file mode 100644 index 0000000..9a85633 Binary files /dev/null and b/basicsuite/mediaplayer/images/PlayButton.png differ diff --git a/basicsuite/mediaplayer/images/PlaybackSlider.png b/basicsuite/mediaplayer/images/PlaybackSlider.png new file mode 100755 index 0000000..3716315 Binary files /dev/null and b/basicsuite/mediaplayer/images/PlaybackSlider.png differ diff --git a/basicsuite/mediaplayer/images/RateButtonForward.png b/basicsuite/mediaplayer/images/RateButtonForward.png new file mode 100644 index 0000000..4b52603 Binary files /dev/null and b/basicsuite/mediaplayer/images/RateButtonForward.png differ diff --git a/basicsuite/mediaplayer/images/RateButtonReverse.png b/basicsuite/mediaplayer/images/RateButtonReverse.png new file mode 100644 index 0000000..64e94ed Binary files /dev/null and b/basicsuite/mediaplayer/images/RateButtonReverse.png differ diff --git a/basicsuite/mediaplayer/images/SliderBackground.png b/basicsuite/mediaplayer/images/SliderBackground.png new file mode 100644 index 0000000..b83f729 Binary files /dev/null and b/basicsuite/mediaplayer/images/SliderBackground.png differ diff --git a/basicsuite/mediaplayer/images/SliderHandle.png b/basicsuite/mediaplayer/images/SliderHandle.png new file mode 100755 index 0000000..5206100 Binary files /dev/null and b/basicsuite/mediaplayer/images/SliderHandle.png differ diff --git a/basicsuite/mediaplayer/images/SliderProgress.png b/basicsuite/mediaplayer/images/SliderProgress.png new file mode 100755 index 0000000..e0efc87 Binary files /dev/null and b/basicsuite/mediaplayer/images/SliderProgress.png differ diff --git a/basicsuite/mediaplayer/images/UrlButton.png b/basicsuite/mediaplayer/images/UrlButton.png new file mode 100644 index 0000000..876951f Binary files /dev/null and b/basicsuite/mediaplayer/images/UrlButton.png differ diff --git a/basicsuite/mediaplayer/images/VolumeDown.png b/basicsuite/mediaplayer/images/VolumeDown.png new file mode 100755 index 0000000..60c626d Binary files /dev/null and b/basicsuite/mediaplayer/images/VolumeDown.png differ diff --git a/basicsuite/mediaplayer/images/VolumeUp.png b/basicsuite/mediaplayer/images/VolumeUp.png new file mode 100755 index 0000000..886fde7 Binary files /dev/null and b/basicsuite/mediaplayer/images/VolumeUp.png differ diff --git a/basicsuite/mediaplayer/images/folder.png b/basicsuite/mediaplayer/images/folder.png new file mode 100644 index 0000000..e53e2ad Binary files /dev/null and b/basicsuite/mediaplayer/images/folder.png differ diff --git a/basicsuite/mediaplayer/images/gradient.png b/basicsuite/mediaplayer/images/gradient.png new file mode 100644 index 0000000..1cd7281 Binary files /dev/null and b/basicsuite/mediaplayer/images/gradient.png differ diff --git a/basicsuite/mediaplayer/images/pattern.png b/basicsuite/mediaplayer/images/pattern.png new file mode 100644 index 0000000..028181e Binary files /dev/null and b/basicsuite/mediaplayer/images/pattern.png differ diff --git a/basicsuite/mediaplayer/images/qt-logo.png b/basicsuite/mediaplayer/images/qt-logo.png new file mode 100755 index 0000000..242bb28 Binary files /dev/null and b/basicsuite/mediaplayer/images/qt-logo.png differ diff --git a/basicsuite/mediaplayer/images/titlebar.png b/basicsuite/mediaplayer/images/titlebar.png new file mode 100644 index 0000000..51c9008 Binary files /dev/null and b/basicsuite/mediaplayer/images/titlebar.png differ diff --git a/basicsuite/mediaplayer/images/titlebar.sci b/basicsuite/mediaplayer/images/titlebar.sci new file mode 100755 index 0000000..0418d94 --- /dev/null +++ b/basicsuite/mediaplayer/images/titlebar.sci @@ -0,0 +1,5 @@ +border.left: 10 +border.top: 12 +border.bottom: 12 +border.right: 10 +source: titlebar.png diff --git a/basicsuite/mediaplayer/images/up.png b/basicsuite/mediaplayer/images/up.png new file mode 100644 index 0000000..b05f802 Binary files /dev/null and b/basicsuite/mediaplayer/images/up.png differ diff --git a/basicsuite/mediaplayer/main.qml b/basicsuite/mediaplayer/main.qml new file mode 100755 index 0000000..d8075c8 --- /dev/null +++ b/basicsuite/mediaplayer/main.qml @@ -0,0 +1,289 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtMultimedia 5.0 + +FocusScope { + id: applicationWindow + focus: true + + MouseArea { + id: mouseActivityMonitor + anchors.fill: parent + + hoverEnabled: true + onClicked: { + if (controlBar.state === "VISIBLE" && content.videoPlayer.mediaPlayer.status === MediaPlayer.Loaded) { + controlBar.hide(); + } else { + controlBar.show(); + controlBarTimer.restart(); + } + } + } + + signal resetTimer + onResetTimer: { + controlBar.show(); + controlBarTimer.restart(); + } + + Component.onCompleted: { + init(); + } + + Content { + id: content + anchors.fill: parent + } + + Timer { + id: controlBarTimer + interval: 4000 + running: false + + onTriggered: { + hideToolBars(); + } + } + + ControlBar { + id: controlBar + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: applicationWindow.bottom + mediaPlayer: content.videoPlayer.mediaPlayer + + onOpenFile: { + applicationWindow.openVideo(); + } + + onOpenURL: { + applicationWindow.openURL(); + } + + onOpenFX: { + applicationWindow.openFX(); + } + + onToggleFullScreen: { +// viewer.toggleFullscreen(); + } + } + + ParameterPanel { + id: parameterPanel + opacity: controlBar.opacity + visible: effectSelectionPanel.visible && model.count !== 0 + height: 116 + width: 500 + anchors { + bottomMargin: 15 + bottom: controlBar.top + right: effectSelectionPanel.left + rightMargin: 15 + } + } + + EffectSelectionPanel { + id: effectSelectionPanel + visible: false + opacity: controlBar.opacity + anchors { + bottom: controlBar.top + right: controlBar.right + // rightMargin: 15 + bottomMargin: 15 + } + width: 250 + height: 350 + itemHeight: 80 + onEffectSourceChanged: { + content.effectSource = effectSource + parameterPanel.model = content.effect.parameters + } + } + + UrlBar { + id: urlBar + opacity: 0 + visible: opacity != 0 + anchors.fill: parent + onUrlAccepted: { + urlBar.opacity = 0; + if (text != "") + content.openVideo(text) + } + } + + Rectangle { + anchors.right: parent.right + anchors.top: parent.top + anchors.rightMargin: 32 + anchors.topMargin: 32 + width: 40 + height: 40 + radius: width / 2 + color: infoMouser.pressed ? "#BB999999" : "#88444444" + antialiasing: true + visible: content.videoPlayer.mediaPlayer.status !== MediaPlayer.NoMedia && controlBar.state === "VISIBLE" + + Text { + anchors.centerIn: parent + text: "i" + font.italic: true + font.bold: true + color: "white" + font.pixelSize: 28 + } + + MouseArea { + id: infoMouser + anchors.fill: parent + anchors.margins: -10 + onClicked: metadataView.opacity = 1 + } + } + + MetadataView { + id: metadataView + mediaPlayer: content.videoPlayer.mediaPlayer + } + + property real volumeBeforeMuted: 1.0 + property bool isFullScreen: false + + FileBrowser { + id: fileBrowser + anchors.fill: parent + onFileSelected: { + if (file != "") + content.openVideo(file); + } + } + + Keys.onPressed: { + applicationWindow.resetTimer(); + if (event.key === Qt.Key_O && event.modifiers & Qt.ControlModifier) { + openVideo(); + return; + } else if (event.key === Qt.Key_N && event.modifiers & Qt.ControlModifier) { + openURL(); + return; + } else if (event.key === Qt.Key_E && event.modifiers & Qt.ControlModifier) { + openFX(); + return; + } else if (event.key === Qt.Key_F && event.modifiers & Qt.ControlModifier) { +// viewer.toggleFullscreen(); + return; + } else if (event.key === Qt.Key_Up || event.key === Qt.Key_VolumeUp) { + content.videoPlayer.mediaPlayer.volume = Math.min(1, content.videoPlayer.mediaPlayer.volume + 0.1); + return; + } else if (event.key === Qt.Key_Down || event.key === Qt.Key_VolumeDown) { + if (event.modifiers & Qt.ControlModifier) { + if (content.videoPlayer.mediaPlayer.volume) { + volumeBeforeMuted = content.videoPlayer.mediaPlayer.volume; + content.videoPlayer.mediaPlayer.volume = 0 + } else { + content.videoPlayer.mediaPlayer.volume = volumeBeforeMuted; + } + } else { + content.videoPlayer.mediaPlayer.volume = Math.max(0, content.videoPlayer.mediaPlayer.volume - 0.1); + } + return; + } else if (applicationWindow.isFullScreen && event.key === Qt.Key_Escape) { +// viewer.toggleFullscreen(); + return; + } + + // What's next should be handled only if there's a loaded media + if (content.videoPlayer.mediaPlayer.status !== MediaPlayer.Loaded + && content.videoPlayer.mediaPlayer.status !== MediaPlayer.Buffered) + return; + + if (event.key === Qt.Key_Space) { + if (content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.PlayingState) + content.videoPlayer.mediaPlayer.pause() + else if (content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.PausedState + || content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.StoppedState) + content.videoPlayer.mediaPlayer.play() + } else if (event.key === Qt.Key_Left) { + content.videoPlayer.mediaPlayer.seek(Math.max(0, content.videoPlayer.mediaPlayer.position - 30000)); + return; + } else if (event.key === Qt.Key_Right) { + content.videoPlayer.mediaPlayer.seek(Math.min(content.videoPlayer.mediaPlayer.duration, content.videoPlayer.mediaPlayer.position + 30000)); + return; + } + } + + function init() { + content.init() + } + + function openVideo() { + //videoFileBrowser.show() + // var videoFile = viewer.openFileDialog(); + // if (videoFile != "") + // content.openVideo(videoFile); + fileBrowser.show() + } + + function openCamera() { + content.openCamera() + } + + function openURL() { + urlBar.opacity = urlBar.opacity === 0 ? 1 : 0 + } + + function openFX() { + effectSelectionPanel.visible = !effectSelectionPanel.visible; + } + + function close() { + } + + function hideToolBars() { + if (!controlBar.isMouseAbove && !parameterPanel.isMouseAbove && !effectSelectionPanel.isMouseAbove && content.videoPlayer.isPlaying) + controlBar.hide(); + } +} diff --git a/basicsuite/mediaplayer/mediaplayer.pro b/basicsuite/mediaplayer/mediaplayer.pro new file mode 100644 index 0000000..d0ce9e3 --- /dev/null +++ b/basicsuite/mediaplayer/mediaplayer.pro @@ -0,0 +1,13 @@ +TARGET = mediaplayer + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + Effects \ + images +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/mediaplayer/preview_l.jpg b/basicsuite/mediaplayer/preview_l.jpg new file mode 100644 index 0000000..0fff215 Binary files /dev/null and b/basicsuite/mediaplayer/preview_l.jpg differ diff --git a/basicsuite/mediaplayer/title.txt b/basicsuite/mediaplayer/title.txt new file mode 100644 index 0000000..7919029 --- /dev/null +++ b/basicsuite/mediaplayer/title.txt @@ -0,0 +1 @@ +Media Player diff --git a/basicsuite/photogallery/description.txt b/basicsuite/photogallery/description.txt new file mode 100644 index 0000000..f5e302c --- /dev/null +++ b/basicsuite/photogallery/description.txt @@ -0,0 +1 @@ +This is a simple photo gallery, showing images found in /data/images. diff --git a/basicsuite/photogallery/main.qml b/basicsuite/photogallery/main.qml new file mode 100644 index 0000000..5fbab8a --- /dev/null +++ b/basicsuite/photogallery/main.qml @@ -0,0 +1,295 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import Qt.labs.folderlistmodel 1.0 + +Item { + id: root + + width: 320 + height: 480 + + Rectangle { + anchors.fill: parent + color: "black" + } + + FolderListModel { + id: imageList + folder: "/data/images" + nameFilters: ["*.png", "*.jpg"] + + showDirs: false + } + + Text { + id: noImages + color: "white" + visible: grid.count == 0 + text: "No images in " + imageList.folder + anchors.centerIn: parent + } + + GridView { + id: grid + + anchors.fill: parent + + cellHeight: root.width / 3 + cellWidth: cellHeight + + model: imageList + +// NumberAnimation on contentY { from: 0; to: 2000; duration: 3000; loops: 1; easing.type: Easing.InOutCubic } + + delegate: Rectangle { + + id: box + color: "white" + width: grid.cellWidth + height: grid.cellHeight + scale: 0.97 + rotation: 2; + antialiasing: true + + Rectangle { + id: sepia + color: "#b08050" + width: image.width + height: image.height + anchors.centerIn: parent + + property real fakeOpacity: image.status == Image.Ready ? 1.5 : 0 + Behavior on fakeOpacity { NumberAnimation { duration: 1000 } } + + opacity: fakeOpacity + visible: image.opacity <= 0.99; + antialiasing: true + } + + Image { + id: image + source: filePath + width: grid.cellWidth * 0.9 + height: grid.cellHeight * 0.9 + anchors.centerIn: sepia + asynchronous: true + opacity: sepia.fakeOpacity - .5 + sourceSize.width: width; + antialiasing: true + } + + MouseArea { + anchors.fill: parent + onClicked: { + root.showBigImage(filePath, box.x - grid.contentX, box.y - grid.contentY, image); + } + } + } + } + + function showBigImage(filePath, itemX, itemY, image) { + fakeBigImage.x = itemX; + fakeBigImage.y = itemY; + fakeBigImage.sourceSize = image.sourceSize; + fakeBigImage.source = filePath; + + beginEnterLargeAnimation.running = true; + } + + property int time: 500; + property real xPos: width < height ? 0 : width / 2 - height / 2; + property real yPos: width < height ? height / 2 - width / 2: 0; + property real size: Math.min(width, height); + + states: [ + State { name: "grid" }, + State { name: "enter-large" }, + State { name: "large" }, + State { name: "exit-large" } + ] + + SequentialAnimation { + id: beginEnterLargeAnimation + PropertyAction { target: mouseArea; property: "enabled"; value: "true" } + PropertyAction { target: fakeBigImage; property: "rotation"; value: 2; } + PropertyAction { target: fakeBigImage; property: "scale"; value: 0.97 * 0.9; } + PropertyAction { target: fakeBigImage; property: "width"; value: grid.cellWidth; } + PropertyAction { target: fakeBigImage; property: "height"; value: grid.cellHeight; } + PropertyAction { target: fakeBigImage; property: "visible"; value: true; } + + ParallelAnimation { + NumberAnimation { target: fakeBigImage; property: "rotation"; to: 0; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: fakeBigImage; property: "scale"; to: 1; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: fakeBigImage; property: "x"; to: root.xPos; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: fakeBigImage; property: "y"; to: root.yPos; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: fakeBigImage; property: "width"; to: root.size; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: fakeBigImage; property: "height"; to: root.size; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: grid; property: "opacity"; to: 0; duration: root.time; easing.type: Easing.InOutCubic } + } + ScriptAction { + script: { + + bigImage = realBigImageComponent.createObject(root); + bigImage.source = fakeBigImage.source; + } + } + } + + property Item bigImage; + property real targetRotation: 0; + property real targetWidth: 0 + property real targetHeight: 0 + property bool bigImageShowing: false; + + SequentialAnimation { + id: finalizeEnterLargeAnimation + ScriptAction { script: { + fakeBigImage.anchors.centerIn = root; + } + } + ParallelAnimation { + NumberAnimation { target: bigImage; property: "opacity"; to: 1; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: fakeBigImage; property: "rotation"; to: root.targetRotation; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: bigImage; property: "rotation"; to: root.targetRotation; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: fakeBigImage; property: "width"; to: root.targetWidth; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: fakeBigImage; property: "height"; to: root.targetHeight; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: bigImage; property: "width"; to: root.targetWidth; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: bigImage; property: "height"; to: root.targetHeight; duration: root.time; easing.type: Easing.InOutCubic } + } + PropertyAction { target: fakeBigImage; property: "visible"; value: false } + PropertyAction { target: root; property: "bigImageShowing"; value: true } + } + + SequentialAnimation { + id: backToGridAnimation + ParallelAnimation { + NumberAnimation { target: bigImage; property: "opacity"; to: 0; duration: root.time; easing.type: Easing.InOutCubic } + NumberAnimation { target: grid; property: "opacity"; to: 1; duration: root.time; easing.type: Easing.InOutCubic } + } + PropertyAction { target: fakeBigImage; property: "source"; value: "" } + PropertyAction { target: root; property: "bigImageShowing"; value: false } + PropertyAction { target: mouseArea; property: "enabled"; value: false } + ScriptAction { script: { + bigImage.destroy(); + fakeBigImage.anchors.centerIn = undefined + } + } + } + + Image { + id: fakeBigImage + width: grid.cellWidth + height: grid.cellHeight + visible: false + antialiasing: true + } + + Component { + id: realBigImageComponent + + Image { + id: realBigImage + + anchors.centerIn: parent; + + asynchronous: true; + + // Bound size to the current display size, to try to avoid any GL_MAX_TEXTURE_SIZE issues. + sourceSize: Qt.size(Math.max(root.width, root.height), Math.max(root.width, root.height)); + + opacity: 0 + onStatusChanged: { + + if (status != Image.Ready) + return; + + var imageIsLandscape = width > height; + var screenIsLandscape = root.width > root.height; + + var targetScale; + + // Rotation needed... + if (imageIsLandscape != screenIsLandscape && width != height) { + root.targetRotation = 90; + var aspect = width / height + var screenAspect = root.height / root.width + + if (aspect > screenAspect) { + targetScale = root.height / width + } else { + targetScale = root.width / height; + } + } else { + root.targetRotation = 0; + var aspect = height / width; + var screenAspect = root.height / root.width + + if (aspect > screenAspect) { + targetScale = root.height / height + } else { + targetScale = root.width / width; + } + } + + root.targetWidth = width * targetScale + root.targetHeight = height * targetScale; + + width = root.size + height = root.size; + + finalizeEnterLargeAnimation.running = true; + } + } + } + + MouseArea { + id: mouseArea + anchors.fill: parent + enabled: false + + onClicked: { + if (root.bigImageShowing) + backToGridAnimation.running = true; + } + } + +} diff --git a/basicsuite/photogallery/photogallery.pro b/basicsuite/photogallery/photogallery.pro new file mode 100644 index 0000000..04c33f3 --- /dev/null +++ b/basicsuite/photogallery/photogallery.pro @@ -0,0 +1,12 @@ +TARGET = photogallery + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + *.png +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/photogallery/preview_l.jpg b/basicsuite/photogallery/preview_l.jpg new file mode 100644 index 0000000..0b67f1d Binary files /dev/null and b/basicsuite/photogallery/preview_l.jpg differ diff --git a/basicsuite/photogallery/title.txt b/basicsuite/photogallery/title.txt new file mode 100644 index 0000000..4aee1d3 --- /dev/null +++ b/basicsuite/photogallery/title.txt @@ -0,0 +1 @@ +Photo Gallery diff --git a/basicsuite/qt5-cinematicdemo/Qt5_CinematicExperience.pro b/basicsuite/qt5-cinematicdemo/Qt5_CinematicExperience.pro new file mode 100644 index 0000000..3830ee9 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/Qt5_CinematicExperience.pro @@ -0,0 +1,9 @@ +TEMPLATE = app + +QT += qml quick +SOURCES += main.cpp + +target.path = /opt/Qt5_CinematicExperience +qml.files = Qt5_CinematicExperience.qml content +qml.path = /opt/Qt5_CinematicExperience +INSTALLS += target qml diff --git a/basicsuite/qt5-cinematicdemo/README b/basicsuite/qt5-cinematicdemo/README new file mode 100644 index 0000000..1f16c7e --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/README @@ -0,0 +1,49 @@ + +INTRO +========== + +This UX demo application presents some graphical features of Qt5. +The name 'Cinematic Experience' reflects how it's possible to build user +interfaces with increased dynamics. + + +RUNNING +========== + +To run this application you need relatively recent build of Qt5: +- http://qt-project.org +- http://qt.gitorious.org/qt/qt5 + +There are two different ways to run the application: + +1) If your target platform contains 'qmlscene' binary, just use it: +--- +cd Qt5_CinematicExperience +[path to Qt5]/qtbase/bin/qmlscene Qt5_CinematicExperience.qml +--- + +2) Alternatively, a simple launcher is provided to start the application: +--- +cd Qt5_CinematicExperience +[path to Qt5]/qtbase/bin/qmake +make +./Qt5_CinematicExperience +--- + +The run application in fullscreen mode, use '--fullscreen' parameter for +qmlscene or launcher. If you want to tweak the window resolution, +modify 'width' and 'height' properties in Qt5_CinematicExperience.qml + + +LICENSE +========== + +Source codes are licensed under a Creative Commons Attribution 3.0 Unported +License. http://creativecommons.org/licenses/by/3.0/ + +No attribution required, but feel free to mention us or +contact info@quitcoding.com + +Qt, and the Qt logo are trademarks of Nokia Corporation +Movie reviews copyright © IMDb.com +DVD cover icons from http://www.iconarchive.com diff --git a/basicsuite/qt5-cinematicdemo/content/Background.qml b/basicsuite/qt5-cinematicdemo/content/Background.qml new file mode 100644 index 0000000..f0225ba --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/Background.qml @@ -0,0 +1,39 @@ +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: root + + anchors.fill: parent + + Image { + id: backgroundImage + anchors.fill: parent + source: settings.showColors ? "images/background3.png" : "images/background.png" + Behavior on source { + SequentialAnimation { + NumberAnimation { target: backgroundImage; property: "opacity"; to: 0; duration: 400; easing.type: Easing.InQuad } + PropertyAction { target: backgroundImage; property: "source" } + NumberAnimation { target: backgroundImage; property: "opacity"; to: 1; duration: 400; easing.type: Easing.OutQuad } + } + } + } + + // Sky stars particles + ParticleSystem { + width: parent.width + height: 220 + paused: detailsView.isShown || infoView.isShown || !settings.showShootingStarParticles + ImageParticle { + source: "images/star.png" + rotationVariation: 10 + } + Emitter { + anchors.fill: parent + emitRate: 4 + lifeSpan: 5000 + size: 48 + sizeVariation: 16 + } + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/Button.qml b/basicsuite/qt5-cinematicdemo/content/Button.qml new file mode 100644 index 0000000..c6ab643 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/Button.qml @@ -0,0 +1,112 @@ +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: root + + property alias text: buttonTextItem.text + property bool effectsOn: true + signal clicked + + width: buttonBackgroundImage.width + height: buttonBackgroundImage.height + scale: mouseArea.pressed && mouseArea.containsMouse ? 0.9 : 1.0 + opacity: mouseArea.pressed && mouseArea.containsMouse ? 0.8 : 1.0 + + Behavior on scale { + NumberAnimation { duration: 150; easing.type: Easing.OutQuad } + } + Behavior on opacity { + NumberAnimation { duration: 150; easing.type: Easing.OutQuad } + } + + BorderImage { + id: buttonBackgroundImage + source: "images/button.png" + border.left: 24 + border.right: 24 + border.top: 20 + border.bottom: 20 + width: 140 + } + + // Stars effect + ParticleSystem { + id: particleSystem + anchors.fill: buttonBackgroundImage + running: root.effectsOn + ImageParticle { + source: "images/star.png" + rotationVariation: 180 + color:"#ffffff" + } + Emitter { + width: parent.width + height: 8 + emitRate: 16 + lifeSpan: 2000 + size: 32 + sizeVariation: 16 + endSize: 8 + velocity: PointDirection{ y: 20; x:-2; xVariation: 5; yVariation: 10 } + } + Turbulence { + width: parent.width + height: (parent.height / 2) + strength: 8 + } + } + + // Button background + ShaderEffectSource { + id: shaderSource + anchors.fill: buttonBackgroundImage + sourceItem: buttonBackgroundImage + hideSource: true + visible: false + } + + // Particles + ShaderEffectSource { + id: shaderSource2 + anchors.fill: particleSystem + sourceItem: particleSystem + hideSource: true + visible: false + } + + // Mask particles inside the button + ShaderEffect { + id: shaderEffectItem + anchors.fill: shaderSource + + property variant source: shaderSource + property variant source2: shaderSource2 + + fragmentShader: " + uniform sampler2D source; + uniform sampler2D source2; + uniform lowp float qt_Opacity; + varying highp vec2 qt_TexCoord0; + void main() { + lowp vec4 pix = texture2D(source, qt_TexCoord0); + lowp vec4 pix2 = texture2D(source2, qt_TexCoord0); + gl_FragColor = qt_Opacity * (pix + pix.a * pix2); + }" + } + + Text { + id: buttonTextItem + anchors.centerIn: parent + color: "#000000" + font.pixelSize: 28 + } + MouseArea { + id: mouseArea + anchors.fill: parent + anchors.margins: -16 + onClicked: { + root.clicked(); + } + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/CurtainEffect.qml b/basicsuite/qt5-cinematicdemo/content/CurtainEffect.qml new file mode 100644 index 0000000..961b348 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/CurtainEffect.qml @@ -0,0 +1,53 @@ +import QtQuick 2.0 + +ShaderEffect { + id: root + + property variant source + property real leftHeight: height / 2 + property real rightHeight: height / 2 + property real originalHeight: height + property real originalWidth: width + property real amplitude: 0.10 + + mesh: Qt.size(1, 80) + + vertexShader: " + attribute highp vec4 qt_Vertex; + attribute highp vec2 qt_MultiTexCoord0; + uniform highp mat4 qt_Matrix; + varying highp vec2 qt_TexCoord0; + varying lowp float shade; + uniform highp float leftHeight; + uniform highp float rightHeight; + uniform highp float originalHeight; + uniform highp float originalWidth; + uniform highp float amplitude; + + void main() { + qt_TexCoord0 = qt_MultiTexCoord0; + + highp vec4 shift = vec4(0); + shift.y = qt_Vertex.y * ((originalHeight - leftHeight) + (leftHeight - rightHeight) * (qt_Vertex.x / originalWidth)) / originalHeight; + + shade = sin(21.9911486 * qt_Vertex.y / originalHeight); + shift.x = amplitude * (originalHeight - leftHeight + (leftHeight - rightHeight) * (qt_Vertex.x / originalWidth)) * shade; + + gl_Position = qt_Matrix * (qt_Vertex - shift); + + shade = 0.2 * (2.0 - shade ) * (1.0 - (rightHeight + (leftHeight - rightHeight) * (1.0 - qt_Vertex.y / originalWidth)) / originalHeight); + } + " + + fragmentShader: " + varying highp vec2 qt_TexCoord0; + uniform lowp float qt_Opacity; + uniform sampler2D source; + varying lowp float shade; + void main() { + highp vec4 color = texture2D(source, qt_TexCoord0); + color.rgb *= 1.0 - shade; + gl_FragColor = color * qt_Opacity; + } + " +} diff --git a/basicsuite/qt5-cinematicdemo/content/DelegateItem.qml b/basicsuite/qt5-cinematicdemo/content/DelegateItem.qml new file mode 100644 index 0000000..ced4f95 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/DelegateItem.qml @@ -0,0 +1,93 @@ +import QtQuick 2.0 + +Item { + id: root + + property string name + property bool isSelected: listView.currentIndex === index + + width: parent ? parent.width : imageItem.width + height: imageItem.height + z: isSelected ? 1000 : -index + rotation: isSelected ? 0 : -15 + scale: isSelected ? mainView.height/540 : mainView.height/1080 + opacity: 1.0 - Math.abs((listView.currentIndex - index) * 0.25) + + Behavior on rotation { + NumberAnimation { duration: 500; easing.type: Easing.OutBack } + } + Behavior on scale { + NumberAnimation { duration: 1500; easing.type: Easing.OutElastic } + } + Behavior on opacity { + NumberAnimation { duration: 200; easing.type: Easing.OutQuad } + } + + MouseArea { + anchors.fill: parent + onClicked: { + if (isSelected) { + detailsView.image = model.image + detailsView.name = model.name + detailsView.year = model.year + detailsView.director = model.director + detailsView.cast = model.cast + detailsView.rating = model.rating + detailsView.overview = model.overview + detailsView.show(); + } else { + listView.currentIndex = index; + if (settings.showShootingStarParticles) shootingStarBurst.burst(50); + } + } + } + + Image { + id: imageItem + anchors.horizontalCenter: parent.horizontalCenter + source: "images/" + model.image + visible: !settings.showLighting + } + + ShaderEffectSource { + id: s1 + sourceItem: imageItem + hideSource: settings.showLighting + visible: settings.showLighting + } + + ShaderEffect { + anchors.fill: imageItem + property variant src: s1 + property variant srcNmap: coverNmapSource + property real widthPortition: mainView.width/imageItem.width + property real heightPortition: mainView.height/imageItem.height + property real widthNorm: widthPortition * 0.5 - 0.5 + property real heightNorm: root.y/imageItem.height - listView.contentY / imageItem.height + property real lightPosX: listView.globalLightPosX * widthPortition - widthNorm + property real lightPosY: listView.globalLightPosY * heightPortition - heightNorm + visible: settings.showLighting + + fragmentShader: " + uniform sampler2D src; + uniform sampler2D srcNmap; + uniform lowp float qt_Opacity; + varying highp vec2 qt_TexCoord0; + uniform highp float lightPosX; + uniform highp float lightPosY; + void main() { + highp vec4 pix = texture2D(src, qt_TexCoord0.st); + highp vec4 pix2 = texture2D(srcNmap, qt_TexCoord0.st); + highp vec3 normal = normalize(pix2.rgb * 2.0 - 1.0); + highp vec3 light_pos = normalize(vec3(qt_TexCoord0.x - lightPosX, qt_TexCoord0.y - lightPosY, 0.8 )); + highp float diffuse = max(dot(normal, light_pos), 0.2); + + // boost a bit + diffuse *= 2.5; + + highp vec3 color = diffuse * pix.rgb; + gl_FragColor = vec4(color, pix.a) * qt_Opacity; + } + " + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/DetailsView.qml b/basicsuite/qt5-cinematicdemo/content/DetailsView.qml new file mode 100644 index 0000000..b3ff952 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/DetailsView.qml @@ -0,0 +1,190 @@ +import QtQuick 2.0 + +Item { + id: root + + property bool isShown: false + property string image + property string name + property string year + property string director + property string cast + property string overview + property alias rating: ratingsItem.rating + + anchors.fill: parent + opacity: 0 + visible: opacity + scale: 0.3 + + function show() { + mainView.scheduleUpdate(); + root.isShown = true; + showAnimation.restart(); + } + function hide() { + hideAnimation.restart(); + } + + Binding { + target: mainView + property: "blurAmount" + value: 40 * root.opacity + when: root.isShown + } + + ParallelAnimation { + id: showAnimation + NumberAnimation { target: root; property: "opacity"; to: 1.0; duration: 500; easing.type: Easing.InOutQuad } + NumberAnimation { target: root; property: "scale"; to: 1.0; duration: 500; easing.type: Easing.InOutQuad } + } + SequentialAnimation { + id: hideAnimation + ParallelAnimation { + NumberAnimation { target: root; property: "opacity"; to: 0; duration: 500; easing.type: Easing.InOutQuad } + NumberAnimation { target: root; property: "scale"; to: 0.3; duration: 500; easing.type: Easing.InOutQuad } + } + PropertyAction { target: root; property: "isShown"; value: false } + } + + MouseArea { + anchors.fill: parent + onClicked: { + root.hide(); + } + } + + Rectangle { + id: backgroundItem + anchors.centerIn: parent + width: Math.min(620, parent.width - 32) + height: Math.min(840, parent.height - 32) + border.color: "#808080" + border.width: 1 + opacity: 0.9 + gradient: Gradient { + GradientStop { position: 0.0; color: "#101010" } + GradientStop { position: 0.3; color: "#404040" } + GradientStop { position: 1.0; color: "#090909" } + } + } + + Flickable { + anchors.top: backgroundItem.top + anchors.left: backgroundItem.left + anchors.right: backgroundItem.right + anchors.bottom: bottomSeparator.top + anchors.margins: 1 + anchors.bottomMargin: 0 + + contentWidth: backgroundItem.width + contentHeight: ratingsItem.y + descriptionTextItem.height + 64 + flickableDirection: Flickable.VerticalFlick + clip: true + + Image { + id: movieImageItem + x: 8 + y: 24 + width: 192 + height: 192 + source: root.image ? "images/" + root.image : "" + fillMode: Image.PreserveAspectFit + smooth: true + } + + Column { + id: topColumn + y: 20 + anchors.left: movieImageItem.right + anchors.leftMargin: 10 + anchors.right: parent.right + anchors.rightMargin: 26 + spacing: 8 + Text { + id: titleTextItem + width: parent.width + wrapMode: Text.WordWrap + color: "#ffffff" + font.pixelSize: text.length < 12 ? settings.fontL : settings.fontMM + text: root.name + } + Text { + id: yearTextItem + width: parent.width + wrapMode: Text.WordWrap + color: "#ffffff" + font.pixelSize: settings.fontS + text: "Published: " + root.year + } + Text { + id: directorsTextItem + width: parent.width + wrapMode: Text.WordWrap + color: "#ffffff" + font.pixelSize: settings.fontS + text: "Director: " + root.director + } + Text { + id: castTextItem + width: parent.width + wrapMode: Text.WordWrap + color: "#ffffff" + font.pixelSize: settings.fontS + text: "Cast: " + root.cast + } + } + + RatingsItem { + id: ratingsItem + x: 10 + y: Math.max(topColumn.height, movieImageItem.height) + 40 + rating: root.rating + } + + Text { + id: descriptionTextItem + anchors.top: ratingsItem.bottom + anchors.topMargin: 16 + width: parent.width - 32 + anchors.horizontalCenter: parent.horizontalCenter + wrapMode: Text.WordWrap + color: "#ffffff" + font.pixelSize: settings.fontM + text: "Description: " + root.overview + } + } + + Rectangle { + id: bottomSeparator + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: backgroundItem.bottom + anchors.bottomMargin: 80 + width: backgroundItem.width - 16 + height: 1 + color: "#808080" + } + + Button { + anchors.bottom: backgroundItem.bottom + anchors.bottomMargin: 8 + anchors.left: backgroundItem.left + anchors.leftMargin: 32 + text: "Back" + effectsOn: false + onClicked: { + root.hide(); + } + } + Button { + anchors.bottom: backgroundItem.bottom + anchors.bottomMargin: 8 + anchors.right: backgroundItem.right + anchors.rightMargin: 32 + effectsOn: root.visible + text: "Order" + onClicked: { + console.debug("Order! TODO: implement"); + } + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/FpsItem.qml b/basicsuite/qt5-cinematicdemo/content/FpsItem.qml new file mode 100644 index 0000000..fb66d56 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/FpsItem.qml @@ -0,0 +1,42 @@ +import QtQuick 2.0 + +Item { + id: root + property int frameCounter: 0 + property int fps: 0; + + width: 160 + height: 48 + + Image { + id: spinnerImage + source: "images/spinner.png" + NumberAnimation on rotation { + from:0 + to: 360 + duration: 800 + loops: Animation.Infinite + } + onRotationChanged: frameCounter++; + } + + Text { + anchors.right: parent.right + anchors.verticalCenter: spinnerImage.verticalCenter + color: "#ffffff" + style: Text.Outline + styleColor: "#606060" + font.pixelSize: 28 + text: root.fps + " fps" + } + + Timer { + interval: 2000 + repeat: true + running: true + onTriggered: { + fps = frameCounter/2; + frameCounter = 0; + } + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/InfoView.qml b/basicsuite/qt5-cinematicdemo/content/InfoView.qml new file mode 100644 index 0000000..dee035e --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/InfoView.qml @@ -0,0 +1,264 @@ +import QtQuick 2.0 + +Item { + id: root + + property bool isShown: false + + anchors.fill: parent + + QtObject { + id: priv + property bool poleOut: false + // How curly the curtain is when opened + property int endCurly: 80 + // 0 = pole in, 1 = pole out + property real polePosition: 0 + property bool showingStarted: false + } + + function show() { + priv.showingStarted = true; + // Disabled, so animations continue while infoview is on + //isShown = true; + hideCurtainAnimation.stop(); + hidePoleAnimation.stop(); + if (priv.poleOut) { + showCurtainAnimation.restart(); + } else { + showPoleAnimation.restart(); + } + } + function hide() { + priv.showingStarted = false; + showCurtainAnimation.stop(); + showPoleAnimation.stop(); + if (priv.poleOut) { + hideCurtainAnimation.restart(); + } else { + hidePoleAnimation.restart(); + } + } + + onIsShownChanged: { + if (root.isShown) { + mainView.scheduleUpdate(); + } + } + + Binding { + target: mainView + property: "blurAmount" + value: 40 * priv.polePosition + when: root.isShown + } + + // Pole show/hide animations + SequentialAnimation { + id: showPoleAnimation + NumberAnimation { target: priv; property: "polePosition"; to: 1; duration: 600; easing.type: Easing.InOutQuad } + PropertyAction { target: priv; property: "poleOut"; value: true } + ScriptAction { script: showCurtainAnimation.restart(); } + } + SequentialAnimation { + id: hidePoleAnimation + PropertyAction { target: priv; property: "poleOut"; value: false } + NumberAnimation { target: priv; property: "polePosition"; to: 0; duration: 600; easing.type: Easing.InOutQuad } + PropertyAction { target: root; property: "isShown"; value: false } + } + + // Curtain show/hide animations + SequentialAnimation { + id: showCurtainAnimation + NumberAnimation { target: curtainEffect; property: "rightHeight"; to: root.height-8; duration: 1200; easing.type: Easing.OutBack } + } + SequentialAnimation { + id: hideCurtainAnimation + NumberAnimation { target: curtainEffect; property: "rightHeight"; to: 0; duration: 600; easing.type: Easing.OutCirc } + ScriptAction { script: hidePoleAnimation.restart(); } + } + + MouseArea { + anchors.fill: parent + enabled: priv.poleOut + onClicked: { + root.hide(); + } + } + + BorderImage { + anchors.right: parent.right + anchors.top: parent.top + border.left: 22 + border.right: 64 + border.top: 0 + border.bottom: 0 + width: 86 + priv.polePosition * (viewItem.width-88) + z: 20 + source: "images/info.png" + opacity: 0.5 + priv.polePosition + MouseArea { + anchors.fill: parent + anchors.margins: -20 + onClicked: { + if (priv.showingStarted) { + root.hide(); + } else { + root.show(); + } + } + } + } + + Item { + id: viewItem + anchors.right: parent.right + width: Math.min(620, parent.width) + height: parent.height + priv.endCurly - 16 + y: 8 + visible: priv.poleOut + + Rectangle { + id: backgroundItem + anchors.fill: parent + anchors.margins: 16 + anchors.topMargin: 8 + gradient: Gradient { + GradientStop { position: 0.0; color: "#101010" } + GradientStop { position: 0.3; color: "#404040" } + GradientStop { position: 1.0; color: "#090909" } + } + border.color: "#808080" + border.width: 1 + opacity: 0.8 + } + + Flickable { + id: flickableArea + anchors.fill: backgroundItem + contentHeight: infoTextColumn.height + 32 + contentWidth: backgroundItem.width + flickableDirection: Flickable.VerticalFlick + clip: true + + Column { + id: infoTextColumn + width: parent.width + spacing: 32 + + Item { + width: parent.width + height: 8 + } + Image { + id: textItem + anchors.horizontalCenter: parent.horizontalCenter + source: "images/heading.png" + } + + InfoViewItem { + text: "Welcome to 'Cinematic Experience' demo. This application demonstrates the power of Qt5 and few of the new additions available in QtQuick 2.0. Below is a short summary of those new features which have been used in this demo application." + image: "images/qt_logo2.png" + } + InfoViewItem { + text: "Rendering
    Qt5 has brand new rendering backend 'QML SceneGraph' which is optimized for hardware accelerated rendering. This allows to take full gains out of OpenGL powered GPUs on desktop and embedded devices. Not just performance, new Qt5 rendering backend also allows features which have not been possible earlier." + } + InfoViewItem { + text: "Particles
    Qt5 comes with a fresh particles plugin 'QtQuick.Particles 2.0' which is superior compared to Qt4 particles. In this demo application, twinkling stars, shooting star and fog/smoke have been implemented using this new particles engine. Superb." + image: "images/sc2.png" + } + InfoViewItem { + text: "Sprites
    QtQuick 2.0 has built-in support for sprites using Sprite, SpriteSequence and AnimatedSprite elements. Sprites can also be used as a source for particles. In this demo application, shooting star is an AnimatedSprite with 16 frames." + image: "images/sc5.png" + switchedLayout: true + } + InfoViewItem { + text: "Animations
    QtQuick has always had a very strong animations support. Qt5 supports now also animations along a non-linear paths using PathAnimation and PathInterpolator QML elements. In this demo, shooting star position moves along PathAnimation using PathCurves." + image: "images/sc1.png" + } + InfoViewItem { + text: "ShaderEffects
    Qt5 supports ShaderEffect and ShaderEffectSource QML elements which allow writing custom GLSL shader effects. This gives developers a lot of control to transform and enhance QML UIs by increasing dynamicity. In this demo, custom shader effect is used for lighting the movie delegates." + image: "images/sc3.png" + switchedLayout: true + } + InfoViewItem { + text: "Graphical Effects
    Qt5 comes with pre-defined set of effects such as drop-shadow, blur, glow, colorize etc. These are available in 'QtGraphicalEffects 1.0' plugin. In this demo, DropShadow is used to improve the appearance of movie title texts." + image: "images/sc4.png" + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter + height: 128 + spacing: 16 + Image { + source: "images/qt_ambassador_logo.png" + anchors.bottom: parent.bottom + } + Image { + source: "images/cc-by_logo.png" + anchors.bottom: parent.bottom + } + Image { + source: "images/quit_logo.png" + anchors.bottom: parent.bottom + } + } + Text { + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter + color: "#909090" + font.pixelSize: settings.fontXS + text: "Copyright 2012 QUIt Coding. Reuse sources freely." + } + } + } + + // Grip to close the view by flicking + Image { + id: gripImage + anchors.right: parent.right + anchors.rightMargin: 8 + anchors.bottom: parent.bottom + anchors.bottomMargin: 8 + source: "images/grip.png" + opacity: 0.25 + MouseArea { + property int pressedY: 0 + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.bottomMargin: priv.endCurly - 16 + anchors.margins: -16 + width: 90 + height: 80 + onPressed: { + showCurtainAnimation.stop(); + hideCurtainAnimation.stop(); + pressedY = mouseY + } + onPositionChanged: { + curtainEffect.rightHeight = root.height - (pressedY - mouseY) - 8 + } + onReleased: { + if (mouseY < -root.height*0.2) { + root.hide(); + } else { + root.show(); + } + } + } + } + } + + CurtainEffect { + id: curtainEffect + anchors.fill: viewItem + source: ShaderEffectSource { sourceItem: viewItem; hideSource: true } + rightHeight: 0 + leftHeight: rightHeight + Behavior on leftHeight { + SpringAnimation { spring: .4; damping: .05; mass: .5 } + } + // Hide smoothly when curtain closes + opacity: 0.004 * rightHeight + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/InfoViewItem.qml b/basicsuite/qt5-cinematicdemo/content/InfoViewItem.qml new file mode 100644 index 0000000..a339f98 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/InfoViewItem.qml @@ -0,0 +1,30 @@ +import QtQuick 2.0 + +Item { + id: root + property alias text: textItem.text + property alias image: imageItem.source + // Switch image & text positions + property bool switchedLayout: false + + width: parent.width + height: Math.max(imageItem.height, textItem.paintedHeight) + + Image { + id: imageItem + x: root.switchedLayout ? 16 : parent.width - width - 10 + y: 8 + } + + Text { + id: textItem + width: parent.width - imageItem.width - 40 + x: root.switchedLayout ? parent.width - width - 16 : 16 + y: 8 + color: "#ffffff" + style: Text.Raised + styleColor: "#000000" + font.pixelSize: settings.fontS + wrapMode: Text.WordWrap + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/MainView.qml b/basicsuite/qt5-cinematicdemo/content/MainView.qml new file mode 100644 index 0000000..73efe70 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/MainView.qml @@ -0,0 +1,232 @@ +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import QtGraphicalEffects 1.0 + +Item { + id: root + + // Set this to blur the mainView when showing something on top of it + property real blurAmount: 0 + + // Updates the blur shader source, best called right before adding blurAmount + function scheduleUpdate() { + mainContentSource.scheduleUpdate(); + } + + anchors.fill: parent + + // Update blur shader source when width/height changes + onHeightChanged: { + root.scheduleUpdate(); + } + onWidthChanged: { + root.scheduleUpdate(); + } + + Item { + id: mainViewArea + anchors.fill: parent + + Background { + id: background + } + + ListView { + id: listView + + property real globalLightPosX: lightImage.x / root.width + property real globalLightPosY: lightImage.y / root.height + + // Normal-mapped cover shared among delegates + ShaderEffectSource { + id: coverNmapSource + sourceItem: Image { source: "images/cover_nmap.png" } + hideSource: true + visible: false + } + + anchors.fill: parent + spacing: -60 + model: moviesModel + delegate: DelegateItem { + name: model.name + } + highlightFollowsCurrentItem: true + highlightRangeMode: ListView.StrictlyEnforceRange + highlightMoveDuration: 400 + preferredHighlightBegin: root.height * 0.5 - 140 + preferredHighlightEnd: root.height * 0.5 - 140 + cacheBuffer: 4000 + } + + Text { + id: titleText + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: -40 + anchors.horizontalCenter: parent.horizontalCenter + width: 180 + parent.width * 0.25 + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + text: listView.currentIndex+1 + ". " + listView.currentItem.name + color: "#ffffff" + style: Text.Outline + styleColor: "#b0a030" + font.pixelSize: settings.fontL + Behavior on text { + SequentialAnimation { + ParallelAnimation { + NumberAnimation { target: titleText; property: "opacity"; duration: 100; to: 0; easing.type: Easing.InOutQuad } + NumberAnimation { target: titleText; property: "scale"; duration: 100; to: 0.6; easing.type: Easing.InOutQuad } + } + PropertyAction { target: titleText; property: "text" } + ParallelAnimation { + NumberAnimation { target: titleText; property: "opacity"; duration: 100; to: 1; easing.type: Easing.InOutQuad } + NumberAnimation { target: titleText; property: "scale"; duration: 100; to: 1; easing.type: Easing.InOutQuad } + } + } + } + } + + Image { + anchors.bottom: parent.bottom + anchors.bottomMargin: 32 + anchors.horizontalCenter: parent.horizontalCenter + source: "images/qt_logo.png" + opacity: listView.atYEnd + Behavior on opacity { + NumberAnimation { duration: 500; easing.type: Easing.InOutQuad } + } + } + + // Shooting star + animation + particles + AnimatedSprite { + id: lightImage + width: 128 + height: 128 + frameWidth: 128 + frameHeight: 128 + frameCount: 16 + frameRate: 15 + source: "images/planet_sprite.png" + interpolate: true + loops: Animation.Infinite + visible: settings.showLighting || settings.showShootingStarParticles + running: !detailsView.isShown && !infoView.isShown && (settings.showLighting || settings.showShootingStarParticles) + } + + PathAnimation { + target: lightImage + duration: 5000 + orientation: PathAnimation.RightFirst + anchorPoint: Qt.point(lightImage.width/2, lightImage.height/2) + running: true + paused: detailsView.isShown || infoView.isShown || (!settings.showLighting && !settings.showShootingStarParticles) + loops: Animation.Infinite + path: Path { + id: lightAnimPath + property int w: root.width > 0 ? root.width : 1 + property int h: root.height > 0 ? root.height : 1 + startX: w*0.4; startY: h*0.3 + PathCurve { x: lightAnimPath.w*0.8; y: lightAnimPath.h*0.2 } + PathCurve { x: lightAnimPath.w*0.8; y: lightAnimPath.h*0.7 } + PathCurve { x: lightAnimPath.w*0.1; y: lightAnimPath.h*0.6 } + PathCurve { x: lightAnimPath.w*0.4; y: lightAnimPath.h*0.3 } + } + } + + ParticleSystem { + anchors.fill: parent + paused: detailsView.isShown || infoView.isShown + + // Shooting star particles + ImageParticle { + source: "images/particle.png" + color: "#ffefaf" + colorVariation: settings.showColors ? 1.0 : 0.1 + alpha: 0 + } + Emitter { + id: shootingStarEmitter + emitRate: settings.showShootingStarParticles ? 100 : 0 + lifeSpan: 2000 + x: lightImage.x + lightImage.width/2 + y: lightImage.y + lightImage.height/2 + velocity: PointDirection {xVariation: 8; yVariation: 8;} + acceleration: PointDirection {xVariation: 12; yVariation: 12;} + size: 32 + sizeVariation: 16 + } + Emitter { + id: shootingStarBurst + emitRate: 0 + lifeSpan: 2000 + x: lightImage.x + lightImage.width/2 + y: lightImage.y + lightImage.height/2 + velocity: PointDirection {xVariation: 60; yVariation: 60;} + acceleration: PointDirection {xVariation: 40; yVariation: 40;} + size: 24 + sizeVariation: 16 + } + + // Dust/Smoke particles + ImageParticle { + groups: ["smoke"] + source: "images/smoke.png" + color: "#ffffff" + alpha: 0.9 + opacity: 0.8 + colorVariation: settings.showColors ? 0.9 : 0.0 + rotationVariation: 180 + } + Emitter { + y: root.height * 0.85 + anchors.horizontalCenter: parent.horizontalCenter + width: 200 + parent.width * 0.1 + height: root.height * 0.3 + emitRate: settings.showFogParticles ? 8 : 0 + lifeSpan: 2000 + lifeSpanVariation: 1000 + group: "smoke" + size: 192 + sizeVariation: 64 + acceleration: PointDirection { y: -80; xVariation: 20 } + } + Emitter { + y: root.height * 0.9 + anchors.horizontalCenter: parent.horizontalCenter + width: 200 + parent.width * 0.1 + height: root.height * 0.2 + emitRate: settings.showFogParticles ? 10 : 0 + lifeSpan: 2000 + group: "smoke" + size: 192 + sizeVariation: 64 + acceleration: PointDirection { y: -20; xVariation: 40 } + } + Turbulence { + groups: ["smoke"] + width: parent.width + height: parent.height * 0.8 + strength: 60 + } + } + + SettingsView { + id: settingsView + } + } + + FastBlur { + anchors.fill: mainViewArea + radius: root.blurAmount + visible: root.blurAmount + source: ShaderEffectSource { + id: mainContentSource + anchors.fill: parent + sourceItem: mainViewArea + hideSource: false + live: false + visible: root.blurAmount + } + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/MoviesModel.qml b/basicsuite/qt5-cinematicdemo/content/MoviesModel.qml new file mode 100644 index 0000000..c2ee561 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/MoviesModel.qml @@ -0,0 +1,187 @@ +import QtQuick 2.0 + +// Dummy model for movies +ListModel { + id: movieModel + + ListElement { + name: "Lord of the Rings: The Return of the King" + image: "15.png" + year: "2003" + rating: 8.9 + director: "Peter Jackson" + cast: "Elijah Wood, Viggo Mortensen, Ian McKellen" + overview: "While Frodo & Sam continue to approach Mount Doom to destroy the One Ring, unaware of the path Gollum is leading them, the former Fellowship aid Rohan & Gondor in a great battle in the Pelennor Fields, Minas Tirith and the Black Gates as Sauron wages his last war against Middle-Earth." + } + ListElement { + name: "Fight Club" + image: "9.png" + year: "1999" + rating: 8.9 + director: "David Fincher" + cast: "Brad Pitt, Edward Norton, Helena Bonham Carter" + overview: "A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on, with underground \"fight clubs\" forming in every town, until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion." + } + ListElement { + name: "Lord of the Rings: The Fellowship of the Ring" + image: "13.png" + year: "2001" + rating: 8.8 + director: "Peter Jackson" + cast: "Elijah Wood, Ian McKellen, Orlando Bloom" + overview: "An ancient Ring thought lost for centuries has been found, and through a strange twist in fate has been given to a small Hobbit named Frodo. When Gandalf discovers the Ring is in fact the One Ring of the Dark Lord Sauron, Frodo must make an epic quest to the Cracks of Doom in order to destroy it! However he does not go alone. He is joined by Gandalf, Legolas the elf, Gimli the Dwarf, Aragorn, Boromir and his three Hobbit friends Merry, Pippin and Samwise. Through mountains, snow, darkness, forests, rivers and plains, facing evil and danger at every corner the Fellowship of the Ring must go. Their quest to destroy the One Ring is the only hope for the end of the Dark Lords reign!" + } + ListElement { + name: "Lord of the Rings: The Two Towers" + image: "14.png" + year: "2002" + rating: 8.7 + director: "Peter Jackson" + cast: "Elijah Wood, Ian McKellen, Viggo Mortensen" + overview: "Sauron's forces increase. His allies grow. The Ringwraiths return in an even more frightening form. Saruman's army of Uruk Hai is ready to launch an assault against Aragorn and the people of Rohan. Yet, the Fellowship is broken and Boromir is dead. For the little hope that is left, Frodo and Sam march on into Mordor, unprotected. A number of new allies join with Aragorn, Gimli, Legolas, Pippin and Merry. And they must defend Rohan and attack Isengard. Yet, while all this is going on, Sauron's troops mass toward the City of Gondor, for the War of the Ring is about to begin." + } + ListElement { + name: "Gladiator" + image: "10.png" + year: "2000" + rating: 8.5 + director: "Ridley Scott" + cast: "Russell Crowe, Joaquin Phoenix, Connie Nielsen" + overview: "Maximus is a powerful Roman general, loved by the people and the aging Emperor, Marcus Aurelius. Before his death, the Emperor chooses Maximus to be his heir over his own son, Commodus, and a power struggle leaves Maximus and his family condemned to death. The powerful general is unable to save his family, and his loss of will allows him to get captured and put into the Gladiator games until he dies. The only desire that fuels him now is the chance to rise to the top so that he will be able to look into the eyes of the man who will feel his revenge." + } + ListElement { + name: "Big Fish" + image: "7.png" + year: "2003" + rating: 8.0 + director: "Tim Burton" + cast: "Ewan McGregor, Albert Finney, Billy Crudup" + overview: "The story revolves around a dying father and his son, who is trying to learn more about his dad by piecing together the stories he has gathered over the years. The son winds up re-creating his father's elusive life in a series of legends and myths inspired by the few facts he knows. Through these tales, the son begins to understand his father's great feats and his great failings." + } + ListElement { + name: "Avatar" + image: "12.png" + year: "2009" + rating: 8.0 + director: "James Cameron" + cast: "Sam Worthington, Zoe Saldana, Sigourney Weaver" + overview: "When his brother is killed in a robbery, paraplegic Marine Jake Sully decides to take his place in a mission on the distant world of Pandora. There he learns of greedy corporate figurehead Parker Selfridge's intentions of driving off the native humanoid \"Na\'vi\" in order to mine for the precious material scattered throughout their rich woodland. In exchange for the spinal surgery that will fix his legs, Jake gathers intel for the cooperating military unit spearheaded by gung-ho Colonel Quaritch, while simultaneously attempting to infiltrate the Na\'vi people with the use of an \"avatar\" identity. While Jake begins to bond with the native tribe and quickly falls in love with the beautiful alien Neytiri, the restless Colonel moves forward with his ruthless extermination tactics, forcing the soldier to take a stand - and fight back in an epic battle for the fate of Pandora." + } + ListElement { + name: "The Social Network" + image: "18.png" + year: "2010" + rating: 7.9 + director: "David Fincher" + cast: "Jesse Eisenberg, Andrew Garfield, Justin Timberlake" + overview: "On a fall night in 2003, Harvard undergrad and computer programming genius Mark Zuckerberg sits down at his computer and heatedly begins working on a new idea. In a fury of blogging and programming, what begins in his dorm room soon becomes a global social network and a revolution in communication. A mere six years and 500 million friends later, Mark Zuckerberg is the youngest billionaire in history... but for this entrepreneur, success leads to both personal and legal complications." + } + ListElement { + name: "300" + image: "5.png" + year: "2006" + rating: 7.8 + director: "Zack Snyder" + cast: "Gerard Butler, Lena Headey, David Wenham" + overview: "In the Battle of Thermopylae of 480 BC an alliance of Greek city-states fought the invading Persian army in the mountain pass of Thermopylae. Vastly outnumbered, the Greeks held back the enemy in one of the most famous last stands of history. Persian King Xerxes lead a Army of well over 100,000 (Persian king Xerxes before war has about 170,000 army) men to Greece and was confronted by 300 Spartans, 700 Thespians and other Slave soldiers. Xerxes waited for 10 days for King Leonidas to surrender or withdraw left with no options he moved. The battle lasted for about 3 days and after which all 300 Spartans were killed. The Spartan defeat was not the one expected, as a local shepherd, named Ephialtes, defected to the Persians and informed Xerxes of a separate path through Thermopylae, which the Persians could use to outflank the Greeks." + } + ListElement { + name: "The Last Samurai" + image: "2.png" + year: "2003" + rating: 7.7 + director: "Edward Zwick" + cast: "Tom Cruise, Ken Watanabe, Billy Connolly" + overview: "In the 1870s, Captain Nathan Algren, a cynical veteran of the American Civil war who will work for anyone, is hired by Americans who want lucrative contracts with the Emperor of Japan to train the peasant conscripts for the first standing imperial army in modern warfare using firearms. The imperial Omura cabinet's first priority is to repress a rebellion of traditionalist Samurai -hereditary warriors- who remain devoted to the sacred dynasty but reject the Westernizing policy and even refuse firearms. Yet when his ill-prepared superior force sets out too soon, their panic allows the sword-wielding samurai to crush them. Badly wounded Algren's courageous stand makes the samurai leader Katsumoto spare his life; once nursed to health he learns to know and respect the old Japanese way, and participates as advisor in Katsumoto's failed attempt to save the Bushido tradition, but..." + } + ListElement { + name: "The Bolt" + image: "1.png" + year: "2008" + rating: 7.1 + director: "Byron Howard, Chris Williams" + cast: "John Travolta, Miley Cyrus, Susie Essman" + overview: "Bolt, an American White Shepherd, has lived his whole life on the set of his action TV show, where he believes he has superpowers. When separated from the studio by accident, he meets a female alley cat named Mittens and a hamster named Rhino. He's trying to find the way home, to the studio. Along the way, he learns that he doesn't have superpowers and that the show is not real." + } + ListElement { + name: "The School of Rock" + image: "3.png" + year: "2003" + rating: 7.1 + director: "Richard Linklater" + cast: "Jack Black, Mike White, Joan Cusack" + overview: "Down and out rock star Dewey Finn gets fired from his band, and he faces a mountain of debts and depression. He takes a job as a 4th grade substitute teacher at an uptight private school where his attitude and hijinx have a powerful effect on his students. He also meets Zack, a 10-year-old guitar prodigy, who could help Dewey win a \"battle of the bands\" competition, which would solve his financial problems and put him back in the spotlight." + } + ListElement { + name: "Thor" + image: "19.png" + year: "2011" + rating: 7.0 + director: "Kenneth Branagh" + cast: "Chris Hemsworth, Anthony Hopkins, Natalie Portman" + overview: "The warrior Thor (Hemsworth) is cast out of the fantastic realm of Asgard by his father Odin (Hopkins) for his arrogance and sent to Earth to live among humans. Falling in love with scientist Jane Foster (Portman) teaches Thor much-needed lessons, and his new-found strength comes into play as a villain from his homeland sends dark forces toward Earth." + } + ListElement { + name: "Charlie and the Chocolate Factory" + image: "16.png" + year: "2005" + rating: 6.9 + director: "Tim Burton" + cast: "Johnny Depp, Freddie Highmore, David Kelly" + overview: "When Willy Wonka decides to let five children into his chocolate factory, he decides to release five golden tickets in five separate chocolate bars, causing complete mayhem. The tickets start to be found, with the fifth going to a very special boy, called Charlie Bucket. With his Grandpa, Charlie joins the rest of the children to experience the most amazing factory ever. But not everything goes to plan within the factory." + } + ListElement { + name: "Quantum of Solace" + image: "4.png" + year: "2008" + rating: 6.8 + director: "Marc Forster" + cast: "Daniel Craig, Olga Kurylenko, Mathieu Amalric" + overview: "Is there solace in revenge? Bond and \"M\" sniff a shadowy international network of power and corruption reaping billions. As Bond pursues the agents of an assassination attempt on \"M,\" all roads lead to Dominic Greene, a world-renowned developer of green technology. Greene, a nasty piece of work, is intent on securing a barren area of Bolivia in exchange for assisting a strongman stage a coup there. The CIA looks the other way, and only Bond, with help from a retired spy and from a mysterious beauty, stands in Greene's way. \"M\" wonders if she can trust Bond, or if vengeance possesses him. Beyond that, can anyone drawn to Bond live to tell the tale?" + } + ListElement { + name: "Dinosaur" + image: "8.png" + year: "2000" + rating: 6.3 + director: "Eric Leighton, Ralph Zondag" + cast: "D.B. Sweeney, Julianna Margulies, Samuel E. Wright" + overview: "During an attack on a pack of Iguanodon, an egg is separated and ends up with the possession of a group of lemurs. The lemurs care for this egg and the young creature born from it, which they call Aladar. When a meteor shower hits earth, Aladar and his family must leave their homeland. Away from home and as close to danger as they have ever been, they meet up with a huge group of dinosaurs, led by Kron and Bruton. All together they are trying to reach the nesting grounds, but it's not going to be easy." + } + ListElement { + name: "Bee Movie" + image: "6.png" + year: "2007" + rating: 6.2 + director: "Steve Hickner, Simon J. Smith" + cast: "Jerry Seinfeld, Renée Zellweger, Matthew Broderick" + overview: "When the bee Barry B. Benson graduates from college, he finds that he will have only one job for his entire life, and absolutely disappointed, he joins the team responsible for bringing the honey and pollination of the flowers to visit the world outside the hive. Once in Manhattan, he is saved by the florist Vanessa and he breaks the bee law to thank Vanessa. They become friends and Barry discovers that humans exploit bees to sell the honey they produce. Barry decides to sue the human race, with destructive consequences to nature." + } + ListElement { + name: "Jumper" + image: "11.png" + year: "2008" + rating: 5.9 + director: "Doug Liman" + cast: "Hayden Christensen, Samuel L. Jackson, Jamie Bell" + overview: "David Rice is a high school student in Ann Arbor, abandoned by his mother at five, enamored with Millie, a fellow student, and picked on by at least one classmate. On a winter's day, while about to drown, he discovers he can transport himself instantaneously to anyplace on earth. He leaves town, goes to New York City, robs a bank vault, and comes to the attention of a shadowy group of government hunters. Eight years later, the hunters, led by the murderous Roland, get a fix on David. He heads home, searches out Millie, invites her to travel with him, and only later realizes that Roland and his crew are seriously deadly. Is everyone close to David in danger?" + } + ListElement { + name: "The Haunting" + image: "17.png" + year: "1999" + rating: 4.7 + director: "Jan de Bont" + cast: "Liam Neeson, Catherine Zeta-Jones, Owen Wilson" + overview: "A remake of the classic 1963 movie \"The Haunting\" about a team of paranormal experts who look into strange occurrences in an ill-fated house. Through the course of the night some will unravel, some will question, and all will fight for their lives as the house fights back." + } + ListElement { + name: "Wild Wild West" + image: "20.png" + year: "1999" + rating: 4.5 + director: "Barry Sonnenfeld" + cast: "Will Smith, Kevin Kline, Kenneth Branagh" + overview: "Jim West is a guns-a-blazing former Civil War hero. Artemus Gordon is an inventive U.S. Marshal who excels in disguise. When the United States is threatened by psychotic Confederate Arliss Loveless, President Ulysses Grant teams the duo up to bring him to justice. On a hazard-packed train journey from Washington D.C. to Utah, West and Gordon must combine their skills to best Loveless and his diabolical machines." + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/RatingsItem.qml b/basicsuite/qt5-cinematicdemo/content/RatingsItem.qml new file mode 100644 index 0000000..6d22489 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/RatingsItem.qml @@ -0,0 +1,32 @@ +import QtQuick 2.0 + +Item { + property real rating: 5.0 + + width: emptyRatingStarsImage.width + ratingTextItem.paintedWidth + 4 + height: 32 + + // TODO: Implement ratings in shader + animations, instead of clipping trick + Image { + id: emptyRatingStarsImage + source: "images/stars2.png" + } + Item { + id: ratingImageItem + height: 32 + width: (36 * rating) - 2 + clip: true + Image { + source: "images/stars.png" + } + } + Text { + id: ratingTextItem + anchors.left: emptyRatingStarsImage.right + anchors.leftMargin: 4 + anchors.verticalCenter: ratingImageItem.verticalCenter + color: "#ffffff" + font.pixelSize: settings.fontM + text: "(" + rating.toFixed(1) + ")" + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/SettingsView.qml b/basicsuite/qt5-cinematicdemo/content/SettingsView.qml new file mode 100644 index 0000000..7944803 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/SettingsView.qml @@ -0,0 +1,138 @@ +import QtQuick 2.0 + +Item { + id: root + + property bool isShown: false + + anchors.fill: parent + + function show() { + isShown = true; + hideAnimation.stop(); + showAnimation.restart(); + } + function hide() { + isShown = false; + showAnimation.stop(); + hideAnimation.restart(); + } + + SequentialAnimation { + id: showAnimation + PropertyAction { target: backgroundItem; property: "visible"; value: true } + ParallelAnimation { + NumberAnimation { target: backgroundItem; property: "opacity"; to: 1; duration: 250; easing.type: Easing.InOutQuad } + NumberAnimation { target: backgroundItem; property: "scale"; to: 1; duration: 500; easing.type: Easing.OutBack } + } + } + SequentialAnimation { + id: hideAnimation + ParallelAnimation { + NumberAnimation { target: backgroundItem; property: "opacity"; to: 0; duration: 500; easing.type: Easing.InOutQuad } + NumberAnimation { target: backgroundItem; property: "scale"; to: 0.6; duration: 500; easing.type: Easing.InOutQuad } + } + PropertyAction { target: backgroundItem; property: "visible"; value: false } + } + + MouseArea { + anchors.fill: parent + enabled: root.isShown + onClicked: { + root.hide(); + } + } + + Image { + id: settingsIcon + anchors.left: parent.left + anchors.leftMargin: 4 + anchors.bottom: parent.bottom + anchors.bottomMargin: 4 + source: "images/settings.png" + opacity: backgroundItem.opacity + 0.4 + MouseArea { + anchors.fill: parent + anchors.margins: -20 + onClicked: { + if (root.isShown) { + root.hide(); + } else { + root.show(); + } + } + } + } + + BorderImage { + id: backgroundItem + anchors.left: settingsIcon.horizontalCenter + anchors.bottom: settingsIcon.verticalCenter + width: Math.min(480, parent.width - 60) + height: settingsContentColumn.height + 36 + source: "images/panel_bg.png" + border.left : 22 + border.right : 10 + border.top : 5 + border.bottom : 26 + + transformOrigin: Item.BottomLeft + visible: false + opacity: 0 + scale: 0.6 + + Column { + id: settingsContentColumn + width: parent.width + y: 8 + Switch { + text: "Show movies cover lighting?" + checked: settings.showLighting + onCheckedChanged: { + settings.showLighting = checked; + } + } + Rectangle { + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width - 32 + height: 1 + color: "#404040" + } + Switch { + text: "Show shooting star particles?" + checked: settings.showShootingStarParticles + onCheckedChanged: { + settings.showShootingStarParticles = checked; + } + } + Rectangle { + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width - 32 + height: 1 + color: "#404040" + } + Switch { + text: "Show fog particles?" + checked: settings.showFogParticles + onCheckedChanged: { + settings.showFogParticles = checked; + } + } + Rectangle { + anchors.horizontalCenter: parent.horizontalCenter + width: parent.width - 32 + height: 1 + color: "#404040" + } + Switch { + text: "Do you l-o-v-e colors?" + checked: settings.showColors + onText: "Yes" + offText: "No!" + onCheckedChanged: { + settings.showColors = checked; + } + } + } + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/Switch.qml b/basicsuite/qt5-cinematicdemo/content/Switch.qml new file mode 100644 index 0000000..967c03f --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/content/Switch.qml @@ -0,0 +1,170 @@ +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: root + + property alias text: textItem.text + property bool checked: false + property string onText: "On" + property string offText: "Off" + + QtObject { + id: priv + property alias checkedPriv: root.checked + onCheckedPrivChanged: { + if (checkedPriv) switchEffectAnimation.restart(); + } + + function releaseSwitch() { + if (knob.x == 48) switchEffectAnimation.restart(); + // Don't switch if we are in correct side + if ((knob.x == -2 && !checked) || (knob.x == 48 && checked)) { + return; + } + checked = !checked; + } + } + + width: parent ? parent.width : 200 + height: 80 + + MouseArea { + width: parent.width + height: parent.height + onClicked: { + root.checked = !root.checked + } + } + + Text { + id: textItem + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: 22 + anchors.right: switchBackgroundImage.left + elide: Text.ElideRight + font.pixelSize: 20 + color: "#ffffff" + } + + Image { + id: switchBackgroundImage + source: "images/switch_background.png" + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 22 + } + Image { + id: switchFrameImage + source: "images/switch_frame.png" + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 21 + z: 10 + } + + Item { + id: switchItem + anchors.fill: switchBackgroundImage + + SequentialAnimation { + id: switchEffectAnimation + PropertyAction { target: particleSystem; property: "paused"; value: "false" } + ScriptAction { script: particleEmitter.pulse(3000) } + } + + Image { + id: switchOnImage + anchors.right: knob.right + anchors.rightMargin: 2 + source: "images/switch_on.png" + opacity: knob.x / 48 + + // Stars effect + ParticleSystem { + id: particleSystem + anchors.fill: parent + paused: true + onEmptyChanged: if (empty) particleSystem.pause(); + ImageParticle { + source: "images/star.png" + rotationVariation: 180 + color:"#ffffff" + } + Emitter { + id: particleEmitter + width: parent.width + height: 8 + emitRate: 16 + lifeSpan: 2000 + size: 32 + sizeVariation: 16 + endSize: 8 + velocity: PointDirection{ y: 20; x:-2; xVariation: 5; yVariation: 10 } + enabled: false + + } + Turbulence { + width: parent.width + height: (parent.height / 2) + strength: 8 + } + } + } + + Text { + anchors.verticalCenter: parent.verticalCenter + anchors.right: knob.left + anchors.rightMargin: 6 + color: "#000000" + font.pixelSize: 18 + font.bold: true + text: onText + } + Text { + anchors.verticalCenter: parent.verticalCenter + anchors.left: knob.right + anchors.leftMargin: 4 + color: "#ffffff" + font.pixelSize: 18 + font.bold: true + text: offText + } + + Image { + id: knob + source: "images/switch_thumb.png" + x: checked ? 48 : -2 + opacity: 0.4 + MouseArea { + anchors.fill: parent + drag.target: knob; drag.axis: Drag.XAxis; drag.minimumX: -2; drag.maximumX: 48 + onClicked: checked = !checked + onReleased: priv.releaseSwitch(); + } + Behavior on x { + NumberAnimation { duration: 250; easing.type: Easing.InOutQuad } + } + } + } + + // Mask out switch parts which should be hidden + ShaderEffect { + id: shaderItem + property variant source: ShaderEffectSource { sourceItem: switchItem; hideSource: true } + property variant maskSource: ShaderEffectSource { sourceItem: switchBackgroundImage; hideSource: true } + + anchors.fill: switchBackgroundImage + + fragmentShader: " + varying highp vec2 qt_TexCoord0; + uniform highp float qt_Opacity; + uniform sampler2D source; + uniform sampler2D maskSource; + void main(void) { + gl_FragColor = texture2D(source, qt_TexCoord0.st) * (texture2D(maskSource, qt_TexCoord0.st).a) * qt_Opacity; + } + " + } +} diff --git a/basicsuite/qt5-cinematicdemo/content/images/1.png b/basicsuite/qt5-cinematicdemo/content/images/1.png new file mode 100644 index 0000000..15c16d0 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/1.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/10.png b/basicsuite/qt5-cinematicdemo/content/images/10.png new file mode 100644 index 0000000..d1bbf39 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/10.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/11.png b/basicsuite/qt5-cinematicdemo/content/images/11.png new file mode 100644 index 0000000..d2bf2f4 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/11.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/12.png b/basicsuite/qt5-cinematicdemo/content/images/12.png new file mode 100644 index 0000000..92031de Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/12.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/13.png b/basicsuite/qt5-cinematicdemo/content/images/13.png new file mode 100644 index 0000000..d28b3ea Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/13.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/14.png b/basicsuite/qt5-cinematicdemo/content/images/14.png new file mode 100644 index 0000000..9755a27 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/14.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/15.png b/basicsuite/qt5-cinematicdemo/content/images/15.png new file mode 100644 index 0000000..a1b6efb Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/15.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/16.png b/basicsuite/qt5-cinematicdemo/content/images/16.png new file mode 100644 index 0000000..7a4a520 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/16.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/17.png b/basicsuite/qt5-cinematicdemo/content/images/17.png new file mode 100644 index 0000000..33853b1 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/17.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/18.png b/basicsuite/qt5-cinematicdemo/content/images/18.png new file mode 100644 index 0000000..a04e29e Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/18.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/19.png b/basicsuite/qt5-cinematicdemo/content/images/19.png new file mode 100644 index 0000000..8af7536 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/19.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/2.png b/basicsuite/qt5-cinematicdemo/content/images/2.png new file mode 100644 index 0000000..30deff4 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/2.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/20.png b/basicsuite/qt5-cinematicdemo/content/images/20.png new file mode 100644 index 0000000..78b8acb Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/20.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/3.png b/basicsuite/qt5-cinematicdemo/content/images/3.png new file mode 100644 index 0000000..0a2675e Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/3.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/4.png b/basicsuite/qt5-cinematicdemo/content/images/4.png new file mode 100644 index 0000000..7d4620b Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/4.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/5.png b/basicsuite/qt5-cinematicdemo/content/images/5.png new file mode 100644 index 0000000..bfd1d61 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/5.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/6.png b/basicsuite/qt5-cinematicdemo/content/images/6.png new file mode 100644 index 0000000..7ae2086 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/6.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/7.png b/basicsuite/qt5-cinematicdemo/content/images/7.png new file mode 100644 index 0000000..a1b1925 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/7.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/8.png b/basicsuite/qt5-cinematicdemo/content/images/8.png new file mode 100644 index 0000000..fcfa8d4 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/8.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/9.png b/basicsuite/qt5-cinematicdemo/content/images/9.png new file mode 100644 index 0000000..c066c29 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/9.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/background.png b/basicsuite/qt5-cinematicdemo/content/images/background.png new file mode 100644 index 0000000..f88c905 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/background.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/background3.png b/basicsuite/qt5-cinematicdemo/content/images/background3.png new file mode 100644 index 0000000..67b16dd Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/background3.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/button.png b/basicsuite/qt5-cinematicdemo/content/images/button.png new file mode 100644 index 0000000..1f1c375 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/button.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/cc-by_logo.png b/basicsuite/qt5-cinematicdemo/content/images/cc-by_logo.png new file mode 100644 index 0000000..d264c4e Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/cc-by_logo.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/cover_nmap.png b/basicsuite/qt5-cinematicdemo/content/images/cover_nmap.png new file mode 100644 index 0000000..e613d9b Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/cover_nmap.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/grip.png b/basicsuite/qt5-cinematicdemo/content/images/grip.png new file mode 100644 index 0000000..66118f9 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/grip.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/heading.png b/basicsuite/qt5-cinematicdemo/content/images/heading.png new file mode 100644 index 0000000..509b12b Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/heading.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/heading_big.png b/basicsuite/qt5-cinematicdemo/content/images/heading_big.png new file mode 100644 index 0000000..ec37388 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/heading_big.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/heading_big.xcf b/basicsuite/qt5-cinematicdemo/content/images/heading_big.xcf new file mode 100644 index 0000000..b77b948 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/heading_big.xcf differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/info.png b/basicsuite/qt5-cinematicdemo/content/images/info.png new file mode 100644 index 0000000..0f9d3c3 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/info.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/panel_bg.png b/basicsuite/qt5-cinematicdemo/content/images/panel_bg.png new file mode 100644 index 0000000..fd25e7e Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/panel_bg.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/particle.png b/basicsuite/qt5-cinematicdemo/content/images/particle.png new file mode 100644 index 0000000..5c83896 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/particle.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/planet_sprite.png b/basicsuite/qt5-cinematicdemo/content/images/planet_sprite.png new file mode 100644 index 0000000..8ea7b13 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/planet_sprite.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/qt_ambassador_logo.png b/basicsuite/qt5-cinematicdemo/content/images/qt_ambassador_logo.png new file mode 100644 index 0000000..dec13bb Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/qt_ambassador_logo.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/qt_logo.png b/basicsuite/qt5-cinematicdemo/content/images/qt_logo.png new file mode 100644 index 0000000..53e4806 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/qt_logo.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/qt_logo2.png b/basicsuite/qt5-cinematicdemo/content/images/qt_logo2.png new file mode 100644 index 0000000..748392d Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/qt_logo2.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/quit_logo.png b/basicsuite/qt5-cinematicdemo/content/images/quit_logo.png new file mode 100644 index 0000000..f1ad50e Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/quit_logo.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/sc1.png b/basicsuite/qt5-cinematicdemo/content/images/sc1.png new file mode 100644 index 0000000..3e21076 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/sc1.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/sc2.png b/basicsuite/qt5-cinematicdemo/content/images/sc2.png new file mode 100644 index 0000000..54befbd Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/sc2.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/sc3.png b/basicsuite/qt5-cinematicdemo/content/images/sc3.png new file mode 100644 index 0000000..f71cec8 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/sc3.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/sc4.png b/basicsuite/qt5-cinematicdemo/content/images/sc4.png new file mode 100644 index 0000000..d0797a1 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/sc4.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/sc5.png b/basicsuite/qt5-cinematicdemo/content/images/sc5.png new file mode 100644 index 0000000..d9461c4 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/sc5.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/settings.png b/basicsuite/qt5-cinematicdemo/content/images/settings.png new file mode 100644 index 0000000..4215bee Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/settings.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/smoke.png b/basicsuite/qt5-cinematicdemo/content/images/smoke.png new file mode 100644 index 0000000..be0cedf Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/smoke.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/spinner.png b/basicsuite/qt5-cinematicdemo/content/images/spinner.png new file mode 100644 index 0000000..e59efb2 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/spinner.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/star.png b/basicsuite/qt5-cinematicdemo/content/images/star.png new file mode 100644 index 0000000..0d592cf Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/star.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/stars.png b/basicsuite/qt5-cinematicdemo/content/images/stars.png new file mode 100644 index 0000000..a997e1b Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/stars.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/stars2.png b/basicsuite/qt5-cinematicdemo/content/images/stars2.png new file mode 100644 index 0000000..50e3200 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/stars2.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/switch_background.png b/basicsuite/qt5-cinematicdemo/content/images/switch_background.png new file mode 100644 index 0000000..bd9a4ca Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/switch_background.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/switch_frame.png b/basicsuite/qt5-cinematicdemo/content/images/switch_frame.png new file mode 100644 index 0000000..8404a53 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/switch_frame.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/switch_on.png b/basicsuite/qt5-cinematicdemo/content/images/switch_on.png new file mode 100644 index 0000000..bc9fccb Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/switch_on.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/switch_thumb.png b/basicsuite/qt5-cinematicdemo/content/images/switch_thumb.png new file mode 100644 index 0000000..e8f7451 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/content/images/switch_thumb.png differ diff --git a/basicsuite/qt5-cinematicdemo/description.txt b/basicsuite/qt5-cinematicdemo/description.txt new file mode 100644 index 0000000..253d246 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/description.txt @@ -0,0 +1,5 @@ +The Qt5 Cinematic Experience is a demo by "QUIt Coding", a small group of talented individuals enjoying software development with cutting edge technologies. They are official members of the Qt Ambassador Program. + +The demo shows off a number features of Qt Quick 2.0. A nicely styled list control of movie covers with lighting effects, particles and transitions. The information roll-down curvy curtain is implemented using inline GLSL in the QML file. + +The source code for this demo and more awesome looking Qt Quick examples are available from quitcoding.com. diff --git a/basicsuite/qt5-cinematicdemo/main.cpp b/basicsuite/qt5-cinematicdemo/main.cpp new file mode 100644 index 0000000..81c1c85 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/main.cpp @@ -0,0 +1,18 @@ +#include +#include + +int main(int argc, char* argv[]) +{ + QGuiApplication app(argc,argv); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); + view.setSource(QUrl::fromLocalFile(QCoreApplication::applicationDirPath() + QLatin1String("/Qt5_CinematicExperience.qml"))); + + const QString lowerArgument = QString::fromLatin1(argv[1]).toLower(); + if (lowerArgument == QLatin1String("--fullscreen")) { + view.showFullScreen(); + } else { + view.show(); + } + return app.exec(); +} diff --git a/basicsuite/qt5-cinematicdemo/main.qml b/basicsuite/qt5-cinematicdemo/main.qml new file mode 100644 index 0000000..b9ad90f --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/main.qml @@ -0,0 +1,48 @@ +import QtQuick 2.0 +import "content" + +Item { + id: mainWindow + + width: 1920 + height: 1080 + + QtObject { + id: settings + // These are used to scale fonts according to screen size + property real _scaler: 300 + mainWindow.width * mainWindow.height * 0.00015 + property int fontXS: _scaler * 0.032 + property int fontS: _scaler * 0.040 + property int fontM: _scaler * 0.046 + property int fontMM: _scaler * 0.064 + property int fontL: _scaler * 0.100 + // Settings + property bool showFogParticles: false + property bool showShootingStarParticles: false + property bool showLighting: false + property bool showColors: true + } + + MainView { + id: mainView + } + + InfoView { + id: infoView + } + + DetailsView { + id: detailsView + } + + MoviesModel { + id: moviesModel + } + + FpsItem { + anchors.top: parent.top + anchors.topMargin: 8 + anchors.left: parent.left + anchors.leftMargin: 8 + } +} diff --git a/basicsuite/qt5-cinematicdemo/preview_l.jpg b/basicsuite/qt5-cinematicdemo/preview_l.jpg new file mode 100644 index 0000000..21bb2f9 Binary files /dev/null and b/basicsuite/qt5-cinematicdemo/preview_l.jpg differ diff --git a/basicsuite/qt5-cinematicdemo/qt5-cinematicdemo.pro b/basicsuite/qt5-cinematicdemo/qt5-cinematicdemo.pro new file mode 100644 index 0000000..eb67555 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/qt5-cinematicdemo.pro @@ -0,0 +1,13 @@ +TARGET = qt5-cinematicdemo + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + *.png \ + content +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/qt5-cinematicdemo/title.txt b/basicsuite/qt5-cinematicdemo/title.txt new file mode 100644 index 0000000..68451f8 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/title.txt @@ -0,0 +1 @@ +Qt5 Cinematic Demo diff --git a/basicsuite/qt5-everywhere/Button.qml b/basicsuite/qt5-everywhere/Button.qml new file mode 100644 index 0000000..43e93b8 --- /dev/null +++ b/basicsuite/qt5-everywhere/Button.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + width: (app.height + app.width) * 0.04 + height: width + + property string imageSource : "" + property double rotation: 0 + signal clicked() + + Image { + id: buttonImage + anchors.fill: root + anchors.margins: 0 + source: root.imageSource + opacity: 1.0 + rotation: root.rotation + } + + MouseArea { + id: buttonMouseArea + anchors.fill: root + anchors.margins: -20 + hoverEnabled: true + onClicked: root.clicked() + onEntered: buttonImage.anchors.margins = -(root.width * 0.1) + onExited: buttonImage.anchors.margins = 0 + onPressed: {buttonImage.opacity = 0.7; buttonImage.anchors.margins = -(root.width * 0.1)} + onReleased: { buttonImage.opacity = 1.0; buttonImage.anchors.margins = 0} + } +} diff --git a/basicsuite/qt5-everywhere/Cloud.qml b/basicsuite/qt5-everywhere/Cloud.qml new file mode 100644 index 0000000..b399308 --- /dev/null +++ b/basicsuite/qt5-everywhere/Cloud.qml @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: cloudRoot + x: app.width + y: randomY+deltaY + width: app.width*0.2 + height: width*0.4 + + property int duration: 20000 + property string sourceImage: "" + property real deltaY: 0 + property real randomY: app.height*0.3 + property real amplitudeY: app.height*0.2 + + function start() { + recalculate() + cloudXAnimation.restart(); + cloudYAnimation.restart(); + } + + function recalculate() { + cloudRoot.duration = Math.random()*15000 + 10000 + cloudRoot.x = app.width + cloudRoot.randomY = Math.random()*app.height + cloudRoot.width = app.width*0.2 + cloudRoot.height = cloudRoot.width*0.4 + cloudRoot.scale = Math.random()*0.6 + 0.7 + } + + Image { + id: cloud + anchors.fill: cloudRoot + source: cloudRoot.sourceImage + } + + SequentialAnimation{ + id: cloudYAnimation + NumberAnimation { target: cloudRoot; property: "deltaY"; duration: cloudRoot.duration*0.3; from: 0; to:cloudRoot.amplitudeY; easing.type: Easing.InOutQuad } + NumberAnimation { target: cloudRoot; property: "deltaY"; duration: cloudRoot.duration*0.3; from: cloudRoot.amplitudeY; to:0; easing.type: Easing.InOutQuad } + running: true + onRunningChanged: { + if (!running) { + cloudRoot.amplitudeY = Math.random() * (app.height*0.2) + restart() + } + } + } + + NumberAnimation { + id: cloudXAnimation + target: cloudRoot + property: "x" + duration: cloudRoot.duration + to:-cloudRoot.width + running: true + + onRunningChanged: { + if (!running) { + recalculate() + restart() + } + } + } +} diff --git a/basicsuite/qt5-everywhere/DialogButton.qml b/basicsuite/qt5-everywhere/DialogButton.qml new file mode 100644 index 0000000..7f24e5d --- /dev/null +++ b/basicsuite/qt5-everywhere/DialogButton.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: button + radius: 10 + height: 0.3 * dialog.height + width: dialog.width * 0.5 - dialog.dialogMargin + color: "transparent" + + property string buttonText + signal clicked() + + Text { + anchors.centerIn: parent + text: button.buttonText + font.pixelSize: 0.4 * button.height + color: "#ffffff" + } + + MouseArea { + anchors.fill: parent + onPressed: parent.color = Qt.rgba(0.2, 0.2, 0.2, 0.4) + onReleased: parent.color = "transparent" + onClicked: button.clicked() + } +} diff --git a/basicsuite/qt5-everywhere/Element.qml b/basicsuite/qt5-everywhere/Element.qml new file mode 100644 index 0000000..097a3fc --- /dev/null +++ b/basicsuite/qt5-everywhere/Element.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + width: 1 + height: 1 + + property int itemId : 1 + + Image { + id: elementImage + anchors.centerIn: root + z: 5 + } + + Component.onCompleted: { + elementImage.source = root.itemId === 1 ? "images/tree1.png" : + root.itemId === 2 ? "images/tree2.png" : + root.itemId === 3 ? "images/mountain.png" : + root.itemId === 4 ? "images/stones.png" : + root.itemId === 5 ? "images/box_open.png" : + root.itemId === 6 ? "images/box.png" : + root.itemId === 10 ? "images/character0.png" : + root.itemId === 11 ? "images/character1.png" : + root.itemId === 12 ? "images/character3.png" : + root.itemId === 13 ? "images/character7.png" : + root.itemId === 14 ? "images/character8.png" : + root.itemId === 15 ? "images/character9.png" : + root.itemId === 20 ? "images/character2.png" : + root.itemId === 21 ? "images/character4.png" : + root.itemId === 22 ? "images/character5.png" : + root.itemId === 23 ? "images/character6.png" : + root.itemId === 24 ? "images/character10.png" : + "" + } +} diff --git a/basicsuite/qt5-everywhere/Group.qml b/basicsuite/qt5-everywhere/Group.qml new file mode 100644 index 0000000..6ee3304 --- /dev/null +++ b/basicsuite/qt5-everywhere/Group.qml @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "style.js" as Style + +Item { + id: group + objectName: "group" + + property int uid: 0 + property real targetScale: 1 + property int textX: 0 + property int textY: 0 + property string name: "Text" + property real imageScale: 6.0 + + property int fontSize: 160 + property string uiFont: Style.FONT_FAMILY + property bool bold: true + property int fontTransition: 6 + + Text { + text: group.name + x: textX + y: textY + font.pixelSize: group.fontSize + font.family: Style.FONT_FAMILY + font.bold: group.bold + color: "#42200a" + smooth: true + + Text { + text: group.name + color: "#1d6cb0" + x:group.fontTransition + y:-group.fontTransition + font.pixelSize: group.fontSize + font.family: Style.FONT_FAMILY + font.bold: group.bold + smooth: true + } + } +} diff --git a/basicsuite/qt5-everywhere/HelpScreen.qml b/basicsuite/qt5-everywhere/HelpScreen.qml new file mode 100644 index 0000000..3fb540c --- /dev/null +++ b/basicsuite/qt5-everywhere/HelpScreen.qml @@ -0,0 +1,329 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "style.js" as Style + +Item { + id: root + anchors.fill:parent + property int delay: 500 + property int rotationAngle:0 + + SequentialAnimation { + id: closeAnimation + + ScriptAction{ + script: { + pointer.visible = false + instructionText.text = "" + instructionText2.text = "" + highlightImage.smooth = false + highlight.size = Math.max(root.height, root.width)*2.5 + } + } + + PauseAnimation { duration: root.delay } + + onRunningChanged: if (!running){ + stopAnimations() + root.visible=false + highlight.size=0 + highlightImage.smooth = true + } + } + + + Item{ + id: highlight + property int size: 0 + property bool hidden: false + width:1 + height:1 + Behavior on x {NumberAnimation{duration: root.delay}} + Behavior on y {NumberAnimation{duration: root.delay}} + Behavior on size {id: sizeBehavior; NumberAnimation{duration: root.delay}} + } + + Image{ + id: highlightImage + anchors.centerIn: highlight + width: highlight.hidden? 0: highlight.size + height: highlight.hidden? 0: highlight.size + source: "images/highlight_mask.png" + opacity: .8 + smooth: true + } + + Rectangle{ + id: top + anchors {left:parent.left; top: parent.top; right: parent.right; bottom: highlightImage.top} + color: "black" + opacity: .8 + } + + Rectangle{ + id: bottom + anchors {left:parent.left; top: highlightImage.bottom; right: parent.right; bottom: parent.bottom} + color: "black" + opacity: .8 + } + + Rectangle{ + id: left + anchors {left:parent.left; top: highlightImage.top; right: highlightImage.left; bottom: highlightImage.bottom} + color: "black" + opacity: .8 + } + + Rectangle{ + id: right + anchors {left:highlightImage.right; top: highlightImage.top; right: parent.right; bottom: highlightImage.bottom} + color: "black" + opacity: .8 + } + + Text{ + id: instructionText + anchors {horizontalCenter: parent.horizontalCenter; top: parent.top; topMargin: parent.height*.05} + text: "" + font.pixelSize: parent.width*.075 + font.family: Style.FONT_FAMILY + smooth: true + color: "white" + + Text{ + id: instructionText2 + anchors {horizontalCenter: parent.horizontalCenter; top: parent.bottom; topMargin: -parent.height/2} + text: "" + font.pixelSize: parent.font.pixelSize + font.family: Style.FONT_FAMILY + smooth: true + color: "white" + } + } + + Item{ + id: pointer + width: parent.width*.3 + height: parent.width*.3 + + Image{ + id: handImage + width: parent.width*.8 + height: width + source: "images/hand.png" + y: parent.height/2-height/2 + x: parent.width/2-width/2+deltaX + property int deltaX:0 + anchors.verticalCenter: parent.verticalCenter + rotation: 90 + + SequentialAnimation{ + id: pointingAnimation + PauseAnimation { duration: root.delay} + NumberAnimation{ + target: handImage + property: "deltaX" + from: -handImage.width*.2 + to: handImage.width*.2 + duration: 500 + easing.type: Easing.InOutCubic + } + PauseAnimation { duration: 200 } + NumberAnimation{ + target: handImage + property: "deltaX" + from: handImage.width*.2 + to: -handImage.width*.2 + duration: 500 + easing.type: Easing.InOutCubic + + } + } + + } + } + + SequentialAnimation { + id: helpAnimation + loops: Animation.Infinite + + PauseAnimation { duration: 1000 } + PropertyAction { target: handImage; property: "mirror"; value: true} + PropertyAction { target: instructionText; property: "text"; value: "Tap on the devices to"} + PropertyAction { target: instructionText2; property: "text"; value: "open applications"} + PropertyAction { target: pointer; property: "visible"; value: true} + PropertyAction { target: highlight; property: "hidden"; value: false} + + SequentialAnimation { + id: clickAnimation + property int index: 0 + property variant uids: [8,12] + loops: 2 + + ScriptAction{ + script: { + clickAnimation.index+=1 + if (clickAnimation.index>=clickAnimation.uids.length) clickAnimation.index=0 + } + } + + ScriptAction{ + script: { + highlight.size= (700+clickAnimation.index*100)*canvas.scalingFactor + + highlight.x=root.width/2 +getPosition(clickAnimation.uids[clickAnimation.index]).x*canvas.scalingFactor + highlight.y=root.height/2 +getPosition(clickAnimation.uids[clickAnimation.index]).y*canvas.scalingFactor + + pointer.x= root.width/2 -pointer.width/2 +getPosition(clickAnimation.uids[clickAnimation.index]).x*canvas.scalingFactor*.5 + pointer.y= root.height/2 -pointer.height/2 +getPosition(clickAnimation.uids[clickAnimation.index]).y*canvas.scalingFactor*.5 + pointer.rotation=Math.atan2(getPosition(clickAnimation.uids[clickAnimation.index]).y*canvas.scalingFactor, getPosition(clickAnimation.uids[clickAnimation.index]).x*canvas.scalingFactor)*180.0/Math.PI + pointingAnimation.restart() + } + } + + PauseAnimation { duration: 3000 } + } + PauseAnimation { duration: 1000 } + + SequentialAnimation{ + id: navigationAnimation + PropertyAction { target: handImage; property: "mirror"; value: false} + PropertyAction { target: instructionText; property: "text"; value: "Use the Arrow to navigate"} + PropertyAction { target: instructionText2; property: "text"; value: "between applications"} + ScriptAction{ + script: { + highlight.size= Math.min(root.width, root.height)*.4 + + var _x=0; + var _y=0; + + if (root.width > root.height){ + _x = navigationPanel.x+navigationPanel.width /2 + _y = navigationPanel.y+navigationPanel.height*.33 + pointer.x= root.width/2 -pointer.width/2 +root.width*.2 + pointer.y= root.height/2 -pointer.height/2 + highlight.x=_x + highlight.y=_y + + }else{ + _x=navigationPanel.x+navigationPanel.width*.33 + _y=navigationPanel.y + navigationPanel.height /2 + pointer.x= root.width/2 -pointer.width/2 + pointer.y= root.height/2 -pointer.height/2 +root.height*.2 + highlight.x=_x + highlight.y=_y + } + + pointer.rotation=Math.atan2(_y-(pointer.y+pointer.height/2), _x-(pointer.x+pointer.width/2))*180.0/Math.PI + + pointingAnimation.restart() + } + } + PauseAnimation { duration: 5000 } + + PropertyAction { target: instructionText; property: "text"; value: "Use the Home button to"} + PropertyAction { target: instructionText2; property: "text"; value: "return to the beginning"} + ScriptAction{ + script: { + highlight.size= Math.min(root.width, root.height)*.3 + + var _x=0; + var _y=0; + + if (root.width > root.height){ + _x = navigationPanel.x+navigationPanel.width /2 + _y = navigationPanel.y+navigationPanel.height-navigationPanel.width /2 + pointer.x= root.width/2 -pointer.width/2 +root.width*.2 + pointer.y= root.height/2 -pointer.height/2 + highlight.x=_x + highlight.y=_y + + }else{ + _x=navigationPanel.x+navigationPanel.width-navigationPanel.height /2 + _y=navigationPanel.y + navigationPanel.height /2 + pointer.x= root.width/2 -pointer.width/2 + pointer.y= root.height/2 -pointer.height/2 +root.height*.2 + highlight.x=_x + highlight.y=_y + } + pointer.rotation=Math.atan2(_y-(pointer.y+pointer.height/2), _x-(pointer.x+pointer.width/2))*180.0/Math.PI + + pointingAnimation.restart() + } + } + PauseAnimation { duration: 5000 } + } + + } + + onWidthChanged: if (visible) show() + onHeightChanged: if (visible) show() + + function show(){ + highlight.hidden = true + + pointer.visible = false + rotationAngle = 0 + + startAnimations() + visible = true + } + + function startAnimations(){ + pointingAnimation.restart() + helpAnimation.restart() + } + + function stopAnimations(){ + pointingAnimation.stop() + helpAnimation.stop() + } + + MouseArea{ + anchors.fill: root + onClicked: { + stopAnimations() + closeAnimation.restart() + } + } +} + diff --git a/basicsuite/qt5-everywhere/IslandElementContainer.qml b/basicsuite/qt5-everywhere/IslandElementContainer.qml new file mode 100644 index 0000000..c191d68 --- /dev/null +++ b/basicsuite/qt5-everywhere/IslandElementContainer.qml @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: elementContainer + + width: place == 2 ? parent.width : (islandWidth-parent.width)/2 + height: place == 2 ? 0.1*islandHeight : 0.4*islandHeight + x: place == 0 ? -width : place == 1 ? parent.width : 0 + y: place == 2 ? parent.height : (parent.height - height*0.6) + + property int place : 0 + property int itemWidth : islandWidth * 0.1 + property int islandWidth: 100 + property int islandHeight: 100 + + function createElement(xx, yy, itemId) { + var component = Qt.createComponent("Element.qml") + if (component.status === Component.Ready) + component.createObject(elementContainer, {"x": xx, "y": yy, "itemId": itemId}); + } + + function createElements() + { + // Left side + if (place === 0) { + var temp0 = Math.floor(Math.random()*6.9); + switch(temp0) { + case 0: + createElement(elementContainer.width*0.4, elementContainer.height*0.2, 1); + createElement(elementContainer.width*0.25, elementContainer.height*0.3, 1); + createElement(elementContainer.width*0.15, elementContainer.height*0.5, 1); + createElement(elementContainer.width*0.55, elementContainer.height*0.4, 1); + break; + case 1: + createElement(elementContainer.width*0.6, elementContainer.height*0.1, 1); + createElement(elementContainer.width*0.4, elementContainer.height*0.2, 1); + createElement(elementContainer.width*0.7, elementContainer.height*0.3, 1); + createElement(elementContainer.width*0.3, elementContainer.height*0.5, 1); + break; + case 2: + createElement(elementContainer.width*0.6, elementContainer.height*0.1, 3); + createElement(elementContainer.width*0.4, elementContainer.height*0.6, 4); + createElement(elementContainer.width*0.8, elementContainer.height*0.8, 4); + break; + case 3: + createElement(elementContainer.width*0.6, elementContainer.height*0.1, 3); + createElement(elementContainer.width*0.4, elementContainer.height*0.4, 1); + createElement(elementContainer.width*0.5, elementContainer.height*0.5, 2); + createElement(elementContainer.width*0.7, elementContainer.height*0.6, 2); + break; + case 4: + case 5: + var characterId = 10 + Math.floor(Math.random()*5.9); + createElement(elementContainer.width*0.7, elementContainer.height*0.3, characterId); + break; + default: break; + } + } + else if (place === 1) { + var temp1 = Math.floor(Math.random()*6.9); + switch(temp1) { + case 0: + createElement(elementContainer.width*0.6, elementContainer.height*0.2, 1); + createElement(elementContainer.width*0.75, elementContainer.height*0.3, 1); + createElement(elementContainer.width*0.85, elementContainer.height*0.5, 1); + createElement(elementContainer.width*0.45, elementContainer.height*0.4, 1); + break; + case 1: + createElement(elementContainer.width*0.4, elementContainer.height*0.1, 1); + createElement(elementContainer.width*0.6, elementContainer.height*0.2, 1); + createElement(elementContainer.width*0.3, elementContainer.height*0.3, 1); + createElement(elementContainer.width*0.7, elementContainer.height*0.5, 1); + break; + case 2: + createElement(elementContainer.width*0.4, elementContainer.height*0.1, 3); + createElement(elementContainer.width*0.6, elementContainer.height*0.6, 4); + createElement(elementContainer.width*0.2, elementContainer.height*0.8, 4); + break; + case 3: + createElement(elementContainer.width*0.4, elementContainer.height*0.1, 3); + createElement(elementContainer.width*0.6, elementContainer.height*0.4, 2); + createElement(elementContainer.width*0.5, elementContainer.height*0.5, 1); + createElement(elementContainer.width*0.3, elementContainer.height*0.6, 2); + break; + case 4: + case 5: + var characterId1 = 20 + Math.floor(Math.random()*4.9); + createElement(elementContainer.width*0.3, elementContainer.height*0.3, characterId1); + break; + default: break; + } + } + else { + var temp2 = Math.floor(Math.random()*4.9); + switch(temp2) { + case 0: + createElement(elementContainer.width*0.8, elementContainer.height*0.8, 5); + createElement(elementContainer.width*0.4, elementContainer.height*0.5, 5); + break; + case 1: + createElement(elementContainer.width*0.1, elementContainer.height*0.5, 1); + createElement(elementContainer.width*0.2, elementContainer.height*0.9, 2); + createElement(elementContainer.width*0.6, elementContainer.height*0.8, 4); + break; + case 2: + createElement(elementContainer.width*0.2, elementContainer.height*0.5, 6); + createElement(elementContainer.width*0.7, elementContainer.height*0.6, 2); + createElement(elementContainer.width*0.6, elementContainer.height*0.7, 1); + break; + case 3: + createElement(elementContainer.width*0.2, elementContainer.height*0.8, 6); + createElement(elementContainer.width*0.7, elementContainer.height*0.6, 6); + break; + default: break; + } + } + } +} diff --git a/basicsuite/qt5-everywhere/NavigationPanel.qml b/basicsuite/qt5-everywhere/NavigationPanel.qml new file mode 100644 index 0000000..e73cc7f --- /dev/null +++ b/basicsuite/qt5-everywhere/NavigationPanel.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Grid { + id: root + + function checkOrientation() { + root.spacing = (app.height + app.width) * 0.02 + + if (app.width >= app.height) { + root.columns = 1 + root.anchors.bottom = undefined + root.anchors.horizontalCenter = undefined + root.anchors.right = app.right + root.anchors.verticalCenter = app.verticalCenter + root.anchors.rightMargin = app.width * 0.02 + root.anchors.bottomMargin = 0 + } + else { + root.columns = 3 + root.anchors.right = undefined + root.anchors.verticalCenter = undefined + root.anchors.bottom = app.bottom + root.anchors.horizontalCenter = app.horizontalCenter + root.anchors.rightMargin = 0 + root.anchors.bottomMargin = app.width * 0.02 + } + } + + Button { + id: nextButton + imageSource: "images/btn_next.png" + onClicked: canvas.goNext() + } + + Button { + id: prevButton + imageSource: "images/btn_previous.png" + onClicked: canvas.goPrevious() + } + + Button { + id: homeButton + imageSource: app.navigationState === 0 && !helpscreen.visible ? "images/btn_help.png" : "images/btn_home.png" + onClicked: { + if (app.navigationState===0){ + helpscreen.show() + return; + } + canvas.goBack() + } + } +} diff --git a/basicsuite/qt5-everywhere/QtLogo.png b/basicsuite/qt5-everywhere/QtLogo.png new file mode 100644 index 0000000..7b5c533 Binary files /dev/null and b/basicsuite/qt5-everywhere/QtLogo.png differ diff --git a/basicsuite/qt5-everywhere/QuitDialog.qml b/basicsuite/qt5-everywhere/QuitDialog.qml new file mode 100644 index 0000000..897afb9 --- /dev/null +++ b/basicsuite/qt5-everywhere/QuitDialog.qml @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: root + anchors.fill: parent + color: Qt.rgba(0.0, 0.0, 0.0, 0.7) + + signal yes() + signal no() + + MouseArea { + anchors.fill: parent + } + + Rectangle { + id: dialog + anchors.centerIn: parent + width: dialogText.paintedWidth * 1.1 + height: parent.height * 0.3 + property double dialogMargin: height * 0.05 + + gradient: Gradient { + GradientStop { position: 0.0; color: "#222222" } + GradientStop { position: 0.3; color: "#000000" } + GradientStop { position: 1.0; color: "#111111" } + } + radius: 10 + border { color: "#999999"; width: 1 } + + Item { + id: content + anchors { left: parent.left; right: parent.right; top: parent.top } + height: dialog.height * 0.6 + + Text { + id: dialogText + anchors.centerIn: parent + verticalAlignment: Text.AlignVCenter + text: qsTr("Are you sure you want to quit?") + color: "#ffffff" + font.pixelSize: 0.2 *content.height + } + } + + Rectangle { + id: line + anchors { left: parent.left; right: parent.right; top: content.bottom } + anchors.leftMargin: dialog.dialogMargin + anchors.rightMargin: dialog.dialogMargin + height: 1 + color: "#777777" + } + + DialogButton { + anchors { bottom: dialog.bottom; left:dialog.left; bottomMargin: dialog.dialogMargin; leftMargin: dialog.dialogMargin } + buttonText: "Yes" + onClicked: root.yes() + } + DialogButton { + anchors { bottom: dialog.bottom; right:dialog.right; bottomMargin: dialog.dialogMargin; rightMargin: dialog.dialogMargin } + buttonText: "No" + onClicked: root.no() + } + + } + +} diff --git a/basicsuite/qt5-everywhere/Slide.qml b/basicsuite/qt5-everywhere/Slide.qml new file mode 100644 index 0000000..36e0b08 --- /dev/null +++ b/basicsuite/qt5-everywhere/Slide.qml @@ -0,0 +1,252 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "style.js" as Style + +Item { + id: slide + objectName: "slide" + + property int uid: 0 + property int gid: 0 + property string url: "" + property int device: 0 + property string imageSource: "" + property bool loaded: false + property bool loading: false + property real targetScale: 1 + property bool animationRunning: navigationAnimation.running || zoomAnimation.running + property int demoWidth: 603 + property int demoHeight: 378 + property int maskVerticalOffset: 51 + property int maskHorizontalOffset: 1 + property string demoColor: "#4353c3" + property string name: "" + + function targetWidth() + { + return demoWidth*scale; + } + + function targetHeight() + { + return demoHeight*scale; + } + + Rectangle { + id: demoBackground + anchors.centerIn: parent + width: demoContainer.width * 1.03 + height: demoContainer.height * 1.03 + color: "black" + z: slide.loading || slide.loaded ? 1:-1 + + Rectangle{ + id: demoContainer + anchors.centerIn: parent + width: demoWidth + height: demoHeight + color: demoColor + clip: true + + Text { + id: splashScreenText + color: 'white' + font.pixelSize: parent.width *.2 + font.family: Style.FONT_FAMILY + text: slide.name + anchors.centerIn: parent + smooth: true + visible: true + } + } + } + + ShaderEffectSource{ + id: demo + anchors.centerIn: parent + width: demoWidth + height: demoHeight + sourceItem: demoContainer + live: false + visible: (hasSnapshot && !slide.loaded) || updating + hideSource: visible && !updating && !loading + clip: true + + property bool updating: false + property bool hasSnapshot: false + + onScheduledUpdateCompleted: { + updating = false + hasSnapshot = true + releaseDemo(true) + } + } + + Image { + id: deviceMaskImage + anchors.centerIn: parent + anchors.verticalCenterOffset: maskVerticalOffset + anchors.horizontalCenterOffset: maskHorizontalOffset + smooth: !animationRunning + antialiasing: !animationRunning + source: slide.imageSource + width: slide.width + height: slide.height + z: 2 + + IslandElementContainer { id: leftElementcontainer; place: 0; islandHeight: islandImage.height; islandWidth: islandImage.width } + IslandElementContainer { id: rightElementcontainer;place: 1; islandHeight: islandImage.height; islandWidth: islandImage.width } + IslandElementContainer { id: bottomElementcontainer;place: 2; islandHeight: islandImage.height; islandWidth: islandImage.width } + } + + Image { + id: islandImage + anchors.top: deviceMaskImage.bottom + anchors.topMargin: -height * 0.3 + anchors.horizontalCenter: deviceMaskImage.horizontalCenter + source: "images/island.png" + smooth: !animationRunning + antialiasing: !animationRunning + width: Math.max(deviceMaskImage.width, deviceMaskImage.height) * 1.6 + height: width/2 + z: -3 + } + + // Load timer + Timer { + id: loadTimer + interval: 5 + running: false + repeat: false + onTriggered: { + loadSplashScreen(); + load() + } + } + + function loadDemo(){ + if (!slide.loaded) + { + splashScreenText.visible = true + loadTimer.start(); + } else if (slide.url==="demos/radio/radio.qml"){ + for (var i =0; i go home + canvas.goHome() + } + } + + onPressed: { + // Save mouse state + oldX = mouse.x + oldY = mouse.y + startMouseX = mouse.x + startMouseY = mouse.y + } + + onPositionChanged: { + var dx = mouse.x - oldX; + var dy = mouse.y - oldY; + + oldX = mouse.x; + oldY = mouse.y; + + if (!zoomAnimation.running && !navigationAnimation.running) + { + panning = true; + canvas.xOffset += dx; + canvas.yOffset += dy; + app.navigationState = 3 //dirty + } + } + onWheel: { + var newScalingFactor = canvas.scalingFactor + if (wheel.angleDelta.y > 0){ + newScalingFactor+=canvas.scalingFactor*.05 + }else{ + newScalingFactor-=canvas.scalingFactor*.05 + } + if (newScalingFactor < app.minScaleFactor) newScalingFactor = app.minScaleFactor + if (newScalingFactor > app.maxScaleFactor) newScalingFactor = app.maxScaleFactor + canvas.scalingFactor = newScalingFactor + } +} diff --git a/basicsuite/qt5-everywhere/app.pro b/basicsuite/qt5-everywhere/app.pro new file mode 100644 index 0000000..6edb532 --- /dev/null +++ b/basicsuite/qt5-everywhere/app.pro @@ -0,0 +1,15 @@ +TARGET = qt5-everywhere + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + *.js \ + fonts \ + images \ + demos +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml b/basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml new file mode 100644 index 0000000..39a0834 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "content" +import "content/calculator.js" as CalcEngine + + +Rectangle { + id: window + anchors.fill: parent + color: "#272822" + + function operatorPressed(operator) { CalcEngine.operatorPressed(operator) } + function digitPressed(digit) { CalcEngine.digitPressed(digit) } + + Item { + id: pad + width: window.width * 0.58 + height: window.height * 0.98 + NumberPad { anchors.horizontalCenter: parent.horizontalCenter } + } + + AnimationController { + id: controller + animation: ParallelAnimation { + id: anim + NumberAnimation { target: display; property: "x"; duration: 400; from: -16; to: window.width - display.width; easing.type: Easing.InOutQuad } + NumberAnimation { target: pad; property: "x"; duration: 400; from: window.width - pad.width; to: 0; easing.type: Easing.InOutQuad } + SequentialAnimation { + NumberAnimation { target: pad; property: "scale"; duration: 200; from: 1; to: 0.97; easing.type: Easing.InOutQuad } + NumberAnimation { target: pad; property: "scale"; duration: 200; from: 0.97; to: 1; easing.type: Easing.InOutQuad } + } + } + } + + Display { + id: display + x: -16 + width: window.width * 0.42 + height: parent.height + + MouseArea { + property real startX: 0 + property real oldP: 0 + property bool rewind: false + + anchors.fill: parent + onPositionChanged: { + var reverse = startX > window.width / 2 + var mx = mapToItem(window, mouse.x).x + var p = Math.abs((mx - startX) / (window.width - display.width)) + if (p < oldP) + rewind = reverse ? false : true + else + rewind = reverse ? true : false + controller.progress = reverse ? 1 - p : p + oldP = p + } + onPressed: startX = mapToItem(window, mouse.x).x + onReleased: { + if (rewind) + controller.completeToBeginning() + else + controller.completeToEnd() + } + } + } + +} diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml new file mode 100644 index 0000000..6165ed3 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + property alias text: textItem.text + property alias color: textItem.color + property bool operator: false + + signal clicked + + width: 0.33*pad.width + height: pad.height/7 + + Text { + id: textItem + anchors.centerIn: parent + horizontalAlignment: Text.AlignHCenter + font.pixelSize: parent.height * 0.6 + elide: Text.ElideLeft + lineHeight: 0.75 + color: "white" + } + + Image { + id: touchImage + source: "images/touch-green.png" + anchors.centerIn: parent + width: 2*parent.height + height: 2*parent.height + visible: false + } + + MouseArea { + id: mouse + anchors.fill: parent + anchors.margins: -5 + onPressed: touchImage.visible = true + onReleased: touchImage.visible = false + onClicked: { + if (operator) + window.operatorPressed(parent.text) + else + window.digitPressed(parent.text) + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml new file mode 100644 index 0000000..df3bfa2 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: display + function clearAll() + { + listView.model.clear(); + } + + function displayOperator(operator) + { + listView.model.append({ "operator": operator, "operand": "" }) + } + + function newLine(operator, operand) + { + listView.model.append({ "operator": operator, "operand": operand }) + } + + function appendDigit(digit) + { + if (!listView.model.count) + listView.model.append({ "operator": "", "operand": "" }) + var i = listView.model.count - 1; + listView.model.get(i).operand = listView.model.get(i).operand + digit; + } + + Item { + id: theItem + width: parent.width + 32 + height: parent.height + + Rectangle { + id: rect + x: 16 + color: "white" + height: parent.height + width: display.width - 16 + } + Image { + anchors.right: rect.left + source: "images/paper-edge-left.png" + height: parent.height + fillMode: Image.TileVertically + } + Image { + anchors.left: rect.right + source: "images/paper-edge-right.png" + height: parent.height + fillMode: Image.TileVertically + } + + Image { + source: "images/paper-grip.png" + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 20 + } + + ListView { + id: listView + x: 16; y: 30 + width: display.width + height: display.height + delegate: Item { + height: 20 + width: parent.width + Text { + id: operator + x: 8 + font.pixelSize: 18 + color: "#6da43d" + text: model.operator + } + Text { + id: operand + font.pixelSize: 18 + anchors.right: parent.right + anchors.rightMargin: 26 + text: model.operand + } + } + model: ListModel { } + } + + } + +} diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml new file mode 100644 index 0000000..454c50d --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Grid { + columns: 3 + columnSpacing: 0 + rowSpacing: 0 + + Button { text: "7" } + Button { text: "8" } + Button { text: "9" } + Button { text: "4" } + Button { text: "5" } + Button { text: "6" } + Button { text: "1" } + Button { text: "2" } + Button { text: "3" } + Button { text: "0" } + Button { text: "." } + Button { text: " " } + Button { text: "±"; color: "#6da43d"; operator: true } + Button { text: "−"; color: "#6da43d"; operator: true } + Button { text: "+"; color: "#6da43d"; operator: true } + Button { text: " "; color: "#6da43d"; operator: true } + Button { text: "÷"; color: "#6da43d"; operator: true } + Button { text: "×"; color: "#6da43d"; operator: true } + Button { text: "C"; color: "#6da43d"; operator: true } + Button { text: " "; color: "#6da43d"; operator: true } + Button { text: "="; color: "#6da43d"; operator: true } +} diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml new file mode 100644 index 0000000..3bdea86 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Text { + width: 64 + font.pixelSize: 14 + font.bold: false + wrapMode: Text.WordWrap + lineHeight: 0.75 + color: "#676764" +} diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wav b/basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wav new file mode 100644 index 0000000..94cccb7 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wav differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js b/basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js new file mode 100644 index 0000000..ffc78bf --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js @@ -0,0 +1,150 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +var curVal = 0 +var memory = 0 +var lastOp = "" +var previousOperator = "" +var digits = "" + +function disabled(op) { + if (op == "." && digits.toString().search(/\./) != -1) { + return true + } else if (op == window.squareRoot && digits.toString().search(/-/) != -1) { + return true + } else { + return false + } +} + +function digitPressed(op) +{ + if (lastOp == "=") + display.newLine("", ""); + + if (disabled(op)) + return + if (digits.toString().length >= 14) + return + if (lastOp.toString().length == 1 && ((lastOp >= "0" && lastOp <= "9") || lastOp == ".") ) { + digits = digits + op.toString() + display.appendDigit(op.toString()) + } else { + digits = op + display.appendDigit(op.toString()) + } + lastOp = op +} + +function operatorPressed(op) +{ + if (disabled(op)) + return + lastOp = op + + if (previousOperator == "+") { + digits = Number(digits.valueOf()) + Number(curVal.valueOf()) + } else if (previousOperator == "−") { + digits = Number(curVal) - Number(digits.valueOf()) + } else if (previousOperator == "×") { + digits = Number(curVal) * Number(digits.valueOf()) + } else if (previousOperator == "÷") { + digits = Number(Number(curVal) / Number(digits.valueOf())).toString() + } else if (previousOperator == "=") { + } + + if (op == "+" || op == "−" || op == "×" || op == "÷") { + previousOperator = op + curVal = digits.valueOf() + display.displayOperator(previousOperator) + return + } + + if (op == "=") { + display.newLine("=", digits.toString()) + } + + curVal = 0 + previousOperator = "" + + if (op == "1/x") { + digits = (1 / digits.valueOf()).toString() + } else if (op == "x^2") { + digits = (digits.valueOf() * digits.valueOf()).toString() + } else if (op == "Abs") { + digits = (Math.abs(digits.valueOf())).toString() + } else if (op == "Int") { + digits = (Math.floor(digits.valueOf())).toString() + } else if (op == window.plusminus) { + digits = (digits.valueOf() * -1).toString() + } else if (op == window.squareRoot) { + digits = (Math.sqrt(digits.valueOf())).toString() + } else if (op == "mc") { + memory = 0; + } else if (op == "m+") { + memory += digits.valueOf() + } else if (op == "mr") { + digits = memory.toString() + } else if (op == "m-") { + memory = digits.valueOf() + } else if (op == window.leftArrow) { + digits = digits.toString().slice(0, -1) + if (digits.length == 0) { + digits = "0" + } + } else if (op == "Off") { + Qt.quit(); + } else if (op == "C") { + curVal = 0 + memory = 0 + lastOp = "" + digits = "" + display.clearAll() + } else if (op == "AC") { + curVal = 0 + memory = 0 + lastOp = "" + digits ="0" + } + + +} + diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.png new file mode 100644 index 0000000..2989ee2 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.png differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.png new file mode 100644 index 0000000..3e21248 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.png differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.png new file mode 100644 index 0000000..98e662f Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.png differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.png new file mode 100644 index 0000000..6bc6561 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.png differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.png new file mode 100644 index 0000000..ca29a3a Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.png differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.png new file mode 100644 index 0000000..7c2da7b Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.png differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.png new file mode 100644 index 0000000..953c408 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.png differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.png new file mode 100644 index 0000000..e08ddfa Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.png differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.png new file mode 100644 index 0000000..d9aa7e3 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.png differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.png new file mode 100644 index 0000000..64dbde6 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.png differ diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.png new file mode 100644 index 0000000..bb02b00 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.png differ diff --git a/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml b/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml new file mode 100644 index 0000000..e2b3bb0 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml @@ -0,0 +1,404 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: root + anchors.fill: parent + property color rimColor: Qt.rgba(1,0,0,1) //'#ff0000' + property color dialColor: Qt.rgba(0.2,0.2,0.2,1) //'#333333' + property color bgcolor: Qt.rgba(1,1,1,1) + property int dialStyle: 0 + color: "#333333" + + Text{ + id: codeText + anchors {fill:parent} + text: "" + rotation: 10 + color: "#666666" + font.pixelSize: root.height*.05 + + verticalAlignment:Text.AlignBottom + + property int pos: 0 + + property string code: " +var ctx = clockCanvas.getContext('2d') +ctx.clearRect(0,0,clockContainer.clockRadius,clockContainer.clockRadius) + +var gradient = ctx.createRadialGradient(clockContainer.clockRadius/4, clockContainer.clockRadius/4, 0, clockContainer.clockRadius/4, clockContainer.clockRadius/4, clockContainer.clockRadius) +gradient.addColorStop(0, '#ffffff') +gradient.addColorStop(1, '#888888') + +ctx.fillStyle = gradient +ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) +ctx.fill() + +drawDials(ctx) + +var gradient2 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius) +gradient2.addColorStop(0, Qt.rgba(0,0,0,.5)) +gradient2.addColorStop(.5, Qt.rgba(1,1,1,.5)) +gradient2.addColorStop(1, Qt.rgba(0,0,0,.5)) + +var gradient3 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius) +gradient3.addColorStop(0, Qt.rgba(1,1,1,.5)) +gradient3.addColorStop(.5, Qt.rgba(0,0,0,.5)) +gradient3.addColorStop(1, Qt.rgba(1,1,1,.5)) + +ctx.lineWidth = clockContainer.clockRadius*.05 +ctx.strokeStyle = root.rimColor + +ctx.beginPath() +ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false) +ctx.stroke() + +ctx.strokeStyle = gradient2 +ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false) +ctx.stroke() + +ctx.beginPath() +ctx.strokeStyle = root.rimColor +ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) +ctx.stroke() + +ctx.strokeStyle = gradient3 +ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) +ctx.stroke() +ctx.closePath() + +function drawPointer(context, angle, len, thickness, color){ + context.beginPath() + context.lineWidth = thickness + context.strokeStyle = color + context.moveTo(clockContainer.clockRadius/2, clockContainer.clockRadius/2) + var x1=Math.cos(angle*0.01745)*len + var y1=Math.sin(angle*0.01745)*len + context.lineTo(clockContainer.clockRadius/2+.5+x1,clockContainer.clockRadius/2+.5+y1) + context.stroke() + context.closePath() +}" + + Timer{ + id: textTimer + interval: 10 + onTriggered: { + codeText.pos++ + if (codeText.pos >= codeText.code.length)codeText.pos=0 + codeText.text+=codeText.code.charAt(codeText.pos) + if (codeText.text.length >1000){ + codeText.text=codeText.text.substring(codeText.text.length-1000) + } + } + repeat: true + running: true + } + } + + Rectangle { + anchors.fill: parent + gradient: Gradient { + GradientStop {position: .0; color :"black"} + GradientStop {position: .5; color :"transparent"} + GradientStop {position: 1.0; color :"black"} + + } + opacity: .5 + } + + Item { + id: clockContainer + width: 2* Math.min(root.width*.8, root.height*.8) + height: width + scale: 0.5 + anchors.centerIn: parent + property int clockRadius: width + + ShaderEffectSource{ + id: clockBg + anchors.fill: parent + sourceItem: clockCanvas + hideSource: true + live: false + } + + Canvas { + id: clockCanvas + anchors.fill: parent + onPaint: { + var ctx = clockCanvas.getContext('2d') + + ctx.clearRect(0,0,clockContainer.clockRadius,clockContainer.clockRadius) + + var gradient = ctx.createRadialGradient(clockContainer.clockRadius/4, clockContainer.clockRadius/4, 0, clockContainer.clockRadius/4, clockContainer.clockRadius/4, clockContainer.clockRadius) + + ctx.fillStyle = root.bgcolor + ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) + ctx.fill() + + gradient.addColorStop(0, Qt.rgba(0,0,0,0)) + gradient.addColorStop(1, Qt.rgba(0,0,0,.5)) + + ctx.fillStyle = gradient + ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) + ctx.fill() + + drawDials(ctx) + + var gradient2 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius) + gradient2.addColorStop(0, Qt.rgba(0,0,0,.5)) + gradient2.addColorStop(.5, Qt.rgba(1,1,1,.5)) + gradient2.addColorStop(1, Qt.rgba(0,0,0,.5)) + + var gradient3 = ctx.createLinearGradient(0, 0, clockContainer.clockRadius, clockContainer.clockRadius) + gradient3.addColorStop(0, Qt.rgba(1,1,1,.5)) + gradient3.addColorStop(.5, Qt.rgba(0,0,0,.5)) + gradient3.addColorStop(1, Qt.rgba(1,1,1,.5)) + + ctx.lineWidth = clockContainer.clockRadius*.05 + + ctx.strokeStyle = root.rimColor + ctx.beginPath() + ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false) + ctx.stroke() + + ctx.strokeStyle = gradient2 + ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.45, 0, 360, false) + ctx.stroke() + + ctx.beginPath() + ctx.strokeStyle = root.rimColor + ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) + ctx.stroke() + + ctx.strokeStyle = gradient3 + + ctx.arc(clockContainer.clockRadius/2, clockContainer.clockRadius/2, clockContainer.clockRadius*.475, 0, 360, false) + ctx.stroke() + ctx.closePath() + + + clockBg.scheduleUpdate() + } + + function drawDials(context){ + + context.strokeStyle = "#888888" + context.fillStyle = root.dialColor + context.lineWidth = 2 + context.beginPath() + for (var i=1; i<=60; i++){ + var x1=Math.cos(((i)*6)*0.01745)*clockContainer.clockRadius*.4 + var y1=Math.sin(((i)*6)*0.01745)*clockContainer.clockRadius*.4 + + var x2=Math.cos(((i)*6)*0.01745)*clockContainer.clockRadius*.45 + var y2=Math.sin(((i)*6)*0.01745)*clockContainer.clockRadius*.45 + + context.moveTo(clockContainer.clockRadius/2+.5+x1,clockContainer.clockRadius/2+.5+y1) + context.lineTo(clockContainer.clockRadius/2+.5+x2,clockContainer.clockRadius/2+.5+y2) + context.stroke() + } + context.closePath() + + context.beginPath() + + var romans = ['I','II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII'] + + for (i=1; i<=12; i++){ + x1=Math.cos((-90+(i)*30)*0.01745)*clockContainer.clockRadius*.35 -clockContainer.width*0.03 + y1=Math.sin((-90+(i)*30)*0.01745)*clockContainer.clockRadius*.35 +clockContainer.height*0.04 + + if (root.dialStyle === 1) x1-=clockContainer.width*0.01 + + context.font = 'bold '+Math.floor(clockContainer.width*.1)+'px Arial' + + + if (i >= 10) + x1 -= clockContainer.width*0.02 + context.textAlign = 'center'; + context.textBaseline = 'middle' + + var dial = i + + if (root.dialStyle === 1) dial = romans[i-1] + context.text(dial,clockContainer.clockRadius/2+x1,clockContainer.clockRadius/2+y1) + + context.fill() + context.stroke() + } + context.closePath() + } + } + + Canvas { + id: clockPointers + anchors.fill: parent + antialiasing: true + renderTarget: Canvas.Image + onPaint: { + var ctx = clockPointers.getContext('2d') + ctx.clearRect(0,0,clockContainer.clockRadius,clockContainer.clockRadius) + ctx.lineCap = 'round' + drawPointer(ctx, -90+clock.hours*30, clockContainer.clockRadius*.25, clockContainer.clockRadius*.05, "#000000") + drawPointer(ctx, -90+clock.minutes*6, clockContainer.clockRadius*.375, clockContainer.clockRadius*.025, "#333333") + drawPointer(ctx, -90+clock.seconds*6, clockContainer.clockRadius*.40, 4, "#aa0000") + + // Draw nail + ctx.beginPath() + ctx.fillStyle = "#535353" + ctx.ellipse(clockContainer.clockRadius/2-16,clockContainer.clockRadius/2-16,32,32) + ctx.fill() + ctx.closePath() + } + + function drawPointer(context, angle, len, thickness, color){ + context.beginPath() + context.lineWidth = thickness + context.strokeStyle = color + context.moveTo(clockContainer.clockRadius/2, clockContainer.clockRadius/2) + var x1=Math.cos(angle*0.01745)*len + var y1=Math.sin(angle*0.01745)*len + context.lineTo(clockContainer.clockRadius/2+.5+x1,clockContainer.clockRadius/2+.5+y1) + context.stroke() + context.closePath() + } + } + + Timer{ + id: clock + interval: 1000 + repeat: true + running: !mouseArea.pressed + + property int hours: 0 + property int minutes: 0 + property int seconds: 0 + + onTriggered: { + seconds ++ + if (seconds == 60) seconds = 0 + + if (seconds == 0) minutes++ + if (minutes == 60) { + hours++ + minutes=0 + } + + if (hours >= 12) hours=0 + + clockPointers.requestPaint() + } + } + } + + MouseArea { + id: mouseArea + anchors.fill: clockContainer + property bool grabbed: false + + onPressed: { + + var temp = clockContainer.clockRadius/2 + var ang = (90+Math.atan2((mouseY-temp), (mouseX-temp))*57.2957795) + if (ang <0) ang+=360 + + if (ang/6 > clock.minutes-2 && ang/6clockContainer.clockRadius*.42*clockContainer.scale){ + root.rimColor = newColor() + clockCanvas.requestPaint() + return; + }else if (dist>clockContainer.clockRadius*.32*clockContainer.scale) { + root.dialStyle = Math.round(Math.random()) + root.dialColor = newColor() + clockCanvas.requestPaint() + }else{ + root.bgcolor = newColor() + clockCanvas.requestPaint() + } + } + } + + onPositionChanged: { + if (grabbed) { + var temp = clockContainer.clockRadius/2 + var ang = (90+Math.atan2((mouseY-temp), (mouseX-temp))*57.2957795) + if (ang <0) ang+=360 + + var oldMinutes = clock.minutes + clock.minutes=ang/6 + + if (oldMinutes>55 && clock.minutes <5) clock.hours++ + if (oldMinutes<5 && clock.minutes >50) clock.hours-- + if (clock.hours >12) clock.hours=1 + if (clock.hours <0) clock.hours=11 + + + clockPointers.requestPaint() + } + } + onReleased: grabbed = false; + } + + function newColor(){ + var r=Math.random() + var g=Math.random() + var b=Math.random() + return Qt.rgba(r,g,b,1) + } + + Component.onCompleted: { + var d = new Date() + clock.hours = d.getHours() + if (clock.hours>=12)clock.hours-=12 + clock.minutes = d.getMinutes() + clock.seconds = d.getSeconds() + clockCanvas.requestPaint() + } +} diff --git a/basicsuite/qt5-everywhere/demos/demos.pro b/basicsuite/qt5-everywhere/demos/demos.pro new file mode 100644 index 0000000..439fe35 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/demos.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS += \ + shaders \ diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml new file mode 100644 index 0000000..b0c2047 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: delegate + height: grid.cellHeight + width: grid.cellWidth + color: mainWindow.appBackground + property int tileMargin: mainWindow.tileMargin + + Rectangle { + anchors.left: parent.left + anchors.top: parent.top + anchors.topMargin: parent.tileMargin/2 + width: parent.width - tileMargin + height: parent.height - tileMargin + color: mainWindow.tileBackground + + MouseArea { + anchors.fill: parent + onClicked: { + grid.currentIndex = index + console.log(link) + Qt.openUrlExternally(link) + } + } + + states: [ + State { + name: "selected" + when: delegate.GridView.isCurrentItem + } + ] + + + Image { + id: iconImage + source: url + width: parent.width + height: parent.height + } + + Rectangle{ + width: parent.width + height: dateText.height + tileMargin + anchors.top: dateText.top + anchors.bottom: parent.bottom + color: "Black" + opacity: 0.5 + visible: iconImage.source + + } + + Text { + id: dateText + anchors.left: parent.left + anchors.leftMargin: tileMargin + anchors.bottom: parent.bottom + anchors.bottomMargin: tileMargin + anchors.right: parent.right + anchors.rightMargin: tileMargin + + color: mainWindow.textColor + text: title + width: parent.width; + wrapMode: Text.WordWrap; + smooth: true + font { family: mainWindow.uiFont; pixelSize: mainWindow.tileFontSize } + } + } +} + diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml new file mode 100644 index 0000000..dae206b --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: scrollBar + + // The properties that define the scrollbar's state. + // position and pageSize are in the range 0.0 - 1.0. They are relative to the + // height of the page, i.e. a pageSize of 0.5 means that you can see 50% + // of the height of the view. + // orientation can be either Qt.Vertical or Qt.Horizontal + property real position + property real pageSize + property variant orientation : Qt.Vertical + + // A light, semi-transparent background + Rectangle { + id: background + anchors.fill: parent + radius: width/2 - 1 + color: mainWindow.appBackground + } + + // Size the bar to the required size, depending upon the orientation. + Rectangle { + x: scrollBar.position * (scrollBar.width-2) + 1 + y: 1 + width: scrollBar.pageSize * (scrollBar.width-2) + height: parent.height + radius: height/2 - 1 + color: mainWindow.tileBackground + } +} diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml new file mode 100644 index 0000000..d85d292 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml @@ -0,0 +1,150 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.XmlListModel 2.0 + +Rectangle { + id: mainWindow + anchors.fill: parent + color: appBackground + + property int tileHeight: parseInt(grid.height / 3) + property int tileFontSize: tileHeight * 0.08 + property int horizontalMargin: height * 0.08 + property int topBarsize: height * 0.2 + property int bottomBarSize: height * 0.08 + property int tileMargin: height * 0.01 + property int appHeaderFontSize: topBarsize * 0.4 + property string appBackground: "#262626" + property string tileBackground: "#86bc24" + property string textColor: "white" + property string uiFont: "Segoe UI" + + XmlListModel { + id: feedModel + //source: "http://blog.qt.digia.com/feed/" + source: "http://news.yahoo.com/rss/tech" + //query: "/rss/channel/item" + // Filter out items that don't have images + query: "/rss/channel/item[exists(child::media:content)]" + namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";" + XmlRole { name: "url"; query: "media:content/@url/string()" } + XmlRole { name: "title"; query: "title/string()" } + XmlRole { name: "pubDate"; query: "pubDate/string()" } + XmlRole { name: "link"; query: "link/string()" } + + onStatusChanged: { + if (status == XmlListModel.Ready) { + playbanner.start(); + } + } + } + + // Top bar + Item { + id: topBar + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top + anchors.leftMargin: horizontalMargin + opacity: 0 + height: topBarsize + Text { + id: title + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + text: qsTr("Yahoo Technology") + font.family: uiFont; + font.pixelSize: appHeaderFontSize; + color: textColor + smooth: true + } + } + + // Grid view + GridView { + id: grid + anchors.fill: parent + anchors.topMargin: topBarsize + anchors.bottomMargin: bottomBarSize + anchors.leftMargin: horizontalMargin + anchors.rightMargin: horizontalMargin + opacity: 0 + flow: GridView.TopToBottom + cellHeight: tileHeight + cellWidth: parseInt(tileHeight * 1.5) + cacheBuffer: cellWidth + clip: false + focus: true + model: feedModel + delegate: RssDelegate {} + + // Only show the scrollbars when the view is moving. + states: State { + when: grid.movingHorizontally + PropertyChanges { target: horizontalScrollBar; opacity: 1 } + } + + transitions: Transition { + NumberAnimation { properties: "opacity"; duration: 400 } + } + } + + ScrollBar { + id: horizontalScrollBar + width: parent.width; height: 6 + anchors.bottom: parent.bottom + anchors.left: parent.left + opacity: 0 + orientation: Qt.Horizontal + position: grid.visibleArea.xPosition + pageSize: grid.visibleArea.widthRatio + } + + SequentialAnimation { + id: playbanner + running: false + NumberAnimation { target: topBar; property: "opacity"; to: 1.0; duration: 300} + NumberAnimation { target: grid; property: "opacity"; to: 1.0; duration: 300} + } + +} + diff --git a/basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js b/basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js new file mode 100644 index 0000000..467e431 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +var heartData = [0,0,0,0,0] + +function fillHeartData(length) { + if (length !== heartData.length) { + heartData = new Array(length); + for (var i=0; i 0) + app.beatDifference = 0.8*beatDifference + 0.2*(ms - app.previousTime) + app.frequency = Math.round(60000.0 / app.beatDifference) + app.previousTime = ms; + } + + function updateData() { + app.heartDataIndex++; + if (app.heartDataIndex >= Data.heartData.length) + app.heartDataIndex = 0; + else + app.heartDataIndex++; + + if (beatDataIndex >= 0) + fillBeatData() + else + fillRandomData() + + heartCanvas.requestPaint() + } + + function fillBeatData() { + var value = 0; + switch (app.beatDataIndex) { + case 0: value = Math.random()*0.1+0.1; break; + case 1: value = Math.random()*0.1+0.0; break; + case 2: value = Math.random()*0.3+0.7; break; + case 3: value = Math.random()*0.1-0.05; break; + case 4: value = Math.random()*0.3-0.8; break; + case 5: value = Math.random()*0.1-0.05; break; + case 6: value = Math.random()*0.1-0.05; break; + case 7: value = Math.random()*0.1+0.15; break; + default: value = 0; break; + } + + Data.heartData[app.heartDataIndex] = value; + app.beatDataIndex++; + if (app.beatDataIndex > 7) + app.beatDataIndex = -1 + } + + function fillRandomData() { + Data.heartData[app.heartDataIndex] = Math.random()*0.05-0.025 + } + + onWidthChanged: { + Data.fillHeartData(Math.floor(app.width*0.5)) + gridCanvas.requestPaint(); + } + onHeightChanged: gridCanvas.requestPaint() + + Item { + id: grid + anchors.fill: parent + + Canvas { + id: gridCanvas + anchors.fill: parent + antialiasing: true + renderTarget: Canvas.Image + onPaint: { + var ctx = gridCanvas.getContext('2d') + + ctx.clearRect(0,0,grid.width,grid.height) + var step = 1000 / updateTimer.interval * (app.width / Data.heartData.length) + var xCount = app.width / step + var yCount = app.height / step + ctx.strokeStyle = app.gridColor; + + var x=0; + ctx.beginPath() + for (var i=0; i 100 ? app.alarmColor : app.textColor + font { pixelSize: app.width * .1; bold: true } + } + + // Pulse timer + Timer { + id: heartTimer + interval: 1200 + running: true + repeat: false + onTriggered: pulse() + } + + // Update timer + Timer { + id: updateTimer + interval: 30 + running: true + repeat: true + onTriggered: updateData() + } + + SequentialAnimation{ + id: heartAnimation + NumberAnimation { target: heart; property: "scale"; duration: 100; from: 1.0; to:1.2; easing.type: Easing.Linear } + NumberAnimation { target: heart; property: "scale"; duration: 100; from: 1.2; to:1.0; easing.type: Easing.Linear } + } + + Component.onCompleted: { + Data.fillHeartData(Math.max(100,Math.floor(app.width*0.5))) + } +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/.DS_Store b/basicsuite/qt5-everywhere/demos/maroon/.DS_Store new file mode 100644 index 0000000..b5c859b Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/.DS_Store differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/Maroon.qml b/basicsuite/qt5-everywhere/demos/maroon/Maroon.qml new file mode 100644 index 0000000..d7bfcb6 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/Maroon.qml @@ -0,0 +1,233 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "content" +import "content/logic.js" as Logic + +Item { + id: root + width: 320 + height: 480 + property var gameState: Logic.newGameState(canvas); + property bool passedSplash: false + + Image { + source:"content/gfx/background.png" + anchors.bottom: view.bottom + + ParticleSystem { + id: particles + anchors.fill: parent + + ImageParticle { + id: bubble + anchors.fill: parent + source: "content/gfx/catch.png" + opacity: 0.25 + } + + Wander { + xVariance: 25; + pace: 25; + } + + Emitter { + width: parent.width + height: 150 + anchors.bottom: parent.bottom + anchors.bottomMargin: 3 + startTime: 15000 + + emitRate: 2 + lifeSpan: 15000 + + acceleration: PointDirection{ y: -6; xVariation: 2; yVariation: 2 } + + size: 24 + sizeVariation: 16 + } + } + } + + Column { + id: view + y: -(height - 480) + width: 320 + + GameOverScreen { gameCanvas: canvas } + + Item { + id: canvasArea + width: 320 + height: 480 + + Row { + height: childrenRect.height + Image { + id: wave + y: 30 + source:"content/gfx/wave.png" + } + Image { + y: 30 + source:"content/gfx/wave.png" + } + NumberAnimation on x { from: 0; to: -(wave.width); duration: 16000; loops: Animation.Infinite } + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { from: y - 2; to: y + 2; duration: 1600; easing.type: Easing.InOutQuad } + NumberAnimation { from: y + 2; to: y - 2; duration: 1600; easing.type: Easing.InOutQuad } + } + } + + Row { + opacity: 0.5 + Image { + id: wave2 + y: 25 + source: "content/gfx/wave.png" + } + Image { + y: 25 + source: "content/gfx/wave.png" + } + NumberAnimation on x { from: -(wave2.width); to: 0; duration: 32000; loops: Animation.Infinite } + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { from: y + 2; to: y - 2; duration: 1600; easing.type: Easing.InOutQuad } + NumberAnimation { from: y - 2; to: y + 2; duration: 1600; easing.type: Easing.InOutQuad } + } + } + + Image { + source: "content/gfx/sunlight.png" + opacity: 0.02 + y: 0 + anchors.horizontalCenter: parent.horizontalCenter + transformOrigin: Item.Top + SequentialAnimation on rotation { + loops: Animation.Infinite + NumberAnimation { from: -10; to: 10; duration: 8000; easing.type: Easing.InOutSine } + NumberAnimation { from: 10; to: -10; duration: 8000; easing.type: Easing.InOutSine } + } + } + + Image { + source: "content/gfx/sunlight.png" + opacity: 0.04 + y: 20 + anchors.horizontalCenter: parent.horizontalCenter + transformOrigin: Item.Top + SequentialAnimation on rotation { + loops: Animation.Infinite + NumberAnimation { from: 10; to: -10; duration: 8000; easing.type: Easing.InOutSine } + NumberAnimation { from: -10; to: 10; duration: 8000; easing.type: Easing.InOutSine } + } + } + + Image { + source: "content/gfx/grid.png" + opacity: 0.5 + } + + GameCanvas { + id: canvas + anchors.bottom: parent.bottom + anchors.bottomMargin: 20 + x: 32 + focus: true + } + + InfoBar { anchors.bottom: canvas.top; anchors.bottomMargin: 6; width: parent.width } + + //3..2..1..go + Timer { + id: countdownTimer + interval: 1000 + running: root.countdown < 5 + repeat: true + onTriggered: root.countdown++ + } + Repeater { + model: ["content/gfx/text-blank.png", "content/gfx/text-3.png", "content/gfx/text-2.png", "content/gfx/text-1.png", "content/gfx/text-go.png"] + delegate: Image { + visible: root.countdown <= index + opacity: root.countdown == index ? 0.5 : 0.1 + scale: root.countdown >= index ? 1.0 : 0.0 + source: modelData + Behavior on opacity { NumberAnimation {} } + Behavior on scale { NumberAnimation {} } + } + } + } + + NewGameScreen { + onStartButtonClicked: root.passedSplash = true + } + } + + property int countdown: 10 + Timer { + id: gameStarter + interval: 4000 + running: false + repeat: false + onTriggered: Logic.startGame(canvas); + } + + states: [ + State { + name: "gameOn"; when: gameState.gameOver == false && passedSplash + PropertyChanges { target: view; y: -(height - 960) } + StateChangeScript { script: root.countdown = 0; } + PropertyChanges { target: gameStarter; running: true } + }, + State { + name: "gameOver"; when: gameState.gameOver == true + PropertyChanges { target: view; y: 0 } + } + ] + + transitions: Transition { + NumberAnimation { properties: "x,y"; duration: 1200; easing.type: Easing.OutQuad } + } +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/BuildButton.qml b/basicsuite/qt5-everywhere/demos/maroon/content/BuildButton.qml new file mode 100644 index 0000000..49641fc --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/BuildButton.qml @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "logic.js" as Logic + +Item { + id: container + width: 64 + height: 64 + property alias source: img.source + property int index + property int row: 0 + property int col: 0 + property int towerType + property bool canBuild: true + property Item gameCanvas: parent.parent.parent + signal clicked() + + Image { + id: img + opacity: (canBuild && gameCanvas.coins >= Logic.towerData[towerType-1].cost) ? 1.0 : 0.4 + } + Text { + anchors.right: parent.right + font.pointSize: 14 + font.bold: true + color: "#ffffff" + text: Logic.towerData[towerType - 1].cost + } + MouseArea { + anchors.fill: parent + onClicked: { + Logic.buildTower(towerType, col, row) + container.clicked() + } + } + Image { + visible: col == index && row != 0 + source: "gfx/dialog-pointer.png" + anchors.top: parent.bottom + anchors.topMargin: 4 + anchors.horizontalCenter: parent.horizontalCenter + } + Image { + visible: col == index && row == 0 + source: "gfx/dialog-pointer.png" + rotation: 180 + anchors.bottom: parent.top + anchors.bottomMargin: 6 + anchors.horizontalCenter: parent.horizontalCenter + } +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/GameCanvas.qml b/basicsuite/qt5-everywhere/demos/maroon/content/GameCanvas.qml new file mode 100644 index 0000000..5e6e963 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/GameCanvas.qml @@ -0,0 +1,240 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "logic.js" as Logic +import "towers" as Towers + +Item { + id: grid + + property int squareSize: 64 + property int rows: 6 + property int cols: 4 + property Item canvas: grid + property int score: 0 + property int coins: 100 + property int lives: 3 + property int waveNumber: 0 + property int waveProgress: 0 + property var towers + property var mobs + property bool gameRunning: false + property bool gameOver: false + property bool errored: false + property string errorString: "" + + width: cols * squareSize + height: rows * squareSize + + function freshState() { + lives = 3 + coins = 100 + score = 0 + waveNumber = 0 + waveProgress = 0 + gameOver = false + gameRunning = false + towerMenu.shown = false + helpButton.comeBack(); + } + + Text { + id: errorText // Mostly for debug purposes + text: errorString + visible: errored + color: "red" + font.pixelSize: 18 + wrapMode: Text.WordWrap + width: parent.width / 1.2 + height: parent.height / 1.2 + anchors.centerIn: parent + z: 1000 + } + + Timer { + interval: 16 + running: true + repeat: true + onTriggered: Logic.tick() + } + + MouseArea { + id: ma + anchors.fill: parent + onClicked: { + if (towerMenu.visible) + towerMenu.finish() + else + towerMenu.open(mouse.x, mouse.y) + } + } + + Image { + id: towerMenu + visible: false + z: 1500 + scale: 0.9 + opacity: 0.7 + property int dragDistance: 16 + property int targetRow: 0 + property int targetCol: 0 + property bool shown: false + property bool towerExists: false + + function finish() { + shown = false + } + + function open(xp,yp) { + if (!grid.gameRunning) + return + targetRow = Logic.row(yp) + targetCol = Logic.col(xp) + if (targetRow == 0) + towerMenu.y = (targetRow + 1) * grid.squareSize + else + towerMenu.y = (targetRow - 1) * grid.squareSize + towerExists = (grid.towers[Logic.towerIdx(targetCol, targetRow)] != null) + shown = true + helpButton.goAway(); + } + + states: State { + name: "shown"; when: towerMenu.shown && !grid.gameOver + PropertyChanges { target: towerMenu; visible: true; scale: 1; opacity: 1 } + } + + transitions: Transition { + PropertyAction { property: "visible" } + NumberAnimation { properties: "opacity,scale"; duration: 500; easing.type: Easing.OutElastic } + } + + x: -32 + source: "gfx/dialog.png" + Row { + id: buttonRow + height: 100 + anchors.centerIn: parent + spacing: 8 + BuildButton { + row: towerMenu.targetRow; col: towerMenu.targetCol + anchors.verticalCenter: parent.verticalCenter + towerType: 1; index: 0 + canBuild: !towerMenu.towerExists + source: "gfx/dialog-melee.png" + onClicked: towerMenu.finish() + } + BuildButton { + row: towerMenu.targetRow; col: towerMenu.targetCol + anchors.verticalCenter: parent.verticalCenter + towerType: 2; index: 1 + canBuild: !towerMenu.towerExists + source: "gfx/dialog-shooter.png" + onClicked: towerMenu.finish() + } + BuildButton { + row: towerMenu.targetRow; col: towerMenu.targetCol + anchors.verticalCenter: parent.verticalCenter + towerType: 3; index: 2 + canBuild: !towerMenu.towerExists + source: "gfx/dialog-bomb.png" + onClicked: towerMenu.finish() + } + BuildButton { + row: towerMenu.targetRow; col: towerMenu.targetCol + anchors.verticalCenter: parent.verticalCenter + towerType: 4; index: 3 + canBuild: !towerMenu.towerExists + source: "gfx/dialog-factory.png" + onClicked: towerMenu.finish() + } + } + } + + + Keys.onPressed: { // Cheat Codes while Testing + if (event.key == Qt.Key_Up && (event.modifiers & Qt.ShiftModifier)) + grid.coins += 10; + if (event.key == Qt.Key_Left && (event.modifiers & Qt.ShiftModifier)) + grid.lives += 1; + if (event.key == Qt.Key_Down && (event.modifiers & Qt.ShiftModifier)) + Logic.gameState.waveProgress += 1000; + if (event.key == Qt.Key_Right && (event.modifiers & Qt.ShiftModifier)) + Logic.endGame(); + } + + Image { + id: helpButton + z: 1010 + source: "gfx/button-help.png" + function goAway() { + helpMA.enabled = false; + helpButton.opacity = 0; + } + function comeBack() { + helpMA.enabled = true; + helpButton.opacity = 1; + } + Behavior on opacity { NumberAnimation {} } + MouseArea { + id: helpMA + anchors.fill: parent + onClicked: {helpImage.visible = true; helpButton.visible = false;} + } + + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 0 + } + + Image { + id: helpImage + z: 1010 + source: "gfx/help.png" + anchors.fill: parent + visible: false + MouseArea { + anchors.fill: parent + onClicked: helpImage.visible = false; + } + } + +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/GameOverScreen.qml b/basicsuite/qt5-everywhere/demos/maroon/content/GameOverScreen.qml new file mode 100644 index 0000000..dfb439f --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/GameOverScreen.qml @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "logic.js" as Logic + +Item { + id: gameOverScreen + width: 320 + height: 400 + property GameCanvas gameCanvas + + Image { + id: img + source: "gfx/text-gameover.png" + anchors.centerIn: parent + } + + ParticleSystem { + anchors.fill: parent + ImageParticle { + id: cloud + source: "gfx/cloud.png" + alphaVariation: 0.25 + opacity: 0.25 + } + + Wander { + xVariance: 100; + pace: 1; + } + + Emitter { + id: cloudLeft + width: 160 + height: 160 + anchors.right: parent.left + emitRate: 0.5 + lifeSpan: 12000 + velocity: PointDirection{ x: 64; xVariation: 2; yVariation: 2 } + size: 160 + } + + Emitter { + id: cloudRight + width: 160 + height: 160 + anchors.left: parent.right + emitRate: 0.5 + lifeSpan: 12000 + velocity: PointDirection{ x: -64; xVariation: 2; yVariation: 2 } + size: 160 + } + } + + + Text { + visible: gameCanvas != undefined + text: "You saved " + gameCanvas.score + " fishes!" + anchors.top: img.bottom + anchors.topMargin: 12 + anchors.horizontalCenter: parent.horizontalCenter + font.bold: true + color: "#000000" + opacity: 0.5 + } + + Image { + source: "gfx/button-play.png" + anchors.bottom: parent.bottom + anchors.bottomMargin: 0 + MouseArea { + anchors.fill: parent + onClicked: gameCanvas.gameOver = false//This will actually trigger the state change in main.qml + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/InfoBar.qml b/basicsuite/qt5-everywhere/demos/maroon/content/InfoBar.qml new file mode 100644 index 0000000..36303fc --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/InfoBar.qml @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + height: childrenRect.height + + // Display the number of lives + Row { + anchors.left: parent.left + anchors.leftMargin: 10 + spacing: 5 + Repeater { + id: rep + model: Math.min(10, canvas.lives) + delegate: Image { source: "gfx/lifes.png" } + } + } + + // Display the number of fishes saved + Row { + anchors.right: points.left + anchors.rightMargin: 20 + spacing: 5 + Image { source: "gfx/scores.png" } + Text { + text: canvas.score + font.bold: true + } + } + + // Display the number of coins + Row { + id: points + anchors.right: parent.right + anchors.rightMargin: 10 + spacing: 5 + Image { source: "gfx/points.png" } + Text { + id: pointsLabel + text: canvas.coins + font.bold: true + } + } +} + diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/NewGameScreen.qml b/basicsuite/qt5-everywhere/demos/maroon/content/NewGameScreen.qml new file mode 100644 index 0000000..495e3aa --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/NewGameScreen.qml @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +// This is the first screen. +// It shows the logo and emit a startButtonClicked signal +// when the user press the "PLAY" button. + +Item { + id: newGameScreen + width: 320 + height: 480 + + signal startButtonClicked + + Image { + source: "gfx/logo.png" + anchors.top: parent.top + anchors.topMargin: 60 + } + + Image { + source: "gfx/logo-fish.png" + anchors.top: parent.top + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x + 148; to: x + 25; duration: 2000; easing.type: Easing.InOutQuad } + NumberAnimation { from: x + 25; to: x + 148; duration: 1600; easing.type: Easing.InOutQuad } + } + SequentialAnimation on anchors.topMargin { + loops: Animation.Infinite + NumberAnimation { from: 100; to: 60; duration: 1600; easing.type: Easing.InOutQuad } + NumberAnimation { from: 60; to: 100; duration: 2000; easing.type: Easing.InOutQuad } + } + } + + Image { + source: "gfx/logo-bubble.png" + anchors.top: parent.top + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x + 140; to: x + 40; duration: 2000; easing.type: Easing.InOutQuad } + NumberAnimation { from: x + 40; to: x + 140; duration: 1600; easing.type: Easing.InOutQuad } + } + SequentialAnimation on anchors.topMargin { + loops: Animation.Infinite + NumberAnimation { from: 100; to: 60; duration: 1600; easing.type: Easing.InOutQuad } + NumberAnimation { from: 60; to: 100; duration: 2000; easing.type: Easing.InOutQuad } + } + SequentialAnimation on width { + loops: Animation.Infinite + NumberAnimation { from: 140; to: 160; duration: 1000; easing.type: Easing.InOutQuad } + NumberAnimation { from: 160; to: 140; duration: 800; easing.type: Easing.InOutQuad } + } + SequentialAnimation on height { + loops: Animation.Infinite + NumberAnimation { from: 150; to: 140; duration: 800; easing.type: Easing.InOutQuad } + NumberAnimation { from: 140; to: 150; duration: 1000; easing.type: Easing.InOutQuad } + } + } + + Image { + source: "gfx/button-play.png" + anchors.bottom: parent.bottom + anchors.bottomMargin: 60 + MouseArea { + anchors.fill: parent + onClicked: newGameScreen.startButtonClicked() + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/SoundEffect.qml b/basicsuite/qt5-everywhere/demos/maroon/content/SoundEffect.qml new file mode 100644 index 0000000..0dccd12 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/SoundEffect.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +//Proxies a SoundEffect if QtMultimedia is installed +Item { + id: container + property QtObject effect: Qt.createQmlObject("import QtMultimedia 5.0; SoundEffect{ source: '" + container.source + "' }", container); + property url source: "" + onSourceChanged: if (effect != null) effect.source = source; + function play() { + if (effect != null) + effect.play(); + } +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/bomb-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/bomb-action.wav new file mode 100644 index 0000000..b334dc1 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/audio/bomb-action.wav differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch-action.wav new file mode 100644 index 0000000..3e22124 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch-action.wav differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch.wav new file mode 100644 index 0000000..d3eade8 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/audio/catch.wav differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/currency.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/currency.wav new file mode 100644 index 0000000..0d9ef2c Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/audio/currency.wav differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/factory-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/factory-action.wav new file mode 100644 index 0000000..a2ace6c Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/audio/factory-action.wav differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/melee-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/melee-action.wav new file mode 100644 index 0000000..d325af4 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/audio/melee-action.wav differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/projectile-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/projectile-action.wav new file mode 100644 index 0000000..4e2284f Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/audio/projectile-action.wav differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/audio/shooter-action.wav b/basicsuite/qt5-everywhere/demos/maroon/content/audio/shooter-action.wav new file mode 100644 index 0000000..3e12b94 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/audio/shooter-action.wav differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/background.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/background.png new file mode 100644 index 0000000..d548b93 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/background.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-action.png new file mode 100644 index 0000000..42da5d7 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-action.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-idle.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-idle.png new file mode 100644 index 0000000..3bd62e2 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb-idle.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb.png new file mode 100644 index 0000000..380da7d Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/bomb.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-help.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-help.png new file mode 100644 index 0000000..aecebc1 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-help.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-play.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-play.png new file mode 100644 index 0000000..6cdad6c Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/button-play.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch-action.png new file mode 100644 index 0000000..78ca9fe Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch-action.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch.png new file mode 100644 index 0000000..b7620fe Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/catch.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/cloud.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/cloud.png new file mode 100644 index 0000000..d7c35f8 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/cloud.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/currency.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/currency.png new file mode 100644 index 0000000..1571341 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/currency.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-bomb.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-bomb.png new file mode 100644 index 0000000..708d916 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-bomb.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-factory.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-factory.png new file mode 100644 index 0000000..d2e2a48 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-factory.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-melee.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-melee.png new file mode 100644 index 0000000..069d18d Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-melee.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-pointer.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-pointer.png new file mode 100644 index 0000000..9b51a09 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-pointer.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-shooter.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-shooter.png new file mode 100644 index 0000000..af980ca Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog-shooter.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog.png new file mode 100644 index 0000000..d528ba7 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/dialog.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-action.png new file mode 100644 index 0000000..8981678 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-action.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-idle.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-idle.png new file mode 100644 index 0000000..a145582 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory-idle.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory.png new file mode 100644 index 0000000..bfb9f3f Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/factory.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/grid.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/grid.png new file mode 100644 index 0000000..b595552 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/grid.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/help.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/help.png new file mode 100644 index 0000000..4654e4c Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/help.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/lifes.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/lifes.png new file mode 100644 index 0000000..135310b Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/lifes.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-bubble.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-bubble.png new file mode 100644 index 0000000..136151c Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-bubble.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-fish.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-fish.png new file mode 100644 index 0000000..c41833a Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo-fish.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo.png new file mode 100644 index 0000000..787ac99 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/logo.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-action.png new file mode 100644 index 0000000..c53873b Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-action.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-idle.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-idle.png new file mode 100644 index 0000000..621d9df Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee-idle.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee.png new file mode 100644 index 0000000..ab24015 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/melee.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob-idle.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob-idle.png new file mode 100644 index 0000000..dedacc7 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob-idle.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob.png new file mode 100644 index 0000000..7569c35 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/mob.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/points.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/points.png new file mode 100644 index 0000000..1d2386d Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/points.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile-action.png new file mode 100644 index 0000000..aa2e650 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile-action.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile.png new file mode 100644 index 0000000..c25a0c3 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/projectile.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/scores.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/scores.png new file mode 100644 index 0000000..af757fe Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/scores.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-action.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-action.png new file mode 100644 index 0000000..08e7e30 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-action.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-idle.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-idle.png new file mode 100644 index 0000000..663098d Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter-idle.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter.png new file mode 100644 index 0000000..d44401e Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/shooter.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/sunlight.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/sunlight.png new file mode 100644 index 0000000..d1c7042 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/sunlight.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-1.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-1.png new file mode 100644 index 0000000..3ea399c Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-1.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-2.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-2.png new file mode 100644 index 0000000..934a481 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-2.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-3.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-3.png new file mode 100644 index 0000000..47523f5 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-3.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-blank.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-blank.png new file mode 100644 index 0000000..4a687b2 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-blank.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-gameover.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-gameover.png new file mode 100644 index 0000000..4f53ef0 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-gameover.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-go.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-go.png new file mode 100644 index 0000000..bfc26f7 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/text-go.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/gfx/wave.png b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/wave.png new file mode 100644 index 0000000..f97426c Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/maroon/content/gfx/wave.png differ diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/logic.js b/basicsuite/qt5-everywhere/demos/maroon/content/logic.js new file mode 100644 index 0000000..dd76b7e --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/logic.js @@ -0,0 +1,264 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +.pragma library // Shared game state +.import QtQuick 2.0 as QQ + +// Game Stuff +var gameState // Local reference +function getGameState() { return gameState; } + +var towerData = [ // Name and cost, stats are in the delegate per instance + { "name": "Melee", "cost": 20 }, + { "name": "Ranged", "cost": 50 }, + { "name": "Bomb", "cost": 75 }, + { "name": "Factory", "cost": 25 } +] + +var waveBaseData = [300, 290, 280, 270, 220, 180, 160, 80, 80, 80, 30, 30, 30, 30]; +var waveData = []; + +var towerComponents = new Array(towerData.length); +var mobComponent = Qt.createComponent("mobs/MobBase.qml"); + +function endGame() +{ + gameState.gameRunning = false; + gameState.gameOver = true; + for (var i = 0; i < gameState.cols; i++) { + for (var j = 0; j < gameState.rows; j++) { + if (gameState.towers[towerIdx(i, j)]) { + gameState.towers[towerIdx(i, j)].destroy(); + gameState.towers[towerIdx(i, j)] = null; + } + } + for (var j in gameState.mobs[i]) + gameState.mobs[i][j].destroy(); + gameState.mobs[i].splice(0,gameState.mobs[i].length); //Leaves queue reusable + } +} + +function startGame(gameCanvas) +{ + waveData = new Array(); + for (var i in waveBaseData) + waveData[i] = waveBaseData[i]; + gameState.freshState(); + for (var i = 0; i < gameCanvas.cols; i++) { + for (var j = 0; j < gameCanvas.rows; j++) + gameState.towers[towerIdx(i, j)] = null; + gameState.mobs[i] = new Array(); + } + gameState.towers[towerIdx(0, 0)] = newTower(3, 0, 0);//Start with a starfish in the corner + gameState.gameRunning = true; + gameState.gameOver = false; +} + +function newGameState(gameCanvas) +{ + for (var i = 0; i < towerComponents.length; i++) { + towerComponents[i] = Qt.createComponent("towers/" + towerData[i].name + ".qml"); + if (towerComponents[i].status == QQ.Component.Error) { + gameCanvas.errored = true; + gameCanvas.errorString += "Loading Tower " + towerData[i].name + "\n" + (towerComponents[i].errorString()); + console.log(towerComponents[i].errorString()); + } + } + gameState = gameCanvas; + gameState.freshState(); + gameState.towers = new Array(gameCanvas.rows * gameCanvas.cols); + gameState.mobs = new Array(gameCanvas.cols); + return gameState; +} + +function row(y) +{ + return Math.floor(y / gameState.squareSize); +} + +function col(x) +{ + return Math.floor(x / gameState.squareSize); +} + +function towerIdx(x, y) +{ + return y + (x * gameState.rows); +} + +function newMob(col) +{ + var ret = mobComponent.createObject(gameState.canvas, + { "col" : col, + "speed" : (Math.min(2.0, 0.10 * (gameState.waveNumber + 1))), + "y" : gameState.canvas.height }); + gameState.mobs[col].push(ret); + return ret; +} + +function newTower(type, row, col) +{ + var ret = towerComponents[type].createObject(gameState.canvas); + ret.row = row; + ret.col = col; + ret.fireCounter = ret.rof; + ret.spawn(); + return ret; +} + +function buildTower(type, x, y) +{ + if (gameState.towers[towerIdx(x,y)] != null) { + if (type <= 0) { + gameState.towers[towerIdx(x,y)].sell(); + gameState.towers[towerIdx(x,y)] = null; + } + } else { + if (gameState.coins < towerData[type - 1].cost) + return; + gameState.towers[towerIdx(x, y)] = newTower(type - 1, y, x); + gameState.coins -= towerData[type - 1].cost; + } +} + +function killMob(col, mob) +{ + if (!mob) + return; + var idx = gameState.mobs[col].indexOf(mob); + if (idx == -1 || !mob.hp) + return; + mob.hp = 0; + mob.die(); + gameState.mobs[col].splice(idx,1); +} + +function killTower(row, col) +{ + var tower = gameState.towers[towerIdx(col, row)]; + if (!tower) + return; + tower.hp = 0; + tower.die(); + gameState.towers[towerIdx(col, row)] = null; +} + +function tick() +{ + if (!gameState.gameRunning) + return; + + // Spawn + gameState.waveProgress += 1; + var i = gameState.waveProgress; + var j = 0; + while (i > 0 && j < waveData.length) + i -= waveData[j++]; + if ( i == 0 ) // Spawn a mob + newMob(Math.floor(Math.random() * gameState.cols)); + if ( j == waveData.length ) { // Next Wave + gameState.waveNumber += 1; + gameState.waveProgress = 0; + var waveModifier = 10; // Constant governing how much faster the next wave is to spawn (not fish speed) + for (var k in waveData ) // Slightly faster + if (waveData[k] > waveModifier) + waveData[k] -= waveModifier; + } + + // Towers Attack + for (var j in gameState.towers) { + var tower = gameState.towers[j]; + if (tower == null) + continue; + if (tower.fireCounter > 0) { + tower.fireCounter -= 1; + continue; + } + var column = tower.col; + for (var k in gameState.mobs[column]) { + var conflict = gameState.mobs[column][k]; + if (conflict.y <= gameState.canvas.height && conflict.y + conflict.height > tower.y + && conflict.y - ((tower.row + 1) * gameState.squareSize) < gameState.squareSize * tower.range) { // In Range + tower.fire(); + tower.fireCounter = tower.rof; + conflict.hit(tower.damage); + } + } + + // Income + if (tower.income) { + gameState.coins += tower.income; + tower.fire(); + tower.fireCounter = tower.rof; + } + } + + // Mobs move + for (var i = 0; i < gameState.cols; i++) { + for (var j = 0; j < gameState.mobs[i].length; j++) { + var mob = gameState.mobs[i][j]; + var newPos = gameState.mobs[i][j].y - gameState.mobs[i][j].speed; + if (newPos < 0) { + gameState.lives -= 1; + killMob(i, mob); + if (gameState.lives <= 0) + endGame(); + continue; + } + var conflict = gameState.towers[towerIdx(i, row(newPos))]; + if (conflict != null) { + if (mob.y < conflict.y + gameState.squareSize) + gameState.mobs[i][j].y += gameState.mobs[i][j].speed * 10; // Moved inside tower, now hurry back out + if (mob.fireCounter > 0) { + mob.fireCounter--; + } else { + gameState.mobs[i][j].fire(); + conflict.hp -= mob.damage; + if (conflict.hp <= 0) + killTower(conflict.row, conflict.col); + mob.fireCounter = mob.rof; + } + } else { + gameState.mobs[i][j].y = newPos; + } + } + } + +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/mobs/MobBase.qml b/basicsuite/qt5-everywhere/demos/maroon/content/mobs/MobBase.qml new file mode 100644 index 0000000..d4ece66 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/mobs/MobBase.qml @@ -0,0 +1,262 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "../logic.js" as Logic +import ".." + +Item { + id: container + property string name: "Fish" + property int col: 0 + property real hp: 3 + property real damage: 1 + property real speed: 0.25 + property int rof: 30 //In ticks + property int fireCounter: 0 + property bool dying: false + width: parent ? parent.squareSize : 0 + height: parent ? parent.squareSize : 0 + x: col * width + z: 1001 + function fire() { } + + function die() { + if (dying) + return; + dying = true; + bubble.jumpTo("burst"); + if (fishSprite.currentSprite == "front") + fishSprite.jumpTo(Math.random() > 0.5 ? "left" : "right" ); + fishSwim.start(); + Logic.gameState.score += 1; + killedSound.play(); + bubble.scale = 0.9 + destroy(350); + } + + function inked() { + if (hp > 0) + ink.jumpTo("dirty"); + } + + function hit(dmg) { + hp -= dmg; + + if (hp <= 0) + Logic.killMob(col, container); + } + + Component.onCompleted: spawnSound.play() + + SoundEffect { + id: spawnSound + source: "../audio/catch.wav" + } + SoundEffect { + id: killedSound + source: "../audio/catch-action.wav" + } + + SpriteSequence { + id: fishSprite + width: 64 + height: 64 + interpolate: false + goalSprite: "" + + Sprite { + name: "left" + source: "../gfx/mob-idle.png" + frameWidth: 64 + frameHeight: 64 + frameCount: 1 + frameDuration: 800 + frameDurationVariation: 400 + to: { "front" : 1 } + } + + Sprite { + name: "front" + source: "../gfx/mob-idle.png" + frameCount: 1 + frameX: 64 + frameWidth: 64 + frameHeight: 64 + frameDuration: 800 + frameDurationVariation: 400 + to: { "left" : 1, "right" : 1 } + } + + Sprite { + name: "right" + source: "../gfx/mob-idle.png" + frameCount: 1 + frameX: 128 + frameWidth: 64 + frameHeight: 64 + frameDuration: 800 + frameDurationVariation: 400 + to: { "front" : 1 } + } + + + Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. + name: "dummy" + source: "../gfx/melee-idle.png" + frameCount: 8 + frameWidth: 64 + frameHeight: 64 + frameX: 0 + frameDuration: 200 + } + + NumberAnimation on x { + id: fishSwim + running: false + property bool goingLeft: fishSprite.currentSprite == "right" + to: goingLeft ? -360 : 360 + duration: 300 + } + } + + SpriteSequence { + id: bubble + width: 64 + height: 64 + scale: 0.4 + (0.2 * hp) + interpolate: false + goalSprite: "" + + Behavior on scale { + NumberAnimation { duration: 150; easing.type: Easing.OutBack } + } + + Sprite { + name: "big" + source: "../gfx/catch.png" + frameCount: 1 + to: { "burst" : 0 } + } + + Sprite { + name: "burst" + source: "../gfx/catch-action.png" + frameCount: 3 + frameX: 64 + frameDuration: 200 + } + + Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. + name: "dummy" + source: "../gfx/melee-idle.png" + frameCount: 8 + frameWidth: 64 + frameHeight: 64 + frameX: 0 + frameDuration: 200 + } + SequentialAnimation on width { + loops: Animation.Infinite + NumberAnimation { from: width * 1; to: width * 1.1; duration: 800; easing.type: Easing.InOutQuad } + NumberAnimation { from: width * 1.1; to: width * 1; duration: 1000; easing.type: Easing.InOutQuad } + } + SequentialAnimation on height { + loops: Animation.Infinite + NumberAnimation { from: height * 1; to: height * 1.15; duration: 1200; easing.type: Easing.InOutQuad } + NumberAnimation { from: height * 1.15; to: height * 1; duration: 1000; easing.type: Easing.InOutQuad } + } + } + + SpriteSequence { + id: ink + width: 64 + height: 64 + scale: bubble.scale + goalSprite: "" + + Sprite { + name: "clean" + source: "../gfx/projectile-action.png" + frameCount: 1 + frameX: 0 + frameWidth: 64 + frameHeight: 64 + } + Sprite { + name: "dirty" + source: "../gfx/projectile-action.png" + frameCount: 3 + frameX: 64 + frameWidth: 64 + frameHeight: 64 + frameDuration: 150 + to: {"clean":1} + } + + Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. + name: "dummy" + source: "../gfx/melee-idle.png" + frameCount: 8 + frameWidth: 64 + frameHeight: 64 + frameX: 0 + frameDuration: 200 + } + SequentialAnimation on width { + loops: Animation.Infinite + NumberAnimation { from: width * 1; to: width * 1.1; duration: 800; easing.type: Easing.InOutQuad } + NumberAnimation { from: width * 1.1; to: width * 1; duration: 1000; easing.type: Easing.InOutQuad } + } + SequentialAnimation on height { + loops: Animation.Infinite + NumberAnimation { from: height * 1; to: height * 1.15; duration: 1200; easing.type: Easing.InOutQuad } + NumberAnimation { from: height * 1.15; to: height * 1; duration: 1000; easing.type: Easing.InOutQuad } + } + + } + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x; to: x - 5; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: x - 5; to: x; duration: 900; easing.type: Easing.InOutQuad } + } +} + diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/towers/Bomb.qml b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Bomb.qml new file mode 100644 index 0000000..41522ef --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Bomb.qml @@ -0,0 +1,133 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "../logic.js" as Logic +import ".." + +TowerBase { + id: container + hp: 10 + range: 0.4 + rof: 10 + property real detonationRange: 2.5 + + function fire() { + sound.play() + sprite.jumpTo("shoot") + animDelay.start() + } + + function finishFire() { + var sCol = Math.max(0, col - 1) + var eCol = Math.min(Logic.gameState.cols - 1, col + 1) + var killList = new Array() + for (var i = sCol; i <= eCol; i++) { + for (var j = 0; j < Logic.gameState.mobs[i].length; j++) + if (Math.abs(Logic.gameState.mobs[i][j].y - container.y) < Logic.gameState.squareSize * detonationRange) + killList.push(Logic.gameState.mobs[i][j]) + while (killList.length > 0) + Logic.killMob(i, killList.pop()) + } + Logic.killTower(row, col); + } + + Timer { + id: animDelay + running: false + interval: shootState.frameCount * shootState.frameDuration + onTriggered: finishFire() + } + + function die() + { + destroy() // No blink, because we usually meant to die + } + + SoundEffect { + id: sound + source: "../audio/bomb-action.wav" + } + + SpriteSequence { + id: sprite + width: 64 + height: 64 + interpolate: false + goalSprite: "" + + Sprite { + name: "idle" + source: "../gfx/bomb-idle.png" + frameCount: 4 + frameDuration: 800 + } + + Sprite { + id: shootState + name: "shoot" + source: "../gfx/bomb-action.png" + frameCount: 6 + frameDuration: 155 + to: { "dying" : 1 } // So that if it takes a frame to clean up, it is on the last frame of the explosion + } + + Sprite { + name: "dying" + source: "../gfx/bomb-action.png" + frameCount: 1 + frameX: 64 * 5 + frameWidth: 64 + frameHeight: 64 + frameDuration: 155 + } + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x; to: x + 4; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: x + 4; to: x; duration: 900; easing.type: Easing.InOutQuad } + } + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { from: y; to: y - 4; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: y - 4; to: y; duration: 900; easing.type: Easing.InOutQuad } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/towers/Factory.qml b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Factory.qml new file mode 100644 index 0000000..b34a184 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Factory.qml @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "../logic.js" as Logic +import ".." + +TowerBase { + id: container + rof: 160 + income: 5 + SpriteSequence { + id: sprite + width: 64 + height: 64 + interpolate: false + goalSprite: "" + + Sprite { + name: "idle" + source: "../gfx/factory-idle.png" + frameCount: 4 + frameDuration: 200 + } + + Sprite { + name: "action" + source: "../gfx/factory-action.png" + frameCount: 4 + frameDuration: 90 + to: { "idle" : 1 } + } + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x; to: x + 4; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: x + 4; to: x; duration: 900; easing.type: Easing.InOutQuad } + } + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { from: y; to: y - 4; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: y - 4; to: y; duration: 900; easing.type: Easing.InOutQuad } + } + } + + SoundEffect { + id: actionSound + source: "../audio/factory-action.wav" + } + + function fire() { + actionSound.play() + sprite.jumpTo("action") + coinLaunch.start() + } + + function spawn() { + coin.target = Logic.gameState.mapToItem(container, 240, -32) + } + + Image { + id: coin + property var target: { "x" : 0, "y" : 0 } + source: "../gfx/currency.png" + visible: false + } + + SequentialAnimation { + id: coinLaunch + PropertyAction { target: coin; property: "visible"; value: true } + ParallelAnimation { + NumberAnimation { target: coin; property: "x"; from: 16; to: coin.target.x } + NumberAnimation { target: coin; property: "y"; from: 16; to: coin.target.y } + } + PropertyAction { target: coin; property: "visible"; value: false } + } +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/towers/Melee.qml b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Melee.qml new file mode 100644 index 0000000..1b49a45 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Melee.qml @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import ".." + +TowerBase { + hp: 4 + range: 0.1 + damage: 1 + rof: 40 + income: 0 + + SpriteSequence { + id: sprite + width: 64 + height: 64 + interpolate: false + goalSprite: "" + + Sprite { + name: "idle" + source: "../gfx/melee-idle.png" + frameCount: 8 + frameDuration: 250 + } + + Sprite { + name: "shoot" + source: "../gfx/melee-action.png" + frameCount: 2 + frameDuration: 200 + to: { "idle" : 1 } + } + } + + function fire() { + shootSound.play() + sprite.jumpTo("shoot") + } + + SoundEffect { + id: shootSound + source: "../audio/melee-action.wav" + } +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/towers/Ranged.qml b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Ranged.qml new file mode 100644 index 0000000..33f3354 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/towers/Ranged.qml @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "../logic.js" as Logic +import ".." + +TowerBase { + id: container + hp: 2 + range: 6 + damage: 0 // By projectile + rof: 40 + income: 0 + property var targetMob + property real realDamage: 1 + function fire() { + proj.x = 32 - proj.width / 2 + proj.y = 0 + targetMob = Logic.gameState.mobs[col][0] + projAnim.to = targetMob.y - container.y -10 + projAnim.start() + shootSound.play() + sprite.jumpTo("shoot") + } + + Image { + id: proj + y: 1000 + SequentialAnimation on y { + id: projAnim + running: false + property real to: 1000 + SmoothedAnimation { + to: projAnim.to + velocity: 400 + } + ScriptAction { + script: { + if (targetMob && targetMob.hit) { + targetMob.hit(realDamage) + targetMob.inked() + projSound.play() + } + } + } + PropertyAction { + value: 1000; + } + } + source: "../gfx/projectile.png" + } + + SoundEffect { + id: shootSound + source: "../audio/shooter-action.wav" + } + SoundEffect { + id: projSound + source: "../audio/projectile-action.wav" + } + + SpriteSequence { + id: sprite + width: 64 + height: 64 + interpolate: false + goalSprite: "" + + Sprite { + name: "idle" + source: "../gfx/shooter-idle.png" + frameCount: 4 + frameDuration: 250 + } + + Sprite { + name: "shoot" + source: "../gfx/shooter-action.png" + frameCount: 5 + frameDuration: 90 + to: { "idle" : 1 } + } + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x; to: x - 4; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: x - 4; to: x; duration: 900; easing.type: Easing.InOutQuad } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/maroon/content/towers/TowerBase.qml b/basicsuite/qt5-everywhere/demos/maroon/content/towers/TowerBase.qml new file mode 100644 index 0000000..5c71cb0 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/maroon/content/towers/TowerBase.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + property real hp: 1 + property real range: 0 + property real damage: 0 + property int rof: 100 + property int fireCounter: 0 + property int income: 0 + property int row: 0 + property int col: 0 + + width: parent ? parent.squareSize : 0 + height: parent ? parent.squareSize : 0 + //This is how it is placed on the gameboard, do not modify/animate the X/Y/Z of a TowerBase please + x: col * width + y: row * height + z: 1000 + + function fire() { } + function spawn() { } //After all game properties are set + function die() { stdDeath.start(); destroy(1000); } + function sell() { destroy(); } + + SequentialAnimation on opacity { + id: stdDeath + running: false + loops: 2 + NumberAnimation { from: 1; to: 0; } + NumberAnimation { from: 0; to: 1; } + } +} diff --git a/basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml b/basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml new file mode 100644 index 0000000..eb4e29e --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml @@ -0,0 +1,181 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: root + property real size: Math.min(root.width, root.height); + signal finished() + + SequentialAnimation { + id: entryAnimation + running: true + PropertyAction { target: sphereEmitter; property: "emitRate"; value: 150 } + PropertyAction { target: starEmitter; property: "emitRate"; value: 100 } + PropertyAction { target: starEmitter; property: "enabled"; value: true } + PropertyAction { target: sphereEmitter; property: "enabled"; value: true } + PropertyAction { target: sphereSystem; property: "running"; value: true } + PropertyAction { target: starSystem; property: "running"; value: true } + PauseAnimation { duration: 5000 } + + onRunningChanged: if (!running) explodeAnimation.restart() + } + + SequentialAnimation{ + id: explodeAnimation + ScriptAction { script: { + starAccel.x = 5 + starAccel.xVariation = 20; + starAccel.yVariation = 20; + sphereAccel.x = -5 + sphereAccel.xVariation = 20 + sphereAccel.yVariation = 20 + sphereParticle.alpha = 0; + } + } + PropertyAction { target: sphereEmitter; property: "emitRate"; value: 200 } + PropertyAction { target: starEmitter; property: "emitRate"; value: 200 } + PauseAnimation { duration: 2000 } + PropertyAction { target: starEmitter; property: "enabled"; value: false } + PropertyAction { target: sphereEmitter; property: "enabled"; value: false } + PauseAnimation { duration: 5000 } + + onRunningChanged: { + if (!running) { + root.finished() + root.destroy() + } + } + } + + Item { + id: logo; + width: root.size / 2; + height: root.size / 2; + anchors.centerIn: parent + } + + ParticleSystem { + id: sphereSystem; + anchors.fill: logo + running: false + + ImageParticle { + id: sphereParticle + source: "images/particle.png" + color: "#80c342" + alpha: 1 + colorVariation: 0.0 + } + + Emitter { + id: sphereEmitter + anchors.fill: parent + emitRate: 100 + lifeSpan: 4000 + size: root.width*.15 + sizeVariation: size *.2 + velocity: PointDirection { xVariation: 2; yVariation: 2; } + + acceleration: PointDirection { + id: sphereAccel + xVariation: 1; + yVariation: 1; + } + + shape: MaskShape { + source: "images/qt-logo-green-mask.png" + } + } + } + + ParticleSystem { + id: starSystem; + anchors.fill: logo + running: false + + ImageParticle { + id: starParticle + source: "images/particle_star.png" + color: "#ffffff" + alpha: 0 + colorVariation: 0 + } + + Emitter { + id: starEmitter + anchors.fill: parent + emitRate: 50 + lifeSpan: 5000 + size: root.width*.1 + sizeVariation: size *.2 + velocity: PointDirection { xVariation: 1; yVariation: 1; } + + acceleration: PointDirection { + id: starAccel + xVariation: 0; + yVariation: 0; + } + + shape: MaskShape { + source: "images/qt-logo-white-mask.png" + } + } + } + + MouseArea { + anchors.fill: parent + onClicked: { + + if (entryAnimation.running) { + entryAnimation.complete() + return; + } + + if (explodeAnimation.running) { + root.finished() + root.destroy() + } + + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml b/basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml new file mode 100644 index 0000000..fc74037 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +/** + * ParticleSystem component draw particles with the given color. + */ + +ParticleSystem { + id: root + anchors.fill: parent + running: true + + property color particleColor: "#ff0000" + property real angle: particleRoot.angle; + property int pointCount: particleRoot.pointCount; + property real radius: particleRoot.distance; + property real movement: particleRoot.movement; + property bool emitting: particleRoot.running; + property int touchX: 0 + property int touchY: 0 + property int startAngle: 0 + property bool pressed: false + property real targetX: pressed ? touchX : width/2+radius * Math.cos(targetAngle*(Math.PI/180)) + property real targetY: pressed ? touchY : height/2+radius * Math.sin(targetAngle*(Math.PI/180)) + property real targetAngle: angle+startAngle + + Emitter { + id: emitter + lifeSpan: 1000 + emitRate: 80 + x: targetX + y: targetY + enabled: root.emitting + size: root.height*.05 + endSize: root.height*.1 + sizeVariation: .5 + velocity: AngleDirection{angle:0; angleVariation: 360; magnitude: 10} + acceleration: AngleDirection{angle:0; angleVariation: 360; magnitude: 10} + velocityFromMovement: root.movement + } + + ImageParticle { + id: imageParticle + source: "images/particle.png" + color: root.pointCount >0 && root.pressed ? root.particleColor: "#444444" + alpha: .0 + colorVariation: root.pointCount >0 && root.pressed ? 0.3: .0 + + Behavior on color{ + enabled: root.pointCount != 0 + ColorAnimation { duration: 500 } + } + + SequentialAnimation on color { + id: colorAnimation + loops: Animation.Infinite + running: root.pointCount === 0 + ColorAnimation {from: root.particleColor; to: "magenta"; duration: 2000} + ColorAnimation {from: "magenta"; to: "blue"; duration: 1000} + ColorAnimation {from: "blue"; to: "violet"; duration: 1000} + ColorAnimation {from: "violet"; to: "red"; duration: 1000} + ColorAnimation {from: "red"; to: "orange"; duration: 1000} + ColorAnimation {from: "orange"; to: "yellow"; duration: 1000} + ColorAnimation {from: "yellow"; to: "green"; duration: 1000} + ColorAnimation {from: "green"; to: root.particleColor; duration: 2000} + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/particledemo/images/particle.png b/basicsuite/qt5-everywhere/demos/particledemo/images/particle.png new file mode 100644 index 0000000..7520c9b Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/particledemo/images/particle.png differ diff --git a/basicsuite/qt5-everywhere/demos/particledemo/images/particle_star.png b/basicsuite/qt5-everywhere/demos/particledemo/images/particle_star.png new file mode 100644 index 0000000..5660d27 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/particledemo/images/particle_star.png differ diff --git a/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-green-mask.png b/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-green-mask.png new file mode 100644 index 0000000..84be10d Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-green-mask.png differ diff --git a/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-white-mask.png b/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-white-mask.png new file mode 100644 index 0000000..920eeee Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/particledemo/images/qt-logo-white-mask.png differ diff --git a/basicsuite/qt5-everywhere/demos/particledemo/particle.png b/basicsuite/qt5-everywhere/demos/particledemo/particle.png new file mode 100644 index 0000000..5c83896 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/particledemo/particle.png differ diff --git a/basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml b/basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml new file mode 100644 index 0000000..c3f8253 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml @@ -0,0 +1,213 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Rectangle { + id: particleRoot + color: "#000000" + anchors.fill: parent + + property real distance: parent.height*.4 + property real angle: 0 + property real movement: 0 + property alias running: angleAnimation.running + property int pointCount: mouseArea.pointCount + multiPointTouchArea.pointCount + + BootScreenDemo { + width: Math.min(parent.width,parent.height) + height: width + anchors.centerIn: parent + z: 1 + onFinished: { + distanceAnimation.restart() + angleAnimation.restart() + } + } + + RotationAnimation on angle { + id: angleAnimation + from: 0 + to: 360 + running: false + duration: distanceAnimation.delay + direction: RotationAnimation.Shortest + loops: Animation.Infinite + } + + SequentialAnimation on distance { + id: distanceAnimation + property int easingType:0 + property int delay: 1000 + running: false + + NumberAnimation { + from: 0 + to: parent.height*.4 + duration: distanceAnimation.delay/2 + easing.type: distanceAnimation.easingType + } + + NumberAnimation { + from: parent.height*.4 + to: 0 + duration: distanceAnimation.delay/2 + easing.type: distanceAnimation.easingType + } + + onRunningChanged: { + if (!running){ + var type = Math.floor(Math.random()*10) + switch (type){ + case 0: + distanceAnimation.easingType=Easing.InOutBack + break; + case 1: + distanceAnimation.easingType=Easing.InOutBounce + break; + case 2: + distanceAnimation.easingType=Easing.InOutCirc + break; + case 3: + distanceAnimation.easingType=Easing.InOutElastic + break; + case 4: + distanceAnimation.easingType=Easing.InOutSine + break; + case 5: + distanceAnimation.easingType=Easing.OutInQuad + break; + case 6: + distanceAnimation.easingType=Easing.OutInCubic + break; + case 7: + distanceAnimation.easingType=Easing.OutExpo + break; + case 8: + distanceAnimation.easingType=Easing.OutCurve + break; + default: + distanceAnimation.easingType=Easing.Linear + break; + } + + distanceAnimation.delay = 500 + Math.floor(Math.random()*1500) + angleAnimation.from = 180 + Math.random()*90 - 45 + particleRoot.movement = Math.random()*2 + angleAnimation.restart() + distanceAnimation.restart() + } + } + } + + /** + * Create five ParticleSysComponents for drawing particles + * in the place of multitouch points with the given color. + */ + ParticleSysComponent{ id: p1; particleColor: "#ff0000"; startAngle: 1*360/(5-particleRoot.pointCount); } + ParticleSysComponent{ id: p2; particleColor: "#00ff00"; startAngle: 2*360/(5-particleRoot.pointCount); } + ParticleSysComponent{ id: p3; particleColor: "#0000ff"; startAngle: 3*360/(5-particleRoot.pointCount); } + ParticleSysComponent{ id: p4; particleColor: "#ffff00"; startAngle: 4*360/(5-particleRoot.pointCount); } + ParticleSysComponent{ id: p5; particleColor: "#ff00ff"; startAngle: 5*360/(5-particleRoot.pointCount); } + + /** + * In this demo we only support five touch point at the same time. + * One from mouseArea (because of Desktop-support) and four from MultiPointTouchArea. + */ + MultiPointTouchArea { + id: multiPointTouchArea + anchors.fill: parent + minimumTouchPoints: 1 + maximumTouchPoints: 6 + + property int pointCount:0 + + touchPoints: [ + TouchPoint { id: point1 }, + TouchPoint { id: point2 }, + TouchPoint { id: point3 }, + TouchPoint { id: point4 } + ] + + onPressed: updatePointCount() + onReleased: updatePointCount() + onTouchUpdated: { + p2.touchX = point1.x; p2.touchY = point1.y; p2.pressed = point1.pressed; + p3.touchX = point2.x; p3.touchY = point2.y; p3.pressed = point2.pressed; + p4.touchX = point3.x; p4.touchY = point3.y; p4.pressed = point3.pressed; + p5.touchX = point4.x; p5.touchY = point4.y; p5.pressed = point4.pressed; + } + + function updatePointCount(){ + var tmp = 0 + for (var i=0; i<4; i++) { + if (touchPoints[i].pressed) + tmp++ + } + pointCount = tmp + } + } + + /** + * For desktop. + */ + MouseArea { + id: mouseArea + anchors.fill: parent + + property int pointCount:0 + + onPressed: { + pointCount = 1; + p1.touchX = mouse.x; + p1.touchY = mouse.y; + p1.pressed = true; + } + onReleased: { + pointCount = 0; + p1.pressed = false; + } + onPositionChanged: { + p1.touchX = mouse.x; + p1.touchY = mouse.y; + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/image0.png b/basicsuite/qt5-everywhere/demos/photosurface/images/image0.png new file mode 100644 index 0000000..711b788 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/photosurface/images/image0.png differ diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/image1.png b/basicsuite/qt5-everywhere/demos/photosurface/images/image1.png new file mode 100644 index 0000000..e9bfcdf Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/photosurface/images/image1.png differ diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/image2.png b/basicsuite/qt5-everywhere/demos/photosurface/images/image2.png new file mode 100644 index 0000000..b37453c Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/photosurface/images/image2.png differ diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/image3.png b/basicsuite/qt5-everywhere/demos/photosurface/images/image3.png new file mode 100644 index 0000000..63d82e7 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/photosurface/images/image3.png differ diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/image4.png b/basicsuite/qt5-everywhere/demos/photosurface/images/image4.png new file mode 100644 index 0000000..a499231 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/photosurface/images/image4.png differ diff --git a/basicsuite/qt5-everywhere/demos/photosurface/images/qml-photosurface-example-small.png b/basicsuite/qt5-everywhere/demos/photosurface/images/qml-photosurface-example-small.png new file mode 100644 index 0000000..a0cd823 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/photosurface/images/qml-photosurface-example-small.png differ diff --git a/basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml b/basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml new file mode 100644 index 0000000..6ca2626 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml @@ -0,0 +1,131 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Rectangle { + id: root + visible: true + anchors.fill: parent + property int highestZ: 0 + property real defaultSize: 200 + + gradient: Gradient{ + GradientStop{position: 0.0; color: "#333333"} + GradientStop{position: 1.0; color: "#111111"} + } + + Repeater { +// model: FolderListModel { +// id: folderModel +// objectName: "folderModel" +// showDirs: false +// nameFilters: ["*.png", "*.jpg", "*.gif"] +// } + id: repeater + model: 5 + anchors.fill: parent + + clip: true + Rectangle { + id: photoFrame + width: image.width * image.scale + 20 + height: image.height * image.scale + 20 + border.color: "black" + border.width: 2 + smooth: true + antialiasing: true + x: Math.random() * root.width - defaultSize / 2 + y: Math.random() * root.height - defaultSize / 2 + rotation: Math.random() * 13 - 6 + Image { + id: image + anchors.centerIn: parent + fillMode: Image.PreserveAspectFit + source: "images/image"+index+".png" + scale: defaultSize / Math.max(sourceSize.width, sourceSize.height) + antialiasing: true + } + PinchArea { + anchors.fill: parent + pinch.target: photoFrame + pinch.minimumRotation: -360 + pinch.maximumRotation: 360 + pinch.minimumScale: 0.1 + pinch.maximumScale: 10 + onPinchFinished: photoFrame.border.color = "black"; + MouseArea { + id: dragArea + hoverEnabled: true + anchors.fill: parent + drag.target: photoFrame + onPressed: photoFrame.z = ++root.highestZ; + onEntered: photoFrame.border.color = "red"; + onExited: photoFrame.border.color = "black"; + onWheel: { + if (wheel.modifiers & Qt.ControlModifier) { + photoFrame.rotation += wheel.angleDelta.y / 120 * 5; + if (Math.abs(photoFrame.rotation) < 4) + photoFrame.rotation = 0; + } else { + photoFrame.rotation += wheel.angleDelta.x / 120; + if (Math.abs(photoFrame.rotation) < 0.6) + photoFrame.rotation = 0; + var scaleBefore = image.scale; + image.scale += image.scale * wheel.angleDelta.y / 120 / 10; + photoFrame.x -= image.width * (image.scale - scaleBefore) / 2.0; + photoFrame.y -= image.height * (image.scale - scaleBefore) / 2.0; + } + } + } + } + } + } +// Text { +// anchors.bottom: parent.bottom +// anchors.left: parent.left +// anchors.margins: 10 +// color: "darkgrey" +// text: "On a touchscreen: use two fingers to zoom and rotate, one finger to drag\n" + +// "With a mouse: drag normally, use the vertical wheel to zoom, horizontal wheel to rotate, or hold Ctrl while using the vertical wheel to rotate" +// wrapMode: Text.Wrap +// } + + //Component.onCompleted: fileDialog.open() +} diff --git a/basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml b/basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml new file mode 100644 index 0000000..76635b6 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml @@ -0,0 +1,185 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + width: size + height: size + + property int steps: 10 + property int size: 0 + property real volume: .5 + property bool playing: false + signal clicked(); + + Item { + id: bg + anchors.fill: parent + + Rectangle { + id: bgRect + + gradient: Gradient { + GradientStop {position: .0; color: "lightgray"} + GradientStop {position: 1.0; color: "white"} + } + + border {width:1; color: "#888888"} + radius: root.size/2 + anchors.centerIn: parent + width: parent.width + height: parent.height + } + + Rectangle { + gradient: Gradient { + GradientStop {position: .0; color: playButtonMouseArea.pressed ? "#052e41": "#095477"} + GradientStop {position: 1.0; color: playButtonMouseArea.pressed ? "#095477": "#052e41"} + } + + border {width:1; color: "#888888"} + radius: width/2 + anchors.centerIn: parent + width: parent.width*.6 + height: parent.height*.6 + + Image { + anchors {fill: parent; margins: parent.height*.3} + source: !root.playing ? "images/radio_btn_play.png" : "images/radio_btn_pause.png" + } + + MouseArea { + id: playButtonMouseArea + anchors.fill: parent + anchors.margins: parent.width*.2 + onClicked:{ + root.clicked() + } + } + } + } + + Item { + id: volumeIndicator + anchors.centerIn: root + width: root.size + height: root.size + z:2 + + Rectangle{ + id: volumeCircle + objectName: "volumeCircle" + anchors {horizontalCenter: parent.horizontalCenter; top: parent.top} + + gradient: Gradient { + GradientStop {position: .1; color: "#095477"} + GradientStop {position: 1.0; color: "#0e82b8"} + } + + width: root.size * .2 + height: width + radius: width/2 + border {width:1; color: "#888888"} + + Image { + anchors {fill: parent; margins: parent.height*.2} + source: "images/radio_sound_icon.png" + rotation: -volumeRotation.angle + } + } + + transform: Rotation { + id: volumeRotation + origin.x: volumeIndicator.width/2 + origin.y: volumeIndicator.height/2 + angle: 270.0*root.volume+225 + } + } + + MouseArea { + id: mouseArea + anchors.fill: volumeIndicator + property bool grabbed: false + anchors.margins: -root.size*.2 + z: -1 + + onPressed: { + var object = mapToItem(volumeIndicator, mouse.x, mouse.y) + var item = volumeIndicator.childAt(object.x,object.y) + if (item && item.objectName === 'volumeCircle') { + grabbed = true + return; + } else { + grabbed = false + } + + object = mapToItem(root, mouse.x, mouse.y) + item = root.childAt(object.x,object.y) + if (item && item.objectName === 'volumePoint') { + root.volume = item.level + } + } + + onPositionChanged: { + if (!grabbed) return; + var ang = (225+Math.atan2((mouse.y-mouseArea.height/2.0), (mouse.x-mouseArea.width/2.0))*180.0/Math.PI) + if (ang >360) ang-=360 + if (ang > 270) return; + root.volume = (ang)/270.0 + } + } + + function init(){ + for (var i=0; i<=root.steps; i++){ + var x=Math.cos(((i)*270/root.steps+135)*0.01745)*root.size*.40 + var y=Math.sin(((i)*270/root.steps+135)*0.01745)*root.size*.40 + var component = Qt.createComponent("VolumePoint.qml") + if (component.status === Component.Ready) { + var object = component.createObject(root); + object.size = root.size*.05 + object.x = root.size/2+x-object.size/2 + object.y = root.size/2+y-object.size/2 + object.level = i/root.steps + } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml b/basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml new file mode 100644 index 0000000..c107823 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: root + objectName: "volumePoint" + width: size + height: size + radius: size/2 + color: volume >= level ? "#0e82b8": "#095477" + border {width:1; color: "#888888"} + property int size: 10 + property real level: 0 + property real volume: parent.volume + + Behavior on color{ColorAnimation { duration: 500 }} + + Item { + id: pointClickArea + objectName: "pointClickArea" + property alias value: root.level + anchors.fill: parent + anchors.margins: -root.size*2 + } +} diff --git a/basicsuite/qt5-everywhere/demos/radio/channels.xml b/basicsuite/qt5-everywhere/demos/radio/channels.xml new file mode 100644 index 0000000..99522ab --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/radio/channels.xml @@ -0,0 +1,27 @@ + + + + BBC World Service + http://vpr.streamguys.net/vpr24.mp3 + + + CBC Music Hard Rock + http://2903.live.streamtheworld.com:80/CBC_HAROCK_H_SC.mp3 + + + "JPR Classics" + http://jpr.streamguys.org:80/jpr-classics + + + VPR Classical + http://vprclassical.streamguys.net/vprclassical24.mp3 + + + VPR Jazz24 + http://vprjazz.streamguys.net/vprjazz24.mp3 + + + Radio Paradise + http://scfire-m26.websys.aol.com:80/radio_paradise_mp3_128kbps.mp3 + + diff --git a/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_pause.png b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_pause.png new file mode 100644 index 0000000..5204834 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_pause.png differ diff --git a/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_play.png b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_play.png new file mode 100644 index 0000000..92ee858 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_play.png differ diff --git a/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_stop.png b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_stop.png new file mode 100644 index 0000000..187158a Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/radio/images/radio_btn_stop.png differ diff --git a/basicsuite/qt5-everywhere/demos/radio/images/radio_sound_icon.png b/basicsuite/qt5-everywhere/demos/radio/images/radio_sound_icon.png new file mode 100644 index 0000000..ac0b61e Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/radio/images/radio_sound_icon.png differ diff --git a/basicsuite/qt5-everywhere/demos/radio/images/volume.png b/basicsuite/qt5-everywhere/demos/radio/images/volume.png new file mode 100644 index 0000000..a098d82 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/radio/images/volume.png differ diff --git a/basicsuite/qt5-everywhere/demos/radio/radio.qml b/basicsuite/qt5-everywhere/demos/radio/radio.qml new file mode 100644 index 0000000..8615f9b --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/radio/radio.qml @@ -0,0 +1,261 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtMultimedia 5.0 +import QtQuick.XmlListModel 2.0 + +FocusScope { + id: scope + x: parent.x; y: parent.y + width: parent.width; height: parent.height + focus: true + property bool active: false + + Rectangle { + id: root + width:parent.width + height: parent.height + anchors.centerIn: parent + focus: true + color: "#262626" + + Audio { + id: playMusic + source: "" + volume: volumeButton.volume + onSourceChanged: { + if (volumeButton.playing) playMusic.play() + } + onAvailabilityChanged: { + if (availability === Audio.Available) { + if (volumeButton.playing) playMusic.play() + } + } + Component.onDestruction: { + volumeButton.playing = false + playMusic.stop() + playMusic.source = "" + } + } + + Rectangle { + id: playerRect + anchors.top: volumeButton.top + anchors.left: volumeButton.left + anchors.bottom: volumeButton.bottom + anchors.right: parent.right + anchors.rightMargin: parent.height*.05 + gradient: Gradient { + GradientStop {position: .1; color: "lightgrey"} + GradientStop {position: 1.0; color: "white"} + } + border {width:1; color: "#888888"} + radius: height/2 + + Rectangle { + id: displayRect + anchors.fill: parent + anchors.margins: parent.height*.1 + gradient: Gradient { + GradientStop {position: .0; color: "#095477"} + GradientStop {position: 1.0; color: "#052e41"} + } + border {width:1; color: "#888888"} + radius: height/2 + + + PathView { + enabled: root.activeFocus + id: stationList + anchors.fill:parent + anchors.leftMargin: parent.height*.9 + model: stationModel + pathItemCount: 6 + clip: true + property int openedIndex: -1 + + onMovementStarted: { + idleTimer.stop() + openedIndex = -1 + pathItemCount = 5 + } + onMovementEnded: idleTimer.restart() + + onOpenedIndexChanged: { + if (openedIndex === -1) return + idleTimer.lastIndex=openedIndex + positionViewAtIndex(openedIndex, PathView.Center) + } + + Timer { + id: idleTimer + interval: 5000 + property int lastIndex: -1 + onTriggered: { + stationList.openedIndex = idleTimer.lastIndex + } + } + + Timer { + id: browseTimer + interval: 500 + property string source:"" + onTriggered: playMusic.source = source + } + + path: Path { + startX: stationList.x; startY: 0 + PathArc { + id: pathArc + x: stationList.x; relativeY: stationList.height*1.1 + radiusX: volumeButton.height/2 + radiusY: volumeButton.height/2 + useLargeArc: false + } + } + + delegate: Item { + id: stationDelegate + property bool opened: stationList.openedIndex === index + width: stationList.width*.7 + height: opened? stationList.height*.4: stationList.height*.2 + + Behavior on height {NumberAnimation{duration:200}} + + Text { + id: delegateText + anchors.left: parent.left + anchors.top: parent.top + text: (index+1) +". " +title + font.pixelSize: stationDelegate.opened? stationList.height*.15 : stationList.height*.1 + font.weight: stationDelegate.opened? Font.Bold: Font.Normal + color: stationList.openedIndex ===-1 || opened? "white": "#0e82b8" + Behavior on font.pixelSize {NumberAnimation{duration:200}} + } + + Text { + id: statustextText + anchors.left: parent.left + anchors.top: delegateText.bottom + + text: playMusic.playbackState=== Audio.PlayingState ? "Playing...": + playMusic.status=== Audio.Buffering ? "Buffering...": + playMusic.status=== Audio.Loading ? "Loading...": + playMusic.playbackState=== Audio.StoppedState ? "Stopped":"Error" + + font.pixelSize: stationList.height*.1 + color: delegateText.color + opacity: opened? 1.0: .0 + Behavior on opacity {NumberAnimation{duration:200}} + } + + + MouseArea { + anchors.fill: parent + visible: root.activeFocus + + onClicked: { + if (opened){ + idleTimer.lastIndex=-1 + stationList.openedIndex=-1 + }else { + stationList.openedIndex= index + browseTimer.source = url + browseTimer.restart() + } + } + } + } + } + } + } + + XmlListModel { + id: stationModel + source: "http://qt-project.org/uploads/videos/qt5_radio_channels.xml" + query: "/radio/channel" + XmlRole {name: "title"; query: "title/string()"} + XmlRole {name: "url"; query: "url/string()"} + } + + VolumeButton { + id: volumeButton + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: size*.1 + size:parent.height*.5 + playing: playMusic.playbackState === Audio.PlayingState + onClicked: { + if (!playMusic.source) return; + if (!playing) { + playMusic.play() + }else { + playMusic.stop() + } + } + } + + Component.onCompleted: { + volumeButton.init() + scope.focus = true + } + + Keys.onPressed: { + if (event.key === Qt.Key_Down || event.key === Qt.Key_VolumeDown) { + event.accepted = true + if (volumeButton.volume > .1){ + volumeButton.volume-=.1 + }else{ + volumeButton.volume = 0.0 + } + } + + if (event.key === Qt.Key_Up || event.key === Qt.Key_VolumeUp) { + event.accepted = true + if (volumeButton.volume < .9){ + volumeButton.volume+=.1 + }else{ + volumeButton.volume = 1.0 + } + } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml new file mode 100644 index 0000000..c16f582 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Image { + id: container + property bool on: false + + source: "images/busy.png"; visible: container.on + + NumberAnimation on rotation { + running: container.on; from: 0; to: 360; loops: Animation.Infinite; duration: 1200 + } +} diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml new file mode 100644 index 0000000..2916d1b --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: delegate + property double margin: delegate.height * 0.2; + width: delegate.ListView.view.width; + height: 60 + + Text { + text: name + color: delegate.ListView.isCurrentItem ? "white" : "black" + font { family: "Helvetica"; pixelSize: delegate.height * 0.25; bold: true } + anchors { + left: parent.left; + leftMargin: margin + verticalCenter: parent.verticalCenter + } + } + + BusyIndicator { + scale: 0.6 + on: delegate.ListView.isCurrentItem && window.loading + anchors { right: parent.right; rightMargin: margin; verticalCenter: parent.verticalCenter } + } + + Rectangle { + width: delegate.width; height: 1; color: "#cccccc" + anchors.bottom: delegate.bottom + visible: delegate.ListView.isCurrentItem ? false : true + } + Rectangle { + width: delegate.width; height: 1; color: "white" + visible: delegate.ListView.isCurrentItem ? false : true + } + + MouseArea { + anchors.fill: delegate + onClicked: { + delegate.ListView.view.currentIndex = index + window.currentFeed = feed + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml new file mode 100644 index 0000000..4050af6 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: delegate + height: column.height + 2*margin + width: delegate.ListView.view.width + + property double margin: width * 0.03 + + Column { + id: column + x: margin; y: margin + width: parent.width - 2*margin + + Text { + id: titleText + text: title; width: parent.width; wrapMode: Text.WordWrap + font { bold: true; family: "Helvetica"; pixelSize: 20} + } + + Text { + id: descriptionText + width: parent.width; text: description + wrapMode: Text.WordWrap + font.family: "Helvetica" + font.pixelSize: 12 + } + } + + Rectangle { + width: parent.width; height: 1; color: "#cccccc" + anchors.bottom: parent.bottom + } +} diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml new file mode 100644 index 0000000..da26d6a --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +ListModel { + id: rssFeeds + + ListElement { name: "Top Stories"; feed: "feeds.bbci.co.uk/news/rss.xml" } + ListElement { name: "Popular Stories"; feed: "finance.yahoo.com/rss/popularstories" } + ListElement { name: "Qt Blog"; feed: "blog.qt.digia.com/feed/" } + ListElement { name: "Planet Qt"; feed: "planet.qt-project.org/rss20.xml" } + ListElement { name: "World"; feed: "rss.news.yahoo.com/rss/world" } + ListElement { name: "Oceania"; feed: "rss.news.yahoo.com/rss/oceania" } + ListElement { name: "U.S. National"; feed: "rss.news.yahoo.com/rss/us" } + ListElement { name: "Business"; feed: "rss.news.yahoo.com/rss/business" } + ListElement { name: "Technology"; feed: "rss.news.yahoo.com/rss/tech" } + ListElement { name: "Entertainment"; feed: "rss.news.yahoo.com/rss/entertainment" } + ListElement { name: "Sports"; feed: "sports.yahoo.com/mlb/teams/bos/rss.xml" } +} diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml new file mode 100644 index 0000000..d3cf4a6 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: container + + property variant scrollArea + property variant orientation: Qt.Vertical + + opacity: 0 + + function position() + { + var ny = 0; + if (container.orientation == Qt.Vertical) + ny = scrollArea.visibleArea.yPosition * container.height; + else + ny = scrollArea.visibleArea.xPosition * container.width; + if (ny > 2) return ny; else return 2; + } + + function size() + { + var nh, ny; + + if (container.orientation == Qt.Vertical) + nh = scrollArea.visibleArea.heightRatio * container.height; + else + nh = scrollArea.visibleArea.widthRatio * container.width; + + if (container.orientation == Qt.Vertical) + ny = scrollArea.visibleArea.yPosition * container.height; + else + ny = scrollArea.visibleArea.xPosition * container.width; + + if (ny > 3) { + var t; + if (container.orientation == Qt.Vertical) + t = Math.ceil(container.height - 3 - ny); + else + t = Math.ceil(container.width - 3 - ny); + if (nh > t) return t; else return nh; + } else return nh + ny; + } + + Rectangle { anchors.fill: parent; color: "Black"; opacity: 0.3 } + + BorderImage { + source: "images/scrollbar.png" + border { left: 1; right: 1; top: 1; bottom: 1 } + x: container.orientation == Qt.Vertical ? 2 : position() + width: container.orientation == Qt.Vertical ? container.width - 4 : size() + y: container.orientation == Qt.Vertical ? position() : 2 + height: container.orientation == Qt.Vertical ? size() : container.height - 4 + } + + states: State { + name: "visible" + when: container.orientation == Qt.Vertical ? scrollArea.movingVertically : scrollArea.movingHorizontally + PropertyChanges { target: container; opacity: 1.0 } + } + + transitions: Transition { + from: "visible"; to: "" + NumberAnimation { properties: "opacity"; duration: 600 } + } +} diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/images/busy.png b/basicsuite/qt5-everywhere/demos/rssnews/content/images/busy.png new file mode 100644 index 0000000..664c2b1 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/rssnews/content/images/busy.png differ diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/images/scrollbar.png b/basicsuite/qt5-everywhere/demos/rssnews/content/images/scrollbar.png new file mode 100644 index 0000000..0228dcf Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/rssnews/content/images/scrollbar.png differ diff --git a/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml new file mode 100644 index 0000000..5eae0a0 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.XmlListModel 2.0 +import "content" + +Rectangle { + id: window + anchors.fill: parent + gradient: Gradient { + GradientStop { position: 0.0; color: "#eeeeee" } + GradientStop { position: 0.1; color: "#ffffff" } + GradientStop { position: 0.9; color: "#ffffff" } + GradientStop { position: 1.0; color: "#bbbbbb" } + } + + property int listWidth: window.width*0.35 + property string currentFeed: "feeds.bbci.co.uk/news/rss.xml" + property bool loading: feedModel.status == XmlListModel.Loading + + RssFeeds { id: rssFeeds } + + XmlListModel { + id: feedModel + source: "http://" + window.currentFeed + query: "/rss/channel/item" + + XmlRole { name: "title"; query: "title/string()" } + XmlRole { name: "link"; query: "link/string()" } + XmlRole { name: "description"; query: "description/string()" } + } + + Row { + Rectangle { + id: categoryContent + width: window.listWidth; height: window.height + color: "#efefef" + + ListView { + id: categories + anchors.fill: parent + model: rssFeeds + delegate: CategoryDelegate {} + highlight: Rectangle { color: "steelblue" } + highlightMoveVelocity: 9999999 + } + ScrollBar { + scrollArea: categories; height: categories.height; width: 8 + anchors.right: categories.right + } + } + ListView { + id: list + width: window.width - window.listWidth; height: window.height + model: feedModel + delegate: NewsDelegate {} + } + } + + ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right } + Rectangle { x: window.listWidth; height: window.height; width: 1; color: "#cccccc" } +} diff --git a/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qmlproject b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qmlproject new file mode 100644 index 0000000..5becbda --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.1 + +Project { + mainFile: "rssnews.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/Block.qml b/basicsuite/qt5-everywhere/demos/samegame/content/Block.qml new file mode 100644 index 0000000..0b10b7f --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/Block.qml @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: block + property bool dying: false + property bool spawned: false + property int type: 0 + property ParticleSystem particleSystem + + Behavior on x { + enabled: spawned; + SpringAnimation{ spring: 2; damping: 0.2 } + } + Behavior on y { + SpringAnimation{ spring: 2; damping: 0.2 } + } + + Image { + id: img + source: { + if (type == 0){ + "gfx/red.png"; + } else if (type == 1) { + "gfx/blue.png"; + } else if (type == 2) { + "gfx/green.png"; + } else { + "gfx/yellow.png"; + } + } + opacity: 0 + Behavior on opacity { NumberAnimation { duration: 200 } } + anchors.fill: parent + } + + //Foreground particles + BlockEmitter { + id: particles + system: particleSystem + group: { + if (type == 0){ + "red"; + } else if (type == 1) { + "blue"; + } else if (type == 2) { + "green"; + } else { + "yellow"; + } + } + anchors.fill: parent + } + + //Paint particles on the background + PaintEmitter { + id: particles2 + system: particleSystem + } + + states: [ + State { + name: "AliveState"; when: spawned == true && dying == false + PropertyChanges { target: img; opacity: 1 } + }, + + State { + name: "DeathState"; when: dying == true + StateChangeScript { script: {particleSystem.paused = false; particles.pulse(100); particles2.pulse(100);} } + PropertyChanges { target: img; opacity: 0 } + StateChangeScript { script: block.destroy(1000); } + } + ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml b/basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml new file mode 100644 index 0000000..ba6261c --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +import "../settings.js" as Settings + +Emitter { + property Item block: parent + velocity: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -40; magnitudeVariation: 40} + acceleration: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -100;} + shape: EllipseShape{fill:true} + enabled: false; + lifeSpan: 700; lifeSpanVariation: 100 + emitRate: 1000 + maximumEmitted: 100 //only fires 0.1s bursts (still 2x old number) + size: Settings.blockSize * 0.85 + endSize: Settings.blockSize * 0.85 /2 +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/Button.qml b/basicsuite/qt5-everywhere/demos/samegame/content/Button.qml new file mode 100644 index 0000000..4b825ba --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/Button.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + property alias imgSrc: image.source + property alias system: emitter.system + property alias group: emitter.group + signal clicked + property bool rotatedButton: false + + width: image.width + height: image.sourceSize.height + Image { + id: image + height: parent.height + width: height/sourceSize.height * sourceSize.width + + anchors.horizontalCenter: parent.horizontalCenter + rotation: rotatedButton ? ((Math.random() * 3 + 2) * (Math.random() <= 0.5 ? -1 : 1)) : 0 + MenuEmitter { + id: emitter + anchors.fill: parent + //shape: MaskShape {source: image.source} + } + } + MouseArea { + anchors.fill: parent + onClicked: {parent.clicked(); emitter.burst(400);} + } +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml b/basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml new file mode 100644 index 0000000..6e72161 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml @@ -0,0 +1,226 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "samegame.js" as Logic + +Item { + id: gameCanvas + property bool gameOver: true + property int score: 0 + property int highScore: 0 + property int moves: 0 + property string mode: "" + property ParticleSystem ps: particleSystem + //For easy theming + property alias backgroundVisible: bg.visible + property string background: "gfx/background.png" + property string blockFile: "Block.qml" + onBlockFileChanged: Logic.changeBlock(blockFile); + property alias particlePack: auxLoader.source + //For multiplayer + property int score2: 0 + property int curTurn: 1 + property bool autoTurnChange: false + signal swapPlayers + property bool swapping: false + //onSwapPlayers: if (autoTurnChange) Logic.turnChange();//Now implemented below + //For puzzle + property url level + property bool puzzleWon: false + signal puzzleLost //Since root is tracking the puzzle progress + function showPuzzleEnd (won) { + if (won) { + smokeParticle.color = Qt.rgba(0,1,0,0); + puzzleWin.play(); + } else { + smokeParticle.color = Qt.rgba(1,0,0,0); + puzzleFail.play(); + puzzleLost(); + } + } + function showPuzzleGoal (str) { + puzzleTextBubble.opacity = 1; + puzzleTextLabel.text = str; + } + Image { + id: bg + z: -1 + anchors.fill: parent + source: background; + fillMode: Image.PreserveAspectCrop + } + + MouseArea { + anchors.fill: parent; onClicked: { + if (puzzleTextBubble.opacity == 1) { + puzzleTextBubble.opacity = 0; + Logic.finishLoadingMap(); + } else if (!swapping) { + Logic.handleClick(mouse.x,mouse.y); + } + } + } + + Image { + id: highScoreTextBubble + opacity: mode == "arcade" && gameOver && gameCanvas.score == gameCanvas.highScore ? 1 : 0 + Behavior on opacity { NumberAnimation {} } + anchors.centerIn: parent + z: 10 + source: "gfx/bubble-highscore.png" + Image { + anchors.centerIn: parent + source: "gfx/text-highscore-new.png" + rotation: -10 + } + } + + Image { + id: puzzleTextBubble + anchors.centerIn: parent + opacity: 0 + Behavior on opacity { NumberAnimation {} } + z: 10 + source: "gfx/bubble-puzzle.png" + Connections { + target: gameCanvas + onModeChanged: if (mode != "puzzle" && puzzleTextBubble.opacity > 0) puzzleTextBubble.opacity = 0; + } + Text { + id: puzzleTextLabel + width: parent.width - 24 + anchors.centerIn: parent + horizontalAlignment: Text.AlignHCenter + color: "white" + font.pixelSize: 24 + font.bold: true + wrapMode: Text.WordWrap + } + } + onModeChanged: { + p1WonImg.opacity = 0; + p2WonImg.opacity = 0; + } + SmokeText { id: puzzleWin; source: "gfx/icon-ok.png"; system: particleSystem } + SmokeText { id: puzzleFail; source: "gfx/icon-fail.png"; system: particleSystem } + + onSwapPlayers: { + smokeParticle.color = "yellow" + Logic.turnChange(); + if (curTurn == 1) { + p1Text.play(); + } else { + p2Text.play(); + } + clickDelay.running = true; + } + SequentialAnimation { + id: clickDelay + ScriptAction { script: gameCanvas.swapping = true; } + PauseAnimation { duration: 750 } + ScriptAction { script: gameCanvas.swapping = false; } + } + + SmokeText { + id: p1Text; source: "gfx/text-p1-go.png"; + system: particleSystem; playerNum: 1 + opacity: p1WonImg.opacity + p2WonImg.opacity > 0 ? 0 : 1 + } + + SmokeText { + id: p2Text; source: "gfx/text-p2-go.png"; + system: particleSystem; playerNum: 2 + opacity: p1WonImg.opacity + p2WonImg.opacity > 0 ? 0 : 1 + } + + onGameOverChanged: { + if (gameCanvas.mode == "multiplayer") { + if (gameCanvas.score >= gameCanvas.score2) { + p1WonImg.opacity = 1; + } else { + p2WonImg.opacity = 1; + } + } + } + Image { + id: p1WonImg + source: "gfx/text-p1-won.png" + anchors.centerIn: parent + opacity: 0 + Behavior on opacity { NumberAnimation {} } + z: 10 + } + Image { + id: p2WonImg + source: "gfx/text-p2-won.png" + anchors.centerIn: parent + opacity: 0 + Behavior on opacity { NumberAnimation {} } + z: 10 + } + + ParticleSystem{ + id: particleSystem; + anchors.fill: parent + z: 5 + ImageParticle { + id: smokeParticle + groups: ["smoke"] + source: "gfx/particle-smoke.png" + alpha: 0.1 + alphaVariation: 0.1 + color: "yellow" + } + Loader { + id: auxLoader + anchors.fill: parent + source: "PrimaryPack.qml" + onItemChanged: { + if (item && "particleSystem" in item) + item.particleSystem = particleSystem + if (item && "gameArea" in item) + item.gameArea = gameCanvas + } + } + } +} + diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml b/basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml new file mode 100644 index 0000000..fb050e7 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: container //Positioned where the 48x48 S/G should be + property alias running: mainAnim.running + property ParticleSystem particleSystem + property int dur: 500 + signal boomTime + Image { + id: s1 + source: "gfx/logo-s.png" + y: 0 + } + Image { + id: g1 + source: "gfx/logo-g.png" + y: -128 + } + Column { + Repeater { + model: 2 + Item { + width: 48 + height: 48 + BlockEmitter { + id: emitter + anchors.fill: parent + group: "red" + system: particleSystem + Connections { + target: container + onBoomTime: emitter.pulse(100); + } + } + } + } + } + SequentialAnimation { + id: mainAnim + running: true + loops: -1 + PropertyAction { target: g1; property: "y"; value: -128} + PropertyAction { target: g1; property: "opacity"; value: 1} + PropertyAction { target: s1; property: "y"; value: 0} + PropertyAction { target: s1; property: "opacity"; value: 1} + NumberAnimation { target: g1; property: "y"; from: -96; to: -48; duration: dur} + ParallelAnimation { + NumberAnimation { target: g1; property: "y"; from: -48; to: 0; duration: dur} + NumberAnimation { target: s1; property: "y"; from: 0; to: 48; duration: dur } + } + PauseAnimation { duration: dur } + ScriptAction { script: container.boomTime(); } + ParallelAnimation { + NumberAnimation { target: g1; property: "opacity"; to: 0; duration: dur } + NumberAnimation { target: s1; property: "opacity"; to: 0; duration: dur } + } + PropertyAction { target: s1; property: "y"; value: -128} + PropertyAction { target: s1; property: "opacity"; value: 1} + NumberAnimation { target: s1; property: "y"; from: -96; to: 0; duration: dur * 2} + } +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml b/basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml new file mode 100644 index 0000000..93089fc --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Emitter { + anchors.fill: parent + velocity: AngleDirection{angleVariation: 360; magnitude: 140; magnitudeVariation: 40} + enabled: false; + lifeSpan: 500; + emitRate: 1 + size: 28 + endSize: 14 + group: "yellow" +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml b/basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml new file mode 100644 index 0000000..fe758af --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml @@ -0,0 +1,98 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "../settings.js" as Settings + +Emitter { + property Item block: parent + anchors.fill: parent + shape: EllipseShape { fill: true } + group: { + if (block.type == 0){ + "redspots"; + } else if (block.type == 1) { + "bluespots"; + } else if (block.type == 2) { + "greenspots"; + } else { + "yellowspots"; + } + } + size: Settings.blockSize * 2 + endSize: Settings.blockSize/2 + lifeSpan: 30000 + enabled: false + emitRate: 60 + maximumEmitted: 60 + velocity: PointDirection{ y: 4; yVariation: 4 } + /* Possibly better, but dependent on gerrit change,28212 + property real mainIntensity: 0.8 + property real subIntensity: 0.1 + property real colorVariation: 0.005 + onEmitParticles: {//One group, many colors, for better stacking + for (var i=0; i
    Clear in three moves..." + startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , + 0 , 0 , 0 , 0 , 0 , 1 , 1 , 2 , 1 , 1 , + 0 , 0 , 0 , 1 , 1 , 3 , 3 , 3 , 3 , 3 , + 0 , 1 , 1 , 3 , 3 , 3 , 1 , 3 , 1 , 1 , + 1 , 2 , 3 , 3 , 1 , 1 , 3 , 3 , 3 , 3 , + 1 , 3 , 3 , 2 , 3 , 3 , 3 , 3 , 1 , 1 , + 1 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml new file mode 100644 index 0000000..0b7a889 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + timeTarget: 10 + goalText: "2 of 10

    Clear in 10 seconds..." + startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 1 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 2 , 2 , + 1 , 2 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 2 , + 2 , 2 , 1 , 3 , 3 , 3 , 1 , 1 , 1 , 2 , + 2 , 1 , 1 , 1 , 3 , 3 , 3 , 1 , 2 , 2 , + 1 , 1 , 1 , 1 , 1 , 3 , 3 , 3 , 2 , 1 ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml new file mode 100644 index 0000000..986f217 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + scoreTarget: 1200 + timeTarget: 60 + goalText: "3 of 10

    Score over 1200 points in one minute..." + mustClear: false + startingGrid: [ 3 , 1 , 2 , 1 , 1 , 2 , 1 , 1 , 3 , 3 , + 1 , 3 , 3 , 2 , 3 , 3 , 1 , 1 , 3 , 1 , + 3 , 1 , 3 , 3 , 2 , 3 , 3 , 3 , 1 , 2 , + 3 , 2 , 2 , 1 , 3 , 3 , 2 , 1 , 1 , 2 , + 3 , 1 , 2 , 2 , 2 , 2 , 2 , 1 , 3 , 1 , + 2 , 3 , 1 , 2 , 2 , 3 , 3 , 1 , 3 , 2 , + 3 , 2 , 1 , 1 , 3 , 3 , 3 , 2 , 2 , 1 , + 1 , 2 , 2 , 3 , 2 , 3 , 3 , 3 , 1 , 1 , + 1 , 3 , 3 , 3 , 1 , 2 , 2 , 3 , 3 , 1 , + 3 , 3 , 2 , 1 , 2 , 2 , 1 , 1 , 1 , 3 , + 2 , 1 , 3 , 2 , 3 , 2 , 3 , 2 , 2 , 1 , + 1 , 3 , 1 , 2 , 1 , 2 , 3 , 1 , 2 , 2 , + 1 , 2 , 2 , 2 , 1 , 1 , 2 , 3 , 1 , 2 ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml new file mode 100644 index 0000000..eff5182 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + scoreTarget: 3000 + timeTarget: 60 + goalText: "4 of 10
    Clear the board with over 3000 points in under a minute..." + startingGrid: [ 3 , 3 , 1 , 1 , 1 , 2 , 2 , 4 , 3 , 3 , + 4 , 3 , 1 , 4 , 2 , 2 , 2 , 4 , 3 , 4 , + 4 , 3 , 3 , 4 , 1 , 1 , 3 , 3 , 4 , 4 , + 3 , 3 , 3 , 3 , 3 , 1 , 3 , 2 , 2 , 4 , + 4 , 4 , 3 , 4 , 3 , 1 , 4 , 4 , 4 , 4 , + 4 , 4 , 3 , 4 , 1 , 1 , 4 , 4 , 3 , 3 , + 4 , 2 , 2 , 2 , 2 , 2 , 4 , 4 , 4 , 1 , + 4 , 4 , 2 , 4 , 2 , 2 , 1 , 1 , 1 , 1 , + 4 , 4 , 2 , 4 , 2 , 2 , 1 , 4 , 4 , 1 , + 4 , 1 , 1 , 4 , 3 , 3 , 4 , 2 , 4 , 1 , + 4 , 1 , 1 , 2 , 3 , 3 , 4 , 2 , 2 , 1 , + 1 , 1 , 2 , 2 , 2 , 3 , 3 , 3 , 2 , 1 , + 4 , 1 , 1 , 2 , 2 , 3 , 4 , 3 , 4 , 4 ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml new file mode 100644 index 0000000..4438de1 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + goalText: "5 of 10

    Clear the level..." + startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 1 , 3 , 2 , 1 , 1 , 1 , 1 , 3 , 2 , 3 , + 1 , 2 , 3 , 1 , 3 , 2 , 2 , 1 , 1 , 2 , + 3 , 2 , 2 , 2 , 1 , 1 , 1 , 1 , 3 , 3 , + 2 , 1 , 1 , 3 , 2 , 1 , 1 , 2 , 1 , 3 , + 1 , 3 , 3 , 1 , 2 , 1 , 2 , 1 , 3 , 3 , + 1 , 3 , 2 , 2 , 2 , 1 , 1 , 3 , 2 , 3 , + 1 , 1 , 3 , 2 , 3 , 3 , 2 , 1 , 1 , 1 , + 1 , 2 , 2 , 3 , 2 , 2 , 1 , 3 , 1 , 3 ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml new file mode 100644 index 0000000..ee48217 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + moveTarget: 4 + goalText: "6 of 10

    Clear in four or less moves..." + startingGrid: [ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , + 4 , 2 , 2 , 2 , 4 , 3 , 3 , 3 , 4 , 4 , + 4 , 2 , 4 , 4 , 4 , 3 , 2 , 3 , 4 , 4 , + 4 , 2 , 2 , 2 , 4 , 3 , 3 , 3 , 4 , 4 , + 4 , 4 , 4 , 2 , 4 , 3 , 4 , 3 , 4 , 4 , + 4 , 2 , 2 , 2 , 4 , 3 , 4 , 3 , 4 , 4 , + 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , + 4 , 3 , 4 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , + 4 , 3 , 3 , 3 , 4 , 2 , 4 , 4 , 4 , 3 , + 4 , 3 , 3 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , + 4 , 3 , 4 , 3 , 4 , 2 , 4 , 4 , 4 , 4 , + 4 , 3 , 4 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , + 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml new file mode 100644 index 0000000..2b34baa --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + moveTarget: 20 + timeTarget: 40 + goalText: "7 of 10

    Clear with 20 moves in 40 seconds (or better)." + startingGrid: [ 1 , 3 , 1 , 1 , 1 , 1 , 2 , 1 , 2 , 2 , + 2 , 1 , 2 , 3 , 3 , 1 , 3 , 1 , 1 , 3 , + 3 , 1 , 1 , 1 , 2 , 2 , 3 , 2 , 3 , 1 , + 1 , 3 , 1 , 1 , 3 , 1 , 1 , 1 , 2 , 3 , + 2 , 1 , 1 , 1 , 3 , 2 , 3 , 3 , 2 , 3 , + 3 , 3 , 3 , 3 , 2 , 2 , 3 , 1 , 3 , 2 , + 2 , 2 , 3 , 2 , 2 , 3 , 2 , 2 , 2 , 2 , + 1 , 2 , 1 , 2 , 1 , 3 , 2 , 3 , 2 , 3 , + 1 , 1 , 2 , 3 , 3 , 3 , 3 , 1 , 1 , 2 , + 3 , 3 , 2 , 2 , 2 , 2 , 3 , 1 , 3 , 1 , + 1 , 2 , 3 , 3 , 3 , 1 , 3 , 2 , 1 , 2 , + 1 , 2 , 1 , 1 , 2 , 3 , 1 , 2 , 1 , 3 , + 3 , 1 , 2 , 2 , 1 , 3 , 3 , 1 , 3 , 2 ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml new file mode 100644 index 0000000..280bbb1 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + goalText: "8 of 10

    Clear the grid." + startingGrid: [ 2 , 4 , 3 , 2 , 3 , 2 , 3 , 3 , 4 , 3 , + 2 , 2 , 3 , 3 , 1 , 4 , 3 , 3 , 3 , 2 , + 1 , 4 , 2 , 3 , 4 , 3 , 3 , 1 , 1 , 1 , + 2 , 1 , 2 , 4 , 4 , 2 , 2 , 3 , 2 , 1 , + 3 , 4 , 4 , 1 , 3 , 2 , 4 , 2 , 1 , 1 , + 2 , 2 , 3 , 1 , 2 , 4 , 1 , 2 , 1 , 2 , + 1 , 2 , 3 , 2 , 4 , 4 , 3 , 1 , 1 , 2 , + 4 , 4 , 2 , 1 , 2 , 4 , 2 , 2 , 4 , 3 , + 4 , 2 , 4 , 1 , 3 , 4 , 1 , 4 , 2 , 4 , + 4 , 3 , 4 , 1 , 4 , 3 , 1 , 3 , 1 , 1 , + 3 , 3 , 2 , 3 , 2 , 4 , 1 , 2 , 4 , 4 , + 3 , 4 , 2 , 2 , 4 , 3 , 4 , 1 , 3 , 2 , + 4 , 3 , 3 , 4 , 2 , 4 , 1 , 2 , 3 , 2 ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml new file mode 100644 index 0000000..7661485 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + scoreTarget: 1000 + goalText: "9 of 10

    Score over 1000 points" + startingGrid: [ 1 , 4 , 4 , 3 , 2 , 1 , 4 , 2 , 4 , 2 , + 2 , 3 , 4 , 4 , 1 , 1 , 1 , 4 , 4 , 4 , + 1 , 3 , 1 , 2 , 2 , 1 , 2 , 1 , 4 , 2 , + 4 , 3 , 4 , 2 , 1 , 4 , 1 , 2 , 2 , 3 , + 3 , 4 , 2 , 4 , 4 , 3 , 2 , 2 , 2 , 1 , + 4 , 4 , 3 , 2 , 4 , 4 , 2 , 1 , 1 , 1 , + 1 , 2 , 1 , 3 , 4 , 1 , 1 , 3 , 2 , 3 , + 3 , 4 , 2 , 2 , 1 , 3 , 2 , 2 , 4 , 2 , + 2 , 4 , 1 , 2 , 2 , 4 , 3 , 3 , 3 , 1 , + 1 , 2 , 2 , 4 , 1 , 2 , 2 , 3 , 3 , 3 , + 4 , 4 , 1 , 4 , 3 , 1 , 3 , 3 , 3 , 4 , + 1 , 2 , 4 , 1 , 2 , 1 , 1 , 4 , 2 , 1 , + 1 , 2 , 3 , 4 , 2 , 4 , 4 , 2 , 1 , 3 ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml new file mode 100644 index 0000000..c75d8e5 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + scoreTarget: 2000 + timeTarget: 60 + moveTarget: 20 + mustClear: false + goalText: "10 of 10

    Score 2000 in one minute with less than 20 moves!" + startingGrid: [ 3 , 2 , 3 , 1 , 3 , 3 , 4 , 1 , 3 , 3 , + 2 , 3 , 2 , 1 , 1 , 2 , 2 , 2 , 4 , 1 , + 2 , 4 , 4 , 4 , 3 , 1 , 4 , 4 , 4 , 1 , + 3 , 1 , 3 , 4 , 4 , 2 , 2 , 2 , 2 , 3 , + 2 , 1 , 4 , 4 , 3 , 3 , 1 , 1 , 3 , 2 , + 3 , 2 , 1 , 4 , 3 , 4 , 1 , 3 , 4 , 2 , + 3 , 3 , 1 , 4 , 4 , 4 , 2 , 1 , 2 , 3 , + 2 , 3 , 4 , 3 , 4 , 1 , 1 , 3 , 2 , 4 , + 4 , 4 , 1 , 2 , 4 , 3 , 2 , 2 , 2 , 4 , + 1 , 4 , 2 , 2 , 1 , 1 , 2 , 1 , 1 , 4 , + 1 , 4 , 3 , 3 , 3 , 1 , 3 , 4 , 4 , 2 , + 3 , 4 , 1 , 1 , 2 , 2 , 2 , 3 , 2 , 1 , + 3 , 3 , 4 , 3 , 1 , 1 , 1 , 4 , 4 , 3 ] +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/samegame.js b/basicsuite/qt5-everywhere/demos/samegame/content/samegame.js new file mode 100644 index 0000000..96b8167 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/content/samegame.js @@ -0,0 +1,581 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* This script file handles the game logic */ +.pragma library +.import QtQuick.LocalStorage 2.0 as Sql +.import "../settings.js" as Settings + +var maxColumn = 10; +var maxRow = 13; +var types = 3; +var maxIndex = maxColumn*maxRow; +var board = new Array(maxIndex); +var blockSrc = "Block.qml"; +var gameDuration; +var component = Qt.createComponent(blockSrc); +var gameCanvas; +var betweenTurns = false; + +var puzzleLevel = null; +var puzzlePath = ""; + +var gameMode = "arcade"; //Set in new game, then tweaks behavior of other functions +var gameOver = false; + +function changeBlock(src) +{ + blockSrc = src; + component = Qt.createComponent(blockSrc); +} + +// Index function used instead of a 2D array +function index(column, row) +{ + return column + row * maxColumn; +} + +function timeStr(msecs) +{ + var secs = Math.floor(msecs/1000); + var m = Math.floor(secs/60); + var ret = "" + m + "m " + (secs%60) + "s"; + return ret; +} + +function cleanUp() +{ + if (gameCanvas == undefined) + return; + // Delete blocks from previous game + for (var i = 0; i < maxIndex; i++) { + if (board[i] != null) + board[i].destroy(); + board[i] = null; + } + if (puzzleLevel != null){ + puzzleLevel.destroy(); + puzzleLevel = null; + } + gameCanvas.mode = "" +} + +function startNewGame(gc, mode, map) +{ + gameCanvas = gc; + if (mode == undefined) + gameMode = "arcade"; + else + gameMode = mode; + gameOver = false; + + cleanUp(); + + gc.gameOver = false; + gc.mode = gameMode; + // Calculate board size + maxColumn = Math.floor(gameCanvas.width/Settings.blockSize); + maxRow = Math.floor(gameCanvas.height/Settings.blockSize); + maxIndex = maxRow * maxColumn; + if (gameMode == "arcade") //Needs to be after board sizing + getHighScore(); + + + // Initialize Board + board = new Array(maxIndex); + gameCanvas.score = 0; + gameCanvas.score2 = 0; + gameCanvas.moves = 0; + gameCanvas.curTurn = 1; + if (gameMode == "puzzle") + loadMap(map); + else//Note that we load them in reverse order for correct visual stacking + for (var column = maxColumn - 1; column >= 0; column--) + for (var row = maxRow - 1; row >= 0; row--) + createBlock(column, row); + if (gameMode == "puzzle") + getLevelHistory();//Needs to be after map load + gameDuration = new Date(); +} + +var fillFound; // Set after a floodFill call to the number of blocks found +var floodBoard; // Set to 1 if the floodFill reaches off that node + +// NOTE: Be careful with vars named x,y, as the calling object's x,y are still in scope +function handleClick(x,y) +{ + if (betweenTurns || gameOver || gameCanvas == undefined) + return; + var column = Math.floor(x/Settings.blockSize); + var row = Math.floor(y/Settings.blockSize); + if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) + return; + if (board[index(column, row)] == null) + return; + // If it's a valid block, remove it and all connected (does nothing if it's not connected) + floodFill(column,row, -1); + if (fillFound <= 0) + return; + if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) + gameCanvas.score2 += (fillFound - 1) * (fillFound - 1); + else + gameCanvas.score += (fillFound - 1) * (fillFound - 1); + if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) + shuffleUp(); + else + shuffleDown(); + gameCanvas.moves += 1; + if (gameMode == "endless") + refill(); + else if (gameMode != "multiplayer") + victoryCheck(); + if (gameMode == "multiplayer" && !gc.gameOver){ + betweenTurns = true; + gameCanvas.swapPlayers();//signal, animate and call turnChange() when ready + } +} + +function floodFill(column,row,type) +{ + if (board[index(column, row)] == null) + return; + var first = false; + if (type == -1) { + first = true; + type = board[index(column,row)].type; + + // Flood fill initialization + fillFound = 0; + floodBoard = new Array(maxIndex); + } + if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) + return; + if (floodBoard[index(column, row)] == 1 || (!first && type != board[index(column, row)].type)) + return; + floodBoard[index(column, row)] = 1; + floodFill(column + 1, row, type); + floodFill(column - 1, row, type); + floodFill(column, row + 1, type); + floodFill(column, row - 1, type); + if (first == true && fillFound == 0) + return; // Can't remove single blocks + board[index(column, row)].dying = true; + board[index(column, row)] = null; + fillFound += 1; +} + +function shuffleDown() +{ + // Fall down + for (var column = 0; column < maxColumn; column++) { + var fallDist = 0; + for (var row = maxRow - 1; row >= 0; row--) { + if (board[index(column,row)] == null) { + fallDist += 1; + } else { + if (fallDist > 0) { + var obj = board[index(column, row)]; + obj.y = (row + fallDist) * Settings.blockSize; + board[index(column, row + fallDist)] = obj; + board[index(column, row)] = null; + } + } + } + } + // Fall to the left + fallDist = 0; + for (column = 0; column < maxColumn; column++) { + if (board[index(column, maxRow - 1)] == null) { + fallDist += 1; + } else { + if (fallDist > 0) { + for (row = 0; row < maxRow; row++) { + obj = board[index(column, row)]; + if (obj == null) + continue; + obj.x = (column - fallDist) * Settings.blockSize; + board[index(column - fallDist,row)] = obj; + board[index(column, row)] = null; + } + } + } + } +} + + +function shuffleUp() +{ + // Fall up + for (var column = 0; column < maxColumn; column++) { + var fallDist = 0; + for (var row = 0; row < maxRow; row++) { + if (board[index(column,row)] == null) { + fallDist += 1; + } else { + if (fallDist > 0) { + var obj = board[index(column, row)]; + obj.y = (row - fallDist) * Settings.blockSize; + board[index(column, row - fallDist)] = obj; + board[index(column, row)] = null; + } + } + } + } + // Fall to the left (or should it be right, so as to be left for P2?) + fallDist = 0; + for (column = 0; column < maxColumn; column++) { + if (board[index(column, 0)] == null) { + fallDist += 1; + } else { + if (fallDist > 0) { + for (row = 0; row < maxRow; row++) { + obj = board[index(column, row)]; + if (obj == null) + continue; + obj.x = (column - fallDist) * Settings.blockSize; + board[index(column - fallDist,row)] = obj; + board[index(column, row)] = null; + } + } + } + } +} + +function turnChange()//called by ui outside +{ + betweenTurns = false; + if (gameCanvas.curTurn == 1){ + shuffleUp(); + gameCanvas.curTurn = 2; + victoryCheck(); + }else{ + shuffleDown(); + gameCanvas.curTurn = 1; + victoryCheck(); + } +} + +function refill() +{ + for (var column = 0; column < maxColumn; column++) { + for (var row = 0; row < maxRow; row++) { + if (board[index(column, row)] == null) + createBlock(column, row); + } + } +} + +function victoryCheck() +{ + // Awards bonuses for no blocks left + var deservesBonus = true; + if (board[index(0,maxRow - 1)] != null || board[index(0,0)] != null) + deservesBonus = false; + // Checks for game over + if (deservesBonus){ + if (gameCanvas.curTurn = 1) + gameCanvas.score += 1000; + else + gameCanvas.score2 += 1000; + } + gameOver = deservesBonus; + if (gameCanvas.curTurn == 1){ + if (!(floodMoveCheck(0, maxRow - 1, -1))) + gameOver = true; + }else{ + if (!(floodMoveCheck(0, 0, -1, true))) + gameOver = true; + } + if (gameMode == "puzzle"){ + puzzleVictoryCheck(deservesBonus);//Takes it from here + return; + } + if (gameOver) { + var winnerScore = Math.max(gameCanvas.score, gameCanvas.score2); + if (gameMode == "multiplayer"){ + gameCanvas.score = winnerScore; + saveHighScore(gameCanvas.score2); + } + saveHighScore(gameCanvas.score); + gameDuration = new Date() - gameDuration; + gameCanvas.gameOver = true; + } +} + +// Only floods up and right, to see if it can find adjacent same-typed blocks +function floodMoveCheck(column, row, type, goDownInstead) +{ + if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) + return false; + if (board[index(column, row)] == null) + return false; + var myType = board[index(column, row)].type; + if (type == myType) + return true; + if (goDownInstead) + return floodMoveCheck(column + 1, row, myType, goDownInstead) || + floodMoveCheck(column, row + 1, myType, goDownInstead); + else + return floodMoveCheck(column + 1, row, myType) || + floodMoveCheck(column, row - 1, myType); +} + +function createBlock(column,row,type) +{ + // Note that we don't wait for the component to become ready. This will + // only work if the block QML is a local file. Otherwise the component will + // not be ready immediately. There is a statusChanged signal on the + // component you could use if you want to wait to load remote files. + if (component.status == 1){ + if (type == undefined) + type = Math.floor(Math.random() * types); + if (type < 0 || type > 4) { + console.log("Invalid type requested");//TODO: Is this triggered by custom levels much? + return; + } + var dynamicObject = component.createObject(gameCanvas, + {"type": type, + "x": column*Settings.blockSize, + "y": -1*Settings.blockSize, + "width": Settings.blockSize, + "height": Settings.blockSize, + "particleSystem": gameCanvas.ps}); + if (dynamicObject == null){ + console.log("error creating block"); + console.log(component.errorString()); + return false; + } + dynamicObject.y = row*Settings.blockSize; + dynamicObject.spawned = true; + + board[index(column,row)] = dynamicObject; + }else{ + console.log("error loading block component"); + console.log(component.errorString()); + return false; + } + return true; +} + +function showPuzzleError(str) +{ + //TODO: Nice user visible UI? + console.log(str); +} + +function loadMap(map) +{ + puzzlePath = map; + var levelComp = Qt.createComponent(puzzlePath); + if (levelComp.status != 1){ + console.log("Error loading level"); + showPuzzleError(levelComp.errorString()); + return; + } + puzzleLevel = levelComp.createObject(); + if (puzzleLevel == null || !puzzleLevel.startingGrid instanceof Array) { + showPuzzleError("Bugger!"); + return; + } + gameCanvas.showPuzzleGoal(puzzleLevel.goalText); + //showPuzzleGoal should call finishLoadingMap as the next thing it does, before handling more events +} + +function finishLoadingMap() +{ + for (var i in puzzleLevel.startingGrid) + if (! (puzzleLevel.startingGrid[i] >= 0 && puzzleLevel.startingGrid[i] <= 9) ) + puzzleLevel.startingGrid[i] = 0; + //TODO: Don't allow loading larger levels, leads to cheating + while (puzzleLevel.startingGrid.length > maxIndex) puzzleLevel.startingGrid.shift(); + while (puzzleLevel.startingGrid.length < maxIndex) puzzleLevel.startingGrid.unshift(0); + for (var i in puzzleLevel.startingGrid) + if (puzzleLevel.startingGrid[i] > 0) + createBlock(i % maxColumn, Math.floor(i / maxColumn), puzzleLevel.startingGrid[i] - 1); + + //### Experimental feature - allow levels to contain arbitrary QML scenes as well! + //while (puzzleLevel.children.length) + // puzzleLevel.children[0].parent = gameCanvas; + gameDuration = new Date(); //Don't start until we finish loading +} + +function puzzleVictoryCheck(clearedAll)//gameOver has also been set if no more moves +{ + var won = true; + var soFar = new Date() - gameDuration; + if (puzzleLevel.scoreTarget != -1 && gameCanvas.score < puzzleLevel.scoreTarget){ + won = false; + } if (puzzleLevel.scoreTarget != -1 && gameCanvas.score >= puzzleLevel.scoreTarget && !puzzleLevel.mustClear){ + gameOver = true; + } if (puzzleLevel.timeTarget != -1 && soFar/1000.0 > puzzleLevel.timeTarget){ + gameOver = true; + } if (puzzleLevel.moveTarget != -1 && gameCanvas.moves >= puzzleLevel.moveTarget){ + gameOver = true; + } if (puzzleLevel.mustClear && gameOver && !clearedAll) { + won = false; + } + + if (gameOver) { + gameCanvas.gameOver = true; + gameCanvas.showPuzzleEnd(won); + + if (won) { + // Store progress + saveLevelHistory(); + } + } +} + +function getHighScore() +{ + var db = Sql.LocalStorage.openDatabaseSync( + "SameGame", + "2.0", + "SameGame Local Data", + 100 + ); + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(game TEXT, score NUMBER, gridSize TEXT, time NUMBER)'); + // Only show results for the current grid size + var rs = tx.executeSql('SELECT * FROM Scores WHERE gridSize = "' + + maxColumn + "x" + maxRow + '" AND game = "' + gameMode + '" ORDER BY score desc'); + if (rs.rows.length > 0) + gameCanvas.highScore = rs.rows.item(0).score; + else + gameCanvas.highScore = 0; + } + ); +} + +function saveHighScore(score) +{ + // Offline storage + var db = Sql.LocalStorage.openDatabaseSync( + "SameGame", + "2.0", + "SameGame Local Data", + 100 + ); + var dataStr = "INSERT INTO Scores VALUES(?, ?, ?, ?)"; + var data = [ + gameMode, + score, + maxColumn + "x" + maxRow, + Math.floor(gameDuration / 1000) + ]; + if (score >= gameCanvas.highScore)//Update UI field + gameCanvas.highScore = score; + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(game TEXT, score NUMBER, gridSize TEXT, time NUMBER)'); + tx.executeSql(dataStr, data); + } + ); +} + +function getLevelHistory() +{ + var db = Sql.LocalStorage.openDatabaseSync( + "SameGame", + "2.0", + "SameGame Local Data", + 100 + ); + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Puzzle(level TEXT, score NUMBER, moves NUMBER, time NUMBER)'); + var rs = tx.executeSql('SELECT * FROM Puzzle WHERE level = "' + puzzlePath + '" ORDER BY score desc'); + if (rs.rows.length > 0) { + gameCanvas.puzzleWon = true; + gameCanvas.highScore = rs.rows.item(0).score; + } else { + gameCanvas.puzzleWon = false; + gameCanvas.highScore = 0; + } + } + ); +} + +function saveLevelHistory() +{ + var db = Sql.LocalStorage.openDatabaseSync( + "SameGame", + "2.0", + "SameGame Local Data", + 100 + ); + var dataStr = "INSERT INTO Puzzle VALUES(?, ?, ?, ?)"; + var data = [ + puzzlePath, + gameCanvas.score, + gameCanvas.moves, + Math.floor(gameDuration / 1000) + ]; + gameCanvas.puzzleWon = true; + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Puzzle(level TEXT, score NUMBER, moves NUMBER, time NUMBER)'); + tx.executeSql(dataStr, data); + } + ); +} + +function nuke() //For "Debug mode" +{ + for (var row = 1; row <= 5; row++) { + for (var col = 0; col < 5; col++) { + if (board[index(col, maxRow - row)] != null) { + board[index(col, maxRow - row)].dying = true; + board[index(col, maxRow - row)] = null; + } + } + } + if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) + shuffleUp(); + else + shuffleDown(); + if (gameMode == "endless") + refill(); + else + victoryCheck(); +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/samegame.qml b/basicsuite/qt5-everywhere/demos/samegame/samegame.qml new file mode 100644 index 0000000..49eab55 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/samegame.qml @@ -0,0 +1,371 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "content/samegame.js" as Logic +import "settings.js" as Settings +import "content" + +Rectangle { + id: root + anchors.fill: parent + property int acc: 0 + + + function loadPuzzle() { + if (gameCanvas.mode != "") + Logic.cleanUp(); + Logic.startNewGame(gameCanvas,"puzzle","levels/level"+acc+".qml") + } + function nextPuzzle() { + acc = (acc + 1) % 10; + loadPuzzle(); + } + Timer { + id: gameOverTimer + interval: 1500 + running : gameCanvas.gameOver && gameCanvas.mode == "puzzle" //mode will be reset by cleanUp(); + repeat : false + onTriggered: { + Logic.cleanUp(); + nextPuzzle(); + } + } + + Image { + source: "content/gfx/background.png" + anchors.fill: parent + } + + GameArea { + id: gameCanvas + z: 1 + y: Settings.headerHeight + + width: parent.width + height: parent.height - Settings.headerHeight - Settings.footerHeight + + backgroundVisible: root.state == "in-game" + onModeChanged: if (gameCanvas.mode != "puzzle") puzzleWon = false; //UI has stricter constraints on this variable than the game does + Age { + groups: ["redspots", "greenspots", "bluespots", "yellowspots"] + enabled: root.state == "" + system: gameCanvas.ps + } + + onPuzzleLost: acc--;//So that nextPuzzle() reloads the current one + + } + + Item { + id: menu + z: 2 + width: parent.width; + anchors.top: parent.top + anchors.bottom: bottomBar.top + + LogoAnimation { + x: 64 + y: Settings.headerHeight + particleSystem: gameCanvas.ps + running: root.state == "" + } + Row { + x: 112 + y: 20 + Image { source: "content/gfx/logo-a.png" } + Image { source: "content/gfx/logo-m.png" } + Image { source: "content/gfx/logo-e.png" } + } + + Column { + y: 100 + 40 + spacing: Settings.menuButtonSpacing + + Button { + width: root.width + rotatedButton: true + imgSrc: "content/gfx/but-game-1.png" + onClicked: { + if (root.state == "in-game") + return //Prevent double clicking + root.state = "in-game" + gameCanvas.blockFile = "Block.qml" + gameCanvas.background = "gfx/background.png" + arcadeTimer.start(); + } + //Emitted particles don't fade out, because ImageParticle is on the GameArea + system: gameCanvas.ps + group: "green" + Timer { + id: arcadeTimer + interval: Settings.menuDelay + running : false + repeat : false + onTriggered: Logic.startNewGame(gameCanvas) + } + } + + Button { + width: root.width + rotatedButton: true + imgSrc: "content/gfx/but-game-2.png" + onClicked: { + if (root.state == "in-game") + return + root.state = "in-game" + gameCanvas.blockFile = "Block.qml" + gameCanvas.background = "gfx/background.png" + twopTimer.start(); + } + system: gameCanvas.ps + group: "green" + Timer { + id: twopTimer + interval: Settings.menuDelay + running : false + repeat : false + onTriggered: Logic.startNewGame(gameCanvas, "multiplayer") + } + } + + Button { + width: root.width + rotatedButton: true + imgSrc: "content/gfx/but-game-3.png" + onClicked: { + if (root.state == "in-game") + return + root.state = "in-game" + gameCanvas.blockFile = "SimpleBlock.qml" + gameCanvas.background = "gfx/background.png" + endlessTimer.start(); + } + system: gameCanvas.ps + group: "blue" + Timer { + id: endlessTimer + interval: Settings.menuDelay + running : false + repeat : false + onTriggered: Logic.startNewGame(gameCanvas, "endless") + } + } + + Button { + width: root.width + rotatedButton: true + imgSrc: "content/gfx/but-game-4.png" + group: "yellow" + onClicked: { + if (root.state == "in-game") + return + root.state = "in-game" + gameCanvas.blockFile = "PuzzleBlock.qml" + gameCanvas.background = "gfx/background.png" + puzzleTimer.start(); + } + Timer { + id: puzzleTimer + interval: Settings.menuDelay + running : false + repeat : false + onTriggered: loadPuzzle(); + } + system: gameCanvas.ps + } + } + } + + Image { + id: scoreBar + source: "content/gfx/bar.png" + width: parent.width + z: 6 + y: -Settings.headerHeight + height: Settings.headerHeight + Behavior on opacity { NumberAnimation {} } + SamegameText { + id: arcadeScore + anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} + text: 'P1: ' + gameCanvas.score + font.pixelSize: Settings.fontPixelSize + textFormat: Text.StyledText + color: "white" + opacity: gameCanvas.mode == "arcade" ? 1 : 0 + Behavior on opacity { NumberAnimation {} } + } + SamegameText { + id: arcadeHighScore + anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} + text: 'Highscore: ' + gameCanvas.highScore + opacity: gameCanvas.mode == "arcade" ? 1 : 0 + } + SamegameText { + id: p1Score + anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} + text: 'P1: ' + gameCanvas.score + opacity: gameCanvas.mode == "multiplayer" ? 1 : 0 + } + SamegameText { + id: p2Score + anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} + text: 'P2: ' + gameCanvas.score2 + opacity: gameCanvas.mode == "multiplayer" ? 1 : 0 + rotation: 180 + } + SamegameText { + id: puzzleMoves + anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} + text: 'Moves: ' + gameCanvas.moves + opacity: gameCanvas.mode == "puzzle" ? 1 : 0 + } + SamegameText { + Image { + source: "content/gfx/icon-time.png" + x: -20 + } + id: puzzleTime + anchors { topMargin: 3; top: parent.top; horizontalCenter: parent.horizontalCenter; horizontalCenterOffset: 20} + text: "00:00" + opacity: gameCanvas.mode == "puzzle" ? 1 : 0 + Timer { + interval: 1000 + repeat: true + running: gameCanvas.mode == "puzzle" && !gameCanvas.gameOver + onTriggered: { + var elapsed = Math.floor((new Date() - Logic.gameDuration)/ 1000.0); + var mins = Math.floor(elapsed/60.0); + var secs = (elapsed % 60); + puzzleTime.text = (mins < 10 ? "0" : "") + mins + ":" + (secs < 10 ? "0" : "") + secs; + } + } + } + SamegameText { + id: puzzleScore + anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} + text: 'Score: ' + gameCanvas.score + opacity: gameCanvas.mode == "puzzle" ? 1 : 0 + } + } + + Image { + id: bottomBar + width: parent.width + height: Settings.footerHeight + source: "content/gfx/bar.png" + y: parent.height - Settings.footerHeight; + z: 2 + /*Button { + id: quitButton + height: Settings.toolButtonHeight + imgSrc: "content/gfx/but-quit.png" + onClicked: {Qt.quit(); } + anchors { left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: 11 } + }*/ + Button { + id: menuButton + height: Settings.toolButtonHeight + imgSrc: "content/gfx/but-menu.png" + visible: (root.state == "in-game"); + onClicked: {root.state = ""; Logic.cleanUp(); gameCanvas.mode = ""} + anchors { left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: 0 } + } + Button { + id: againButton + height: Settings.toolButtonHeight + imgSrc: "content/gfx/but-game-new.png" + visible: (root.state == "in-game"); + opacity: gameCanvas.gameOver && (gameCanvas.mode == "arcade" || gameCanvas.mode == "multiplayer") + Behavior on opacity{ NumberAnimation {} } + onClicked: {if (gameCanvas.gameOver) { Logic.startNewGame(gameCanvas, gameCanvas.mode);}} + anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 11 } + } + Button { + id: nextButton + height: Settings.toolButtonHeight + imgSrc: "content/gfx/but-puzzle-next.png" + visible: (root.state == "in-game") && gameCanvas.mode == "puzzle" && gameCanvas.puzzleWon + opacity: gameCanvas.puzzleWon ? 1 : 0 + Behavior on opacity{ NumberAnimation {} } + onClicked: {if (gameCanvas.puzzleWon) nextPuzzle();} + anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 11 } + } + } + + Connections { + target: root + onStateChanged: stateChangeAnim.running = true + } + SequentialAnimation { + id: stateChangeAnim + ParallelAnimation { + NumberAnimation { target: bottomBar; property: "y"; to: root.height; duration: Settings.menuDelay/2; easing.type: Easing.OutQuad } + NumberAnimation { target: scoreBar; property: "y"; to: -Settings.headerHeight; duration: Settings.menuDelay/2; easing.type: Easing.OutQuad } + } + ParallelAnimation { + NumberAnimation { target: bottomBar; property: "y"; to: root.height - Settings.footerHeight; duration: Settings.menuDelay/2; easing.type: Easing.OutBounce} + NumberAnimation { target: scoreBar; property: "y"; to: root.state == "" ? -Settings.headerHeight : 0; duration: Settings.menuDelay/2; easing.type: Easing.OutBounce} + } + } + + states: [ + State { + name: "in-game" + PropertyChanges { + target: menu + opacity: 0 + visible: false + } + } + ] + + transitions: [ + Transition { + NumberAnimation {properties: "x,y,opacity"} + } + ] + + //"Debug mode" + focus: true + Keys.onAsteriskPressed: Logic.nuke(); + Keys.onSpacePressed: gameCanvas.puzzleWon = true; +} diff --git a/basicsuite/qt5-everywhere/demos/samegame/samegame.qrc b/basicsuite/qt5-everywhere/demos/samegame/samegame.qrc new file mode 100644 index 0000000..951b9d1 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/samegame.qrc @@ -0,0 +1,72 @@ + + + samegame.qml + settings.js + content/gfx/text-p1-won.png + content/gfx/background-puzzle.png + content/gfx/background.png + content/gfx/bar.png + content/gfx/blue-puzzle.png + content/gfx/blue.png + content/gfx/bubble-highscore.png + content/gfx/bubble-puzzle.png + content/gfx/but-game-1.png + content/gfx/but-game-2.png + content/gfx/but-game-3.png + content/gfx/but-game-4.png + content/gfx/but-game-new.png + content/gfx/but-menu.png + content/gfx/but-puzzle-next.png + content/gfx/but-quit.png + content/gfx/green-puzzle.png + content/gfx/green.png + content/gfx/icon-fail.png + content/gfx/icon-ok.png + content/gfx/icon-time.png + content/gfx/logo-a.png + content/gfx/logo-e.png + content/gfx/logo-g.png + content/gfx/logo-m.png + content/gfx/logo-s.png + content/gfx/logo.png + content/gfx/particle-brick.png + content/gfx/particle-paint.png + content/gfx/particle-smoke.png + content/gfx/red-puzzle.png + content/gfx/red.png + content/gfx/text-highscore-new.png + content/gfx/text-highscore.png + content/gfx/text-no-winner.png + content/gfx/text-p1-go.png + content/gfx/text-p1.png + content/gfx/text-p2-go.png + content/gfx/text-p2-won.png + content/gfx/text-p2.png + content/gfx/yellow-puzzle.png + content/gfx/yellow.png + content/levels/level0.qml + content/levels/level1.qml + content/levels/level2.qml + content/levels/level3.qml + content/levels/level4.qml + content/levels/level5.qml + content/levels/level6.qml + content/levels/level7.qml + content/levels/level8.qml + content/levels/level9.qml + content/levels/TemplateBase.qml + content/SamegameText.qml + content/SimpleBlock.qml + content/Block.qml + content/BlockEmitter.qml + content/Button.qml + content/GameArea.qml + content/LogoAnimation.qml + content/MenuEmitter.qml + content/PaintEmitter.qml + content/PrimaryPack.qml + content/PuzzleBlock.qml + content/samegame.js + content/SmokeText.qml + + diff --git a/basicsuite/qt5-everywhere/demos/samegame/settings.js b/basicsuite/qt5-everywhere/demos/samegame/settings.js new file mode 100644 index 0000000..e09dee9 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/samegame/settings.js @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Research In Motion +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +.pragma library + +//This should be switched over once a proper QML settings API exists + +var menuDelay = 500 + +var headerHeight = 20 // 70 on BB10 +var footerHeight = 44 // 100 on BB10 + +var fontPixelSize = 14 // 55 on BB10 + +var blockSize = 32 // 64 on BB10 + +var toolButtonHeight = 32 // 64 on BB10 + +var menuButtonSpacing = 0 // 15 on BB10 diff --git a/basicsuite/qt5-everywhere/demos/shaders/Content.qml b/basicsuite/qt5-everywhere/demos/shaders/Content.qml new file mode 100755 index 0000000..aae2337 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Content.qml @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: root + property alias effect: effectLoader.item + property string effectSource: "Effects/EffectPassThrough.qml" + signal contentSizeChanged(size contentSize) + + color: "black" + + ShaderEffectSource { + id: theSource + smooth: true + hideSource: true + } + + LogoContainer { + id: logoContainer + anchors.fill: root + } + + Loader { + id: effectLoader + source: effectSource + } + + onWidthChanged: { + if (effectLoader.item) + effectLoader.item.targetWidth = root.width + } + + onHeightChanged: { + if (effectLoader.item) + effectLoader.item.targetHeight = root.height + } + + onEffectSourceChanged: { + effectLoader.source = effectSource + updateSource() + } + + function updateSource() { + if (effectLoader.item) { + effectLoader.item.parent = root + effectLoader.item.targetWidth = root.width + effectLoader.item.targetHeight = root.height + effectLoader.item.anchors.fill = logoContainer + effectLoader.item.source = theSource + } + } + + function init() { + theSource.sourceItem = logoContainer + root.effectSource = "Effects/EffectPassThrough.qml" + effectLoader.source = root.effectSource + updateSource() + } +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/EffectSelectionPanel.qml b/basicsuite/qt5-everywhere/demos/shaders/EffectSelectionPanel.qml new file mode 100755 index 0000000..93cdb5f --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/EffectSelectionPanel.qml @@ -0,0 +1,156 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Rectangle { + id: root + height: 78 + property int itemHeight: 25 + property string effectSource: "" + property string effectName: "No effect" + + signal clicked + QtObject { + id: d + property Item selectedItem + } + + ListModel { + id: sources + ListElement { name: "No effect"; source: "Effects/EffectPassThrough.qml" } + ListElement { name: "Billboard"; source: "Effects/EffectBillboard.qml" } + ListElement { name: "Black & white"; source: "Effects/EffectBlackAndWhite.qml" } + ListElement { name: "Blur"; source: "Effects/EffectGaussianBlur.qml" } + ListElement { name: "Edge detection"; source: "Effects/EffectSobelEdgeDetection1.qml" } + ListElement { name: "Emboss"; source: "Effects/EffectEmboss.qml" } + ListElement { name: "Glow"; source: "Effects/EffectGlow.qml" } + ListElement { name: "Isolate"; source: "Effects/EffectIsolate.qml" } + ListElement { name: "Pixelate"; source: "Effects/EffectPixelate.qml" } + ListElement { name: "Posterize"; source: "Effects/EffectPosterize.qml" } + ListElement { name: "Ripple"; source: "Effects/EffectRipple.qml" } + ListElement { name: "Sepia"; source: "Effects/EffectSepia.qml" } + ListElement { name: "Sharpen"; source: "Effects/EffectSharpen.qml" } + ListElement { name: "Shockwave"; source: "Effects/EffectShockwave.qml" } + ListElement { name: "Toon"; source: "Effects/EffectToon.qml" } + ListElement { name: "Warhol"; source: "Effects/EffectWarhol.qml" } + ListElement { name: "Wobble"; source: "Effects/EffectWobble.qml" } + ListElement { name: "Vignette"; source: "Effects/EffectVignette.qml" } + } + + Component { + id: sourceDelegate + Item { + id: sourceDelegateItem + width: root.width + height: itemHeight + + Text { + id: sourceSelectorItem + anchors.centerIn: parent + width: 0.9 * parent.width + height: 0.8 * itemHeight + text: name + color: "white" + } + + states: [ + State { + name: "selected" + PropertyChanges { + target: sourceSelectorItem + bgColor: "#ff8888" + } + } + ] + + transitions: [ + Transition { + from: "*" + to: "*" + ColorAnimation { + properties: "color" + easing.type: Easing.OutQuart + duration: 500 + } + } + ] + } + } + + MouseArea { + id: mouseAboveMonitor + anchors.fill: parent + hoverEnabled: true + } + + ListView { + id: list + anchors.fill: parent + clip: true + anchors.margins: root.width * 0.05 + model: sources + + currentIndex: 0 + + onCurrentIndexChanged : { + effectSource = model.get(currentIndex).source + effectName = model.get(currentIndex).name + root.clicked() + } + + delegate: Item { + id: item + width: parent.width + height: itemHeight + Rectangle { + anchors.fill: parent + border.color: index == list.currentIndex ? "#44ffffff" : "transparent" + color: index == list.currentIndex ? "#22ffffff" : "transparent" + radius: 3 + Text { color: "white" ; text: name ; anchors.centerIn: parent; font.pixelSize: item.height * 0.5 } + MouseArea { + anchors.fill: parent + onClicked: list.currentIndex = index + } + } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/Effect.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/Effect.qml new file mode 100755 index 0000000..34eb07c --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/Effect.qml @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import ShaderReader 1.0 + +ShaderEffect { + id: effect + property variant source + property ListModel parameters: ListModel { } + property bool divider: false + property real dividerValue: 1.0 + property real targetWidth: 0 + property real targetHeight: 0 + property alias fragmentShaderFilename: shaderFileReader.fragmentShaderFilename + property alias vertexShaderFilename: shaderFileReader.vertexShaderFilename + //property string fragmentShaderFilename + //property string vertexShaderFilename + + QtObject { + id: d + property string fragmentShaderCommon: " + #ifdef GL_ES + precision mediump float; + #else + # define lowp + # define mediump + # define highp + #endif // GL_ES + " + } + + ShaderFileReader { + id: shaderFileReader + onFragmentShaderFilenameChanged: { + effect.fragmentShader = d.fragmentShaderCommon + shaderFileReader.fragmentShader + } + onVertexShaderFilenameChanged: { + effect.vertexShader = shaderFileReader.vertexShader + } + } + + // The following is a workaround for the fact that ShaderEffect + // doesn't provide a way for shader programs to be read from a file, + // rather than being inline in the QML file + + //onFragmentShaderFilenameChanged: + // fragmentShader = d.fragmentShaderCommon + shaderFileReader.readFile("qml/QtDemo/demos/shaders/" + fragmentShaderFilename) + //onVertexShaderFilenameChanged: + // vertexShader = shaderFileReader.readFile("qml/QtDemo/demos/shaders/" + vertexShaderFilename) +} + diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBillboard.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBillboard.qml new file mode 100755 index 0000000..124a2a1 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBillboard.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "grid spacing" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real grid: parameters.get(0).value * 10 + + property real step_x: 0.0015625 + property real step_y: targetHeight ? (step_x * targetWidth / targetHeight) : 0.0 + + fragmentShaderFilename: "shaders/billboard.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml new file mode 100755 index 0000000..37a3b6e --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectBlackAndWhite.qml @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "threshold" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real threshold: parameters.get(0).value + + fragmentShaderFilename: "shaders/blackandwhite.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectEmboss.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectEmboss.qml new file mode 100755 index 0000000..4bf5771 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectEmboss.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + fragmentShaderFilename: "shaders/emboss.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGaussianBlur.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGaussianBlur.qml new file mode 100755 index 0000000..e63e17a --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGaussianBlur.qml @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://www.geeks3d.com/20100909/shader-library-gaussian-blur-post-processing-filter-in-glsl/ + +import QtQuick 2.0 + +Item { + id: root + property bool divider: true + property real dividerValue: 1 + property ListModel parameters: ListModel { + ListElement { + name: "radius" + value: 0.5 + } + } + + property alias targetWidth: verticalShader.targetWidth + property alias targetHeight: verticalShader.targetHeight + property alias source: verticalShader.source + + Effect { + id: verticalShader + anchors.fill: parent + dividerValue: parent.dividerValue + property real blurSize: 4.0 * parent.parameters.get(0).value / targetHeight + fragmentShaderFilename: "shaders/gaussianblur_v.fsh" + } + + Effect { + id: horizontalShader + anchors.fill: parent + dividerValue: parent.dividerValue + property real blurSize: 4.0 * parent.parameters.get(0).value / parent.targetWidth + fragmentShaderFilename: "shaders/gaussianblur_h.fsh" + source: horizontalShaderSource + + ShaderEffectSource { + id: horizontalShaderSource + sourceItem: verticalShader + smooth: true + hideSource: true + } + } +} + diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGlow.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGlow.qml new file mode 100755 index 0000000..d6e987d --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectGlow.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + fragmentShaderFilename: "shaders/glow.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectIsolate.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectIsolate.qml new file mode 100755 index 0000000..2425a25 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectIsolate.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "hue" + value: 0.5 + } + ListElement { + name: "width" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real targetHue: parameters.get(0).value * 360 + property real windowWidth: parameters.get(1).value * 60 + + fragmentShaderFilename: "shaders/isolate.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPassThrough.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPassThrough.qml new file mode 100755 index 0000000..1f259be --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPassThrough.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + divider: false +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPixelate.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPixelate.qml new file mode 100755 index 0000000..71f7da9 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPixelate.qml @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "granularity" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real granularity: parameters.get(0).value * 20 + + fragmentShaderFilename: "shaders/pixelate.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPosterize.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPosterize.qml new file mode 100755 index 0000000..0cf16a0 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectPosterize.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "gamma" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real gamma: parameters.get(0).value + + property real numColors: 8.0 + + fragmentShaderFilename: "shaders/posterize.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectRipple.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectRipple.qml new file mode 100755 index 0000000..0b7c48c --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectRipple.qml @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "amplitude" + value: 0.5 + } + ListElement { + name: "frequency" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real amplitude: parameters.get(0).value * 0.03 + property real n: parameters.get(1).value * 7 + + property real time: 0 + NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } + + fragmentShaderFilename: "shaders/ripple.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSepia.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSepia.qml new file mode 100755 index 0000000..446e779 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSepia.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + fragmentShaderFilename: "shaders/sepia.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSharpen.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSharpen.qml new file mode 100755 index 0000000..99ece3c --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSharpen.qml @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "sharpness" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real amount: parameters.get(0).value * 18 + + fragmentShaderFilename: "shaders/sharpen.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectShockwave.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectShockwave.qml new file mode 100755 index 0000000..fe91781 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectShockwave.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + id: root + parameters: ListModel { + ListElement { + name: "amplitude" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real granularity: parameters.get(0).value * 20 + property real weight: parameters.get(0).value + + property real centerX + property real centerY + property real time + + SequentialAnimation { + running: true + loops: Animation.Infinite + ScriptAction { + script: { + centerX = Math.random() + centerY = Math.random() + } + } + NumberAnimation { + target: root + property: "time" + from: 0 + to: 1 + duration: 1000 + } + } + + fragmentShaderFilename: "shaders/shockwave.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml new file mode 100755 index 0000000..189d5d3 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectSobelEdgeDetection1.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "threshold" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real mixLevel: parameters.get(0).value + property real targetSize: 250 - (200 * mixLevel) // TODO: fix ... + property real resS: targetSize + property real resT: targetSize + + fragmentShaderFilename: "shaders/sobeledgedetection1.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectToon.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectToon.qml new file mode 100755 index 0000000..08f1849 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectToon.qml @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "threshold" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real threshold: parameters.get(0).value + property real targetSize: 250 - (200 * threshold) // TODO: fix ... + property real resS: targetSize + property real resT: targetSize + + // TODO + property real magTol: 0.3 + property real quantize: 8.0 + + fragmentShaderFilename: "shaders/toon.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectVignette.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectVignette.qml new file mode 100755 index 0000000..1120161 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectVignette.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + fragmentShaderFilename: "shaders/vignette.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWarhol.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWarhol.qml new file mode 100755 index 0000000..e96d052 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWarhol.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + fragmentShaderFilename: "shaders/warhol.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWobble.qml b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWobble.qml new file mode 100755 index 0000000..4cccf48 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Effects/EffectWobble.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Effect { + parameters: ListModel { + ListElement { + name: "amplitude" + value: 0.5 + } + } + + // Transform slider values, and bind result to shader uniforms + property real amplitude: parameters.get(0).value * 0.05 + + property real frequency: 20 + property real time: 0 + + NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } + + fragmentShaderFilename: "shaders/wobble.fsh" +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Logo.qml b/basicsuite/qt5-everywhere/demos/shaders/Logo.qml new file mode 100644 index 0000000..2e2617a --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Logo.qml @@ -0,0 +1,191 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: root + + property int logoSize: Math.min(parent.height, parent.width) / 2 + property int logoSizeDivider: 1 + property int logoState: 1 + property double posX: parent.width / 2 + property double posY: parent.height / 2 + property double rot: 0 + property double dx: 10 + property double dy: 10 + property double drot: 1 + property string explodeColor: "#ff3333" + + function play() { + randomValues(); + animationTimer.restart() + } + + function logoClicked() { + switch(root.logoState) { + case 1: { + parent.createNewLogos(root.posX,root.posY,logoSize,2) + parent.decreaseCounter(); + logo.visible = false; + root.logoState = 2; + root.explodeColor = "#33ff33" + explodeAnimation.restart() + break; + } + default: { + // return true if we must destroy this logo + if (parent.decreaseCounter(root.posX,root.posY) === true) { + logo.visible = false; + root.logoState = 2; + root.dx = 0; + root.dy = 0; + root.drot = 0; + root.explodeColor = "#ff3333" + explodeAnimation.restart() + } + else { // It was last logo, we will keep it + root.logoState = 1 + root.logoSizeDivider = 1 + root.explodeColor = "#3333ff" + explodeAnimation.restart() + } + break; + } + } + + } + + function randomValues() { + root.dx = Math.random()*5 + root.dy = Math.random()*5 + root.drot = Math.floor(Math.random()*10) - 5 + } + + function move() { + var x = root.posX + root.dx; + var y = root.posY + root.dy; + var limit = logoSize / logoState; + + // Check x + if (x + limit >= parent.width) { + x = parent.width - limit; + root.dx = -root.dx; + } + else if (x <= 0) { + x = 0; + root.dx = -root.dx; + } + + // Check y + if (y + limit >= parent.height) { + y = parent.height - limit; + root.dy = -root.dy; + } + else if (y <= 0) { + y = 0; + root.dy = -root.dy; + } + + root.posX = x + root.posY = y + root.rot = root.rot + root.drot + } + + ParticleSystem{ + id: particleSystem; + anchors.fill: logo + + Emitter { + id: emitter + anchors.fill: particleSystem + enabled: false + emitRate: 1000 + lifeSpan: 500 + size: logo.height * .5 + endSize: logo.height * .1 + velocity: AngleDirection { angleVariation: 360; magnitudeVariation: 160 } + } + + ImageParticle { + id: smokeParticle + source: "images/particle-smoke.png" + alpha: 0.3 + alphaVariation: 0.1 + color: root.explodeColor + } + } + + Timer { + id: animationTimer + interval: 20 + running: false + repeat: true + onTriggered: move(); + } + + Image { + id: logo + width: (logoSize / logoSizeDivider) + height: (logoSize / logoSizeDivider) + x: root.posX + y: root.posY + rotation: root.rot + source: "images/qt-logo.png" + + MouseArea { + anchors.fill: parent + onClicked: logoClicked(); + } + } + + SequentialAnimation { + id: explodeAnimation + running: false + ScriptAction { script: emitter.pulse(100); } + PauseAnimation { duration: 600 } + onRunningChanged: { + if (!explodeAnimation.running && root.logoState > 1) + root.destroy(); + } + } + +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml b/basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml new file mode 100644 index 0000000..1237305 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + anchors.fill: parent + + property int logoCount: 0 + + Image { + id: background + source: "images/wallpaper.png" + anchors.fill: root + } + + function createNewLogo(x,y,logoState) { + logoCount++; + var component = Qt.createComponent("Logo.qml") + if (component.status === Component.Ready) { + var logo = component.createObject(root, {"posX": x, "posY": y, "logoState": logoState, "logoSizeDivider" : logoState, "objectName": "logo"}); + logo.play(); + } + } + + function createNewLogos(x, y, logoSize, logoState) { + var newSize = logoSize / logoState; + var temp = logoSize - newSize; + + createNewLogo(x, y, logoState); + createNewLogo(x+temp, y, logoState); + createNewLogo(x+temp, y+temp, logoState); + createNewLogo(x, y+temp, logoState); + createNewLogo(x+logoSize/2-newSize/2, y+logoSize/2-newSize/2, logoState); + } + + function decreaseCounter() { + if (logoCount > 1) { + logoCount--; + return true; + } + return false; + } + + Component.onCompleted: { + var logoSize = Math.min(root.height, root.width) / 2; + createNewLogo(root.width/2 - logoSize/2, root.height/2 - logoSize/2, 1) + } +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/ParameterPanel.qml b/basicsuite/qt5-everywhere/demos/shaders/ParameterPanel.qml new file mode 100644 index 0000000..33dd5ea --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/ParameterPanel.qml @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: root + height: view.model.count * sliderHeight + color: "#BB333333" + property color lineColor: "black" + property real spacing: 10 + property real sliderHeight: 50 + property bool isMouseAbove: mouseAboveMonitor.containsMouse + + property ListModel model: ListModel { } + + MouseArea { + id: mouseAboveMonitor + anchors.fill: parent + hoverEnabled: true; + } + + Component { + id: editDelegate + + Item { + id: delegate + width: root.width + height: root.sliderHeight + + Text { + id: text + text: name + color: "white" + anchors { + top: parent.top + bottom: parent.bottom + left: parent.left + leftMargin: root.width * 0.05 + } + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + font.pixelSize: delegate.height * 0.3 + font.capitalization: Font.Capitalize + width: root.width * 0.35 + } + + Slider { + anchors { + verticalCenter: text.verticalCenter + left: text.right + leftMargin: root.width * 0.05 + right: parent.right + rightMargin: root.width * 0.05 + } + value: model.value + onValueChanged: view.model.setProperty(index, "value", value) + } + } + } + + ListView { + id: view + anchors.fill: parent + model: root.model + delegate: editDelegate + interactive: false + } +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/Slider.qml b/basicsuite/qt5-everywhere/demos/shaders/Slider.qml new file mode 100644 index 0000000..5ceefcc --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/Slider.qml @@ -0,0 +1,138 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: slider + + height: handleBack.height + // value is read/write. + property real value: 0 + property real maximum: 1 + property real minimum: 0 + property int xMax: width - handle.width + onXMaxChanged: updatePos() + onMinimumChanged: updatePos() + onValueChanged: if (!pressed) updatePos() + property bool mutable: true + property alias pressed : backgroundMouse.pressed + + signal valueChangedByHandle(int newValue) + + function updatePos() { + if (maximum > minimum) { + var pos = 0 + (value - minimum) * slider.xMax / (maximum - minimum); + pos = Math.min(pos, width - handle.width - 0); + pos = Math.max(pos, 0); + handle.x = pos; + } else { + handle.x = 0; + } + } + + Rectangle { + id: background + width: slider.width + anchors.verticalCenter: slider.verticalCenter + height: 2 + color: "#666666" + + MouseArea { + id: backgroundMouse + anchors.fill: parent + anchors.topMargin: -24 + anchors.bottomMargin: -24 + enabled: slider.mutable + drag.target: handle + drag.axis: Drag.XAxis + drag.minimumX: 0 + drag.maximumX: slider.xMax + onPressedChanged: { + value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); + valueChangedByHandle(value); + updatePos(); + } + onPositionChanged: { + value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); + valueChangedByHandle(value); + } + onWheel: { + value = Math.max(minimum, Math.min(maximum, value + (wheel.angleDelta.y > 0 ? 1 : -1) * (10 / slider.xMax) * (slider.maximum - slider.minimum))); + valueChangedByHandle(value); + updatePos(); + } + } + } + + Rectangle { + id: progress + height: 5 + anchors.verticalCenter: background.verticalCenter + anchors.left: background.left + anchors.right: handle.right + anchors.rightMargin: handle.width / 2 + visible: slider.enabled + color: "#98c66c" + } + + Rectangle { + id: handleBack + width: 40 + height: width + radius: width / 2 + color: "#8898c66c" + antialiasing: true + anchors.centerIn: handle + visible: handle.visible + } + + Rectangle { + id: handle + width: 14 + height: width + radius: width / 2 + antialiasing: true + color: "#98c66c" + anchors.verticalCenter: background.verticalCenter + visible: slider.enabled + } +} + diff --git a/basicsuite/qt5-everywhere/demos/shaders/images/particle-smoke.png b/basicsuite/qt5-everywhere/demos/shaders/images/particle-smoke.png new file mode 100644 index 0000000..b27f954 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/shaders/images/particle-smoke.png differ diff --git a/basicsuite/qt5-everywhere/demos/shaders/images/qt-logo.png b/basicsuite/qt5-everywhere/demos/shaders/images/qt-logo.png new file mode 100755 index 0000000..242bb28 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/shaders/images/qt-logo.png differ diff --git a/basicsuite/qt5-everywhere/demos/shaders/images/wallpaper.png b/basicsuite/qt5-everywhere/demos/shaders/images/wallpaper.png new file mode 100644 index 0000000..a499231 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/shaders/images/wallpaper.png differ diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/import.pro b/basicsuite/qt5-everywhere/demos/shaders/import/import.pro new file mode 100644 index 0000000..d72fb60 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/import/import.pro @@ -0,0 +1,13 @@ +CXX_MODULE = qml +TARGET = shaderreader +TARGETPATH = ShaderReader +IMPORT_VERSION = 1.0 + +QT += quick + +SOURCES = main.cpp \ + shaderfilereader.cpp \ + +HEADERS = shaderfilereader.h \ + +load(qml_plugin) diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/main.cpp b/basicsuite/qt5-everywhere/demos/shaders/import/main.cpp new file mode 100644 index 0000000..0475ea8 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/import/main.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include "shaderfilereader.h" + +QT_BEGIN_NAMESPACE + +class SensorExplorerDeclarativeModule : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json") +public: + virtual void registerTypes(const char *uri) + { + Q_ASSERT(QLatin1String(uri) == QLatin1String("ShaderReader")); + qmlRegisterType(uri, 1, 0, "ShaderFileReader"); + } +}; + +QT_END_NAMESPACE + +#include "main.moc" + diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/plugin.json b/basicsuite/qt5-everywhere/demos/shaders/import/plugin.json new file mode 100644 index 0000000..e69de29 diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/qmldir b/basicsuite/qt5-everywhere/demos/shaders/import/qmldir new file mode 100644 index 0000000..0c53031 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/import/qmldir @@ -0,0 +1,2 @@ +module ShaderReader +plugin shaderreader diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp new file mode 100644 index 0000000..36a3632 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "shaderfilereader.h" +#include +#include + +ShaderFileReader::ShaderFileReader(QObject* parent) + : QObject(parent) +{ + if (qEnvironmentVariableIsEmpty("QT_SHADER_PATH")) + setenv("QT_SHADER_PATH", "/data/user/qt/Qt5Everywhere/demos/shaders/",1); +} + +ShaderFileReader::~ShaderFileReader() +{ +} + +void ShaderFileReader::setFragmentShaderFilename(const QString &name) +{ + m_fragmentShaderFilename = name; + Q_EMIT fragmentShaderFilenameChanged(); +} + +void ShaderFileReader::setVertexShaderFilename(const QString &name) +{ + m_vertexShaderFilename = name; + Q_EMIT vertexShaderFilenameChanged(); +} + +QString ShaderFileReader::fragmentShader() const +{ + return readShaderFile(m_fragmentShaderFilename); +} + +QString ShaderFileReader::vertexShader() const +{ + return readShaderFile(m_vertexShaderFilename); +} + +QString ShaderFileReader::readShaderFile(const QString &fileName) const +{ + QString content; + QString path = qgetenv("QT_SHADER_PATH"); + QFile file(path.append(fileName)); + if (file.open(QIODevice::ReadOnly)) { + QTextStream stream(&file); + content = stream.readAll(); + file.close(); + } + return content; +} + diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h new file mode 100644 index 0000000..bfa82f7 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef SHADERFILEREADER_H +#define SHADERFILEREADER_H + +#include +#include + +class ShaderFileReader : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString fragmentShaderFilename READ fragmentShaderFilename + WRITE setFragmentShaderFilename NOTIFY fragmentShaderFilenameChanged) + Q_PROPERTY(QString vertexShaderFilename READ vertexShaderFilename + WRITE setVertexShaderFilename NOTIFY vertexShaderFilenameChanged) + + Q_PROPERTY(QString fragmentShader READ fragmentShader) + Q_PROPERTY(QString vertexShader READ vertexShader) + +public: + ShaderFileReader(QObject* parent = 0); + ~ShaderFileReader(); + + void setFragmentShaderFilename(const QString &name); + void setVertexShaderFilename(const QString &name); + QString fragmentShaderFilename() const { return m_fragmentShaderFilename; } + QString vertexShaderFilename() const { return m_vertexShaderFilename; } + + QString fragmentShader() const; + QString vertexShader() const; + +protected: + QString readShaderFile(const QString &fileName) const; + +Q_SIGNALS: + void fragmentShaderFilenameChanged(); + void vertexShaderFilenameChanged(); + +private: + QString m_fragmentShaderFilename; + QString m_vertexShaderFilename; +}; + +Q_DECLARE_METATYPE(ShaderFileReader*) + +#endif // SHADERFILEREADER_H diff --git a/basicsuite/qt5-everywhere/demos/shaders/main.qml b/basicsuite/qt5-everywhere/demos/shaders/main.qml new file mode 100755 index 0000000..c5f5d4c --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/main.qml @@ -0,0 +1,116 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: applicationWindow + anchors.fill:parent + color: "black" + property int margin: applicationWindow.height * 0.02 + + Content { + id: content + anchors.fill: parent + } + + Rectangle { + id: fx + anchors.right: applicationWindow.right + anchors.bottom: applicationWindow.bottom + anchors.margins: applicationWindow.margin + width: applicationWindow.width * 0.25 + height: applicationWindow.height * 0.08 + color: "#333333" + border.color: "#777777" + opacity: 0.5 + + Text { + anchors.centerIn: fx + color: "#ffffff" + text: effectSelectionPanel.effectName + font.pixelSize: fx.height * 0.5 + } + + MouseArea { + anchors.fill: parent + onPressed: fx.color = "#555555" + onReleased: fx.color = "#333333" + onClicked: effectSelectionPanel.visible = !effectSelectionPanel.visible; + } + } + + ParameterPanel { + id: parameterPanel + opacity: 0.7 + visible: effectSelectionPanel.visible && model.count !== 0 + width: applicationWindow.width * 0.4 + sliderHeight: applicationWindow.height * 0.15 + anchors { + bottom: effectSelectionPanel.bottom + right: effectSelectionPanel.left + } + } + + EffectSelectionPanel { + id: effectSelectionPanel + visible: false + opacity: 0.7 + anchors { + top: applicationWindow.top + right: applicationWindow.right + margins: applicationWindow.margin + } + width: fx.width + height: applicationWindow.height - fx.height - 2*applicationWindow.margin + itemHeight: fx.height + color: fx.color + + onClicked: { + content.effectSource = effectSource + parameterPanel.model = content.effect.parameters + } + } + + Component.onCompleted: { + content.init() + } +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders.pro b/basicsuite/qt5-everywhere/demos/shaders/shaders.pro new file mode 100644 index 0000000..de580fd --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS += \ + import \ diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/billboard.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/billboard.fsh new file mode 100755 index 0000000..baa9554 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/billboard.fsh @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html + +uniform float grid; +uniform float dividerValue; +uniform float step_x; +uniform float step_y; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + float offx = floor(uv.x / (grid * step_x)); + float offy = floor(uv.y / (grid * step_y)); + vec3 res = texture2D(source, vec2(offx * grid * step_x , offy * grid * step_y)).rgb; + vec2 prc = fract(uv / vec2(grid * step_x, grid * step_y)); + vec2 pw = pow(abs(prc - 0.5), vec2(2.0)); + float rs = pow(0.45, 2.0); + float gr = smoothstep(rs - 0.1, rs + 0.1, pw.x + pw.y); + float y = (res.r + res.g + res.b) / 3.0; + vec3 ra = res / y; + float ls = 0.3; + float lb = ceil(y / ls); + float lf = ls * lb + 0.3; + res = lf * res; + vec3 col = mix(res, vec3(0.1, 0.1, 0.1), gr); + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(col, 1.0); + else + gl_FragColor = qt_Opacity * texture2D(source, uv); +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/blackandwhite.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/blackandwhite.fsh new file mode 100755 index 0000000..40756c4 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/blackandwhite.fsh @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html + +uniform float threshold; +uniform float dividerValue; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec4 orig = texture2D(source, uv); + vec3 col = orig.rgb; + float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b; + y = y < threshold ? 0.0 : 1.0; + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(y, y, y, 1.0); + else + gl_FragColor = qt_Opacity * orig; +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/emboss.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/emboss.fsh new file mode 100755 index 0000000..bd13a0b --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/emboss.fsh @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html + +uniform float dividerValue; +const float step_w = 0.0015625; +const float step_h = 0.0027778; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; + vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; + vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; + vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; + vec3 t5 = texture2D(source, uv).rgb; + vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; + vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; + vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; + vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; + vec3 rr = -4.0 * t1 - 4.0 * t2 - 4.0 * t4 + 12.0 * t5; + float y = (rr.r + rr.g + rr.b) / 3.0; + vec3 col = vec3(y, y, y) + 0.3; + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(col, 1.0); + else + gl_FragColor = qt_Opacity * texture2D(source, uv); +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_h.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_h.fsh new file mode 100755 index 0000000..96ae8e4 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_h.fsh @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +uniform float dividerValue; +uniform float blurSize; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec4 c = vec4(0.0); + if (uv.x < dividerValue) { + c += texture2D(source, uv - vec2(4.0*blurSize, 0.0)) * 0.05; + c += texture2D(source, uv - vec2(3.0*blurSize, 0.0)) * 0.09; + c += texture2D(source, uv - vec2(2.0*blurSize, 0.0)) * 0.12; + c += texture2D(source, uv - vec2(1.0*blurSize, 0.0)) * 0.15; + c += texture2D(source, uv) * 0.18; + c += texture2D(source, uv + vec2(1.0*blurSize, 0.0)) * 0.15; + c += texture2D(source, uv + vec2(2.0*blurSize, 0.0)) * 0.12; + c += texture2D(source, uv + vec2(3.0*blurSize, 0.0)) * 0.09; + c += texture2D(source, uv + vec2(4.0*blurSize, 0.0)) * 0.05; + } else { + c = texture2D(source, qt_TexCoord0); + } + gl_FragColor = qt_Opacity * c; +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_v.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_v.fsh new file mode 100755 index 0000000..6bc7b8b --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/gaussianblur_v.fsh @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +uniform float dividerValue; +uniform float blurSize; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec4 c = vec4(0.0); + if (uv.x < dividerValue) { + c += texture2D(source, uv - vec2(0.0, 4.0*blurSize)) * 0.05; + c += texture2D(source, uv - vec2(0.0, 3.0*blurSize)) * 0.09; + c += texture2D(source, uv - vec2(0.0, 2.0*blurSize)) * 0.12; + c += texture2D(source, uv - vec2(0.0, 1.0*blurSize)) * 0.15; + c += texture2D(source, uv) * 0.18; + c += texture2D(source, uv + vec2(0.0, 1.0*blurSize)) * 0.15; + c += texture2D(source, uv + vec2(0.0, 2.0*blurSize)) * 0.12; + c += texture2D(source, uv + vec2(0.0, 3.0*blurSize)) * 0.09; + c += texture2D(source, uv + vec2(0.0, 4.0*blurSize)) * 0.05; + } else { + c = texture2D(source, qt_TexCoord0); + } + // First pass we don't apply opacity + gl_FragColor = c; +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/glow.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/glow.fsh new file mode 100755 index 0000000..e0adcfd --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/glow.fsh @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html + +uniform float dividerValue; +const float step_w = 0.0015625; +const float step_h = 0.0027778; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; + vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; + vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; + vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; + vec3 t5 = texture2D(source, uv).rgb; + vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; + vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; + vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; + vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; + vec3 xx = t1 + 2.0*t2 + t3 - t7 - 2.0*t8 - t9; + vec3 yy = t1 - t3 + 2.0*t4 - 2.0*t6 + t7 - t9; + vec3 rr = sqrt(xx * xx + yy * yy); + vec3 col = rr * 2.0 * t5; + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(col, 1.0); + else + gl_FragColor = qt_Opacity * texture2D(source, uv); +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/isolate.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/isolate.fsh new file mode 100755 index 0000000..0f25bfa --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/isolate.fsh @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html + +uniform float targetHue; +uniform float windowWidth; +uniform float dividerValue; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void rgb2hsl(vec3 rgb, out float h, out float s, float l) +{ + float maxval = max(rgb.r, max(rgb.g, rgb.b)); + float minval = min(rgb.r, min(rgb.g, rgb.b)); + float delta = maxval - minval; + l = (minval + maxval) / 2.0; + s = 0.0; + if (l > 0.0 && l < 1.0) + s = delta / (l < 0.5 ? 2.0 * l : 2.0 - 2.0 * l); + h = 0.0; + if (delta > 0.0) + { + if (rgb.r == maxval && rgb.g != maxval) + h += (rgb.g - rgb.b ) / delta; + if (rgb.g == maxval && rgb.b != maxval) + h += 2.0 + (rgb.b - rgb.r) / delta; + if (rgb.b == maxval && rgb.r != maxval) + h += 4.0 + (rgb.r - rgb.g) / delta; + h *= 60.0; + } +} + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec3 col = texture2D(source, uv).rgb; + float h, s, l; + rgb2hsl(col, h, s, l); + float h2 = (h > targetHue) ? h - 360.0 : h + 360.0; + float y = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b; + vec3 result; + if (uv.x > dividerValue || (abs(h - targetHue) < windowWidth) || (abs(h2 - targetHue) < windowWidth)) + result = col; + else + result = vec3(y, y, y); + gl_FragColor = qt_Opacity * vec4(result, 1.0); +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/pixelate.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/pixelate.fsh new file mode 100755 index 0000000..922d79b --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/pixelate.fsh @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://www.geeks3d.com/20101029/shader-library-pixelation-post-processing-effect-glsl/ + +uniform float dividerValue; +uniform float granularity; +uniform float targetWidth; +uniform float targetHeight; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec2 tc = qt_TexCoord0; + if (uv.x < dividerValue && granularity > 0.0) { + float dx = granularity / targetWidth; + float dy = granularity / targetHeight; + tc = vec2(dx*(floor(uv.x/dx) + 0.5), + dy*(floor(uv.y/dy) + 0.5)); + } + gl_FragColor = qt_Opacity * texture2D(source, tc); +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/posterize.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/posterize.fsh new file mode 100755 index 0000000..e5c77ce --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/posterize.fsh @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://www.geeks3d.com/20091027/shader-library-posterization-post-processing-effect-glsl/ + +uniform float dividerValue; +uniform float gamma; +uniform float numColors; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec4 c = vec4(0.0); + if (uv.x < dividerValue) { + vec3 x = texture2D(source, uv).rgb; + x = pow(x, vec3(gamma, gamma, gamma)); + x = x * numColors; + x = floor(x); + x = x / numColors; + x = pow(x, vec3(1.0/gamma)); + c = vec4(x, 1.0); + } else { + c = texture2D(source, uv); + } + gl_FragColor = qt_Opacity * c; +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/ripple.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/ripple.fsh new file mode 100755 index 0000000..6d4187c --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/ripple.fsh @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://labs.qt.nokia.com/2011/03/22/the-convenient-power-of-qml-scene-graph/ + +uniform float dividerValue; +uniform float targetWidth; +uniform float targetHeight; +uniform float time; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +const float PI = 3.1415926535; +const int ITER = 7; +const float RATE = 0.1; +uniform float amplitude; +uniform float n; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec2 tc = uv; + vec2 p = vec2(-1.0 + 2.0 * gl_FragCoord.x / targetWidth, -(-1.0 + 2.0 * gl_FragCoord.y / targetHeight)); + float diffx = 0.0; + float diffy = 0.0; + vec4 col; + if (uv.x < dividerValue) { + for (int i=0; i= (time - shock.z))) { + float diff = (distance - time); + float powDiff = 1.0 - pow(abs(diff*shock.x), shock.y*weight); + float diffTime = diff * powDiff; + vec2 diffUV = normalize(uv - center); + tc += (diffUV * diffTime); + } + } + gl_FragColor = qt_Opacity * texture2D(source, tc); +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/sobeledgedetection1.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/sobeledgedetection1.fsh new file mode 100755 index 0000000..96732fa --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/sobeledgedetection1.fsh @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on "Graphics Shaders: Theory and Practice" (http://cgeducation.org/ShadersBook/) + +uniform float dividerValue; +uniform float mixLevel; +uniform float resS; +uniform float resT; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec4 c = vec4(0.0); + if (uv.x < dividerValue) { + vec2 st = qt_TexCoord0.st; + vec3 irgb = texture2D(source, st).rgb; + vec2 stp0 = vec2(1.0 / resS, 0.0); + vec2 st0p = vec2(0.0 , 1.0 / resT); + vec2 stpp = vec2(1.0 / resS, 1.0 / resT); + vec2 stpm = vec2(1.0 / resS, -1.0 / resT); + const vec3 W = vec3(0.2125, 0.7154, 0.0721); + float i00 = dot(texture2D(source, st).rgb, W); + float im1m1 = dot(texture2D(source, st-stpp).rgb, W); + float ip1p1 = dot(texture2D(source, st+stpp).rgb, W); + float im1p1 = dot(texture2D(source, st-stpm).rgb, W); + float ip1m1 = dot(texture2D(source, st+stpm).rgb, W); + float im10 = dot(texture2D(source, st-stp0).rgb, W); + float ip10 = dot(texture2D(source, st+stp0).rgb, W); + float i0m1 = dot(texture2D(source, st-st0p).rgb, W); + float i0p1 = dot(texture2D(source, st+st0p).rgb, W); + float h = -1.0*im1p1 - 2.0*i0p1 - 1.0*ip1p1 + 1.0*im1m1 + 2.0*i0m1 + 1.0*ip1m1; + float v = -1.0*im1m1 - 2.0*im10 - 1.0*im1p1 + 1.0*ip1m1 + 2.0*ip10 + 1.0*ip1p1; + float mag = 1.0 - length(vec2(h, v)); + vec3 target = vec3(mag, mag, mag); + c = vec4(target, 1.0); + } else { + c = texture2D(source, qt_TexCoord0); + } + gl_FragColor = qt_Opacity * c; +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/toon.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/toon.fsh new file mode 100755 index 0000000..2814dfb --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/toon.fsh @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://www.geeks3d.com/20101029/shader-library-pixelation-post-processing-effect-glsl/ + +uniform float dividerValue; +uniform float threshold; +uniform float resS; +uniform float resT; +uniform float magTol; +uniform float quantize; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec4 color = vec4(1.0, 0.0, 0.0, 1.1); + vec2 uv = qt_TexCoord0.xy; + if (uv.x < dividerValue) { + vec2 st = qt_TexCoord0.st; + vec3 rgb = texture2D(source, st).rgb; + vec2 stp0 = vec2(1.0/resS, 0.0); + vec2 st0p = vec2(0.0 , 1.0/resT); + vec2 stpp = vec2(1.0/resS, 1.0/resT); + vec2 stpm = vec2(1.0/resS, -1.0/resT); + float i00 = dot( texture2D(source, st).rgb, vec3(0.2125,0.7154,0.0721)); + float im1m1 = dot( texture2D(source, st-stpp).rgb, vec3(0.2125,0.7154,0.0721)); + float ip1p1 = dot( texture2D(source, st+stpp).rgb, vec3(0.2125,0.7154,0.0721)); + float im1p1 = dot( texture2D(source, st-stpm).rgb, vec3(0.2125,0.7154,0.0721)); + float ip1m1 = dot( texture2D(source, st+stpm).rgb, vec3(0.2125,0.7154,0.0721)); + float im10 = dot( texture2D(source, st-stp0).rgb, vec3(0.2125,0.7154,0.0721)); + float ip10 = dot( texture2D(source, st+stp0).rgb, vec3(0.2125,0.7154,0.0721)); + float i0m1 = dot( texture2D(source, st-st0p).rgb, vec3(0.2125,0.7154,0.0721)); + float i0p1 = dot( texture2D(source, st+st0p).rgb, vec3(0.2125,0.7154,0.0721)); + float h = -1.*im1p1 - 2.*i0p1 - 1.*ip1p1 + 1.*im1m1 + 2.*i0m1 + 1.*ip1m1; + float v = -1.*im1m1 - 2.*im10 - 1.*im1p1 + 1.*ip1m1 + 2.*ip10 + 1.*ip1p1; + float mag = sqrt(h*h + v*v); + if (mag > magTol) { + color = vec4(0.0, 0.0, 0.0, 1.0); + } + else { + rgb.rgb *= quantize; + rgb.rgb += vec3(0.5, 0.5, 0.5); + ivec3 irgb = ivec3(rgb.rgb); + rgb.rgb = vec3(irgb) / quantize; + color = vec4(rgb, 1.0); + } + } else { + color = texture2D(source, uv); + } + gl_FragColor = qt_Opacity * color; +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/vignette.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/vignette.fsh new file mode 100755 index 0000000..bd20c8e --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/vignette.fsh @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html + +uniform float dividerValue; +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec4 orig = texture2D(source, uv); + float cr = pow(0.1, 2.0); + float pt = pow(uv.x - 0.5, 2.0) + pow(uv.y - 0.5, 2.0); + float d = pt - cr; + float cf = 1.0; + if (d > 0.0) + cf = 1.0 - 2.0 * d; + vec3 col = cf * orig.rgb; + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(col, 1.0); + else + gl_FragColor = qt_Opacity * orig; +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/warhol.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/warhol.fsh new file mode 100755 index 0000000..6852495 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/warhol.fsh @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html + +uniform float dividerValue; +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec4 orig = texture2D(source, uv); + vec3 col = orig.rgb; + float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b; + y = y < 0.3 ? 0.0 : (y < 0.6 ? 0.5 : 1.0); + if (y == 0.5) + col = vec3(0.8, 0.0, 0.0); + else if (y == 1.0) + col = vec3(0.9, 0.9, 0.0); + else + col = vec3(0.0, 0.0, 0.0); + if (uv.x < dividerValue) + gl_FragColor = qt_Opacity * vec4(col, 1.0); + else + gl_FragColor = qt_Opacity * orig; +} diff --git a/basicsuite/qt5-everywhere/demos/shaders/shaders/wobble.fsh b/basicsuite/qt5-everywhere/demos/shaders/shaders/wobble.fsh new file mode 100755 index 0000000..1670de3 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/shaders/shaders/wobble.fsh @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Based on http://labs.qt.nokia.com/2011/03/22/the-convenient-power-of-qml-scene-graph/ + +uniform float amplitude; +uniform float dividerValue; +uniform float frequency; +uniform float time; + +uniform sampler2D source; +uniform lowp float qt_Opacity; +varying vec2 qt_TexCoord0; + +void main() +{ + vec2 uv = qt_TexCoord0.xy; + vec2 tc = qt_TexCoord0; + if (uv.x < dividerValue) { + vec2 p = sin(time + frequency * qt_TexCoord0); + tc += amplitude * vec2(p.y, -p.x); + } + gl_FragColor = qt_Opacity * texture2D(source, tc); +} diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/AndroidDelegate.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/AndroidDelegate.qml new file mode 100644 index 0000000..21160eb --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/AndroidDelegate.qml @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 + +Item { + id: root + width: parent.width + height: app.height*.1 + + property alias text: textitem.text + signal clicked + + Rectangle { + anchors.fill: parent + color: "#11ffffff" + visible: mouse.pressed + } + + Text { + id: textitem + color: "white" + font.pixelSize: root.height*.6 + text: modelData + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: 30 + } + + Rectangle { + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: 15 + height: 1 + color: "#424246" + } + + Image { + anchors.right: parent.right + anchors.rightMargin: 20 + anchors.verticalCenter: parent.verticalCenter + height: root.height*.8 + width: height + source: "../images/navigation_next_item.png" + } + + MouseArea { + id: mouse + anchors.fill: parent + onClicked: root.clicked() + + } +} diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml new file mode 100644 index 0000000..63f9646 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml @@ -0,0 +1,121 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + anchors {leftMargin: width*.1; rightMargin: width*.1} + + property real progress: 0 + SequentialAnimation on progress { + loops: Animation.Infinite + running: true + NumberAnimation { + from: 0 + to: 1 + duration: 3000 + } + NumberAnimation { + from: 1 + to: 0 + duration: 3000 + } + } + + Column { + spacing: 40 + anchors.centerIn: parent + + Button { + anchors.margins: 20 + text: "Press me" + style: touchStyle + } + + Button { + anchors.margins: 20 + style: touchStyle + text: "Press me too" + } + + Button { + anchors.margins: 20 + style: touchStyle + text: "Dont press me" + onClicked: if (pageStack) pageStack.pop() + } + + } + + Component { + id: touchStyle + ButtonStyle { + panel: Item { + implicitHeight: 50 + implicitWidth: 320 + BorderImage { + anchors.fill: parent + antialiasing: true + border.bottom: 8 + border.top: 8 + border.left: 8 + border.right: 8 + anchors.margins: control.pressed ? -4 : 0 + source: control.pressed ? "../images/button_pressed.png" : "../images/button_default.png" + Text { + text: control.text + anchors.centerIn: parent + color: "white" + font.pixelSize: 23 + renderType: Text.NativeRendering + } + } + } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/CustomAppWindow.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/CustomAppWindow.qml new file mode 100644 index 0000000..e0e7bcd --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/CustomAppWindow.qml @@ -0,0 +1,181 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick.Window 2.1 +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Layouts 1.0 +import QtQuick.Controls.Private 1.0 + +/*! + \qmltype ApplicationWindow + \since QtQuick.Controls 1.0 + \inqmlmodule QtQuick.Controls 1.0 + \ingroup applicationwindow + \brief Provides a top-level application window. + + ApplicationWindow is a \l Window that adds convenience for positioning items, + such as \l MenuBar, \l ToolBar, and \l StatusBar in a platform independent + manner. + + \code + ApplicationWindow { + id: window + menuBar: MenuBar { + Menu { MenuItem {...} } + Menu { MenuItem {...} } + } + + toolBar: ToolBar { + RowLayout { + anchors.fill: parent + ToolButton {...} + } + } + + TabView { + id: myContent + anchors.fill: parent + ... + } + } + \endcode +*/ + +Rectangle { + id: root + + /*! + \qmlproperty MenuBar ApplicationWindow::menuBar + + This property holds the \l MenuBar. + + By default, this value is not set. + */ + property MenuBar menuBar: null + + /*! + \qmlproperty Item ApplicationWindow::toolBar + + This property holds the toolbar \l Item. + + It can be set to any Item type, but is generally used with \l ToolBar. + + By default, this value is not set. When you set the toolbar item, it will + be anchored automatically into the application window. + */ + property Item toolBar + + /*! + \qmlproperty Item ApplicationWindow::statusBar + + This property holds the status bar \l Item. + + It can be set to any Item type, but is generally used with \l StatusBar. + + By default, this value is not set. When you set the status bar item, it + will be anchored automatically into the application window. + */ + property Item statusBar + + onToolBarChanged: { if (toolBar) { toolBar.parent = toolBarArea } } + + onStatusBarChanged: { if (statusBar) { statusBar.parent = statusBarArea } } + + /*! \internal */ + default property alias data: contentArea.data + + color: syspal.window + + SystemPalette {id: syspal} + + Item { + id: backgroundItem + anchors.fill: parent + + Item { + id: toolBarArea + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + height: childrenRect.height + } + + Item { + id: contentArea + anchors.top: toolBarArea.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: statusBarArea.top + } + + Item { + id: statusBarArea + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + height: childrenRect.height + } + + onVisibleChanged: if (visible && menuBar) menuBar.__parentWindow = root + + states: State { + name: "hasMenuBar" + when: menuBar && !menuBar.__isNative + + ParentChange { + target: menuBar.__contentItem + parent: backgroundItem + } + + PropertyChanges { + target: menuBar.__contentItem + x: 0 + y: 0 + width: backgroundItem.width + } + + AnchorChanges { + target: toolBarArea + anchors.top: menuBar.__contentItem.bottom + } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml new file mode 100644 index 0000000..dc0f552 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + property real progress: 0 + SequentialAnimation on progress { + loops: Animation.Infinite + running: true + NumberAnimation { + from: 0 + to: 1 + duration: 3000 + } + NumberAnimation { + from: 1 + to: 0 + duration: 3000 + } + } + + Column { + spacing: 40 + anchors.centerIn: parent + + ProgressBar { + anchors.margins: 20 + style: touchStyle + width: 400 + value: progress + } + + ProgressBar { + anchors.margins: 20 + style: touchStyle + width: 400 + value: 1 - progress + } + + ProgressBar { + anchors.margins: 20 + style: touchStyle + value: 1 + width: 400 + } + + } + + Component { + id: touchStyle + ProgressBarStyle { + panel: Rectangle { + implicitHeight: 15 + implicitWidth: 400 + color: "#444" + opacity: 0.8 + Rectangle { + antialiasing: true + radius: 1 + color: "#468bb7" + height: parent.height + width: parent.width * control.value / control.maximumValue + } + } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml new file mode 100644 index 0000000..a1c0045 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + id: root + width: parent.width + height: parent.height + + Column { + spacing: 12 + anchors.centerIn: parent + + Slider { + anchors.margins: 20 + style: touchStyle + value: 0 + } + Slider { + anchors.margins: 20 + style: touchStyle + value: 0.5 + } + Slider { + anchors.margins: 20 + style: touchStyle + value: 1.0 + } + } + + Component { + id: touchStyle + SliderStyle { + handle: Rectangle { + width: 30 + height: 30 + radius: height + antialiasing: true + color: Qt.lighter("#468bb7", 1.2) + } + + groove: Item { + implicitHeight: 50 + implicitWidth: root.width + Rectangle { + height: 8 + width: parent.width + anchors.verticalCenter: parent.verticalCenter + color: "#444" + opacity: 0.8 + Rectangle { + antialiasing: true + radius: 1 + color: "#468bb7" + height: parent.height + width: parent.width * control.value / control.maximumValue + } + } + } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml new file mode 100644 index 0000000..c96314b --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + TabView { + anchors.fill: parent + style: touchStyle + Tab { + title: "Buttons" + ButtonPage{ visible: true } + } + Tab { + title: "Sliders" + SliderPage{ visible: true } + } + Tab { + title: "Progress" + ProgressBarPage{ visible: true } + } + } + + Component { + id: touchStyle + TabViewStyle { + tabsAlignment: Qt.AlignVCenter + tabOverlap: 0 + frame: Item { } + tab: Item { + implicitWidth: control.width/control.count + implicitHeight: 50 + BorderImage { + anchors.fill: parent + border.bottom: 8 + border.top: 8 + source: tab.selected ? "../images/tab_selected.png":"../images/tabs_standard.png" + Text { + anchors.centerIn: parent + color: "white" + text: tab.title.toUpperCase() + font.pixelSize: 16 + } + Rectangle { + visible: index > 0 + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.margins: 10 + width:1 + color: "#3a3a3a" + } + } + } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml new file mode 100644 index 0000000..605afef --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + property real progress: 0 + SequentialAnimation on progress { + loops: Animation.Infinite + running: true + NumberAnimation { + from: 0 + to: 1 + duration: 3000 + } + NumberAnimation { + from: 1 + to: 0 + duration: 3000 + } + } + + Column { + spacing: 40 + anchors.centerIn: parent + + TextField { + anchors.margins: 20 + text: "Text input" + style: touchStyle + } + + TextField { + anchors.margins: 20 + text: "Readonly Text input" + style: touchStyle + readOnly: true + } + } + Component { + id: touchStyle + + TextFieldStyle { + textColor: "white" + font.pixelSize: 28 + background: Item { + implicitHeight: 50 + implicitWidth: 320 + BorderImage { + source: "../images/textinput.png" + border.left: 8 + border.right: 8 + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + } + } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/images/NOTICE.txt b/basicsuite/qt5-everywhere/demos/touchgallery/images/NOTICE.txt new file mode 100644 index 0000000..93a9afc --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/touchgallery/images/NOTICE.txt @@ -0,0 +1,2 @@ +Notice some of these images are derived from Google applications resources. They were provided under the following license: +You may use the materials in this directory without restriction to develop your apps and to use in your apps. diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/images/button_default.png b/basicsuite/qt5-everywhere/demos/touchgallery/images/button_default.png new file mode 100644 index 0000000..6d6cfd9 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/touchgallery/images/button_default.png differ diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/images/button_pressed.png b/basicsuite/qt5-everywhere/demos/touchgallery/images/button_pressed.png new file mode 100644 index 0000000..ab78b6e Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/touchgallery/images/button_pressed.png differ diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/images/navigation_next_item.png b/basicsuite/qt5-everywhere/demos/touchgallery/images/navigation_next_item.png new file mode 100644 index 0000000..6665c9d Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/touchgallery/images/navigation_next_item.png differ diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/images/navigation_previous_item.png b/basicsuite/qt5-everywhere/demos/touchgallery/images/navigation_previous_item.png new file mode 100644 index 0000000..f8be011 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/touchgallery/images/navigation_previous_item.png differ diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/images/tab_selected.png b/basicsuite/qt5-everywhere/demos/touchgallery/images/tab_selected.png new file mode 100644 index 0000000..2345f7a Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/touchgallery/images/tab_selected.png differ diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/images/tabs_standard.png b/basicsuite/qt5-everywhere/demos/touchgallery/images/tabs_standard.png new file mode 100644 index 0000000..7140ab7 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/touchgallery/images/tabs_standard.png differ diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/images/textinput.png b/basicsuite/qt5-everywhere/demos/touchgallery/images/textinput.png new file mode 100644 index 0000000..b0256db Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/touchgallery/images/textinput.png differ diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/images/toolbar.png b/basicsuite/qt5-everywhere/demos/touchgallery/images/toolbar.png new file mode 100644 index 0000000..e9eba4c Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/touchgallery/images/toolbar.png differ diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/main.qml b/basicsuite/qt5-everywhere/demos/touchgallery/main.qml new file mode 100644 index 0000000..95d737b --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/touchgallery/main.qml @@ -0,0 +1,135 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import "content" + +CustomAppWindow { + id: app + anchors.fill: parent + color: "black" + + toolBar: BorderImage { + border.bottom: 8 + source: "images/toolbar.png" + width: parent.width + height: app.height*.1 + + Rectangle { + id: backButton + width: opacity ? height : 0 + anchors.left: parent.left + anchors.leftMargin: 20 + opacity: pageStack.depth > 1 ? 1 : 0 + anchors.verticalCenter: parent.verticalCenter + antialiasing: true + height: parent.height* .8 + radius: 4 + color: backmouse.pressed ? "#222" : "transparent" + Behavior on opacity { NumberAnimation{} } + Image { + anchors.verticalCenter: parent.verticalCenter + source: "images/navigation_previous_item.png" + height: parent.height*.8 + width: height + } + MouseArea { + id: backmouse + anchors.fill: parent + anchors.margins: -10 + onClicked: pageStack.pop() + } + } + + Text { + font.pixelSize: app.height*.07 + Behavior on x { NumberAnimation{ easing.type: Easing.OutCubic} } + x: backButton.x + backButton.width + 20 + anchors.verticalCenter: parent.verticalCenter + color: "white" + text: "Widget Gallery" + } +} + + ListModel { + id: pageModel + ListElement { + title: "Buttons" + page: "content/ButtonPage.qml" + } + ListElement { + title: "Sliders" + page: "content/SliderPage.qml" + } + ListElement { + title: "ProgressBar" + page: "content/ProgressBarPage.qml" + } + ListElement { + title: "Tabs" + page: "content/TabBarPage.qml" + } + ListElement { + title: "TextInput" + page: "content/TextInputPage.qml" + } + } + + StackView { + id: pageStack + anchors.fill: parent + + initialItem: Item { + width: parent.width + height: parent.height + ListView { + model: pageModel + anchors.fill: parent + clip: true + delegate: AndroidDelegate { + text: title + onClicked: pageStack.push(Qt.resolvedUrl(page)) + } + } + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/video/Content.qml b/basicsuite/qt5-everywhere/demos/video/Content.qml new file mode 100644 index 0000000..de25f13 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/Content.qml @@ -0,0 +1,67 @@ + /**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtMultimedia 5.0 + +Rectangle { + id: root + property alias videoPlayer: videoContent + + color: "black" + + ContentVideo { + id: videoContent + anchors.fill: root + visible: mediaSource == "" ? false : true + } + + function openVideo(path) { + stop(); + videoContent.mediaSource = path + } + + function stop() { + if (videoContent.mediaSource !== undefined) { + videoContent.stop(); + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/video/ContentVideo.qml b/basicsuite/qt5-everywhere/demos/video/ContentVideo.qml new file mode 100644 index 0000000..83c9ab7 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/ContentVideo.qml @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtMultimedia 5.0 + +VideoOutput { + id: videoOutput + source: mediaPlayer + fillMode: VideoOutput.PreserveAspectFit + property alias mediaSource: mediaPlayer.source + property alias mediaPlayer: mediaPlayer + property bool isPlaying: false + + MediaPlayer { + id: mediaPlayer + autoLoad: true + autoPlay: true + + onPlaybackStateChanged: { + if (playbackState === MediaPlayer.PlayingState) + videoOutput.isPlaying = true; + else + videoOutput.isPlaying = false; + } + + Component.onDestruction: { + mediaPlayer.stop() + } + } + function play() { mediaPlayer.play() } + function stop() { mediaPlayer.stop() } +} diff --git a/basicsuite/qt5-everywhere/demos/video/ControlBar.qml b/basicsuite/qt5-everywhere/demos/video/ControlBar.qml new file mode 100644 index 0000000..c8e3b97 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/ControlBar.qml @@ -0,0 +1,290 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtMultimedia 5.0 + +Item { + id: controlBar + anchors.fill: parent + + property MediaPlayer mediaPlayer: null + property bool isMouseAbove: false + property int margin: applicationWindow.width * 0.01 + + signal openURL() + + state: "VISIBLE" + + onMediaPlayerChanged: { + if (mediaPlayer === null) + return; + volumeControl.volume = mediaPlayer.volume; + } + + function updateStatusText() + { + var strText = "" + switch (mediaPlayer.status) { + case MediaPlayer.NoMedia: strText = "No Media"; break; + case MediaPlayer.Loading: strText = "Loading..."; break; + case MediaPlayer.Buffering: strText = "Buffering..."; break; + case MediaPlayer.Stalled: strText = "Stalled"; break; + case MediaPlayer.EndOfMedia: strText = "EndOfMedia"; break; + case MediaPlayer.InvalidMedia: strText = "InvalidMedia"; break; + case MediaPlayer.UnknownStatus: strText = "UnknownStatus"; break; + default: strText = ""; break; + } + + statusText.text = strText; + } + + Rectangle { + anchors.right: parent.right + anchors.top: parent.top + width: applicationWindow.height * 0.12 + height: width + color: "#88333333" + + Image { + id: closeImage + source: "images/CloseButton.png" + anchors.centerIn: parent + width: 0.5*parent.height + height: width + opacity: closeMouseArea.pressed ? 0.6 : 1 + smooth: true + } + + MouseArea { + id: closeMouseArea + anchors.fill: parent + onClicked: { + if (mediaPlayer !== null) { + mediaPlayer.stop(); + mediaPlayer.source = ""; + } + + videoSelector.show(); + } + } + } + + Rectangle { + id: bottomBar + height: parent.height * 0.2 + color: "#88333333" + anchors.left: parent.left + anchors.bottom: parent.bottom + anchors.right: parent.right + + property double playBackHeight: height*0.48 + property double seekHeight: height*0.48 + + VolumeControl { + id: volumeControl + anchors.verticalCenter: playbackControl.verticalCenter + anchors.left: bottomBar.left + anchors.leftMargin: bottomBar.margin + height: bottomBar.playBackHeight + width: parent.width * 0.3 + onVolumeChanged: { + if (mediaPlayer !== null) + mediaPlayer.volume = volume + } + + Connections { + target: mediaPlayer + onVolumeChanged: volumeControl.volume = mediaPlayer.volume + } + } + + //Playback Controls + PlaybackControl { + id: playbackControl + anchors.horizontalCenter: bottomBar.horizontalCenter + anchors.top: bottomBar.top + anchors.topMargin: bottomBar.margin + height: bottomBar.playBackHeight + + onPlayButtonPressed: { + if (mediaPlayer === null) + return; + + if (isPlaying) { + mediaPlayer.pause(); + } else { + mediaPlayer.play(); + } + } + } + + Text { + id: statusText + anchors.right: parent.right + anchors.verticalCenter: playbackControl.verticalCenter + anchors.rightMargin: bottomBar.margin + verticalAlignment: Text.AlignVCenter + height: bottomBar.playBackHeight + font.pixelSize: playbackControl.height * 0.5 + color: "white" + } + + //Seek controls + SeekControl { + id: seekControl + anchors.bottom: bottomBar.bottom + anchors.right: bottomBar.right + anchors.left: bottomBar.left + height: bottomBar.seekHeight + anchors.leftMargin: bottomBar.margin + anchors.rightMargin: bottomBar.margin + + enabled: playbackControl.isPlaybackEnabled + duration: mediaPlayer !== null ? mediaPlayer.duration : 0 + + onSeekValueChanged: { + if (mediaPlayer !== null) { + mediaPlayer.seek(newPosition); + position = mediaPlayer.position; + } + } + + Component.onCompleted: { + if (mediaPlayer !== null) + seekable = mediaPlayer.seekable; + } + } + + Connections { + target: mediaPlayer + onPositionChanged: { + if (!seekControl.pressed) seekControl.position = mediaPlayer.position; + } + onStatusChanged: { + if ((mediaPlayer.status == MediaPlayer.Loaded) || (mediaPlayer.status == MediaPlayer.Buffered) || mediaPlayer.status === MediaPlayer.Buffering || mediaPlayer.status === MediaPlayer.EndOfMedia) + playbackControl.isPlaybackEnabled = true; + else + playbackControl.isPlaybackEnabled = false; + updateStatusText(); + } + onErrorChanged: { + updateStatusText(); + } + + onPlaybackStateChanged: { + if (mediaPlayer.playbackState === MediaPlayer.PlayingState) { + playbackControl.isPlaying = true; + applicationWindow.resetTimer(); + } else { + show(); + playbackControl.isPlaying = false; + } + } + + onSeekableChanged: { + seekControl.seekable = mediaPlayer.seekable; + } + } + } + + //Usage: give the value you wish to modify position, + //returns a value between 0 and duration + function normalizeSeek(value) { + var newPosition = mediaPlayer.position + value; + if (newPosition < 0) + newPosition = 0; + else if (newPosition > mediaPlayer.duration) + newPosition = mediaPlayer.duration; + return newPosition; + } + + function hide() { + controlBar.state = "HIDDEN"; + } + + function show() { + controlBar.state = "VISIBLE"; + } + + states: [ + State { + name: "HIDDEN" + PropertyChanges { + target: controlBar + opacity: 0.0 + } + }, + State { + name: "VISIBLE" + PropertyChanges { + target: controlBar + opacity: 0.95 + } + } + ] + + transitions: [ + Transition { + from: "HIDDEN" + to: "VISIBLE" + NumberAnimation { + id: showAnimation + target: controlBar + properties: "opacity" + from: 0.0 + to: 1.0 + duration: 200 + } + }, + Transition { + from: "VISIBLE" + to: "HIDDEN" + NumberAnimation { + id: hideAnimation + target: controlBar + properties: "opacity" + from: 0.95 + to: 0.0 + duration: 200 + } + } + ] +} diff --git a/basicsuite/qt5-everywhere/demos/video/ImageButton.qml b/basicsuite/qt5-everywhere/demos/video/ImageButton.qml new file mode 100644 index 0000000..937a075 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/ImageButton.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + + height: parent.height * 0.8 + width: image.width * image.scale + + property alias enabled: mouseArea.enabled + property alias imageSource: image.source + + property bool checkable: false + property bool checked: false + property alias hover: mouseArea.containsMouse + property alias pressed: mouseArea.pressed + property double imageSize: 0.9*root.height + + opacity: enabled ? 1.0 : 0.3 + signal clicked + + Image { + id: image + anchors.centerIn: parent + scale: root.height / height + visible: true + opacity: pressed ? 0.6 : 1 + smooth: true + } + + MouseArea { + id: mouseArea + hoverEnabled: true + anchors.fill: root + onPositionChanged: applicationWindow.resetTimer() + onClicked: root.clicked(); + } +} diff --git a/basicsuite/qt5-everywhere/demos/video/PlaybackControl.qml b/basicsuite/qt5-everywhere/demos/video/PlaybackControl.qml new file mode 100644 index 0000000..9716825 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/PlaybackControl.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Row { + id: root + spacing: controlBar.margin + + property bool isPlaybackEnabled: false + property bool isPlaying: false + + signal playButtonPressed() + + ImageButton { + id: playButton + enabled: isPlaybackEnabled + imageSource: !isPlaying ? "images/PlayButton.png" : "images/PauseButton.png" + anchors.verticalCenter: root.verticalCenter + onClicked: { + playButtonPressed(); + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/video/ScrollBar.qml b/basicsuite/qt5-everywhere/demos/video/ScrollBar.qml new file mode 100644 index 0000000..37c2eab --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/ScrollBar.qml @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: scrollBar + + // The properties that define the scrollbar's state. + // position and pageSize are in the range 0.0 - 1.0. They are relative to the + // height of the page, i.e. a pageSize of 0.5 means that you can see 50% + // of the height of the view. + property real position + property real pageSize + + // A light, semi-transparent background + Rectangle { + id: background + anchors.fill: parent + radius: width/2 - 1 + color: "transparent" + } + + Rectangle { + x: scrollBar.position * (scrollBar.width-2) + 1 + y: 1 + width: scrollBar.pageSize * (scrollBar.width-2) + height: parent.height + radius: height/2 - 1 + color: "#22aa22" + } +} diff --git a/basicsuite/qt5-everywhere/demos/video/SeekControl.qml b/basicsuite/qt5-everywhere/demos/video/SeekControl.qml new file mode 100644 index 0000000..8003951 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/SeekControl.qml @@ -0,0 +1,125 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + + property int position: 0 + property int duration: 0 + property bool seekable: false + property alias pressed : seekSlider.pressed + property bool enabled + + signal seekValueChanged(int newPosition) + + onPositionChanged: { + elapsedText.text = formatTime(position); + seekSlider.value = position; + } + + onDurationChanged: { + remainingText.text = formatTime(duration); + } + + Text { + id: elapsedText + anchors.verticalCenter: seekSlider.verticalCenter + anchors.left: root.left + verticalAlignment: Text.AlignVCenter + height: parent.height + text: "00:00" + font.pixelSize: height * 0.4 + color: "#cccccc" + } + + Slider { + id: seekSlider + anchors.left: elapsedText.right + anchors.right: remainingText.left + anchors.verticalCenter: root.verticalCenter + mutable: root.seekable + enabled: root.enabled + height: parent.height + + minimum: 0.0 + maximum: root.duration !== 0 ? root.duration : 1 + + onValueChangedByHandle: { + seekValueChanged(newValue); + applicationWindow.resetTimer() + } + } + + Text { + id: remainingText + anchors.verticalCenter: seekSlider.verticalCenter + anchors.right: root.right + verticalAlignment: Text.AlignVCenter + height: parent.height + text: "00:00" + font.pixelSize: height * 0.4 + color: "#cccccc" + } + + function formatTime(time) { + time = time / 1000 + var hours = Math.floor(time / 3600); + time = time - hours * 3600; + var minutes = Math.floor(time / 60); + var seconds = Math.floor(time - minutes * 60); + + if (hours > 0) + return formatTimeBlock(hours) + ":" + formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); + else + return formatTimeBlock(minutes) + ":" + formatTimeBlock(seconds); + + } + + function formatTimeBlock(time) { + if (time === 0) + return "00" + if (time < 10) + return "0" + time; + else + return time.toString(); + } +} diff --git a/basicsuite/qt5-everywhere/demos/video/Slider.qml b/basicsuite/qt5-everywhere/demos/video/Slider.qml new file mode 100644 index 0000000..8a99cfe --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/Slider.qml @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: slider + + anchors.leftMargin: handleBack.radius + anchors.rightMargin: handleBack.radius + + // value is read/write. + property real value: 0 + property real maximum: 1 + property real minimum: 0 + property int xMax: width - handle.width + onXMaxChanged: updatePos() + onMinimumChanged: updatePos() + onValueChanged: if (!pressed) updatePos() + property bool mutable: true + property alias pressed : backgroundMouse.pressed + + signal valueChangedByHandle(int newValue) + + function updatePos() { + if (maximum > minimum) { + var pos = 0 + (value - minimum) * slider.xMax / (maximum - minimum); + pos = Math.min(pos, width - handle.width - 0); + pos = Math.max(pos, 0); + handle.x = pos; + } else { + handle.x = 0; + } + } + + Rectangle { + id: background + width: slider.width + anchors.verticalCenter: slider.verticalCenter + height: 2 + color: "#666666" + + MouseArea { + id: backgroundMouse + anchors.fill: parent + anchors.topMargin: -24 + anchors.bottomMargin: -24 + enabled: slider.mutable + drag.target: handle + drag.axis: Drag.XAxis + drag.minimumX: 0 + drag.maximumX: slider.xMax + onPressedChanged: { + value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); + valueChangedByHandle(value); + updatePos(); + } + onPositionChanged: { + value = Math.max(minimum, Math.min(maximum, (maximum - minimum) * (mouseX - handle.width/2) / slider.xMax + minimum)); + valueChangedByHandle(value); + } + onWheel: { + value = Math.max(minimum, Math.min(maximum, value + (wheel.angleDelta.y > 0 ? 1 : -1) * (10 / slider.xMax) * (slider.maximum - slider.minimum))); + valueChangedByHandle(value); + updatePos(); + } + } + } + + Rectangle { + id: progress + height: 5 + anchors.verticalCenter: background.verticalCenter + anchors.left: background.left + anchors.right: handle.right + anchors.rightMargin: handle.width / 2 + visible: slider.enabled + color: "#98c66c" + } + + Rectangle { + id: handleBack + width: Math.max(10, Math.min(50, slider.height)) + height: width + radius: width / 2 + color: "#8898c66c" + antialiasing: true + anchors.centerIn: handle + visible: handle.visible + } + + Rectangle { + id: handle + width: Math.max(3,handleBack.height / 3) + height: width + radius: width / 2 + antialiasing: true + color: "#98c66c" + anchors.verticalCenter: background.verticalCenter + visible: slider.enabled + } +} + diff --git a/basicsuite/qt5-everywhere/demos/video/VideoDelegate.qml b/basicsuite/qt5-everywhere/demos/video/VideoDelegate.qml new file mode 100644 index 0000000..6109f81 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/VideoDelegate.qml @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: delegate + height: grid.cellHeight + width: grid.cellWidth + property int tileMargin: videoSelector.tileMargin + + signal videoSelected(string link) + + Rectangle { + anchors.left: parent.left + anchors.top: parent.top + anchors.topMargin: parent.tileMargin/2 + width: parent.width - tileMargin + height: parent.height - tileMargin + color: videoSelector.tileBackground + + MouseArea { + anchors.fill: parent + onClicked: { + grid.currentIndex = index + delegate.videoSelected(link) + } + } + + states: [ + State { + name: "selected" + when: delegate.GridView.isCurrentItem + } + ] + + + Image { + id: iconImage + source: thumbnail + width: parent.width + height: parent.height + } + + Rectangle{ + width: parent.width + height: titleText.height + tileMargin + anchors.top: titleText.top + anchors.bottom: parent.bottom + color: "Black" + opacity: 0.5 + visible: iconImage.source + + } + + Text { + id: titleText + anchors.left: parent.left + anchors.leftMargin: tileMargin/3 + anchors.bottom: parent.bottom + anchors.bottomMargin: tileMargin/3 + anchors.right: parent.right + anchors.rightMargin: tileMargin/3 + + color: videoSelector.textColor + text: title + width: parent.width; + wrapMode: Text.WordWrap; + smooth: true + font { family: videoSelector.uiFont; pixelSize: videoSelector.tileFontSize } + } + } +} + diff --git a/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml b/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml new file mode 100644 index 0000000..aa54e33 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.XmlListModel 2.0 + +Item { + id: videoSelector + + property int tileHeight: parseInt(grid.height / 2) + property int tileMargin: tileHeight * 0.1 + property int tileFontSize: tileHeight * 0.08 + property string tileBackground: "#262626" + property string textColor: "white" + property string uiFont: "Segoe UI" + + signal selectVideo(string link) + + state: "VISIBLE" + + onOpacityChanged: { + if (state === "HIDDEN" && opacity <= 0.05) + visible = false; + } + + XmlListModel { + id: videoModel + source: "http://qt-project.org/uploads/videos/qt5_videos.xml" + query: "/videolist/item" + XmlRole { name: "thumbnail"; query: "thumbnail/string()" } + XmlRole { name: "title"; query: "title/string()" } + XmlRole { name: "link"; query: "link/string()" } + } + + // Grid view + GridView { + id: grid + anchors.fill: parent + flow: GridView.TopToBottom + cellHeight: tileHeight + cellWidth: parseInt(tileHeight * 1.5) + cacheBuffer: cellWidth + clip: false + focus: true + model: videoModel + delegate: VideoDelegate { onVideoSelected: videoSelector.selectVideo(link); } + + // Only show the scrollbars when the view is moving. + states: State { + when: grid.movingHorizontally + PropertyChanges { target: horizontalScrollBar; opacity: 1 } + } + + transitions: Transition { + NumberAnimation { properties: "opacity"; duration: 400 } + } + } + + ScrollBar { + id: horizontalScrollBar + width: parent.width; height: 6 + anchors.bottom: parent.bottom + anchors.left: parent.left + opacity: 0 + position: grid.visibleArea.xPosition + pageSize: grid.visibleArea.widthRatio + } + + function hide() { + videoSelector.state = "HIDDEN"; + } + + function show() { + videoSelector.visible = true; + videoSelector.state = "VISIBLE"; + } + + states: [ + State { + name: "HIDDEN" + PropertyChanges { + target: videoSelector + opacity: 0.0 + } + }, + State { + name: "VISIBLE" + PropertyChanges { + target: videoSelector + opacity: 0.95 + } + } + ] + + transitions: [ + Transition { + from: "HIDDEN" + to: "VISIBLE" + NumberAnimation { + id: showAnimation + target: videoSelector + properties: "opacity" + from: 0.0 + to: 1.0 + duration: 200 + } + }, + Transition { + from: "VISIBLE" + to: "HIDDEN" + NumberAnimation { + id: hideAnimation + target: videoSelector + properties: "opacity" + from: 0.95 + to: 0.0 + duration: 200 + } + } + ] +} diff --git a/basicsuite/qt5-everywhere/demos/video/VolumeControl.qml b/basicsuite/qt5-everywhere/demos/video/VolumeControl.qml new file mode 100644 index 0000000..6e75fd2 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/VolumeControl.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + property alias volume: volumeSlider.value + + //Volume Controls + ImageButton { + id: volumeDown + height: parent.height * 0.5 + imageSource: "images/VolumeDown.png" + anchors.verticalCenter: root.verticalCenter + anchors.left: root.left + onClicked: { + root.volume = 0.0; + } + } + Slider { + id: volumeSlider + anchors.left: volumeDown.right + anchors.right: volumeUp.left + height: root.height + maximum: 1.0 + minimum: 0.0 + anchors.verticalCenter: root.verticalCenter + anchors.verticalCenterOffset: 1 + } + + ImageButton { + id: volumeUp + height: parent.height * 0.5 + imageSource: "images/VolumeUp.png" + anchors.verticalCenter: root.verticalCenter + anchors.verticalCenterOffset: 1 + anchors.right: root.right + onClicked: { + root.volume = 1.0 + } + } +} diff --git a/basicsuite/qt5-everywhere/demos/video/images/CloseButton.png b/basicsuite/qt5-everywhere/demos/video/images/CloseButton.png new file mode 100644 index 0000000..24407fe Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/images/CloseButton.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/images/PauseButton.png b/basicsuite/qt5-everywhere/demos/video/images/PauseButton.png new file mode 100644 index 0000000..b58ceb4 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/images/PauseButton.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/images/PlayButton.png b/basicsuite/qt5-everywhere/demos/video/images/PlayButton.png new file mode 100644 index 0000000..247fe32 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/images/PlayButton.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/images/RateButtonForward.png b/basicsuite/qt5-everywhere/demos/video/images/RateButtonForward.png new file mode 100644 index 0000000..ebfca0d Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/images/RateButtonForward.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/images/RateButtonReverse.png b/basicsuite/qt5-everywhere/demos/video/images/RateButtonReverse.png new file mode 100644 index 0000000..1837bfd Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/images/RateButtonReverse.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/images/StopButton.png b/basicsuite/qt5-everywhere/demos/video/images/StopButton.png new file mode 100644 index 0000000..76bcbc8 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/images/StopButton.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/images/VolumeDown.png b/basicsuite/qt5-everywhere/demos/video/images/VolumeDown.png new file mode 100644 index 0000000..38b1013 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/images/VolumeDown.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/images/VolumeUp.png b/basicsuite/qt5-everywhere/demos/video/images/VolumeUp.png new file mode 100644 index 0000000..cffe961 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/images/VolumeUp.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/main.qml b/basicsuite/qt5-everywhere/demos/video/main.qml new file mode 100644 index 0000000..5987843 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/main.qml @@ -0,0 +1,161 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtMultimedia 5.0 + +Rectangle { + id: applicationWindow + focus: true + color: "black" + anchors.fill:parent + + MouseArea { + id: mouseActivityMonitor + anchors.fill: parent + + hoverEnabled: true + onClicked: { + if (controlBar.state === "VISIBLE") { + controlBar.hide(); + } else { + controlBar.show(); + controlBarTimer.restart(); + } + } + } + + signal resetTimer + onResetTimer: { + controlBar.show(); + controlBarTimer.restart(); + } + + Content { + id: content + anchors.fill: parent + } + + VideoSelector { + id: videoSelector + anchors.fill: parent + anchors.margins: applicationWindow.width * 0.02 + visible: true + onSelectVideo: { + videoSelector.hide() + content.openVideo(link) + content.videoPlayer.play() + } + onVisibleChanged: { + if (visible) + controlBar.hide() + else + controlBar.show() + } + } + + Timer { + id: controlBarTimer + interval: 4000 + running: false + + onTriggered: hideToolBars(); + } + + ControlBar { + id: controlBar + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: applicationWindow.bottom + mediaPlayer: content.videoPlayer.mediaPlayer + } + + Component.onCompleted: { + controlBar.hide() + } + + property real volumeBeforeMuted: 1.0 + + Keys.onPressed: { + applicationWindow.resetTimer(); + if (event.key === Qt.Key_Up || event.key === Qt.Key_VolumeUp) { + content.videoPlayer.mediaPlayer.volume = Math.min(1, content.videoPlayer.mediaPlayer.volume + 0.1); + return; + } else if (event.key === Qt.Key_Down || event.key === Qt.Key_VolumeDown) { + if (event.modifiers & Qt.ControlModifier) { + if (content.videoPlayer.mediaPlayer.volume) { + volumeBeforeMuted = content.videoPlayer.mediaPlayer.volume; + content.videoPlayer.mediaPlayer.volume = 0 + } else { + content.videoPlayer.mediaPlayer.volume = volumeBeforeMuted; + } + } else { + content.videoPlayer.mediaPlayer.volume = Math.max(0, content.videoPlayer.mediaPlayer.volume - 0.1); + } + return; + } + + // What's next should be handled only if there's a loaded media + if (content.videoPlayer.mediaPlayer.status !== MediaPlayer.Loaded + && content.videoPlayer.mediaPlayer.status !== MediaPlayer.Buffered) + return; + + if (event.key === Qt.Key_Space) { + if (content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.PlayingState) + content.videoPlayer.mediaPlayer.pause() + else if (content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.PausedState + || content.videoPlayer.mediaPlayer.playbackState === MediaPlayer.StoppedState) + content.videoPlayer.mediaPlayer.play() + } else if (event.key === Qt.Key_Left) { + content.videoPlayer.mediaPlayer.seek(Math.max(0, content.videoPlayer.mediaPlayer.position - 30000)); + return; + } else if (event.key === Qt.Key_Right) { + content.videoPlayer.mediaPlayer.seek(Math.min(content.videoPlayer.mediaPlayer.duration, content.videoPlayer.mediaPlayer.position + 30000)); + return; + } + } + + function hideToolBars() { + if (!controlBar.isMouseAbove && content.videoPlayer.isPlaying) + controlBar.hide(); + } + +} diff --git a/basicsuite/qt5-everywhere/demos/video/qt5_video_jens.png b/basicsuite/qt5-everywhere/demos/video/qt5_video_jens.png new file mode 100644 index 0000000..84f3bce Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/qt5_video_jens.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/qt5_video_kenneth.png b/basicsuite/qt5-everywhere/demos/video/qt5_video_kenneth.png new file mode 100644 index 0000000..eecb297 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/qt5_video_kenneth.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/qt5_video_lars.png b/basicsuite/qt5-everywhere/demos/video/qt5_video_lars.png new file mode 100644 index 0000000..51e0701 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/qt5_video_lars.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/qt5_video_samuel.png b/basicsuite/qt5-everywhere/demos/video/qt5_video_samuel.png new file mode 100644 index 0000000..1ed97c1 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/qt5_video_samuel.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/qt5_video_simon.png b/basicsuite/qt5-everywhere/demos/video/qt5_video_simon.png new file mode 100644 index 0000000..583c564 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/qt5_video_simon.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/qt5_video_thiago.png b/basicsuite/qt5-everywhere/demos/video/qt5_video_thiago.png new file mode 100644 index 0000000..abf8522 Binary files /dev/null and b/basicsuite/qt5-everywhere/demos/video/qt5_video_thiago.png differ diff --git a/basicsuite/qt5-everywhere/demos/video/qt5_videos.xml b/basicsuite/qt5-everywhere/demos/video/qt5_videos.xml new file mode 100644 index 0000000..420e476 --- /dev/null +++ b/basicsuite/qt5-everywhere/demos/video/qt5_videos.xml @@ -0,0 +1,33 @@ + + + + Lars Knoll: The Making of Qt 5 + qt5_video_lars.png + http://download.qt-project.org/learning/videos/Lars_Knoll_The_Making_of_Qt_5.mp4 + + + Qt 5: Jens Bache-Wiig on Qt 5 and Qt Quick + qt5_video_jens.png + http://download.qt-project.org/learning/videos/Qt5_Jens_Bache-Wiig_on_Qt5_Qt_Quick.mp4 + + + Qt 5: Simon Hausmann on Qt WebKit + qt5_video_simon.png + http://download.qt-project.org/learning/videos/Qt_5_Simon_Hausmann_on_Qt_WebKit.mp4 + + + Qt 5: Qt Developer Kenneth Christiansen on Qt WebKit + qt5_video_kenneth.png + http://download.qt-project.org/learning/videos/Qt5_Kenneth_Christiansen_on_Qt_WebKit.mp4 + + + Qt 5: Thiago Macieira on Qt Core + qt5_video_thiago.png + http://download.qt-project.org/learning/videos/Qt5_Thiago_Macieira_on_Qt_Core.mp4 + + + Qt 5: Samuel Rodal on Qt GUI, Qt Quick and Qt Open GL + qt5_video_samuel.png + http://download.qt-project.org/learning/videos/Qt5_Samuel_Rodal_on_Qt_GUI_OpenGL.mp4 + + diff --git a/basicsuite/qt5-everywhere/description.txt b/basicsuite/qt5-everywhere/description.txt new file mode 100644 index 0000000..efa4b99 --- /dev/null +++ b/basicsuite/qt5-everywhere/description.txt @@ -0,0 +1 @@ +This demo contains several Qt Quick 2 applications which you can launch by tapping the devices. diff --git a/basicsuite/qt5-everywhere/engine.js b/basicsuite/qt5-everywhere/engine.js new file mode 100644 index 0000000..2618807 --- /dev/null +++ b/basicsuite/qt5-everywhere/engine.js @@ -0,0 +1,302 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +var positions = [ + {x:-1100, y:-1650, gid: 0, url: "demos/rssnews/rssnews.qml", device: 3, name: "Rss Reader"}, + {x:-2100, y:-1550, gid: 0, url: "demos/gridrssnews/main.qml", device: 7, name: "Rss Reader"}, + + {x:1300, y:-1600, gid: 1, url: "demos/canvasclock/canvasClock.qml", device: 4, name: "Canvas\n Clock"}, + {x:2020, y:-1520, gid: 1, url: "demos/heartmonitor/main.qml", device: 5, name: " Heart\nMonitor"}, + + {x:1000, y:-300, gid: 2, url: "demos/calqlatr/Calqlatr.qml", device: 0, name: "Calqlatr"}, + {x:-500, y:-250, gid: 2, url: "demos/touchgallery/main.qml", device: 2, name: "Widget\nGallery"}, + {x:200, y:-200, gid: 2, url: "demos/photosurface/photosurface.qml", device: 6, name: " Photo\nSurface"}, + + {x:-1800, y:0, gid: 3, url: "demos/maroon/Maroon.qml", device: 1, name: "Maroon in\n Trouble"}, + {x:-2500, y:100, gid: 3, url: "demos/samegame/samegame.qml", device: 1, name: "SameGame"}, + + {x:1200, y:1200, gid: 5, url: "demos/shaders/main.qml", device: 6, name: "Shaders"}, + {x:2200, y:1400, gid: 5, url: "demos/particledemo/particledemo.qml", device: 7, name: "Particle\n Paint"}, + + {x:-800, y:1180, gid: 4, url: "demos/video/main.qml", device: 8, name: "Video"}, + {x:-1600, y:1500, gid: 4, url: "demos/radio/radio.qml", device: 4, name: "Internet\n Radio"} + ] + +var groupPositions = [ + {x:-2880, y:-2100, width: 2400, height: 1200, textX: 50, textY: 50, name: "Feeds"}, + {x:700, y:-2100, width: 1700, height: 1200, textX: 50, textY: 50, name: "Canvas"}, + {x:-900, y:-800, width: 2650, height: 1300, textX: 50, textY: 50, name: "Applications"}, + {x:-3000, y:-500, width: 1750, height: 1150, textX: 50, textY: 50, name: "Games"}, + {x:-2200, y:850, width: 2050, height: 1150, textX: 50, textY: 150, name: "Multimedia"}, + {x:510, y:600, width: 2450, height: 1500, textX: 50, textY: 50, name: "Particles & Shaders"} + ] + +var imageSources = ["phone1.png","phone2.png", "phone3.png","tablet1.png", "car_device.png", "medical_device.png", "laptop1.png", "laptop2.png", "tv.png"] +var widths = [300, 360, 366, 758, 625, 600, 918, 923, 800] +var heights = [605, 706, 720, 564, 386, 488, 600, 600, 638] +var scales = [0.8, 0.8, 0.6, 0.9, 1.0, 1.0, 0.9, 1.0, 1.0] +var demoWidths = [269, 322, 322, 642, 480, 482, 688, 691, 726] +var demoHeights = [404, 482, 482, 402, 320, 322, 431, 432, 456] +var maskHorizontalOffsets = [1, 1, 1, 1, -52, 1, 1, 1, 1] +var maskVerticalOffsets = [20, 32, 15, 24, 15, 45, 59, 57, 56] +var navigationList = [1,0,2,3,4,6,5,7,8,12,11,9,10] +var groupNavigationList = [0,1,2,3,4,5] +var currentDemoIndex = -1 +var currentGroupIndex = -1 +var objects = [] +var groups = [] + +function initSlides(){ + positions.forEach(function(pos){ + createSlide(pos.x,pos.y, pos.gid, pos.url, pos.device, pos.name) + }) +} + +function createSlide(x,y,gid,url,device,name){ + var component = Qt.createComponent("Slide.qml") + if (component.status === Component.Ready){ + var object=component.createObject(canvas) + object.device = device + object.imageSource = "images/" + imageSources[device] + object.width = widths[device] + object.height = heights[device] + object.scale = scales[device] + object.demoWidth = demoWidths[device] + object.demoHeight = demoHeights[device] + object.maskVerticalOffset = maskVerticalOffsets[device] + object.maskHorizontalOffset = maskHorizontalOffsets[device] + object.uid = objects.length + object.gid = gid + object.name = name + object.x = x-object.width/2 + object.y = y-object.height/2 + object.createElements(); + + if (url){ + object.url = url; + } + objects.push(object) + } +} + +function initGroups(){ + groupPositions.forEach(function(pos){ + createGroup(pos.x, pos.y, pos.width, pos.height, pos.textX, pos.textY, pos.textSource, pos.name) + }) +} + +function createGroup(x,y,width,height,textX,textY,textSource,name){ + var component = Qt.createComponent("Group.qml") + if (component.status === Component.Ready){ + var object=component.createObject(canvas) + object.uid = groups.length + object.x = x + object.y = y + object.width = width + object.height = height + object.textX = textX + object.textY = textY + object.name = name + + groups.push(object) + } +} + +function loadCurrentDemo(){ + + // Load current demo and release all others possible running demos + if (currentDemoIndex != -1) { + for (var i=0; i < objects.length; i++){ + if (currentDemoIndex == i){ + objects[navigationList[currentDemoIndex]].loadDemo(); + } + } + } +} + +function releaseDemos() +{ + for (var i=0; i < objects.length; i++) + objects[i].releaseDemo(); +} + +function getCurrent() +{ + if (currentDemoIndex < 0 || currentDemoIndex >= objects.length) + return null; + + return selectTarget(navigationList[currentDemoIndex]); +} + +function getNext() +{ + currentDemoIndex++; + if (currentDemoIndex >= objects.length) + currentDemoIndex = 0; + + return selectTarget(navigationList[currentDemoIndex]); +} + +function getPrevious() +{ + currentDemoIndex--; + if (currentDemoIndex < 0) + currentDemoIndex = objects.length-1; + + return selectTarget(navigationList[currentDemoIndex]); +} + +function selectTarget(uid){ + + var idx = -1; + + for (var i=0; i < objects.length; i++){ + if (uid >= 0 && objects[i].uid === uid){ + idx = i; + } else { + objects[i].releaseDemo(); + } + } + if (idx !== -1){ + currentDemoIndex = navigationList.indexOf(idx) + currentGroupIndex = objects[idx].gid + return {"x": positions[idx].x, + "y": positions[idx].y, + "targetScale": objects[idx].targetScale, + "navState": 2} + } + + return null; +} + +function getPosition(idx){ + return {"x": positions[idx].x, "y": positions[idx].y} +} + +function getCurrentGroup() +{ + if (currentGroupIndex < 0 || currentGroupIndex >= groups.length) + return null; + + return selectGroup(groupNavigationList[currentGroupIndex]); +} + +function getNextGroup() +{ + currentGroupIndex++; + if (currentGroupIndex >= groups.length) + currentGroupIndex = 0; + + return selectGroup(groupNavigationList[currentGroupIndex]); +} + +function getPreviousGroup() +{ + currentGroupIndex--; + if (currentGroupIndex < 0) + currentGroupIndex = groups.length-1; + + return selectGroup(groupNavigationList[currentGroupIndex]); +} + +function selectGroup(id){ + + var idx = -1; + + for (var i=0; i < groups.length; i++){ + if (id >= 0 && groups[i].uid === id){ + idx = i; + break; + } + } + + if (idx !== -1){ + currentGroupIndex = groupNavigationList.indexOf(idx) + return {"x": groupPositions[idx].x + groupPositions[idx].width/2, + "y": groupPositions[idx].y + groupPositions[idx].height/2, + "targetScale": groups[idx].targetScale, + "navState": 1} + } + + return null; +} + +function boundingBox(){ + var minX = 0, maxX = 0, minY = 0, maxY = 0; + + for (var i=0; i maxX) + maxX = right; + + if (top < minY) + minY = top; + else if (bottom > maxY) + maxY = bottom; + } + + return {"x": minX, "y": minY, "width": maxX-minX, "height": maxY-minY, "centerX": (minX+maxX)/2, "centerY": (minY+maxY)/2}; +} + +function scaleToBox(destWidth, destHeight, sourceWidth, sourceHeight) +{ + return Math.min(destWidth / sourceWidth, destHeight / sourceHeight); +} + +function updateObjectScales(destWidth, destHeight) +{ + for (var i=0; i 0 && app.height > 0){ + var bbox = Engine.boundingBox(); + app.homeScaleFactor = Engine.scaleToBox(app.width*0.85, app.height*0.85, bbox.width, bbox.height); + app.homeCenterX = bbox.centerX; + app.homeCenterY = bbox.centerY; + app.minScaleFactor = app.homeScaleFactor / 10; + app.maxScaleFactor = app.homeScaleFactor * 20; + Engine.updateObjectScales(app.width*0.9, app.height*0.9); + Engine.updateGroupScales(app.width, app.height); + tapLimitX = Math.max(1,app.width * 0.02); + tapLimitY = Math.max(1,app.height * 0.02); + + + var target = Engine.getCurrentGroup() + if (app.useGroups && navigationState == 1) { + if (target !== null) + canvas.goTo(target, true) + else + canvas.goHome() + } + else if (navigationState == 2) { + target = Engine.getCurrent() + if (target !== null) + canvas.goTo(target, true) + else + canvas.goHome() + } + else + canvas.goHome() + + navigationPanel.checkOrientation() + } + } + + function selectTarget(uid) { + return Engine.selectTarget(uid) + } + + function selectGroup(uid) { + return Engine.selectGroup(uid) + } + + function getCurrentGroup() { + return Engine.getCurrentGroup() + } + + function getNext() { + if (app.useGroups && app.navigationState == 1) + return Engine.getNextGroup() + else + return Engine.getNext() + } + + function getPrevious() { + if (app.useGroups && app.navigationState == 1) + return Engine.getPreviousGroup() + else + return Engine.getPrevious() + } + + onWidthChanged: calculateScales(); + onHeightChanged: calculateScales(); + + FontLoader { + id: fontLoader + source: "fonts/PatrickHandSC-Regular.ttf" + } + + gradient: Gradient { + GradientStop { position: 0.0; color: "#89d4ff" } + GradientStop { position: 1.0; color: "#f3fbff" } + } + + Cloud { id: cloud1; sourceImage: "images/cloud1.png"} + Cloud { id: cloud2; sourceImage: "images/cloud1.png"} + Cloud { id: cloud3; sourceImage: "images/cloud1.png"} + Cloud { id: cloud4; sourceImage: "images/cloud2.png"} + Cloud { id: cloud5; sourceImage: "images/cloud2.png"} + Cloud { id: cloud6; sourceImage: "images/cloud2.png"} + + WorldMouseArea { id: worldMouseArea } + WorldCanvas { id:canvas } + NavigationPanel{ id: navigationPanel } + + HelpScreen { + id: helpscreen + visible: false + } + function getPosition(index){ + return Engine.getPosition(index) + } + + QuitDialog { + id: quitDialog + visible: false + + onYes: Qt.quit() + onNo: visible = false + } + + SmoothedAnimation { + id: zoomAnimation + target: canvas; + property: "scalingFactor"; + duration: Style.APP_ANIMATION_DELAY + velocity: -1 + to:canvas.zoomInTarget + + onRunningChanged: { + if (!running) { + if (app.navigationState === 2) + Engine.loadCurrentDemo(); + else + Engine.releaseDemos(); + } + } + } + + SequentialAnimation { + id: navigationAnimation + + property int animCounter: 0 + + function restartAnimation() { + navigationAnimation.animCounter++; + restart(); + } + + NumberAnimation { + id: zoomOutAnimation + target: canvas; + property: "scalingFactor"; + duration: Style.APP_ANIMATION_DELAY/2; + to: app.homeScaleFactor*1.3 + easing.type: Easing.OutCubic + } + + NumberAnimation { + id: zoomInAnimation + target: canvas; + property: "scalingFactor"; + duration: Style.APP_ANIMATION_DELAY/2; + to: canvas.zoomInTarget + easing.type: Easing.InCubic + } + + onRunningChanged: { + if (!running) + animCounter-- + + if (animCounter === 0 && navigationState === 2) + Engine.loadCurrentDemo(); + } + } + + Keys.onReleased: { + // Handle back-key + if (event.key === Qt.Key_Back) { + event.accepted = true; + + if (app.navigationState !== 0) + canvas.goBack(); + else + quitDialog.visible = true + } + } + + Component.onCompleted: { + if (app.useGroups) + Engine.initGroups() + + Engine.initSlides() + cloud1.start(); + cloud2.start(); + cloud3.start(); + cloud4.start(); + cloud5.start(); + cloud6.start(); + } +} diff --git a/basicsuite/qt5-everywhere/preview_l.jpg b/basicsuite/qt5-everywhere/preview_l.jpg new file mode 100644 index 0000000..1bb40bf Binary files /dev/null and b/basicsuite/qt5-everywhere/preview_l.jpg differ diff --git a/basicsuite/qt5-everywhere/qt5-everywhere.pro b/basicsuite/qt5-everywhere/qt5-everywhere.pro new file mode 100644 index 0000000..fab62cb --- /dev/null +++ b/basicsuite/qt5-everywhere/qt5-everywhere.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs +CONFIG += ordered +SUBDIRS += \ + demos \ + app.pro \ No newline at end of file diff --git a/basicsuite/qt5-everywhere/style.js b/basicsuite/qt5-everywhere/style.js new file mode 100644 index 0000000..a6a2966 --- /dev/null +++ b/basicsuite/qt5-everywhere/style.js @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +var APP_WIDTH = 800 +var APP_HEIGHT = 1280 + +var APP_ANIMATION_DELAY = 1000 + +var LOGO_WIDTH = 800 //1006 +var LOGO_HEIGHT = 960 //1200 + +var FONT_FAMILY = "Patrick Hand SC" diff --git a/basicsuite/qt5-everywhere/title.txt b/basicsuite/qt5-everywhere/title.txt new file mode 100644 index 0000000..2f1f4ce --- /dev/null +++ b/basicsuite/qt5-everywhere/title.txt @@ -0,0 +1 @@ +Qt5 Everywhere diff --git a/basicsuite/qt5-launchpresentation/Button.qml b/basicsuite/qt5-launchpresentation/Button.qml new file mode 100644 index 0000000..6d6bf6e --- /dev/null +++ b/basicsuite/qt5-launchpresentation/Button.qml @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + + id: root; + + border.width: (pressed ? 1.5 : 1) * height / 20; + border.color: Qt.rgba(1, 1, 1, 0.4); + radius: height / 4; + + antialiasing: true + + gradient: Gradient { + GradientStop { position: 0; color: Qt.rgba(0.5, 0.5, 0.5, pressed ? 0.7 : 0.5); } + GradientStop { position: 1; color: Qt.rgba(0.2, 0.2, 0.2, pressed ? 0.7 : 0.5); } + } + + Behavior on color { ColorAnimation { duration: 100 } } + + property bool pressed; + property alias label: textItem.text; + + Text { + id: textItem + anchors.centerIn: parent + color: "white" + font.pixelSize: parent.height / 3; + font.bold: true + } + + MouseArea { + id: mouse + anchors.fill: parent + onPressed: root.pressed = !root.pressed; + + } + +} diff --git a/basicsuite/qt5-launchpresentation/CameraSlide.qml b/basicsuite/qt5-launchpresentation/CameraSlide.qml new file mode 100644 index 0000000..a253c08 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/CameraSlide.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtMultimedia 5.0 +import "presentation" + +import QtGraphicalEffects 1.0 + +Slide { + + id: slide + + title: "Qt Multimedia - Camera" + + Camera { + id: camera + Component.onCompleted: camera.stop(); + } + + VideoOutput { + id: videoOut + anchors.fill: parent + source: camera + layer.enabled: true; + layer.effect: ZoomBlur { + samples: 16 + length: button.pressed ? parent.height / 5 : 0 + Behavior on length { + NumberAnimation { duration: 250 } + } + } + } + + onVisibleChanged: { + if (slide.visible) + camera.start(); + else + camera.stop(); + } + + Button { + id: button + anchors.bottom: videoOut.bottom + anchors.horizontalCenter: videoOut.horizontalCenter + anchors.bottomMargin: height / 2; +// anchors.bottom: slide.top; +// anchors.right: slide.right; +// anchors.bottomMargin: height; + label: pressed ? "Remove Effect" : "Zoom Effect"; + width: height * 4; + height: parent.height * 0.1 + } + +} diff --git a/basicsuite/qt5-launchpresentation/CanvasSlide.qml b/basicsuite/qt5-launchpresentation/CanvasSlide.qml new file mode 100644 index 0000000..d972b41 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/CanvasSlide.qml @@ -0,0 +1,161 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "presentation" + +Slide { + id: slide + + title: "Qt Quick - Canvas" + + + + Rectangle { + height: parent.height + width: parent.width * 0.45 + anchors.right: parent.right; + antialiasing: true + radius: slide.height * 0.03; + color: Qt.rgba(0.0, 0.0, 0.0, 0.2); + Canvas { + id:canvas + anchors.fill: parent; + + renderTarget: Canvas.Image; + antialiasing: true; + onPaint: { + eval(editor.text); + } + } + } + + Rectangle { + height: parent.height + width: parent.width * 0.45 + anchors.left: parent.left + antialiasing: true + radius: slide.height * 0.03; + color: Qt.rgba(0.0, 0.0, 0.0, 0.2); + + clip: true; + + TextEdit { + id: editor + anchors.fill: parent; + anchors.margins: 10 + + font.pixelSize: 16 + color: "white" + font.family: "courier" + font.bold: true + + text: +"var ctx = canvas.getContext('2d'); +ctx.save(); +ctx.clearRect(0, 0, canvas.width, canvas.height); +ctx.strokeStyle = 'palegreen' +ctx.fillStyle = 'limegreen'; +ctx.lineWidth = 5; + +ctx.beginPath(); +ctx.moveTo(100, 100); +ctx.lineTo(300, 100); +ctx.lineTo(100, 200); +ctx.closePath(); +ctx.fill(); +ctx.stroke(); + +ctx.fillStyle = 'aquamarine' +ctx.font = '20px sansserif' +ctx.fillText('HTML Canvas API!', 100, 300); +ctx.fillText('Imperative Drawing!', 100, 340); + +ctx.restore(); +" + onTextChanged: canvas.requestPaint(); + + onCursorRectangleChanged: { + emitter.burst(10) + + } + + ParticleSystem { + id: sys1 + running: slide.visible + } + + ImageParticle { + system: sys1 + source: "images/particle.png" + color: "white" + colorVariation: 0.2 + alpha: 0 + } + + Emitter { + id: emitter + system: sys1 + + x: editor.cursorRectangle.x - editor.cursorRectangle.height / 2; + y: editor.cursorRectangle.y + width: editor.cursorRectangle.height + height: editor.cursorRectangle.height + enabled: false + + lifeSpan: 1000 + + velocity: PointDirection { xVariation: 30; yVariation: 30; } + acceleration: PointDirection {xVariation: 30; yVariation: 30; y: 100 } + + endSize: 0 + + size: 4 + sizeVariation: 2 + } + + } + + + + + } +} diff --git a/basicsuite/qt5-launchpresentation/DemoMain.qml b/basicsuite/qt5-launchpresentation/DemoMain.qml new file mode 100644 index 0000000..05454be --- /dev/null +++ b/basicsuite/qt5-launchpresentation/DemoMain.qml @@ -0,0 +1,139 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + id: demoMain; + + property bool useDropShadow: true; + property bool useSwirls: true; + property bool useSimpleGradient: false; + property bool autorun: false; + + width: 1280 + height: 720 + + NoisyGradient { + anchors.fill: parent; + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.rgba(0.64 * 0.6, 0.82 * 0.6, 0.15 * 0.6) } + GradientStop { position: 1.0; color: "black" } + } + visible: !parent.useSimpleGradient + } + + Rectangle { + anchors.fill: parent; + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.rgba(0.64, 0.82, 0.15) } + GradientStop { position: 1.0; color: "black" } + } + visible: parent.useSimpleGradient; + } + + Rectangle { + id: colorTable + width: 1 + height: 46 + color: "transparent" + + Column { + spacing: 2 + y: 1 + Rectangle { width: 1; height: 10; color: "white" } + Rectangle { width: 1; height: 10; color: Qt.rgba(0.64 * 1.4, 0.82 * 1.4, 0.15 * 1.4, 1); } + Rectangle { width: 1; height: 10; color: Qt.rgba(0.64, 0.82, 0.15); } + Rectangle { width: 1; height: 10; color: Qt.rgba(0.64 * 0.7, 0.82 * 0.7, 0.15 * 0.7); } + } + + layer.enabled: true + layer.smooth: true + visible: false; + } + + + Swirl + { + x: 0; + width: parent.width + height: parent.height * 0.2 + anchors.bottom: parent.bottom; + amplitude: height * 0.2; + colorTable: colorTable; + speed: 0.2; + opacity: 0.3 + visible: parent.useSwirls; + } + + Timer { + interval: 20000 + running: parent.autorun + repeat: true + + onTriggered: { + var from = slides.currentSlide; + var to = from == slides.slides.length - 1 ? 1 : from + 1; + slides.switchSlides(slides.slides[from], slides.slides[to], true); + slides.currentSlide = to; + } + } + + SlideDeck { + id: slides + titleColor: "white" + textColor: "white" + anchors.fill: parent + layer.enabled: parent.useDropShadow + layer.effect: DropShadow { + horizontalOffset: slides.width * 0.005; + verticalOffset: slides.width * 0.005; + radius: 16.0 + samples: 16 + fast: true + color: Qt.rgba(0.0, 0.0, 0.0, 0.7); + } + } + + + +} diff --git a/basicsuite/qt5-launchpresentation/EffectsSlide.qml b/basicsuite/qt5-launchpresentation/EffectsSlide.qml new file mode 100644 index 0000000..0355284 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/EffectsSlide.qml @@ -0,0 +1,203 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +import "presentation" + +Slide { + id: slide + + title: "Qt Graphical Effects" + writeInText: "The Qt Graphical Effects module includes a wide range of effects:" + + property real t; + SequentialAnimation on t { + NumberAnimation { from: 0; to: 1; duration: 5000; easing.type: Easing.InOutCubic } + NumberAnimation { from: 1; to: 0; duration: 5000; easing.type: Easing.InOutCubic } + loops: Animation.Infinite + running: slide.visible; + } + + SequentialAnimation { + PropertyAction { target: grid; property: "opacity"; value: 0 } + PauseAnimation { duration: 1500 } + NumberAnimation { target: grid; property: "opacity"; to: 1; duration: 2000; easing.type: Easing.InOutCubic } + running: slide.visible; + } + + Grid { + id: grid; + + opacity: 0; + + width: parent.width + height: parent.height * 0.84 + anchors.bottom: parent.bottom; + + property real cw: width / columns + property real ch: height / rows; + + property int fontSize: slide.baseFontSize * 0.5 + + columns: 4 + rows: 2 + + Item { + width: grid.cw + height: grid.ch + Text { text: "Original"; color: "white"; font.pixelSize: grid.fontSize; anchors.horizontalCenter: noEffect.horizontalCenter } + Image { + id: noEffect; + source: "images/butterfly.png" + width: grid.cw * 0.9 + fillMode: Image.PreserveAspectFit + } + } + + Column { + Glow { + id: glowEffect + radius: 4 + samples: 4 + spread: slide.t + source: noEffect + width: grid.cw * 0.9 + height: width; + Text { text: "Glow"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } + } + } + + Column { + InnerShadow { + id: innerShadowEffect + radius: slide.t * 16; + samples: 16 + color: "black" + source: noEffect + width: grid.cw * 0.9 + height: width; + Text { text: "InnerShadow"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } + } + } + + Column { + GaussianBlur { + id: blurEffect + radius: slide.t * samples; + samples: 8 + source: noEffect + width: grid.cw * 0.9 + height: width; + Text { text: "GaussianBlur"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } + } + } + + Column { + ThresholdMask { + id: thresholdEffect + maskSource: Image { source: "images/fog.png" } + threshold: slide.t * 0.5 + 0.2; + spread: 0.2 + source: noEffect + width: grid.cw * 0.9 + height: width; + Text { text: "ThresholdMask"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } + } + } + + Column { + BrightnessContrast { + id: brightnessEffect + brightness: Math.sin(slide.t * 2 * Math.PI) * 0.5; + contrast: Math.sin(slide.t * 4 * Math.PI) * 0.5; + source: noEffect + width: grid.cw * 0.9 + height: width; + Text { text: "BrightnessContrast"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } + } + } + + Column { + Colorize { + id: colorizeEffect + hue: slide.t + source: noEffect + width: grid.cw * 0.9 + height: width; + Text { text: "Colorize"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } + } + } + + Column { + OpacityMask { + + Item { + id: maskSource; + anchors.fill: parent; + Rectangle { + anchors.fill: parent; + opacity: slide.t; + } + + Text { + text: "Qt 5" + font.pixelSize: parent.height * 0.15 + font.bold: true; + font.underline: true; + anchors.centerIn: parent; + rotation: 70 + } + visible: false; + } + + id: opacityMaskEffect + source: noEffect + maskSource: maskSource; + width: grid.cw * 0.9 + height: width; + Text { text: "OpacityMask"; color: "white"; font.pixelSize: grid.fontSize; anchors.top: parent.top; anchors.horizontalCenter: parent.horizontalCenter; } + } + } + } + +} diff --git a/basicsuite/qt5-launchpresentation/ExamplesSlide.qml b/basicsuite/qt5-launchpresentation/ExamplesSlide.qml new file mode 100644 index 0000000..4540532 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/ExamplesSlide.qml @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "presentation" + +Slide +{ + id: slide + + title: "Qt Quick 2" + + Row { + anchors.fill: parent + + spacing: (width - 320 * 3) / 2 + + Item { + width: 320 + height: 480 + clip: true + Loader { + id: load1 + } + } + + Item { + width: 320 + height: 480 + clip: true; + Loader { + id: load2 + } + } + + Loader { + id: load3 + } + } + + onVisibleChanged: { + if (visible) { + load1.source = "maroon/Maroon.qml" + load2.source = "samegame/Samegame.qml" + load3.source = "calqlatr/Calqlatr.qml" + } else { + load1.source = "" + load2.source = "" + load3.source = "" + } + } +} diff --git a/basicsuite/qt5-launchpresentation/FontSlide.qml b/basicsuite/qt5-launchpresentation/FontSlide.qml new file mode 100644 index 0000000..ce98779 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/FontSlide.qml @@ -0,0 +1,98 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "presentation" + +Slide { + id: fontSlide; + title: "Qt Quick - Fonts" + writeInText: "The default font rendering in Qt Quick 2.0 uses distance fields, making\nit possible to do fully transformable text with subpixel positioning and\nsubpixel antialiasing. + +Native font rendering is also an option for applications that want to look native." + + Rectangle { + id: textRoot + anchors.centerIn: parent + anchors.horizontalCenterOffset: parent.width * 0.2 + anchors.verticalCenterOffset: parent.width * 0.1 + + width: 120 + height: 40 + + color: "transparent" + border.color: "white" + border.width: 1 + + Text { + anchors.centerIn: parent + + text: "Awesome!" + color: "white" + + font.pixelSize: 20; + + SequentialAnimation on scale { + NumberAnimation { to: 4; duration: 2508; easing.type: Easing.OutElastic } + NumberAnimation { to: 1; duration: 2508; easing.type: Easing.OutElastic } + PauseAnimation { duration: 1000 } + loops: Animation.Infinite + running: fontSlide.visible + } + + NumberAnimation on rotation { from: 0; to: 360; duration: 10000; loops: Animation.Infinite; easing.type: Easing.InOutCubic; running: fontSlide.visible } + } + } + + ShaderEffectSource { + width: textRoot.width + height: textRoot.height + sourceItem: textRoot + anchors.bottom: parent.bottom; + anchors.left: parent.left; + smooth: false + transformOrigin: Item.BottomLeft; + + visible: true + + scale: 4; + } + +} diff --git a/basicsuite/qt5-launchpresentation/NoisyGradient.qml b/basicsuite/qt5-launchpresentation/NoisyGradient.qml new file mode 100644 index 0000000..904f14e --- /dev/null +++ b/basicsuite/qt5-launchpresentation/NoisyGradient.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +ShaderEffect { + + id: effectRoot; + + width: 1280 + height: 720 + + property Gradient gradient: Gradient { + GradientStop { position: 0; color: "white" } + GradientStop { position: 0.4; color: "blue" } + GradientStop { position: 1.0; color: "black" } + } + + Rectangle { + id: colorTable + width: 1 + height: 128; + + gradient: effectRoot.gradient; + + layer.enabled: true + layer.smooth: true + + visible: false; + } + + property variant source: colorTable; + + blending: false; + + fragmentShader:" + #ifdef GL_ES + precision lowp float; + #endif + + uniform lowp sampler2D source; + uniform lowp float qt_Opacity; + varying highp vec2 qt_TexCoord0; + + // Noise function from: http://stackoverflow.com/questions/4200224/random-noise-functions-for-glsl + float rand(vec2 n) { + return 0.5 + 0.5 * fract(sin(dot(n.xy, vec2(12.9898, 78.233))) * 43758.5453); + } + + void main() { + lowp float len = clamp(length(vec2(0.5, 0.0) - qt_TexCoord0), 0.0, 1.0); + gl_FragColor = texture2D(source, vec2(0, len)) * qt_Opacity + rand(qt_TexCoord0) * 0.05; + } +" +} diff --git a/basicsuite/qt5-launchpresentation/NormalMapGenerator.qml b/basicsuite/qt5-launchpresentation/NormalMapGenerator.qml new file mode 100644 index 0000000..c6f55c7 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/NormalMapGenerator.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +ShaderEffect { + id: effectRoot; + + property alias source: blurShader.source; + + GaussianBlur + { + id: blurShader; + width: source != undefined ? source.width : 0 + height: source != undefined ? source.height : 0 + samples: 8 + radius: 8 + + layer.enabled: true; + layer.smooth: true; + + visible: false; + } + + width: 256 + height: 128 + + property variant tex: blurShader; + property size pixelSize: Qt.size(1 / blurShader.width, 1 / blurShader.height); + + fragmentShader: " + #ifdef GL_ES + precision lowp float; + #endif + + uniform lowp float qt_Opacity; + uniform lowp sampler2D tex; + uniform highp vec2 pixelSize; + varying highp vec2 qt_TexCoord0; + void main() { + + lowp vec2 xps = vec2(pixelSize.x, 0.0); + vec3 vx = vec3(1, 0, texture2D(tex, qt_TexCoord0 + xps).x - texture2D(tex, qt_TexCoord0 - xps).x); + + lowp vec2 yps = vec2(0.0, pixelSize.y); + vec3 vy = vec3(0, 1, texture2D(tex, qt_TexCoord0 + yps).x - texture2D(tex, qt_TexCoord0 - yps).x); + + vec3 n = normalize(cross(vx, vy)) * 0.5 + 0.5; + + gl_FragColor = vec4(n, 1); + } + " + +} diff --git a/basicsuite/qt5-launchpresentation/OpacityTransitionPresentation.qml b/basicsuite/qt5-launchpresentation/OpacityTransitionPresentation.qml new file mode 100644 index 0000000..dc7cc02 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/OpacityTransitionPresentation.qml @@ -0,0 +1,104 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +import QtQuick 2.0 +import "presentation" + +Presentation { + + id: deck + + width: 1280 + height: 720 + + property bool inTransition: false; + + property variant fromSlide; + property variant toSlide; + + property int transitionTime: 500; + + SequentialAnimation { + id: forwardTransition + PropertyAction { target: deck; property: "inTransition"; value: true } + PropertyAction { target: toSlide; property: "visible"; value: true } + ParallelAnimation { + NumberAnimation { target: fromSlide; property: "opacity"; from: 1; to: 0; duration: deck.transitionTime; easing.type: Easing.OutQuart } + NumberAnimation { target: fromSlide; property: "scale"; from: 1; to: 1.1; duration: deck.transitionTime; easing.type: Easing.InOutQuart } + NumberAnimation { target: toSlide; property: "opacity"; from: 0; to: 1; duration: deck.transitionTime; easing.type: Easing.InQuart } + NumberAnimation { target: toSlide; property: "scale"; from: 0.7; to: 1; duration: deck.transitionTime; easing.type: Easing.InOutQuart } + } + PropertyAction { target: fromSlide; property: "visible"; value: false } + PropertyAction { target: fromSlide; property: "scale"; value: 1 } + PropertyAction { target: deck; property: "inTransition"; value: false } + } + SequentialAnimation { + id: backwardTransition + running: false + PropertyAction { target: deck; property: "inTransition"; value: true } + PropertyAction { target: toSlide; property: "visible"; value: true } + ParallelAnimation { + NumberAnimation { target: fromSlide; property: "opacity"; from: 1; to: 0; duration: deck.transitionTime; easing.type: Easing.OutQuart } + NumberAnimation { target: fromSlide; property: "scale"; from: 1; to: 0.7; duration: deck.transitionTime; easing.type: Easing.InOutQuart } + NumberAnimation { target: toSlide; property: "opacity"; from: 0; to: 1; duration: deck.transitionTime; easing.type: Easing.InQuart } + NumberAnimation { target: toSlide; property: "scale"; from: 1.1; to: 1; duration: deck.transitionTime; easing.type: Easing.InOutQuart } + } + PropertyAction { target: fromSlide; property: "visible"; value: false } + PropertyAction { target: fromSlide; property: "scale"; value: 1 } + PropertyAction { target: deck; property: "inTransition"; value: false } + } + + function switchSlides(from, to, forward) + { + if (deck.inTransition) + return false + + deck.fromSlide = from + deck.toSlide = to + + if (forward) + forwardTransition.running = true + else + backwardTransition.running = true + + return true + } +} diff --git a/basicsuite/qt5-launchpresentation/ParticleSlide.qml b/basicsuite/qt5-launchpresentation/ParticleSlide.qml new file mode 100644 index 0000000..2569a17 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/ParticleSlide.qml @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "presentation" + +Slide +{ + id: slide + + title: "Qt Quick - Particle System" + + Row { + anchors.fill: parent + + SequentialAnimation on opacity { + running: slide.visible; + PropertyAction { value: 0 } + PauseAnimation { duration: 2000; } + NumberAnimation { to: 1; duration: 1000 } + } + + spacing: (width - 320 * 3) / 2 + + Loader { + id: load1 + } + + Loader { + id: load2 + } + + Loader { + id: load3 + } + } + + onVisibleChanged: { + if (visible) { + load1.source = "particles/velocityfrommotion.qml" + load2.source = "particles/customemitter.qml" + load3.source = "particles/emitmask.qml" + } else { + load1.source = "" + load2.source = "" + load3.source = "" + } + } +} diff --git a/basicsuite/qt5-launchpresentation/README b/basicsuite/qt5-launchpresentation/README new file mode 100644 index 0000000..6b3f927 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/README @@ -0,0 +1,51 @@ +This project contains quick tour of Qt 5.0, primarily focusing on its +graphical capabilities. + + + +------------------------------------------------------------------------ + Requirements: + + - Qt 5, including QtDeclarative, QtGraphicalEffects and QtMultimedia. + Commercial URL: http://qt.digia.com + Open Source URL: http://qt-project.org + + - The QML Presentation System: + URL: https://qt.gitorious.org/qt-labs/qml-presentation-system + git: git clone https://git.gitorious.org/qt-labs/qml-presentation-system.git + + - A movie file called 'bunny.mov' in the same directory as the + main.qml file. The demo will run without, but the Video slide will + not show anything. + + + +------------------------------------------------------------------------ + Running: + +To run the demo, start it using the Qt Quick 2.0 'qmlscene' tool. + +> qmlscene main.qml + +The demo includes a slightly fancy fullscreen gradient and a rather +computationally intensive drop shadow which can be too much for +low-end GPUs. On these systems, one could try to use the 'lofi' +launcher instead. + +> qmlscene main_lofi.qml + +It is possible to tweak the parameters of the main file also. + + + +------------------------------------------------------------------------ + Troubleshooting: + +For a -developer-build of Qt, the webkit plugin and QtWebProcess will +be located inside the qtwebkit module, rather than inside QtBase, the plugin +must be added to the QML import path and the path to QtWebProcess must be +added to PATH for the demo to run. + +The slides have been written for the resolution 1280x720. When resized +some of the spacing and content will look a bit odd. Any patches to +fix this will be welcomed :) \ No newline at end of file diff --git a/basicsuite/qt5-launchpresentation/ShaderSlide.qml b/basicsuite/qt5-launchpresentation/ShaderSlide.qml new file mode 100644 index 0000000..206cd9e --- /dev/null +++ b/basicsuite/qt5-launchpresentation/ShaderSlide.qml @@ -0,0 +1,197 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "presentation" + + +Slide { + id: slide + + title: "Qt Quick - ShaderEffect" + + writeInText: "Harness the raw power of the graphics processor. The ShaderEffect\nelement lets you write GLSL inline in your QML files." + + Image { + id: sourceItem + source: "images/ally.png" + visible: false + } + + SequentialAnimation { + id: kickoffAnimation + + // setup + PropertyAction { target: rotationAnimation; property: "running"; value: false } + PropertyAction { target: timeAnimation; property: "running"; value: false } + PropertyAction { target: shader; property: "amp"; value: 0 } + PropertyAction { target: shader; property: "xrot"; value: 0 } + PropertyAction { target: shader; property: "zrot"; value: 0 } + PropertyAction { target: shader; property: "time"; value: 0 } + PropertyAction { target: shader; property: "scale"; value: 1; } + PropertyAction { target: rotationAnimation; property: "running"; value: false } + PropertyAction { target: timeAnimation; property: "running"; value: false } + // short pause + PauseAnimation { duration: 2000 } + // get started... + ParallelAnimation { + NumberAnimation { target: shader; property: "xrot"; to: 2 * Math.PI / 8; duration: 1000; easing.type: Easing.InOutCubic } + NumberAnimation { target: shader; property: "amp"; to: 0.1; duration: 1000; easing.type: Easing.InOutCubic } +// NumberAnimation { target: shader; property: "scale"; to: 1.5; duration: 1000; easing.type: Easing.InOutCubic } + PropertyAction { target: rotationAnimation; property: "running"; value: true } + PropertyAction { target: timeAnimation; property: "running"; value: true } + } + + running: slide.visible; + } + + + ShaderEffect { + id: shader + width: height + height: parent.height + anchors.centerIn: parent; + anchors.verticalCenterOffset: slide.height * 0.1 + + blending: true + + mesh: "50x50" + + property variant size: Qt.size(width, height); + + property variant source: sourceItem; + + property real amp: 0 + + property real xrot: 0; // 2 * Math.PI / 8; +// NumberAnimation on xrot { from: 0; to: Math.PI * 2; duration: 3000; loops: Animation.Infinite } + + property real zrot: 0 + NumberAnimation on zrot { + id: rotationAnimation + from: 0; + to: Math.PI * 2; + duration: 20000; + loops: Animation.Infinite + easing.type: Easing.InOutCubic + running: false; + } + + property real time: 0 + NumberAnimation on time { + id: timeAnimation + from: 0; + to: Math.PI * 2; + duration: 3457; + loops: Animation.Infinite + running: false; + } + + vertexShader: " + attribute highp vec4 qt_Vertex; + attribute highp vec2 qt_MultiTexCoord0; + uniform highp mat4 qt_Matrix; + uniform highp float xrot; + uniform highp float zrot; + uniform highp vec2 size; + uniform highp float time; + uniform highp float amp; + varying lowp vec2 v_TexCoord; + varying lowp float v_light; + void main() { + highp float xcosa = cos(xrot); + highp float xsina = sin(xrot); + + highp mat4 xrot = mat4(1, 0, 0, 0, + 0, xcosa, xsina, 0, + 0, -xsina, xcosa, 0, + 0, 0, 0, 1); + + highp float zcosa = cos(zrot); + highp float zsina = sin(zrot); + + highp mat4 zrot = mat4(zcosa, zsina, 0, 0, + -zsina, zcosa, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); + + highp float near = 2.; + highp float far = 6.; + highp float fmn = far - near; + + highp mat4 proj = mat4(near, 0, 0, 0, + 0, near, 0, 0, + 0, 0, -(far + near) / fmn, -1., + 0, 0, -2. * far * near / fmn, 1); + + highp mat4 model = mat4(2, 0, 0, 0, + 0, 2, 0, 0, + 0, 0, 2, 0, + 0, -.5, -4, 1); + + vec4 nLocPos = vec4(qt_Vertex.xy * 2.0 / size - 1.0, 0, 1); + nLocPos.z = cos(nLocPos.x * 5. + time) * amp; + + vec4 pos = proj * model * xrot * zrot * nLocPos; + pos = vec4(pos.xyx/pos.w, 1); + + gl_Position = qt_Matrix * vec4((pos.xy + 1.0) / 2.0 * size , 0, 1); + + v_TexCoord = qt_MultiTexCoord0; + + + v_light = dot(normalize(vec3(-sin(nLocPos.x * 5.0 + time) * 5.0 * amp, 0, -1)), vec3(0, 0, -1)); + } + " + + fragmentShader: " + uniform lowp sampler2D source; + uniform lowp float qt_Opacity; + varying highp vec2 v_TexCoord; + varying lowp float v_light; + void main() { + highp vec4 c = texture2D(source, v_TexCoord); + gl_FragColor = (vec4(pow(v_light, 16.0)) * 0.3 + c) * qt_Opacity; + } + " + + } + +} diff --git a/basicsuite/qt5-launchpresentation/SlideDeck.qml b/basicsuite/qt5-launchpresentation/SlideDeck.qml new file mode 100644 index 0000000..d9b76ce --- /dev/null +++ b/basicsuite/qt5-launchpresentation/SlideDeck.qml @@ -0,0 +1,232 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +import "presentation" + +OpacityTransitionPresentation { + id: presentation + + width: 1280 + height: 720 + + transitionTime: 2000 + + + /******************************************************************************** + * + * Introduction + * + */ + +/* + Rectangle { + id: openingSlideBlackout + color: "black" + anchors.fill: parent; + Behavior on opacity { NumberAnimation { duration: 1000 } } + } + + onCurrentSlideChanged: { + if (currentSlide < 2) + openingSlideBlackout.opacity = 1; + else + openingSlideBlackout.opacity = 0; + } + + + Slide { + + } +*/ + + Slide { + id: introSlide + + writeInText: "The following is a quick tour of what is new in Qt 5. + +It is an application written with Qt Quick, based on Qt 5. The source code is available from: +https://qt.gitorious.org/qt-labs/qt5-launch-demo + +We hope you will enjoy Qt 5 as much as we have enjoyed creating it. + +[tap to advance]" + +// Image { +// source: "images/qt-logo.png" +// opacity: 0.4 +// z: -1 +// anchors.centerIn: parent +// } + } + + Slide { + centeredText: "Introducing" + fontScale: 2 + } + + Slide { + centeredText: "Qt 5" + fontScale: 4; + } + + + Slide { + writeInText: "OpenGL-based scene graph for Qt Quick 2.0 - providing velvet animations, particles and impressive graphical effects + +Multimedia - Audio, Video and Camera support on all major platforms + +WebKit - Full HTML 5 support from the world's most popular web engine" + + } + + Slide { + writeInText: "C++ language features - template-based connect(), C++11 support + +Connectivity and Networking - DNS lookup, improved IPv6 support + +JSON Support - Fast parser and writer, binary format support" + } + + Slide { + writeInText: "Modularization of the Qt libraries - sanitizing our codebase and simplifying deployment + +Qt Platform Abstraction - Unifying the Qt codebase across platforms, minimizing the porting effort for new platforms + +Wayland support - Wayland-compatible Qt backend and compositor framework" + } + + + WidgetsSlide { } + + + + + /******************************************************************************** + * + * Qt Quick Graphics Stack + * + */ + ExamplesSlide { } + + FontSlide { } + CanvasSlide { } + ParticleSlide { } + ShaderSlide { } + + + + /******************************************************************************** + * + * Qt Graphical Effects + * + */ + + EffectsSlide {} + +// /******************************************************************************** +// * +// * Multimedia +// * +// */ + +// Slide { +// title: "Qt Multimedia" +// writeInText: "The Qt Multmedia module is implemented on all our major platforms, including Windows, Mac OS X and Linux. + +//It contains both a C++ API for use with existing Qt Widgets based applications and a QML API for use with Qt Quick 2.0. + +//The features include recording and playback of video and audio and also use of camera. + +//It also integrates nicely with the Qt Graphical Effects module." +// } + +// VideoSlide { } +// CameraSlide { } + + + + + /******************************************************************************** + * + * WebKit + * + */ + +// WebkitSlide { } + + + + /******************************************************************************** + * + * The End + * + */ + + Slide { + title: "Links" + content: [ + "Qt Project: qt-project.org", + "Qt by Digia: qt.digia.com", + "Follow us on Twitter", + " @QtProject", + " @QtCommercial", + "Find us on Facebook:", + " Qt Project", + " Qt by Digia", + "This demo: https://qt.gitorious.org/qt-labs/qt5-launch-demo" + ]; + + Image { + z: -1 + opacity: 0.7 + source: "images/qt-logo.png" + anchors.top: parent.top + anchors.right: parent.right + anchors.rightMargin: parent.width * 0.15 + fillMode: Image.PreserveAspectFit + } + + } + +} diff --git a/basicsuite/qt5-launchpresentation/Swirl.qml b/basicsuite/qt5-launchpresentation/Swirl.qml new file mode 100644 index 0000000..710f04b --- /dev/null +++ b/basicsuite/qt5-launchpresentation/Swirl.qml @@ -0,0 +1,116 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +ShaderEffect { + id: shader + + width: 400 + height: 300 + + property real speed: 1 + + property color d: Qt.rgba(Math.random() * 0.7, + Math.random() * 0.5, + Math.random() * 0.7, + Math.random() * 0.5) + property real tx + NumberAnimation on tx { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } + property real ty + NumberAnimation on ty { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } + property real tz + NumberAnimation on tz { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } + property real tw + NumberAnimation on tw { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } + + property real amplitude: height / 2 + + property variant colorTable: ShaderEffectSource { sourceItem: Rectangle { width: 4; height: 4; color: "green" } } + + fragmentShader: " + uniform lowp float qt_Opacity; + uniform lowp sampler2D colorTable; + varying highp vec2 qt_TexCoord0; + varying lowp float xx; + + void main() { + gl_FragColor = texture2D(colorTable, qt_TexCoord0); + gl_FragColor.xyz += xx * 0.1; + gl_FragColor *= qt_Opacity; + } + " + + vertexShader: " + uniform lowp vec4 d; + uniform highp float tx; + uniform highp float ty; + uniform highp float tz; + uniform highp float tw; + uniform highp float amplitude; + uniform highp mat4 qt_Matrix; + attribute highp vec4 qt_Vertex; + attribute highp vec2 qt_MultiTexCoord0; + varying highp vec2 qt_TexCoord0; + varying lowp float xx; + void main() { + highp vec4 pos = qt_Vertex; + + highp float y = sin(-tx + d.x * qt_MultiTexCoord0.x * 57. + 12. * d.y) + + sin(ty * 2.0 + d.z * qt_MultiTexCoord0.x * 21. + 5. * d.w) + + sin(tz * 4.0 + d.y * qt_MultiTexCoord0.x * 13. + 7.0 * d.x) + + sin(-ty * 8.0 + d.w * qt_MultiTexCoord0.x * 29. + 15. * d.z); + highp float x = sin(-tx + d.x * qt_MultiTexCoord0.x * 213. + 15. * d.y) + + sin(ty * 2.0 + d.z * qt_MultiTexCoord0.x * 107. + 12. * d.w) + + sin(tz * 4.0 + d.y * qt_MultiTexCoord0.x * 13. + 5. * d.x) + + sin(-ty * 8.0 + d.w * qt_MultiTexCoord0.x * 15. + 7. * d.z); + xx = x; + + pos.xy += vec2(x * sin(qt_MultiTexCoord0.x * 3.14152) * 0.3, + y * (1.0 - qt_MultiTexCoord0.y)) * amplitude; + + gl_Position = qt_Matrix * pos; + qt_TexCoord0 = qt_MultiTexCoord0; + } + " + + mesh: GridMesh { resolution: Qt.size(width / 10, 4) } + +} diff --git a/basicsuite/qt5-launchpresentation/VideoSlide.qml b/basicsuite/qt5-launchpresentation/VideoSlide.qml new file mode 100644 index 0000000..a7aac8a --- /dev/null +++ b/basicsuite/qt5-launchpresentation/VideoSlide.qml @@ -0,0 +1,116 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtMultimedia 5.0 +import "presentation" + +import QtGraphicalEffects 1.0 + +Slide { + + id: slide + + title: "Qt Multimedia - Video" + + Video { + id: video + + anchors.fill: parent + source: "bunny.mov" + autoLoad: true; + + layer.enabled: true; + layer.smooth: true; + layer.effect: Displace { + displacementSource: normalMap + displacement: button.pressed ? 1.0 : 0.0 + Behavior on displacement { + NumberAnimation { duration: 1000 } + } + } + } + + Rectangle { + id: theItem; + width: 256 + height: 128 + color: "transparent" + Text { + id: label + color: "white" + text: "Qt 5" +// font.family: "Times New Roman" + font.bold: true; + font.pixelSize: 80 + anchors.centerIn: parent + } + visible: false; + } + + NormalMapGenerator { + anchors.left: theItem.right + width: 256 + height: 128 + id: normalMap + source: theItem; + visible: false + } + + centeredText: video.hasVideo ? "" : "'bunny.mov' is not found or cannot be played: " + video.errorString + + onVisibleChanged: { + if (slide.visible) + video.play(); + else + video.pause(); + } + + Button { + id: button + anchors.bottom: video.bottom + anchors.horizontalCenter: video.horizontalCenter + anchors.bottomMargin: height / 2; + label: pressed ? "Remove Effect" : "Displacement Effect"; + width: height * 4; + height: parent.height * 0.1 + } + +} diff --git a/basicsuite/qt5-launchpresentation/WebKitSlideContent.qml b/basicsuite/qt5-launchpresentation/WebKitSlideContent.qml new file mode 100644 index 0000000..b0a9c77 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/WebKitSlideContent.qml @@ -0,0 +1,124 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import QtWebKit 3.0 + +Item { + id: slide + + anchors.fill: parent; + + WebView { + id: browser + anchors.fill: parent + url: editor.text + + // This works around rendering bugs in webkit. CSS animations + // and webGL content gets a bad offset, but this hack + // clips it so it is not visible. Not ideal, but it kinda works + // for now. + layer.enabled: true + layer.smooth: true + } + + Rectangle { + border.width: 2 + border.color: "black" + opacity: 0.5 + color: "black" + anchors.fill: editor + anchors.margins: -editor.height * 0.2; + + radius: -anchors.margins + antialiasing: true + } + + TextInput { + id: editor + anchors.top: browser.bottom; + anchors.horizontalCenter: browser.horizontalCenter + font.pixelSize: slide.height * 0.05; + text: "http://qt.digia.com" + onAccepted: browser.reload(); + color: "white" + + onCursorPositionChanged: { + var rect = positionToRectangle(cursorPosition); + emitter.x = rect.x; + emitter.y = rect.y; + emitter.width = rect.width; + emitter.height = rect.height; + emitter.burst(10); + } + + ParticleSystem { + id: sys1 + running: slide.visible + } + + ImageParticle { + system: sys1 + source: "images/particle.png" + color: "white" + colorVariation: 0.2 + alpha: 0 + } + + Emitter { + id: emitter + system: sys1 + + enabled: false + + lifeSpan: 2000 + + velocity: PointDirection { xVariation: 30; yVariation: 30; } + acceleration: PointDirection {xVariation: 30; yVariation: 30; y: 100 } + + endSize: 0 + + size: 8 + sizeVariation: 2 + } + } + +} diff --git a/basicsuite/qt5-launchpresentation/WebkitSlide.qml b/basicsuite/qt5-launchpresentation/WebkitSlide.qml new file mode 100644 index 0000000..1873ab1 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/WebkitSlide.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import "presentation" + +Slide { + id: slide + + title: "Qt WebKit - WebView" + + Loader { + id: webkitLoader + + anchors.fill: parent + + source: "WebKitSlideContent.qml" + } + + centeredText: webkitLoader.status == Loader.Error ? "Qt WebKit not installed or otherwise failed to load" : "" +} + diff --git a/basicsuite/qt5-launchpresentation/WidgetsSlide.qml b/basicsuite/qt5-launchpresentation/WidgetsSlide.qml new file mode 100644 index 0000000..20f0770 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/WidgetsSlide.qml @@ -0,0 +1,152 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "presentation" + +Slide { + id: slide + + writeInText: "The Qt Widgets are working better than ever with accessibility\nimprovements and retina display support." + + property int slamTime: 800; + property int waitTime: 500; + + y: parent.height * 0.1 + + SequentialAnimation { + id: widgetAnimation + ScriptAction { script: { + boxesImage.opacity = 0; + mainwindowsImage.opacity = 0; + chipsWindow.opacity = 0; + stylesWindow.opacity = 0; + } + } + PauseAnimation { duration: 3000 } + ParallelAnimation { + NumberAnimation { target: boxesImage; property: "opacity"; from: 0; to: 1; duration: slide.slamTime; easing.type: Easing.OutBack } + NumberAnimation { target: boxesImage; property: "rotation"; from: 20; to: 10; duration: slide.slamTime; easing.type: Easing.OutBack } + NumberAnimation { target: boxesImage; property: "scale"; from: 2; to: 1.5; duration: slide.slamTime; easing.type: Easing.OutBack } + } + PauseAnimation { duration: slide.waitTime } + ParallelAnimation { + NumberAnimation { target: mainwindowsImage; property: "opacity"; from: 0; to: 1; duration: slide.slamTime; easing.type: Easing.OutBack } + NumberAnimation { target: mainwindowsImage; property: "rotation"; from: -35; to: -20; duration: slide.slamTime; easing.type: Easing.OutBack} + NumberAnimation { target: mainwindowsImage; property: "scale"; from: 2; to: 1.5; duration: slide.slamTime; easing.type: Easing.OutBack } + } + PauseAnimation { duration: slide.waitTime } + ParallelAnimation { + NumberAnimation { target: chipsWindow; property: "opacity"; from: 0; to: 1; duration: slide.slamTime; easing.type: Easing.InOutCubic } + NumberAnimation { target: chipsWindow; property: "rotation"; from: 10; to: 25; duration: slide.slamTime; easing.type: Easing.OutBack} + NumberAnimation { target: chipsWindow; property: "scale"; from: 2.5; to: 1.6; duration: slide.slamTime; easing.type: Easing.OutBack } + } + PauseAnimation { duration: slide.waitTime } + ParallelAnimation { + NumberAnimation { target: stylesWindow; property: "opacity"; from: 0; to: 1; duration: slide.slamTime; easing.type: Easing.InOutCubic } + NumberAnimation { target: stylesWindow; property: "rotation"; from: 30; to: -15; duration: slide.slamTime; easing.type: Easing.OutBack} + NumberAnimation { target: stylesWindow; property: "scale"; from: 1.8; to: 1.4; duration: slide.slamTime; easing.type: Easing.OutBack } + } + running: false + } + + onVisibleChanged: { + widgetAnimation.running = slide.visible; + } + + Row { + x: slide.width * 0.05 + y: slide.height * 0.65; + width: parent.width + Image { + id: boxesImage; + source: "images/widgets_boxes.png" + fillMode: Image.PreserveAspectFit + width: slide.width * .2 + antialiasing: true + opacity: 0; + y: -slide.height * 0.2 + rotation: 10 + scale: 1.5; + } + Image { + id: mainwindowsImage + source: "images/widgets_mainwindows.png" + fillMode: Image.PreserveAspectFit + width: slide.width * .2 + antialiasing: true + opacity: 0 + } + Image { + id: chipsWindow + source: "images/widgets_chips.png" + fillMode: Image.PreserveAspectFit + width: slide.width * .2 + x: slide.width * -0.05 + y: -slide.height * 0.2 + antialiasing: true + opacity: 0 + } + + Image { + id: stylesWindow + source: "images/widgets_styles_fusion.png" + fillMode: Image.PreserveAspectFit + width: slide.width * .2 + + x: slide.width * 1 + y: -slide.height * 0.1 + antialiasing: true + opacity: 0 + + Image { + source: "images/widgets_styles_macstyle.png" + fillMode: Image.PreserveAspectFit + width: slide.width * .2 + + x: parent.width * 0.3 + y: parent.width * 0.1 + rotation: -20 + antialiasing: true + } + } + } +} + diff --git a/basicsuite/qt5-launchpresentation/calqlatr/.DS_Store b/basicsuite/qt5-launchpresentation/calqlatr/.DS_Store new file mode 100644 index 0000000..fe95b02 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/.DS_Store differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/Calqlatr.qml b/basicsuite/qt5-launchpresentation/calqlatr/Calqlatr.qml new file mode 100644 index 0000000..7640fbd --- /dev/null +++ b/basicsuite/qt5-launchpresentation/calqlatr/Calqlatr.qml @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "content" +import "content/calculator.js" as CalcEngine + + +Rectangle { + id: window + width: 320 + height: 480 + focus: true + color: "#272822" + + onWidthChanged: controller.reload() + + function operatorPressed(operator) { CalcEngine.operatorPressed(operator) } + function digitPressed(digit) { CalcEngine.digitPressed(digit) } + + Item { + id: pad + width: window.width * 0.58 + NumberPad { y: 10; anchors.horizontalCenter: parent.horizontalCenter } + } + + AnimationController { + id: controller + animation: ParallelAnimation { + id: anim + NumberAnimation { target: display; property: "x"; duration: 400; from: -16; to: window.width - display.width; easing.type: Easing.InOutQuad } + NumberAnimation { target: pad; property: "x"; duration: 400; from: window.width - pad.width; to: 0; easing.type: Easing.InOutQuad } + SequentialAnimation { + NumberAnimation { target: pad; property: "scale"; duration: 200; from: 1; to: 0.97; easing.type: Easing.InOutQuad } + NumberAnimation { target: pad; property: "scale"; duration: 200; from: 0.97; to: 1; easing.type: Easing.InOutQuad } + } + } + } + + Display { + id: display + x: -16 + width: window.width * 0.42 + height: parent.height + + MouseArea { + property real startX: 0 + property real oldP: 0 + property bool rewind: false + + anchors.fill: parent + onPositionChanged: { + var reverse = startX > window.width / 2 + var mx = mapToItem(window, mouse.x).x + var p = Math.abs((mx - startX) / (window.width - display.width)) + if (p < oldP) + rewind = reverse ? false : true + else + rewind = reverse ? true : false + controller.progress = reverse ? 1 - p : p + oldP = p + } + onPressed: startX = mapToItem(window, mouse.x).x + onReleased: { + if (rewind) + controller.completeToBeginning() + else + controller.completeToEnd() + } + } + } + +} diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/Button.qml b/basicsuite/qt5-launchpresentation/calqlatr/content/Button.qml new file mode 100644 index 0000000..c355c2d --- /dev/null +++ b/basicsuite/qt5-launchpresentation/calqlatr/content/Button.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + property alias text: textItem.text + property alias color: textItem.color + + property bool operator: false + + signal clicked + + width: 30 + height: 50 + + Text { + id: textItem + font.pixelSize: 48 + wrapMode: Text.WordWrap + lineHeight: 0.75 + color: "white" + } + +// Rectangle { +// color: "red" +// opacity: 0.2 +// anchors.fill: mouse +// } + + MouseArea { + id: mouse + anchors.fill: parent + anchors.margins: -5 + onClicked: { + //parent.clicked() + if (operator) + window.operatorPressed(parent.text) + else + window.digitPressed(parent.text) + } + } +} diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/Display.qml b/basicsuite/qt5-launchpresentation/calqlatr/content/Display.qml new file mode 100644 index 0000000..3c1d9c0 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/calqlatr/content/Display.qml @@ -0,0 +1,124 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: display + + function displayOperator(operator) + { + listView.model.append({ "operator": operator, "operand": "" }) + } + + function newLine(operator, operand) + { + listView.model.append({ "operator": operator, "operand": operand }) + } + + function appendDigit(digit) + { + if (!listView.model.count) + listView.model.append({ "operator": "", "operand": "" }) + var i = listView.model.count - 1; + listView.model.get(i).operand = listView.model.get(i).operand + digit; + } + + Item { + id: theItem + width: parent.width + 32 + height: parent.height + + Rectangle { + id: rect + x: 16 + color: "white" + height: parent.height + width: display.width - 16 + } + Image { + anchors.right: rect.left + source: "images/paper-edge-left.png" + height: parent.height + fillMode: Image.TileVertically + } + Image { + anchors.left: rect.right + source: "images/paper-edge-right.png" + height: parent.height + fillMode: Image.TileVertically + } + + Image { + source: "images/paper-grip.png" + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 20 + } + + ListView { + id: listView + x: 16; y: 30 + width: display.width + height: display.height + delegate: Item { + height: 20 + width: parent.width + Text { + id: operator + x: 8 + font.pixelSize: 18 + color: "#6da43d" + text: model.operator + } + Text { + id: operand + font.pixelSize: 18 + anchors.right: parent.right + anchors.rightMargin: 26 + text: model.operand + } + } + model: ListModel { } + } + + } + +} diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/NumberPad.qml b/basicsuite/qt5-launchpresentation/calqlatr/content/NumberPad.qml new file mode 100644 index 0000000..853c763 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/calqlatr/content/NumberPad.qml @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Grid { + columns: 3 + columnSpacing: 32 + rowSpacing: 16 + + Button { text: "7" } + Button { text: "8" } + Button { text: "9" } + Button { text: "4" } + Button { text: "5" } + Button { text: "6" } + Button { text: "1" } + Button { text: "2" } + Button { text: "3" } + Button { text: "0" } + Button { text: "." } + Button { text: " " } + Button { text: "±"; color: "#6da43d"; operator: true } + Button { text: "−"; color: "#6da43d"; operator: true } + Button { text: "+"; color: "#6da43d"; operator: true } + Button { text: " "; color: "#6da43d"; operator: true } + Button { text: "÷"; color: "#6da43d"; operator: true } + Button { text: "×"; color: "#6da43d"; operator: true } + Button { text: "C"; color: "#6da43d"; operator: true } + Button { text: " "; color: "#6da43d"; operator: true } + Button { text: "="; color: "#6da43d"; operator: true } +} diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/StyleLabel.qml b/basicsuite/qt5-launchpresentation/calqlatr/content/StyleLabel.qml new file mode 100644 index 0000000..3bdea86 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/calqlatr/content/StyleLabel.qml @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Text { + width: 64 + font.pixelSize: 14 + font.bold: false + wrapMode: Text.WordWrap + lineHeight: 0.75 + color: "#676764" +} diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/audio/touch.wav b/basicsuite/qt5-launchpresentation/calqlatr/content/audio/touch.wav new file mode 100644 index 0000000..94cccb7 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/audio/touch.wav differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/calculator.js b/basicsuite/qt5-launchpresentation/calqlatr/content/calculator.js new file mode 100644 index 0000000..843ef39 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/calqlatr/content/calculator.js @@ -0,0 +1,143 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +var curVal = 0 +var memory = 0 +var lastOp = "" +var previousOperator = "" +var digits = "" + +function disabled(op) { + if (op == "." && digits.toString().search(/\./) != -1) { + return true + } else if (op == window.squareRoot && digits.toString().search(/-/) != -1) { + return true + } else { + return false + } +} + +function digitPressed(op) +{ + if (disabled(op)) + return + if (digits.toString().length >= 14) + return + if (lastOp.toString().length == 1 && ((lastOp >= "0" && lastOp <= "9") || lastOp == ".") ) { + digits = digits + op.toString() + display.appendDigit(op.toString()) + } else { + digits = op + display.appendDigit(op.toString()) + } + lastOp = op +} + +function operatorPressed(op) +{ + if (disabled(op)) + return + lastOp = op + + if (previousOperator == "+") { + digits = Number(digits.valueOf()) + Number(curVal.valueOf()) + } else if (previousOperator == "−") { + digits = Number(curVal) - Number(digits.valueOf()) + } else if (previousOperator == "×") { + digits = Number(curVal) * Number(digits.valueOf()) + } else if (previousOperator == "÷") { + digits = Number(Number(curVal) / Number(digits.valueOf())).toString() + } else if (previousOperator == "=") { + } + + if (op == "+" || op == "−" || op == "×" || op == "÷") { + previousOperator = op + curVal = digits.valueOf() + display.displayOperator(previousOperator) + return + } + + if (op == "=") { + display.newLine("=", digits.toString()) + } + + curVal = 0 + previousOperator = "" + + if (op == "1/x") { + digits = (1 / digits.valueOf()).toString() + } else if (op == "x^2") { + digits = (digits.valueOf() * digits.valueOf()).toString() + } else if (op == "Abs") { + digits = (Math.abs(digits.valueOf())).toString() + } else if (op == "Int") { + digits = (Math.floor(digits.valueOf())).toString() + } else if (op == window.plusminus) { + digits = (digits.valueOf() * -1).toString() + } else if (op == window.squareRoot) { + digits = (Math.sqrt(digits.valueOf())).toString() + } else if (op == "mc") { + memory = 0; + } else if (op == "m+") { + memory += digits.valueOf() + } else if (op == "mr") { + digits = memory.toString() + } else if (op == "m-") { + memory = digits.valueOf() + } else if (op == window.leftArrow) { + digits = digits.toString().slice(0, -1) + if (digits.length == 0) { + digits = "0" + } + } else if (op == "Off") { + Qt.quit(); + } else if (op == "C") { + digits = "0" + } else if (op == "AC") { + curVal = 0 + memory = 0 + lastOp = "" + digits ="0" + } + + +} + diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-back.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-back.png new file mode 100644 index 0000000..2989ee2 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-back.png differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-close.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-close.png new file mode 100644 index 0000000..3e21248 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-close.png differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-settings.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-settings.png new file mode 100644 index 0000000..98e662f Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/icon-settings.png differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/logo.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/logo.png new file mode 100644 index 0000000..6bc6561 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/logo.png differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-edge-left.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-edge-left.png new file mode 100644 index 0000000..ca29a3a Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-edge-left.png differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-edge-right.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-edge-right.png new file mode 100644 index 0000000..7c2da7b Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-edge-right.png differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-grip.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-grip.png new file mode 100644 index 0000000..953c408 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/paper-grip.png differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/settings-selected-a.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/settings-selected-a.png new file mode 100644 index 0000000..e08ddfa Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/settings-selected-a.png differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/settings-selected-b.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/settings-selected-b.png new file mode 100644 index 0000000..d9aa7e3 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/settings-selected-b.png differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/touch-green.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/touch-green.png new file mode 100644 index 0000000..64dbde6 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/touch-green.png differ diff --git a/basicsuite/qt5-launchpresentation/calqlatr/content/images/touch-white.png b/basicsuite/qt5-launchpresentation/calqlatr/content/images/touch-white.png new file mode 100644 index 0000000..bb02b00 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/calqlatr/content/images/touch-white.png differ diff --git a/basicsuite/qt5-launchpresentation/demo.qmlproject b/basicsuite/qt5-launchpresentation/demo.qmlproject new file mode 100644 index 0000000..eed1c97 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/demo.qmlproject @@ -0,0 +1,18 @@ +/* File generated by Qt Creator, version 2.6.1 */ + +import QmlProject 1.1 + +Project { + mainFile: "main.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "images" + } +} diff --git a/basicsuite/qt5-launchpresentation/description.txt b/basicsuite/qt5-launchpresentation/description.txt new file mode 100644 index 0000000..48d03f3 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/description.txt @@ -0,0 +1,6 @@ +The following is a quick tour of what is new in Qt 5. + +It is an application written with Qt Quick, based on Qt 5. The source code is available from: https://qt.gitorious.org/qt-labs/qt5-launch-demo +The demo makes use of the QML Presentation System, available from: ssh://codereview.qt-project.org/qt-labs/qml-presentation-system.git + +The demo has been modified slightly to run in this launcher. diff --git a/basicsuite/qt5-launchpresentation/images/ally.png b/basicsuite/qt5-launchpresentation/images/ally.png new file mode 100644 index 0000000..05b405b Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/ally.png differ diff --git a/basicsuite/qt5-launchpresentation/images/butterfly.png b/basicsuite/qt5-launchpresentation/images/butterfly.png new file mode 100644 index 0000000..b8cc35c Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/butterfly.png differ diff --git a/basicsuite/qt5-launchpresentation/images/displace.png b/basicsuite/qt5-launchpresentation/images/displace.png new file mode 100644 index 0000000..440e8cb Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/displace.png differ diff --git a/basicsuite/qt5-launchpresentation/images/fog.png b/basicsuite/qt5-launchpresentation/images/fog.png new file mode 100644 index 0000000..f462222 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/fog.png differ diff --git a/basicsuite/qt5-launchpresentation/images/particle.png b/basicsuite/qt5-launchpresentation/images/particle.png new file mode 100644 index 0000000..5c83896 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/particle.png differ diff --git a/basicsuite/qt5-launchpresentation/images/qt-logo.png b/basicsuite/qt5-launchpresentation/images/qt-logo.png new file mode 100644 index 0000000..7f2c662 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/qt-logo.png differ diff --git a/basicsuite/qt5-launchpresentation/images/widgets_boxes.png b/basicsuite/qt5-launchpresentation/images/widgets_boxes.png new file mode 100644 index 0000000..3115255 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/widgets_boxes.png differ diff --git a/basicsuite/qt5-launchpresentation/images/widgets_chips.png b/basicsuite/qt5-launchpresentation/images/widgets_chips.png new file mode 100644 index 0000000..4ef1664 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/widgets_chips.png differ diff --git a/basicsuite/qt5-launchpresentation/images/widgets_mainwindows.png b/basicsuite/qt5-launchpresentation/images/widgets_mainwindows.png new file mode 100644 index 0000000..5ce5416 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/widgets_mainwindows.png differ diff --git a/basicsuite/qt5-launchpresentation/images/widgets_styles_fusion.png b/basicsuite/qt5-launchpresentation/images/widgets_styles_fusion.png new file mode 100644 index 0000000..d94f859 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/widgets_styles_fusion.png differ diff --git a/basicsuite/qt5-launchpresentation/images/widgets_styles_macstyle.png b/basicsuite/qt5-launchpresentation/images/widgets_styles_macstyle.png new file mode 100644 index 0000000..033f43b Binary files /dev/null and b/basicsuite/qt5-launchpresentation/images/widgets_styles_macstyle.png differ diff --git a/basicsuite/qt5-launchpresentation/main.qml b/basicsuite/qt5-launchpresentation/main.qml new file mode 100644 index 0000000..627ec48 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/main.qml @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + + width: 1280 + height: 720 + + property real widthFactor: root.width / root.height; + + DemoMain { + width: 720 * root.widthFactor + height: 720 + + anchors.centerIn: parent + + scale: root.height / height + + useDropShadow: false; + useSimpleGradient: true; + } + +} diff --git a/basicsuite/qt5-launchpresentation/main_hifi.qml b/basicsuite/qt5-launchpresentation/main_hifi.qml new file mode 100644 index 0000000..19e006b --- /dev/null +++ b/basicsuite/qt5-launchpresentation/main_hifi.qml @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt 5 launch demo. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +DemoMain { + autorun: true +} diff --git a/basicsuite/qt5-launchpresentation/maroon/.DS_Store b/basicsuite/qt5-launchpresentation/maroon/.DS_Store new file mode 100644 index 0000000..b5c859b Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/.DS_Store differ diff --git a/basicsuite/qt5-launchpresentation/maroon/Maroon.qml b/basicsuite/qt5-launchpresentation/maroon/Maroon.qml new file mode 100644 index 0000000..d7bfcb6 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/Maroon.qml @@ -0,0 +1,233 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "content" +import "content/logic.js" as Logic + +Item { + id: root + width: 320 + height: 480 + property var gameState: Logic.newGameState(canvas); + property bool passedSplash: false + + Image { + source:"content/gfx/background.png" + anchors.bottom: view.bottom + + ParticleSystem { + id: particles + anchors.fill: parent + + ImageParticle { + id: bubble + anchors.fill: parent + source: "content/gfx/catch.png" + opacity: 0.25 + } + + Wander { + xVariance: 25; + pace: 25; + } + + Emitter { + width: parent.width + height: 150 + anchors.bottom: parent.bottom + anchors.bottomMargin: 3 + startTime: 15000 + + emitRate: 2 + lifeSpan: 15000 + + acceleration: PointDirection{ y: -6; xVariation: 2; yVariation: 2 } + + size: 24 + sizeVariation: 16 + } + } + } + + Column { + id: view + y: -(height - 480) + width: 320 + + GameOverScreen { gameCanvas: canvas } + + Item { + id: canvasArea + width: 320 + height: 480 + + Row { + height: childrenRect.height + Image { + id: wave + y: 30 + source:"content/gfx/wave.png" + } + Image { + y: 30 + source:"content/gfx/wave.png" + } + NumberAnimation on x { from: 0; to: -(wave.width); duration: 16000; loops: Animation.Infinite } + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { from: y - 2; to: y + 2; duration: 1600; easing.type: Easing.InOutQuad } + NumberAnimation { from: y + 2; to: y - 2; duration: 1600; easing.type: Easing.InOutQuad } + } + } + + Row { + opacity: 0.5 + Image { + id: wave2 + y: 25 + source: "content/gfx/wave.png" + } + Image { + y: 25 + source: "content/gfx/wave.png" + } + NumberAnimation on x { from: -(wave2.width); to: 0; duration: 32000; loops: Animation.Infinite } + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { from: y + 2; to: y - 2; duration: 1600; easing.type: Easing.InOutQuad } + NumberAnimation { from: y - 2; to: y + 2; duration: 1600; easing.type: Easing.InOutQuad } + } + } + + Image { + source: "content/gfx/sunlight.png" + opacity: 0.02 + y: 0 + anchors.horizontalCenter: parent.horizontalCenter + transformOrigin: Item.Top + SequentialAnimation on rotation { + loops: Animation.Infinite + NumberAnimation { from: -10; to: 10; duration: 8000; easing.type: Easing.InOutSine } + NumberAnimation { from: 10; to: -10; duration: 8000; easing.type: Easing.InOutSine } + } + } + + Image { + source: "content/gfx/sunlight.png" + opacity: 0.04 + y: 20 + anchors.horizontalCenter: parent.horizontalCenter + transformOrigin: Item.Top + SequentialAnimation on rotation { + loops: Animation.Infinite + NumberAnimation { from: 10; to: -10; duration: 8000; easing.type: Easing.InOutSine } + NumberAnimation { from: -10; to: 10; duration: 8000; easing.type: Easing.InOutSine } + } + } + + Image { + source: "content/gfx/grid.png" + opacity: 0.5 + } + + GameCanvas { + id: canvas + anchors.bottom: parent.bottom + anchors.bottomMargin: 20 + x: 32 + focus: true + } + + InfoBar { anchors.bottom: canvas.top; anchors.bottomMargin: 6; width: parent.width } + + //3..2..1..go + Timer { + id: countdownTimer + interval: 1000 + running: root.countdown < 5 + repeat: true + onTriggered: root.countdown++ + } + Repeater { + model: ["content/gfx/text-blank.png", "content/gfx/text-3.png", "content/gfx/text-2.png", "content/gfx/text-1.png", "content/gfx/text-go.png"] + delegate: Image { + visible: root.countdown <= index + opacity: root.countdown == index ? 0.5 : 0.1 + scale: root.countdown >= index ? 1.0 : 0.0 + source: modelData + Behavior on opacity { NumberAnimation {} } + Behavior on scale { NumberAnimation {} } + } + } + } + + NewGameScreen { + onStartButtonClicked: root.passedSplash = true + } + } + + property int countdown: 10 + Timer { + id: gameStarter + interval: 4000 + running: false + repeat: false + onTriggered: Logic.startGame(canvas); + } + + states: [ + State { + name: "gameOn"; when: gameState.gameOver == false && passedSplash + PropertyChanges { target: view; y: -(height - 960) } + StateChangeScript { script: root.countdown = 0; } + PropertyChanges { target: gameStarter; running: true } + }, + State { + name: "gameOver"; when: gameState.gameOver == true + PropertyChanges { target: view; y: 0 } + } + ] + + transitions: Transition { + NumberAnimation { properties: "x,y"; duration: 1200; easing.type: Easing.OutQuad } + } +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/BuildButton.qml b/basicsuite/qt5-launchpresentation/maroon/content/BuildButton.qml new file mode 100644 index 0000000..49641fc --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/BuildButton.qml @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "logic.js" as Logic + +Item { + id: container + width: 64 + height: 64 + property alias source: img.source + property int index + property int row: 0 + property int col: 0 + property int towerType + property bool canBuild: true + property Item gameCanvas: parent.parent.parent + signal clicked() + + Image { + id: img + opacity: (canBuild && gameCanvas.coins >= Logic.towerData[towerType-1].cost) ? 1.0 : 0.4 + } + Text { + anchors.right: parent.right + font.pointSize: 14 + font.bold: true + color: "#ffffff" + text: Logic.towerData[towerType - 1].cost + } + MouseArea { + anchors.fill: parent + onClicked: { + Logic.buildTower(towerType, col, row) + container.clicked() + } + } + Image { + visible: col == index && row != 0 + source: "gfx/dialog-pointer.png" + anchors.top: parent.bottom + anchors.topMargin: 4 + anchors.horizontalCenter: parent.horizontalCenter + } + Image { + visible: col == index && row == 0 + source: "gfx/dialog-pointer.png" + rotation: 180 + anchors.bottom: parent.top + anchors.bottomMargin: 6 + anchors.horizontalCenter: parent.horizontalCenter + } +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/GameCanvas.qml b/basicsuite/qt5-launchpresentation/maroon/content/GameCanvas.qml new file mode 100644 index 0000000..5e6e963 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/GameCanvas.qml @@ -0,0 +1,240 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "logic.js" as Logic +import "towers" as Towers + +Item { + id: grid + + property int squareSize: 64 + property int rows: 6 + property int cols: 4 + property Item canvas: grid + property int score: 0 + property int coins: 100 + property int lives: 3 + property int waveNumber: 0 + property int waveProgress: 0 + property var towers + property var mobs + property bool gameRunning: false + property bool gameOver: false + property bool errored: false + property string errorString: "" + + width: cols * squareSize + height: rows * squareSize + + function freshState() { + lives = 3 + coins = 100 + score = 0 + waveNumber = 0 + waveProgress = 0 + gameOver = false + gameRunning = false + towerMenu.shown = false + helpButton.comeBack(); + } + + Text { + id: errorText // Mostly for debug purposes + text: errorString + visible: errored + color: "red" + font.pixelSize: 18 + wrapMode: Text.WordWrap + width: parent.width / 1.2 + height: parent.height / 1.2 + anchors.centerIn: parent + z: 1000 + } + + Timer { + interval: 16 + running: true + repeat: true + onTriggered: Logic.tick() + } + + MouseArea { + id: ma + anchors.fill: parent + onClicked: { + if (towerMenu.visible) + towerMenu.finish() + else + towerMenu.open(mouse.x, mouse.y) + } + } + + Image { + id: towerMenu + visible: false + z: 1500 + scale: 0.9 + opacity: 0.7 + property int dragDistance: 16 + property int targetRow: 0 + property int targetCol: 0 + property bool shown: false + property bool towerExists: false + + function finish() { + shown = false + } + + function open(xp,yp) { + if (!grid.gameRunning) + return + targetRow = Logic.row(yp) + targetCol = Logic.col(xp) + if (targetRow == 0) + towerMenu.y = (targetRow + 1) * grid.squareSize + else + towerMenu.y = (targetRow - 1) * grid.squareSize + towerExists = (grid.towers[Logic.towerIdx(targetCol, targetRow)] != null) + shown = true + helpButton.goAway(); + } + + states: State { + name: "shown"; when: towerMenu.shown && !grid.gameOver + PropertyChanges { target: towerMenu; visible: true; scale: 1; opacity: 1 } + } + + transitions: Transition { + PropertyAction { property: "visible" } + NumberAnimation { properties: "opacity,scale"; duration: 500; easing.type: Easing.OutElastic } + } + + x: -32 + source: "gfx/dialog.png" + Row { + id: buttonRow + height: 100 + anchors.centerIn: parent + spacing: 8 + BuildButton { + row: towerMenu.targetRow; col: towerMenu.targetCol + anchors.verticalCenter: parent.verticalCenter + towerType: 1; index: 0 + canBuild: !towerMenu.towerExists + source: "gfx/dialog-melee.png" + onClicked: towerMenu.finish() + } + BuildButton { + row: towerMenu.targetRow; col: towerMenu.targetCol + anchors.verticalCenter: parent.verticalCenter + towerType: 2; index: 1 + canBuild: !towerMenu.towerExists + source: "gfx/dialog-shooter.png" + onClicked: towerMenu.finish() + } + BuildButton { + row: towerMenu.targetRow; col: towerMenu.targetCol + anchors.verticalCenter: parent.verticalCenter + towerType: 3; index: 2 + canBuild: !towerMenu.towerExists + source: "gfx/dialog-bomb.png" + onClicked: towerMenu.finish() + } + BuildButton { + row: towerMenu.targetRow; col: towerMenu.targetCol + anchors.verticalCenter: parent.verticalCenter + towerType: 4; index: 3 + canBuild: !towerMenu.towerExists + source: "gfx/dialog-factory.png" + onClicked: towerMenu.finish() + } + } + } + + + Keys.onPressed: { // Cheat Codes while Testing + if (event.key == Qt.Key_Up && (event.modifiers & Qt.ShiftModifier)) + grid.coins += 10; + if (event.key == Qt.Key_Left && (event.modifiers & Qt.ShiftModifier)) + grid.lives += 1; + if (event.key == Qt.Key_Down && (event.modifiers & Qt.ShiftModifier)) + Logic.gameState.waveProgress += 1000; + if (event.key == Qt.Key_Right && (event.modifiers & Qt.ShiftModifier)) + Logic.endGame(); + } + + Image { + id: helpButton + z: 1010 + source: "gfx/button-help.png" + function goAway() { + helpMA.enabled = false; + helpButton.opacity = 0; + } + function comeBack() { + helpMA.enabled = true; + helpButton.opacity = 1; + } + Behavior on opacity { NumberAnimation {} } + MouseArea { + id: helpMA + anchors.fill: parent + onClicked: {helpImage.visible = true; helpButton.visible = false;} + } + + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 0 + } + + Image { + id: helpImage + z: 1010 + source: "gfx/help.png" + anchors.fill: parent + visible: false + MouseArea { + anchors.fill: parent + onClicked: helpImage.visible = false; + } + } + +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/GameOverScreen.qml b/basicsuite/qt5-launchpresentation/maroon/content/GameOverScreen.qml new file mode 100644 index 0000000..dfb439f --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/GameOverScreen.qml @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "logic.js" as Logic + +Item { + id: gameOverScreen + width: 320 + height: 400 + property GameCanvas gameCanvas + + Image { + id: img + source: "gfx/text-gameover.png" + anchors.centerIn: parent + } + + ParticleSystem { + anchors.fill: parent + ImageParticle { + id: cloud + source: "gfx/cloud.png" + alphaVariation: 0.25 + opacity: 0.25 + } + + Wander { + xVariance: 100; + pace: 1; + } + + Emitter { + id: cloudLeft + width: 160 + height: 160 + anchors.right: parent.left + emitRate: 0.5 + lifeSpan: 12000 + velocity: PointDirection{ x: 64; xVariation: 2; yVariation: 2 } + size: 160 + } + + Emitter { + id: cloudRight + width: 160 + height: 160 + anchors.left: parent.right + emitRate: 0.5 + lifeSpan: 12000 + velocity: PointDirection{ x: -64; xVariation: 2; yVariation: 2 } + size: 160 + } + } + + + Text { + visible: gameCanvas != undefined + text: "You saved " + gameCanvas.score + " fishes!" + anchors.top: img.bottom + anchors.topMargin: 12 + anchors.horizontalCenter: parent.horizontalCenter + font.bold: true + color: "#000000" + opacity: 0.5 + } + + Image { + source: "gfx/button-play.png" + anchors.bottom: parent.bottom + anchors.bottomMargin: 0 + MouseArea { + anchors.fill: parent + onClicked: gameCanvas.gameOver = false//This will actually trigger the state change in main.qml + } + } +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/InfoBar.qml b/basicsuite/qt5-launchpresentation/maroon/content/InfoBar.qml new file mode 100644 index 0000000..36303fc --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/InfoBar.qml @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + height: childrenRect.height + + // Display the number of lives + Row { + anchors.left: parent.left + anchors.leftMargin: 10 + spacing: 5 + Repeater { + id: rep + model: Math.min(10, canvas.lives) + delegate: Image { source: "gfx/lifes.png" } + } + } + + // Display the number of fishes saved + Row { + anchors.right: points.left + anchors.rightMargin: 20 + spacing: 5 + Image { source: "gfx/scores.png" } + Text { + text: canvas.score + font.bold: true + } + } + + // Display the number of coins + Row { + id: points + anchors.right: parent.right + anchors.rightMargin: 10 + spacing: 5 + Image { source: "gfx/points.png" } + Text { + id: pointsLabel + text: canvas.coins + font.bold: true + } + } +} + diff --git a/basicsuite/qt5-launchpresentation/maroon/content/NewGameScreen.qml b/basicsuite/qt5-launchpresentation/maroon/content/NewGameScreen.qml new file mode 100644 index 0000000..495e3aa --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/NewGameScreen.qml @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +// This is the first screen. +// It shows the logo and emit a startButtonClicked signal +// when the user press the "PLAY" button. + +Item { + id: newGameScreen + width: 320 + height: 480 + + signal startButtonClicked + + Image { + source: "gfx/logo.png" + anchors.top: parent.top + anchors.topMargin: 60 + } + + Image { + source: "gfx/logo-fish.png" + anchors.top: parent.top + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x + 148; to: x + 25; duration: 2000; easing.type: Easing.InOutQuad } + NumberAnimation { from: x + 25; to: x + 148; duration: 1600; easing.type: Easing.InOutQuad } + } + SequentialAnimation on anchors.topMargin { + loops: Animation.Infinite + NumberAnimation { from: 100; to: 60; duration: 1600; easing.type: Easing.InOutQuad } + NumberAnimation { from: 60; to: 100; duration: 2000; easing.type: Easing.InOutQuad } + } + } + + Image { + source: "gfx/logo-bubble.png" + anchors.top: parent.top + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x + 140; to: x + 40; duration: 2000; easing.type: Easing.InOutQuad } + NumberAnimation { from: x + 40; to: x + 140; duration: 1600; easing.type: Easing.InOutQuad } + } + SequentialAnimation on anchors.topMargin { + loops: Animation.Infinite + NumberAnimation { from: 100; to: 60; duration: 1600; easing.type: Easing.InOutQuad } + NumberAnimation { from: 60; to: 100; duration: 2000; easing.type: Easing.InOutQuad } + } + SequentialAnimation on width { + loops: Animation.Infinite + NumberAnimation { from: 140; to: 160; duration: 1000; easing.type: Easing.InOutQuad } + NumberAnimation { from: 160; to: 140; duration: 800; easing.type: Easing.InOutQuad } + } + SequentialAnimation on height { + loops: Animation.Infinite + NumberAnimation { from: 150; to: 140; duration: 800; easing.type: Easing.InOutQuad } + NumberAnimation { from: 140; to: 150; duration: 1000; easing.type: Easing.InOutQuad } + } + } + + Image { + source: "gfx/button-play.png" + anchors.bottom: parent.bottom + anchors.bottomMargin: 60 + MouseArea { + anchors.fill: parent + onClicked: newGameScreen.startButtonClicked() + } + } +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/SoundEffect.qml b/basicsuite/qt5-launchpresentation/maroon/content/SoundEffect.qml new file mode 100644 index 0000000..d286a39 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/SoundEffect.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +//Proxies a SoundEffect if QtMultimedia is installed +Item { + id: container + property QtObject effect: Qt.createQmlObject("import QtMultimedia 5.0; SoundEffect{ source: '" + container.source + "' }", container); + property url source: "" + onSourceChanged: if (effect != null) effect.source = source; + function play() { + if (effect != null) + effect.play(); + } + +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/audio/bomb-action.wav b/basicsuite/qt5-launchpresentation/maroon/content/audio/bomb-action.wav new file mode 100644 index 0000000..b334dc1 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/audio/bomb-action.wav differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/audio/catch-action.wav b/basicsuite/qt5-launchpresentation/maroon/content/audio/catch-action.wav new file mode 100644 index 0000000..3e22124 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/audio/catch-action.wav differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/audio/catch.wav b/basicsuite/qt5-launchpresentation/maroon/content/audio/catch.wav new file mode 100644 index 0000000..d3eade8 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/audio/catch.wav differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/audio/currency.wav b/basicsuite/qt5-launchpresentation/maroon/content/audio/currency.wav new file mode 100644 index 0000000..0d9ef2c Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/audio/currency.wav differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/audio/factory-action.wav b/basicsuite/qt5-launchpresentation/maroon/content/audio/factory-action.wav new file mode 100644 index 0000000..a2ace6c Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/audio/factory-action.wav differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/audio/melee-action.wav b/basicsuite/qt5-launchpresentation/maroon/content/audio/melee-action.wav new file mode 100644 index 0000000..d325af4 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/audio/melee-action.wav differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/audio/projectile-action.wav b/basicsuite/qt5-launchpresentation/maroon/content/audio/projectile-action.wav new file mode 100644 index 0000000..4e2284f Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/audio/projectile-action.wav differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/audio/shooter-action.wav b/basicsuite/qt5-launchpresentation/maroon/content/audio/shooter-action.wav new file mode 100644 index 0000000..3e12b94 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/audio/shooter-action.wav differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/background.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/background.png new file mode 100644 index 0000000..d548b93 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/background.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb-action.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb-action.png new file mode 100644 index 0000000..42da5d7 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb-action.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb-idle.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb-idle.png new file mode 100644 index 0000000..3bd62e2 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb-idle.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb.png new file mode 100644 index 0000000..380da7d Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/bomb.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/button-help.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/button-help.png new file mode 100644 index 0000000..aecebc1 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/button-help.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/button-play.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/button-play.png new file mode 100644 index 0000000..6cdad6c Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/button-play.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/catch-action.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/catch-action.png new file mode 100644 index 0000000..78ca9fe Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/catch-action.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/catch.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/catch.png new file mode 100644 index 0000000..b7620fe Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/catch.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/cloud.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/cloud.png new file mode 100644 index 0000000..d7c35f8 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/cloud.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/currency.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/currency.png new file mode 100644 index 0000000..1571341 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/currency.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-bomb.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-bomb.png new file mode 100644 index 0000000..708d916 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-bomb.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-factory.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-factory.png new file mode 100644 index 0000000..d2e2a48 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-factory.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-melee.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-melee.png new file mode 100644 index 0000000..069d18d Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-melee.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-pointer.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-pointer.png new file mode 100644 index 0000000..9b51a09 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-pointer.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-shooter.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-shooter.png new file mode 100644 index 0000000..af980ca Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog-shooter.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog.png new file mode 100644 index 0000000..d528ba7 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/dialog.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/factory-action.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/factory-action.png new file mode 100644 index 0000000..8981678 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/factory-action.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/factory-idle.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/factory-idle.png new file mode 100644 index 0000000..a145582 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/factory-idle.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/factory.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/factory.png new file mode 100644 index 0000000..bfb9f3f Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/factory.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/grid.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/grid.png new file mode 100644 index 0000000..b595552 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/grid.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/help.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/help.png new file mode 100644 index 0000000..4654e4c Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/help.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/lifes.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/lifes.png new file mode 100644 index 0000000..135310b Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/lifes.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/logo-bubble.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/logo-bubble.png new file mode 100644 index 0000000..136151c Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/logo-bubble.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/logo-fish.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/logo-fish.png new file mode 100644 index 0000000..c41833a Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/logo-fish.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/logo.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/logo.png new file mode 100644 index 0000000..787ac99 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/logo.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/melee-action.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/melee-action.png new file mode 100644 index 0000000..c53873b Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/melee-action.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/melee-idle.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/melee-idle.png new file mode 100644 index 0000000..621d9df Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/melee-idle.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/melee.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/melee.png new file mode 100644 index 0000000..ab24015 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/melee.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/mob-idle.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/mob-idle.png new file mode 100644 index 0000000..dedacc7 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/mob-idle.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/mob.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/mob.png new file mode 100644 index 0000000..7569c35 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/mob.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/points.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/points.png new file mode 100644 index 0000000..1d2386d Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/points.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/projectile-action.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/projectile-action.png new file mode 100644 index 0000000..aa2e650 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/projectile-action.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/projectile.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/projectile.png new file mode 100644 index 0000000..c25a0c3 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/projectile.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/scores.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/scores.png new file mode 100644 index 0000000..af757fe Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/scores.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter-action.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter-action.png new file mode 100644 index 0000000..08e7e30 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter-action.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter-idle.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter-idle.png new file mode 100644 index 0000000..663098d Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter-idle.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter.png new file mode 100644 index 0000000..d44401e Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/shooter.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/sunlight.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/sunlight.png new file mode 100644 index 0000000..d1c7042 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/sunlight.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-1.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-1.png new file mode 100644 index 0000000..3ea399c Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-1.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-2.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-2.png new file mode 100644 index 0000000..934a481 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-2.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-3.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-3.png new file mode 100644 index 0000000..47523f5 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-3.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-blank.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-blank.png new file mode 100644 index 0000000..4a687b2 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-blank.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-gameover.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-gameover.png new file mode 100644 index 0000000..4f53ef0 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-gameover.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-go.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-go.png new file mode 100644 index 0000000..bfc26f7 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/text-go.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/gfx/wave.png b/basicsuite/qt5-launchpresentation/maroon/content/gfx/wave.png new file mode 100644 index 0000000..f97426c Binary files /dev/null and b/basicsuite/qt5-launchpresentation/maroon/content/gfx/wave.png differ diff --git a/basicsuite/qt5-launchpresentation/maroon/content/logic.js b/basicsuite/qt5-launchpresentation/maroon/content/logic.js new file mode 100644 index 0000000..dd76b7e --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/logic.js @@ -0,0 +1,264 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +.pragma library // Shared game state +.import QtQuick 2.0 as QQ + +// Game Stuff +var gameState // Local reference +function getGameState() { return gameState; } + +var towerData = [ // Name and cost, stats are in the delegate per instance + { "name": "Melee", "cost": 20 }, + { "name": "Ranged", "cost": 50 }, + { "name": "Bomb", "cost": 75 }, + { "name": "Factory", "cost": 25 } +] + +var waveBaseData = [300, 290, 280, 270, 220, 180, 160, 80, 80, 80, 30, 30, 30, 30]; +var waveData = []; + +var towerComponents = new Array(towerData.length); +var mobComponent = Qt.createComponent("mobs/MobBase.qml"); + +function endGame() +{ + gameState.gameRunning = false; + gameState.gameOver = true; + for (var i = 0; i < gameState.cols; i++) { + for (var j = 0; j < gameState.rows; j++) { + if (gameState.towers[towerIdx(i, j)]) { + gameState.towers[towerIdx(i, j)].destroy(); + gameState.towers[towerIdx(i, j)] = null; + } + } + for (var j in gameState.mobs[i]) + gameState.mobs[i][j].destroy(); + gameState.mobs[i].splice(0,gameState.mobs[i].length); //Leaves queue reusable + } +} + +function startGame(gameCanvas) +{ + waveData = new Array(); + for (var i in waveBaseData) + waveData[i] = waveBaseData[i]; + gameState.freshState(); + for (var i = 0; i < gameCanvas.cols; i++) { + for (var j = 0; j < gameCanvas.rows; j++) + gameState.towers[towerIdx(i, j)] = null; + gameState.mobs[i] = new Array(); + } + gameState.towers[towerIdx(0, 0)] = newTower(3, 0, 0);//Start with a starfish in the corner + gameState.gameRunning = true; + gameState.gameOver = false; +} + +function newGameState(gameCanvas) +{ + for (var i = 0; i < towerComponents.length; i++) { + towerComponents[i] = Qt.createComponent("towers/" + towerData[i].name + ".qml"); + if (towerComponents[i].status == QQ.Component.Error) { + gameCanvas.errored = true; + gameCanvas.errorString += "Loading Tower " + towerData[i].name + "\n" + (towerComponents[i].errorString()); + console.log(towerComponents[i].errorString()); + } + } + gameState = gameCanvas; + gameState.freshState(); + gameState.towers = new Array(gameCanvas.rows * gameCanvas.cols); + gameState.mobs = new Array(gameCanvas.cols); + return gameState; +} + +function row(y) +{ + return Math.floor(y / gameState.squareSize); +} + +function col(x) +{ + return Math.floor(x / gameState.squareSize); +} + +function towerIdx(x, y) +{ + return y + (x * gameState.rows); +} + +function newMob(col) +{ + var ret = mobComponent.createObject(gameState.canvas, + { "col" : col, + "speed" : (Math.min(2.0, 0.10 * (gameState.waveNumber + 1))), + "y" : gameState.canvas.height }); + gameState.mobs[col].push(ret); + return ret; +} + +function newTower(type, row, col) +{ + var ret = towerComponents[type].createObject(gameState.canvas); + ret.row = row; + ret.col = col; + ret.fireCounter = ret.rof; + ret.spawn(); + return ret; +} + +function buildTower(type, x, y) +{ + if (gameState.towers[towerIdx(x,y)] != null) { + if (type <= 0) { + gameState.towers[towerIdx(x,y)].sell(); + gameState.towers[towerIdx(x,y)] = null; + } + } else { + if (gameState.coins < towerData[type - 1].cost) + return; + gameState.towers[towerIdx(x, y)] = newTower(type - 1, y, x); + gameState.coins -= towerData[type - 1].cost; + } +} + +function killMob(col, mob) +{ + if (!mob) + return; + var idx = gameState.mobs[col].indexOf(mob); + if (idx == -1 || !mob.hp) + return; + mob.hp = 0; + mob.die(); + gameState.mobs[col].splice(idx,1); +} + +function killTower(row, col) +{ + var tower = gameState.towers[towerIdx(col, row)]; + if (!tower) + return; + tower.hp = 0; + tower.die(); + gameState.towers[towerIdx(col, row)] = null; +} + +function tick() +{ + if (!gameState.gameRunning) + return; + + // Spawn + gameState.waveProgress += 1; + var i = gameState.waveProgress; + var j = 0; + while (i > 0 && j < waveData.length) + i -= waveData[j++]; + if ( i == 0 ) // Spawn a mob + newMob(Math.floor(Math.random() * gameState.cols)); + if ( j == waveData.length ) { // Next Wave + gameState.waveNumber += 1; + gameState.waveProgress = 0; + var waveModifier = 10; // Constant governing how much faster the next wave is to spawn (not fish speed) + for (var k in waveData ) // Slightly faster + if (waveData[k] > waveModifier) + waveData[k] -= waveModifier; + } + + // Towers Attack + for (var j in gameState.towers) { + var tower = gameState.towers[j]; + if (tower == null) + continue; + if (tower.fireCounter > 0) { + tower.fireCounter -= 1; + continue; + } + var column = tower.col; + for (var k in gameState.mobs[column]) { + var conflict = gameState.mobs[column][k]; + if (conflict.y <= gameState.canvas.height && conflict.y + conflict.height > tower.y + && conflict.y - ((tower.row + 1) * gameState.squareSize) < gameState.squareSize * tower.range) { // In Range + tower.fire(); + tower.fireCounter = tower.rof; + conflict.hit(tower.damage); + } + } + + // Income + if (tower.income) { + gameState.coins += tower.income; + tower.fire(); + tower.fireCounter = tower.rof; + } + } + + // Mobs move + for (var i = 0; i < gameState.cols; i++) { + for (var j = 0; j < gameState.mobs[i].length; j++) { + var mob = gameState.mobs[i][j]; + var newPos = gameState.mobs[i][j].y - gameState.mobs[i][j].speed; + if (newPos < 0) { + gameState.lives -= 1; + killMob(i, mob); + if (gameState.lives <= 0) + endGame(); + continue; + } + var conflict = gameState.towers[towerIdx(i, row(newPos))]; + if (conflict != null) { + if (mob.y < conflict.y + gameState.squareSize) + gameState.mobs[i][j].y += gameState.mobs[i][j].speed * 10; // Moved inside tower, now hurry back out + if (mob.fireCounter > 0) { + mob.fireCounter--; + } else { + gameState.mobs[i][j].fire(); + conflict.hp -= mob.damage; + if (conflict.hp <= 0) + killTower(conflict.row, conflict.col); + mob.fireCounter = mob.rof; + } + } else { + gameState.mobs[i][j].y = newPos; + } + } + } + +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/mobs/MobBase.qml b/basicsuite/qt5-launchpresentation/maroon/content/mobs/MobBase.qml new file mode 100644 index 0000000..d4ece66 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/mobs/MobBase.qml @@ -0,0 +1,262 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "../logic.js" as Logic +import ".." + +Item { + id: container + property string name: "Fish" + property int col: 0 + property real hp: 3 + property real damage: 1 + property real speed: 0.25 + property int rof: 30 //In ticks + property int fireCounter: 0 + property bool dying: false + width: parent ? parent.squareSize : 0 + height: parent ? parent.squareSize : 0 + x: col * width + z: 1001 + function fire() { } + + function die() { + if (dying) + return; + dying = true; + bubble.jumpTo("burst"); + if (fishSprite.currentSprite == "front") + fishSprite.jumpTo(Math.random() > 0.5 ? "left" : "right" ); + fishSwim.start(); + Logic.gameState.score += 1; + killedSound.play(); + bubble.scale = 0.9 + destroy(350); + } + + function inked() { + if (hp > 0) + ink.jumpTo("dirty"); + } + + function hit(dmg) { + hp -= dmg; + + if (hp <= 0) + Logic.killMob(col, container); + } + + Component.onCompleted: spawnSound.play() + + SoundEffect { + id: spawnSound + source: "../audio/catch.wav" + } + SoundEffect { + id: killedSound + source: "../audio/catch-action.wav" + } + + SpriteSequence { + id: fishSprite + width: 64 + height: 64 + interpolate: false + goalSprite: "" + + Sprite { + name: "left" + source: "../gfx/mob-idle.png" + frameWidth: 64 + frameHeight: 64 + frameCount: 1 + frameDuration: 800 + frameDurationVariation: 400 + to: { "front" : 1 } + } + + Sprite { + name: "front" + source: "../gfx/mob-idle.png" + frameCount: 1 + frameX: 64 + frameWidth: 64 + frameHeight: 64 + frameDuration: 800 + frameDurationVariation: 400 + to: { "left" : 1, "right" : 1 } + } + + Sprite { + name: "right" + source: "../gfx/mob-idle.png" + frameCount: 1 + frameX: 128 + frameWidth: 64 + frameHeight: 64 + frameDuration: 800 + frameDurationVariation: 400 + to: { "front" : 1 } + } + + + Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. + name: "dummy" + source: "../gfx/melee-idle.png" + frameCount: 8 + frameWidth: 64 + frameHeight: 64 + frameX: 0 + frameDuration: 200 + } + + NumberAnimation on x { + id: fishSwim + running: false + property bool goingLeft: fishSprite.currentSprite == "right" + to: goingLeft ? -360 : 360 + duration: 300 + } + } + + SpriteSequence { + id: bubble + width: 64 + height: 64 + scale: 0.4 + (0.2 * hp) + interpolate: false + goalSprite: "" + + Behavior on scale { + NumberAnimation { duration: 150; easing.type: Easing.OutBack } + } + + Sprite { + name: "big" + source: "../gfx/catch.png" + frameCount: 1 + to: { "burst" : 0 } + } + + Sprite { + name: "burst" + source: "../gfx/catch-action.png" + frameCount: 3 + frameX: 64 + frameDuration: 200 + } + + Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. + name: "dummy" + source: "../gfx/melee-idle.png" + frameCount: 8 + frameWidth: 64 + frameHeight: 64 + frameX: 0 + frameDuration: 200 + } + SequentialAnimation on width { + loops: Animation.Infinite + NumberAnimation { from: width * 1; to: width * 1.1; duration: 800; easing.type: Easing.InOutQuad } + NumberAnimation { from: width * 1.1; to: width * 1; duration: 1000; easing.type: Easing.InOutQuad } + } + SequentialAnimation on height { + loops: Animation.Infinite + NumberAnimation { from: height * 1; to: height * 1.15; duration: 1200; easing.type: Easing.InOutQuad } + NumberAnimation { from: height * 1.15; to: height * 1; duration: 1000; easing.type: Easing.InOutQuad } + } + } + + SpriteSequence { + id: ink + width: 64 + height: 64 + scale: bubble.scale + goalSprite: "" + + Sprite { + name: "clean" + source: "../gfx/projectile-action.png" + frameCount: 1 + frameX: 0 + frameWidth: 64 + frameHeight: 64 + } + Sprite { + name: "dirty" + source: "../gfx/projectile-action.png" + frameCount: 3 + frameX: 64 + frameWidth: 64 + frameHeight: 64 + frameDuration: 150 + to: {"clean":1} + } + + Sprite { //WORKAROUND: This prevents the triggering of a rendering error which is currently under investigation. + name: "dummy" + source: "../gfx/melee-idle.png" + frameCount: 8 + frameWidth: 64 + frameHeight: 64 + frameX: 0 + frameDuration: 200 + } + SequentialAnimation on width { + loops: Animation.Infinite + NumberAnimation { from: width * 1; to: width * 1.1; duration: 800; easing.type: Easing.InOutQuad } + NumberAnimation { from: width * 1.1; to: width * 1; duration: 1000; easing.type: Easing.InOutQuad } + } + SequentialAnimation on height { + loops: Animation.Infinite + NumberAnimation { from: height * 1; to: height * 1.15; duration: 1200; easing.type: Easing.InOutQuad } + NumberAnimation { from: height * 1.15; to: height * 1; duration: 1000; easing.type: Easing.InOutQuad } + } + + } + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x; to: x - 5; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: x - 5; to: x; duration: 900; easing.type: Easing.InOutQuad } + } +} + diff --git a/basicsuite/qt5-launchpresentation/maroon/content/towers/Bomb.qml b/basicsuite/qt5-launchpresentation/maroon/content/towers/Bomb.qml new file mode 100644 index 0000000..00437f4 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/towers/Bomb.qml @@ -0,0 +1,133 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "../logic.js" as Logic +import ".." + +TowerBase { + id: container + hp: 10 + range: 0.4 + rof: 10 + property real detonationRange: 2.5 + + function fire() { + sound.play() + sprite.jumpTo("shoot") + animDelay.start() + } + + function finishFire() { + var sCol = Math.max(0, col - 1) + var eCol = Math.min(Logic.gameState.cols - 1, col + 1) + var killList = new Array() + for (var i = sCol; i <= eCol; i++) { + for (var j = 0; j < Logic.gameState.mobs[i].length; j++) + if (Math.abs(Logic.gameState.mobs[i][j].y - container.y) < Logic.gameState.squareSize * detonationRange) + killList.push(Logic.gameState.mobs[i][j]) + while (killList.length > 0) + Logic.killMob(i, killList.pop()) + } + Logic.killTower(row, col); + } + + Timer { + id: animDelay + running: false + interval: shootState.frameCount * shootState.frameDuration + onTriggered: finishFire() + } + + function die() + { + destroy() // No blink, because we usually meant to die + } + + SoundEffect { + id: sound + source: "../audio/bomb-action.wav" + } + + SpriteSequence { + id: sprite + width: 64 + height: 64 + interpolate: false + goalSprite: "" + + Sprite { + name: "idle" + source: "../gfx/bomb-idle.png" + frameCount: 4 + frameDuration: 800 + } + + Sprite { + id: shootState + name: "shoot" + source: "../gfx/bomb-action.png" + frameCount: 6 + frameDuration: 155 + to: { "dying" : 1 } // So that if it takes a frame to clean up, it is on the last frame of the explosion + } + + Sprite { + name: "dying" + source: "../gfx/bomb-action.png" + frameCount: 1 + frameX: 64 * 5 + frameWidth: 64 + frameHeight: 64 + frameDuration: 155 + } + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x; to: x + 4; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: x + 4; to: x; duration: 900; easing.type: Easing.InOutQuad } + } + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { from: y; to: y - 4; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: y - 4; to: y; duration: 900; easing.type: Easing.InOutQuad } + } + } +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/towers/Factory.qml b/basicsuite/qt5-launchpresentation/maroon/content/towers/Factory.qml new file mode 100644 index 0000000..b34a184 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/towers/Factory.qml @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "../logic.js" as Logic +import ".." + +TowerBase { + id: container + rof: 160 + income: 5 + SpriteSequence { + id: sprite + width: 64 + height: 64 + interpolate: false + goalSprite: "" + + Sprite { + name: "idle" + source: "../gfx/factory-idle.png" + frameCount: 4 + frameDuration: 200 + } + + Sprite { + name: "action" + source: "../gfx/factory-action.png" + frameCount: 4 + frameDuration: 90 + to: { "idle" : 1 } + } + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x; to: x + 4; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: x + 4; to: x; duration: 900; easing.type: Easing.InOutQuad } + } + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { from: y; to: y - 4; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: y - 4; to: y; duration: 900; easing.type: Easing.InOutQuad } + } + } + + SoundEffect { + id: actionSound + source: "../audio/factory-action.wav" + } + + function fire() { + actionSound.play() + sprite.jumpTo("action") + coinLaunch.start() + } + + function spawn() { + coin.target = Logic.gameState.mapToItem(container, 240, -32) + } + + Image { + id: coin + property var target: { "x" : 0, "y" : 0 } + source: "../gfx/currency.png" + visible: false + } + + SequentialAnimation { + id: coinLaunch + PropertyAction { target: coin; property: "visible"; value: true } + ParallelAnimation { + NumberAnimation { target: coin; property: "x"; from: 16; to: coin.target.x } + NumberAnimation { target: coin; property: "y"; from: 16; to: coin.target.y } + } + PropertyAction { target: coin; property: "visible"; value: false } + } +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/towers/Melee.qml b/basicsuite/qt5-launchpresentation/maroon/content/towers/Melee.qml new file mode 100644 index 0000000..1b49a45 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/towers/Melee.qml @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import ".." + +TowerBase { + hp: 4 + range: 0.1 + damage: 1 + rof: 40 + income: 0 + + SpriteSequence { + id: sprite + width: 64 + height: 64 + interpolate: false + goalSprite: "" + + Sprite { + name: "idle" + source: "../gfx/melee-idle.png" + frameCount: 8 + frameDuration: 250 + } + + Sprite { + name: "shoot" + source: "../gfx/melee-action.png" + frameCount: 2 + frameDuration: 200 + to: { "idle" : 1 } + } + } + + function fire() { + shootSound.play() + sprite.jumpTo("shoot") + } + + SoundEffect { + id: shootSound + source: "../audio/melee-action.wav" + } +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/towers/Ranged.qml b/basicsuite/qt5-launchpresentation/maroon/content/towers/Ranged.qml new file mode 100644 index 0000000..33f3354 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/towers/Ranged.qml @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "../logic.js" as Logic +import ".." + +TowerBase { + id: container + hp: 2 + range: 6 + damage: 0 // By projectile + rof: 40 + income: 0 + property var targetMob + property real realDamage: 1 + function fire() { + proj.x = 32 - proj.width / 2 + proj.y = 0 + targetMob = Logic.gameState.mobs[col][0] + projAnim.to = targetMob.y - container.y -10 + projAnim.start() + shootSound.play() + sprite.jumpTo("shoot") + } + + Image { + id: proj + y: 1000 + SequentialAnimation on y { + id: projAnim + running: false + property real to: 1000 + SmoothedAnimation { + to: projAnim.to + velocity: 400 + } + ScriptAction { + script: { + if (targetMob && targetMob.hit) { + targetMob.hit(realDamage) + targetMob.inked() + projSound.play() + } + } + } + PropertyAction { + value: 1000; + } + } + source: "../gfx/projectile.png" + } + + SoundEffect { + id: shootSound + source: "../audio/shooter-action.wav" + } + SoundEffect { + id: projSound + source: "../audio/projectile-action.wav" + } + + SpriteSequence { + id: sprite + width: 64 + height: 64 + interpolate: false + goalSprite: "" + + Sprite { + name: "idle" + source: "../gfx/shooter-idle.png" + frameCount: 4 + frameDuration: 250 + } + + Sprite { + name: "shoot" + source: "../gfx/shooter-action.png" + frameCount: 5 + frameDuration: 90 + to: { "idle" : 1 } + } + + SequentialAnimation on x { + loops: Animation.Infinite + NumberAnimation { from: x; to: x - 4; duration: 900; easing.type: Easing.InOutQuad } + NumberAnimation { from: x - 4; to: x; duration: 900; easing.type: Easing.InOutQuad } + } + } +} diff --git a/basicsuite/qt5-launchpresentation/maroon/content/towers/TowerBase.qml b/basicsuite/qt5-launchpresentation/maroon/content/towers/TowerBase.qml new file mode 100644 index 0000000..5c71cb0 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/maroon/content/towers/TowerBase.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + property real hp: 1 + property real range: 0 + property real damage: 0 + property int rof: 100 + property int fireCounter: 0 + property int income: 0 + property int row: 0 + property int col: 0 + + width: parent ? parent.squareSize : 0 + height: parent ? parent.squareSize : 0 + //This is how it is placed on the gameboard, do not modify/animate the X/Y/Z of a TowerBase please + x: col * width + y: row * height + z: 1000 + + function fire() { } + function spawn() { } //After all game properties are set + function die() { stdDeath.start(); destroy(1000); } + function sell() { destroy(); } + + SequentialAnimation on opacity { + id: stdDeath + running: false + loops: 2 + NumberAnimation { from: 1; to: 0; } + NumberAnimation { from: 0; to: 1; } + } +} diff --git a/basicsuite/qt5-launchpresentation/particles/customemitter.qml b/basicsuite/qt5-launchpresentation/particles/customemitter.qml new file mode 100644 index 0000000..270935d --- /dev/null +++ b/basicsuite/qt5-launchpresentation/particles/customemitter.qml @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +ParticleSystem { + id: sys + width: 320 + height: 480 + running: true + + property real petalLength: 180 + property real petalRotation: 0 + NumberAnimation on petalRotation { + from: 0; + to: 360; + loops: -1; + running: true + duration: 24000 + } + + function convert(a) {return a*(Math.PI/180);} + Emitter { + lifeSpan: 4000 + emitRate: 120 + size: 12 + anchors.centerIn: parent + //! [0] + onEmitParticles: { + for (var i=0; i 0) { + root.currentSlide = 0; + root.slides[root.currentSlide].visible = true; + } + } + + function switchSlides(from, to, forward) { + from.visible = false + to.visible = true + return true + } + + function goToNextSlide() { + root._userNum = 0 + if (_faded) + return + if (root.currentSlide + 1 < root.slides.length) { + var from = slides[currentSlide] + var to = slides[currentSlide + 1] + if (switchSlides(from, to, true)) { + currentSlide = currentSlide + 1; + root.focus = true; + } + } + } + + function goToPreviousSlide() { + root._userNum = 0 + if (root._faded) + return + if (root.currentSlide - 1 >= 0) { + var from = slides[currentSlide] + var to = slides[currentSlide - 1] + if (switchSlides(from, to, false)) { + currentSlide = currentSlide - 1; + root.focus = true; + } + } + } + + function goToUserSlide() { + --_userNum; + if (root._faded || _userNum >= root.slides.length) + return + if (_userNum < 0) + goToNextSlide() + else if (root.currentSlide != _userNum) { + var from = slides[currentSlide] + var to = slides[_userNum] + if (switchSlides(from, to, _userNum > currentSlide)) { + currentSlide = _userNum; + root.focus = true; + } + } + } + + focus: true + + Keys.onSpacePressed: goToNextSlide() + Keys.onRightPressed: goToNextSlide() + Keys.onDownPressed: goToNextSlide() + Keys.onLeftPressed: goToPreviousSlide() + Keys.onUpPressed: goToPreviousSlide() + Keys.onEscapePressed: Qt.quit() + Keys.onPressed: { + if (event.key >= Qt.Key_0 && event.key <= Qt.Key_9) + _userNum = 10 * _userNum + (event.key - Qt.Key_0) + else { + if (event.key == Qt.Key_Return || event.key == Qt.Key_Enter) + goToUserSlide(); + else if (event.key == Qt.Key_Backspace) + goToPreviousSlide(); + else if (event.key == Qt.Key_C) + root._faded = !root._faded; + _userNum = 0; + } + } + + Rectangle { + z: 1000 + color: "black" + anchors.fill: parent + opacity: root._faded ? 1 : 0 + Behavior on opacity { NumberAnimation { duration: 250 } } + } + + MouseArea { + id: mouseArea + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: { + if (mouse.button == Qt.RightButton) + goToPreviousSlide() + else + goToNextSlide() + } + onPressAndHold: goToPreviousSlide(); //A back mechanism for touch only devices + } + + Window { + id: notesWindow; + width: 400 + height: 300 + + title: "QML Presentation: Notes" + visible: root.showNotes + + Text { + anchors.fill: parent + anchors.margins: parent.height * 0.1; + + font.pixelSize: 16 + wrapMode: Text.WordWrap + + property string notes: root.slides[root.currentSlide].notes; + text: notes == "" ? "Slide has no notes..." : notes; + font.italic: notes == ""; + } + } +} diff --git a/basicsuite/qt5-launchpresentation/presentation/Slide.qml b/basicsuite/qt5-launchpresentation/presentation/Slide.qml new file mode 100644 index 0000000..339298d --- /dev/null +++ b/basicsuite/qt5-launchpresentation/presentation/Slide.qml @@ -0,0 +1,186 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QML Presentation System. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Digia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +import QtQuick 2.0 + +Item { + /* + Slides can only be instantiated as a direct child of a Presentation {} as they rely on + several properties there. + */ + + id: slide + + property bool isSlide: true; + + property string title; + property variant content: [] + property string centeredText + property string writeInText; + property string notes; + + property real fontSize: parent.height * 0.05 + property real fontScale: 1 + + property real baseFontSize: fontSize * fontScale + property real titleFontSize: fontSize * 1.2 * fontScale + property real bulletSpacing: 1 + + property real contentWidth: width + + // Define the slide to be the "content area" + x: parent.width * 0.05 + y: parent.height * 0.2 + width: parent.width * 0.9 + height: parent.height * 0.7 + + property real masterWidth: parent.width + property real masterHeight: parent.height + + property color titleColor: parent.titleColor; + property color textColor: parent.textColor; + property string fontFamily: parent.fontFamily; + + visible: false + + Text { + id: titleText + font.pixelSize: titleFontSize + text: title; + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.top + anchors.bottomMargin: parent.fontSize * 1.5 + font.bold: true; + font.family: slide.fontFamily + color: slide.titleColor + horizontalAlignment: Text.Center + z: 1 + } + + Text { + id: centeredId + width: parent.width + anchors.centerIn: parent + anchors.verticalCenterOffset: - parent.y / 3 + text: centeredText + horizontalAlignment: Text.Center + font.pixelSize: baseFontSize + font.family: slide.fontFamily + color: slide.textColor + wrapMode: Text.Wrap + } + + Text { + id: writeInTextId + property int length; + font.family: slide.fontFamily + font.pixelSize: baseFontSize + color: slide.textColor + + anchors.fill: parent; + wrapMode: Text.Wrap + + text: slide.writeInText.substring(0, length); + + NumberAnimation on length { + from: 0; + to: slide.writeInText.length; + duration: slide.writeInText.length * 30; + running: slide.visible && parent.visible && slide.writeInText.length > 0 + } + + visible: slide.writeInText != undefined; + } + + + Column { + id: contentId + anchors.fill: parent + + Repeater { + model: content.length + + Row { + id: row + + function decideIndentLevel(s) { return s.charAt(0) == " " ? 1 + decideIndentLevel(s.substring(1)) : 0 } + property int indentLevel: decideIndentLevel(content[index]) + property int nextIndentLevel: index < content.length - 1 ? decideIndentLevel(content[index+1]) : 0 + property real indentFactor: (10 - row.indentLevel * 2) / 10; + + height: text.height + (nextIndentLevel == 0 ? 1 : 0.3) * slide.baseFontSize * slide.bulletSpacing + x: slide.baseFontSize * indentLevel + + Rectangle { + id: dot + y: baseFontSize * row.indentFactor / 2 + width: baseFontSize / 4 + height: baseFontSize / 4 + color: slide.textColor + radius: width / 2 + smooth: true + opacity: text.text.length == 0 ? 0 : 1 + } + + Rectangle { + id: space + width: dot.width * 2 + height: 1 + color: "#00ffffff" + } + + Text { + id: text + width: slide.contentWidth - parent.x - dot.width - space.width + font.pixelSize: baseFontSize * row.indentFactor + text: content[index] + textFormat: Text.PlainText + wrapMode: Text.WordWrap + color: slide.textColor + horizontalAlignment: Text.AlignLeft + font.family: slide.fontFamily + } + } + } + } + +} diff --git a/basicsuite/qt5-launchpresentation/presentation/SlideCounter.qml b/basicsuite/qt5-launchpresentation/presentation/SlideCounter.qml new file mode 100644 index 0000000..06e7542 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/presentation/SlideCounter.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QML Presentation System. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Digia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +import QtQuick 2.0 + +Text { + id: counter; + + property real fontSize: parent.height * 0.05 + property real fontScale: 0.5; + property color textColor: parent.textColor != undefined ? parent.textColor : "black" + property string fontFamily: parent.fontFamily != undefined ? parent.fontFamily : "Helvetica" + + text: "# " + (parent.currentSlide + 1) + " / " + parent.slides.length; + color: counter.textColor; + font.family: counter.fontFamily; + font.pixelSize: fontSize * fontScale; + + anchors.right: parent.right; + anchors.bottom: parent.bottom; + anchors.margins: font.pixelSize; +} diff --git a/basicsuite/qt5-launchpresentation/preview_l.jpg b/basicsuite/qt5-launchpresentation/preview_l.jpg new file mode 100644 index 0000000..8decd76 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/preview_l.jpg differ diff --git a/basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro b/basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro new file mode 100644 index 0000000..0a1a2b2 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro @@ -0,0 +1,17 @@ +TARGET = qt5-launchpresentation + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + calqlatr \ + maroon \ + particles \ + presentation \ + samegame \ + images +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/qt5-launchpresentation/samegame/.DS_Store b/basicsuite/qt5-launchpresentation/samegame/.DS_Store new file mode 100644 index 0000000..9805454 Binary files /dev/null and b/basicsuite/qt5-launchpresentation/samegame/.DS_Store differ diff --git a/basicsuite/qt5-launchpresentation/samegame/Samegame.qml b/basicsuite/qt5-launchpresentation/samegame/Samegame.qml new file mode 100644 index 0000000..2b0b82a --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/Samegame.qml @@ -0,0 +1,371 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "content/samegame.js" as Logic +import "settings.js" as Settings +import "content" + +Rectangle { + id: root + width: 320; height: 480 + property int acc: 0 + + + function loadPuzzle() { + if (gameCanvas.mode != "") + Logic.cleanUp(); + Logic.startNewGame(gameCanvas,"puzzle","levels/level"+acc+".qml") + } + function nextPuzzle() { + acc = (acc + 1) % 10; + loadPuzzle(); + } + Timer { + id: gameOverTimer + interval: 1500 + running : gameCanvas.gameOver && gameCanvas.mode == "puzzle" //mode will be reset by cleanUp(); + repeat : false + onTriggered: { + Logic.cleanUp(); + nextPuzzle(); + } + } + + Image { + source: "content/gfx/background.png" + anchors.fill: parent + } + + GameArea { + id: gameCanvas + z: 1 + y: Settings.headerHeight + + width: parent.width + height: parent.height - Settings.headerHeight - Settings.footerHeight + + backgroundVisible: root.state == "in-game" + onModeChanged: if (gameCanvas.mode != "puzzle") puzzleWon = false; //UI has stricter constraints on this variable than the game does + Age { + groups: ["redspots", "greenspots", "bluespots", "yellowspots"] + enabled: root.state == "" + system: gameCanvas.ps + } + + onPuzzleLost: acc--;//So that nextPuzzle() reloads the current one + + } + + Item { + id: menu + z: 2 + width: parent.width; + anchors.top: parent.top + anchors.bottom: bottomBar.top + + LogoAnimation { + x: 64 + y: Settings.headerHeight + particleSystem: gameCanvas.ps + running: root.state == "" + } + Row { + x: 112 + y: 20 + Image { source: "content/gfx/logo-a.png" } + Image { source: "content/gfx/logo-m.png" } + Image { source: "content/gfx/logo-e.png" } + } + + Column { + y: 100 + 40 + spacing: Settings.menuButtonSpacing + + Button { + width: root.width + rotatedButton: true + imgSrc: "content/gfx/but-game-1.png" + onClicked: { + if (root.state == "in-game") + return //Prevent double clicking + root.state = "in-game" + gameCanvas.blockFile = "Block.qml" + gameCanvas.background = "gfx/background.png" + arcadeTimer.start(); + } + //Emitted particles don't fade out, because ImageParticle is on the GameArea + system: gameCanvas.ps + group: "green" + Timer { + id: arcadeTimer + interval: Settings.menuDelay + running : false + repeat : false + onTriggered: Logic.startNewGame(gameCanvas) + } + } + + Button { + width: root.width + rotatedButton: true + imgSrc: "content/gfx/but-game-2.png" + onClicked: { + if (root.state == "in-game") + return + root.state = "in-game" + gameCanvas.blockFile = "Block.qml" + gameCanvas.background = "gfx/background.png" + twopTimer.start(); + } + system: gameCanvas.ps + group: "green" + Timer { + id: twopTimer + interval: Settings.menuDelay + running : false + repeat : false + onTriggered: Logic.startNewGame(gameCanvas, "multiplayer") + } + } + + Button { + width: root.width + rotatedButton: true + imgSrc: "content/gfx/but-game-3.png" + onClicked: { + if (root.state == "in-game") + return + root.state = "in-game" + gameCanvas.blockFile = "SimpleBlock.qml" + gameCanvas.background = "gfx/background.png" + endlessTimer.start(); + } + system: gameCanvas.ps + group: "blue" + Timer { + id: endlessTimer + interval: Settings.menuDelay + running : false + repeat : false + onTriggered: Logic.startNewGame(gameCanvas, "endless") + } + } + + Button { + width: root.width + rotatedButton: true + imgSrc: "content/gfx/but-game-4.png" + group: "yellow" + onClicked: { + if (root.state == "in-game") + return + root.state = "in-game" + gameCanvas.blockFile = "PuzzleBlock.qml" + gameCanvas.background = "gfx/background.png" + puzzleTimer.start(); + } + Timer { + id: puzzleTimer + interval: Settings.menuDelay + running : false + repeat : false + onTriggered: loadPuzzle(); + } + system: gameCanvas.ps + } + } + } + + Image { + id: scoreBar + source: "content/gfx/bar.png" + width: parent.width + z: 6 + y: -Settings.headerHeight + height: Settings.headerHeight + Behavior on opacity { NumberAnimation {} } + SamegameText { + id: arcadeScore + anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} + text: 'P1: ' + gameCanvas.score + font.pixelSize: Settings.fontPixelSize + textFormat: Text.StyledText + color: "white" + opacity: gameCanvas.mode == "arcade" ? 1 : 0 + Behavior on opacity { NumberAnimation {} } + } + SamegameText { + id: arcadeHighScore + anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} + text: 'Highscore: ' + gameCanvas.highScore + opacity: gameCanvas.mode == "arcade" ? 1 : 0 + } + SamegameText { + id: p1Score + anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} + text: 'P1: ' + gameCanvas.score + opacity: gameCanvas.mode == "multiplayer" ? 1 : 0 + } + SamegameText { + id: p2Score + anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} + text: 'P2: ' + gameCanvas.score2 + opacity: gameCanvas.mode == "multiplayer" ? 1 : 0 + rotation: 180 + } + SamegameText { + id: puzzleMoves + anchors { left: parent.left; topMargin: 3; leftMargin: 11; top: parent.top} + text: 'Moves: ' + gameCanvas.moves + opacity: gameCanvas.mode == "puzzle" ? 1 : 0 + } + SamegameText { + Image { + source: "content/gfx/icon-time.png" + x: -20 + } + id: puzzleTime + anchors { topMargin: 3; top: parent.top; horizontalCenter: parent.horizontalCenter; horizontalCenterOffset: 20} + text: "00:00" + opacity: gameCanvas.mode == "puzzle" ? 1 : 0 + Timer { + interval: 1000 + repeat: true + running: gameCanvas.mode == "puzzle" && !gameCanvas.gameOver + onTriggered: { + var elapsed = Math.floor((new Date() - Logic.gameDuration)/ 1000.0); + var mins = Math.floor(elapsed/60.0); + var secs = (elapsed % 60); + puzzleTime.text = (mins < 10 ? "0" : "") + mins + ":" + (secs < 10 ? "0" : "") + secs; + } + } + } + SamegameText { + id: puzzleScore + anchors { right: parent.right; topMargin: 3; rightMargin: 11; top: parent.top} + text: 'Score: ' + gameCanvas.score + opacity: gameCanvas.mode == "puzzle" ? 1 : 0 + } + } + + Image { + id: bottomBar + width: parent.width + height: Settings.footerHeight + source: "content/gfx/bar.png" + y: parent.height - Settings.footerHeight; + z: 2 + Button { + id: quitButton + height: Settings.toolButtonHeight + imgSrc: "content/gfx/but-quit.png" + onClicked: {Qt.quit(); } + anchors { left: parent.left; verticalCenter: parent.verticalCenter; leftMargin: 11 } + } + Button { + id: menuButton + height: Settings.toolButtonHeight + imgSrc: "content/gfx/but-menu.png" + visible: (root.state == "in-game"); + onClicked: {root.state = ""; Logic.cleanUp(); gameCanvas.mode = ""} + anchors { left: quitButton.right; verticalCenter: parent.verticalCenter; leftMargin: 0 } + } + Button { + id: againButton + height: Settings.toolButtonHeight + imgSrc: "content/gfx/but-game-new.png" + visible: (root.state == "in-game"); + opacity: gameCanvas.gameOver && (gameCanvas.mode == "arcade" || gameCanvas.mode == "multiplayer") + Behavior on opacity{ NumberAnimation {} } + onClicked: {if (gameCanvas.gameOver) { Logic.startNewGame(gameCanvas, gameCanvas.mode);}} + anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 11 } + } + Button { + id: nextButton + height: Settings.toolButtonHeight + imgSrc: "content/gfx/but-puzzle-next.png" + visible: (root.state == "in-game") && gameCanvas.mode == "puzzle" && gameCanvas.puzzleWon + opacity: gameCanvas.puzzleWon ? 1 : 0 + Behavior on opacity{ NumberAnimation {} } + onClicked: {if (gameCanvas.puzzleWon) nextPuzzle();} + anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 11 } + } + } + + Connections { + target: root + onStateChanged: stateChangeAnim.running = true + } + SequentialAnimation { + id: stateChangeAnim + ParallelAnimation { + NumberAnimation { target: bottomBar; property: "y"; to: root.height; duration: Settings.menuDelay/2; easing.type: Easing.OutQuad } + NumberAnimation { target: scoreBar; property: "y"; to: -Settings.headerHeight; duration: Settings.menuDelay/2; easing.type: Easing.OutQuad } + } + ParallelAnimation { + NumberAnimation { target: bottomBar; property: "y"; to: root.height - Settings.footerHeight; duration: Settings.menuDelay/2; easing.type: Easing.OutBounce} + NumberAnimation { target: scoreBar; property: "y"; to: root.state == "" ? -Settings.headerHeight : 0; duration: Settings.menuDelay/2; easing.type: Easing.OutBounce} + } + } + + states: [ + State { + name: "in-game" + PropertyChanges { + target: menu + opacity: 0 + visible: false + } + } + ] + + transitions: [ + Transition { + NumberAnimation {properties: "x,y,opacity"} + } + ] + + //"Debug mode" + focus: true + Keys.onAsteriskPressed: Logic.nuke(); + Keys.onSpacePressed: gameCanvas.puzzleWon = true; +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/Block.qml b/basicsuite/qt5-launchpresentation/samegame/content/Block.qml new file mode 100644 index 0000000..85f2e27 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/Block.qml @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: block + property bool dying: false + property bool spawned: false + property int type: 0 + property ParticleSystem particleSystem + + Behavior on x { + enabled: spawned; + SpringAnimation{ spring: 2; damping: 0.2 } + } + Behavior on y { + SpringAnimation{ spring: 2; damping: 0.2 } + } + + Image { + id: img + source: { + if (type == 0){ + "gfx/red.png"; + } else if (type == 1) { + "gfx/blue.png"; + } else if (type == 2) { + "gfx/green.png"; + } else { + "gfx/yellow.png"; + } + } + opacity: 0 + Behavior on opacity { NumberAnimation { duration: 200 } } + anchors.fill: parent + } + + //Foreground particles + BlockEmitter { + id: particles + system: particleSystem + group: { + if (type == 0){ + "red"; + } else if (type == 1) { + "blue"; + } else if (type == 2) { + "green"; + } else { + "yellow"; + } + } + anchors.fill: parent + } + + //Paint particles on the background + PaintEmitter { + id: particles2 + system: particleSystem + } + + states: [ + State { + name: "AliveState"; when: spawned == true && dying == false + PropertyChanges { target: img; opacity: 1 } + }, + + State { + name: "DeathState"; when: dying == true + StateChangeScript { script: {particleSystem.paused = false; particles.pulse(100); particles2.pulse(100);} } + PropertyChanges { target: img; opacity: 0 } + StateChangeScript { script: block.destroy(1000); } + } + ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/BlockEmitter.qml b/basicsuite/qt5-launchpresentation/samegame/content/BlockEmitter.qml new file mode 100644 index 0000000..7dad509 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/BlockEmitter.qml @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +import "../settings.js" as Settings + +Emitter { + property Item block: parent + velocity: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -40; magnitudeVariation: 40} + acceleration: TargetDirection{targetX: block.width/2; targetY: block.height/2; magnitude: -100;} + shape: EllipseShape{fill:true} + enabled: false; + lifeSpan: 700; lifeSpanVariation: 100 + emitRate: 1000 + maximumEmitted: 100 //only fires 0.1s bursts (still 2x old number) + size: Settings.blockSize * 0.85 + endSize: Settings.blockSize * 0.85 /2 +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/Button.qml b/basicsuite/qt5-launchpresentation/samegame/content/Button.qml new file mode 100644 index 0000000..aab21ec --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/Button.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + property alias imgSrc: image.source + property alias system: emitter.system + property alias group: emitter.group + signal clicked + property bool rotatedButton: false + + width: image.width + height: image.sourceSize.height + Image { + id: image + height: parent.height + width: height/sourceSize.height * sourceSize.width + + anchors.horizontalCenter: parent.horizontalCenter + rotation: rotatedButton ? ((Math.random() * 3 + 2) * (Math.random() <= 0.5 ? -1 : 1)) : 0 + MenuEmitter { + id: emitter + anchors.fill: parent + //shape: MaskShape {source: image.source} + } + } + MouseArea { + anchors.fill: parent + onClicked: {parent.clicked(); emitter.burst(400);} + } +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/GameArea.qml b/basicsuite/qt5-launchpresentation/samegame/content/GameArea.qml new file mode 100644 index 0000000..f3ca98d --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/GameArea.qml @@ -0,0 +1,226 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "samegame.js" as Logic + +Item { + id: gameCanvas + property bool gameOver: true + property int score: 0 + property int highScore: 0 + property int moves: 0 + property string mode: "" + property ParticleSystem ps: particleSystem + //For easy theming + property alias backgroundVisible: bg.visible + property string background: "gfx/background.png" + property string blockFile: "Block.qml" + onBlockFileChanged: Logic.changeBlock(blockFile); + property alias particlePack: auxLoader.source + //For multiplayer + property int score2: 0 + property int curTurn: 1 + property bool autoTurnChange: false + signal swapPlayers + property bool swapping: false + //onSwapPlayers: if (autoTurnChange) Logic.turnChange();//Now implemented below + //For puzzle + property url level + property bool puzzleWon: false + signal puzzleLost //Since root is tracking the puzzle progress + function showPuzzleEnd (won) { + if (won) { + smokeParticle.color = Qt.rgba(0,1,0,0); + puzzleWin.play(); + } else { + smokeParticle.color = Qt.rgba(1,0,0,0); + puzzleFail.play(); + puzzleLost(); + } + } + function showPuzzleGoal (str) { + puzzleTextBubble.opacity = 1; + puzzleTextLabel.text = str; + } + Image { + id: bg + z: -1 + anchors.fill: parent + source: background; + fillMode: Image.PreserveAspectCrop + } + + MouseArea { + anchors.fill: parent; onClicked: { + if (puzzleTextBubble.opacity == 1) { + puzzleTextBubble.opacity = 0; + Logic.finishLoadingMap(); + } else if (!swapping) { + Logic.handleClick(mouse.x,mouse.y); + } + } + } + + Image { + id: highScoreTextBubble + opacity: mode == "arcade" && gameOver && gameCanvas.score == gameCanvas.highScore ? 1 : 0 + Behavior on opacity { NumberAnimation {} } + anchors.centerIn: parent + z: 10 + source: "gfx/bubble-highscore.png" + Image { + anchors.centerIn: parent + source: "gfx/text-highscore-new.png" + rotation: -10 + } + } + + Image { + id: puzzleTextBubble + anchors.centerIn: parent + opacity: 0 + Behavior on opacity { NumberAnimation {} } + z: 10 + source: "gfx/bubble-puzzle.png" + Connections { + target: gameCanvas + onModeChanged: if (mode != "puzzle" && puzzleTextBubble.opacity > 0) puzzleTextBubble.opacity = 0; + } + Text { + id: puzzleTextLabel + width: parent.width - 24 + anchors.centerIn: parent + horizontalAlignment: Text.AlignHCenter + color: "white" + font.pixelSize: 24 + font.bold: true + wrapMode: Text.WordWrap + } + } + onModeChanged: { + p1WonImg.opacity = 0; + p2WonImg.opacity = 0; + } + SmokeText { id: puzzleWin; source: "gfx/icon-ok.png"; system: particleSystem } + SmokeText { id: puzzleFail; source: "gfx/icon-fail.png"; system: particleSystem } + + onSwapPlayers: { + smokeParticle.color = "yellow" + Logic.turnChange(); + if (curTurn == 1) { + p1Text.play(); + } else { + p2Text.play(); + } + clickDelay.running = true; + } + SequentialAnimation { + id: clickDelay + ScriptAction { script: gameCanvas.swapping = true; } + PauseAnimation { duration: 750 } + ScriptAction { script: gameCanvas.swapping = false; } + } + + SmokeText { + id: p1Text; source: "gfx/text-p1-go.png"; + system: particleSystem; playerNum: 1 + opacity: p1WonImg.opacity + p2WonImg.opacity > 0 ? 0 : 1 + } + + SmokeText { + id: p2Text; source: "gfx/text-p2-go.png"; + system: particleSystem; playerNum: 2 + opacity: p1WonImg.opacity + p2WonImg.opacity > 0 ? 0 : 1 + } + + onGameOverChanged: { + if (gameCanvas.mode == "multiplayer") { + if (gameCanvas.score >= gameCanvas.score2) { + p1WonImg.opacity = 1; + } else { + p2WonImg.opacity = 1; + } + } + } + Image { + id: p1WonImg + source: "gfx/text-p1-won.png" + anchors.centerIn: parent + opacity: 0 + Behavior on opacity { NumberAnimation {} } + z: 10 + } + Image { + id: p2WonImg + source: "gfx/text-p2-won.png" + anchors.centerIn: parent + opacity: 0 + Behavior on opacity { NumberAnimation {} } + z: 10 + } + + ParticleSystem{ + id: particleSystem; + anchors.fill: parent + z: 5 + ImageParticle { + id: smokeParticle + groups: ["smoke"] + source: "gfx/particle-smoke.png" + alpha: 0.1 + alphaVariation: 0.1 + color: "yellow" + } + Loader { + id: auxLoader + anchors.fill: parent + source: "PrimaryPack.qml" + onItemChanged: { + if (item && "particleSystem" in item) + item.particleSystem = particleSystem + if (item && "gameArea" in item) + item.gameArea = gameCanvas + } + } + } +} + diff --git a/basicsuite/qt5-launchpresentation/samegame/content/LogoAnimation.qml b/basicsuite/qt5-launchpresentation/samegame/content/LogoAnimation.qml new file mode 100644 index 0000000..c879893 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/LogoAnimation.qml @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: container //Positioned where the 48x48 S/G should be + property alias running: mainAnim.running + property ParticleSystem particleSystem + property int dur: 500 + signal boomTime + Image { + id: s1 + source: "gfx/logo-s.png" + y: 0 + } + Image { + id: g1 + source: "gfx/logo-g.png" + y: -128 + } + Column { + Repeater { + model: 2 + Item { + width: 48 + height: 48 + BlockEmitter { + id: emitter + anchors.fill: parent + group: "red" + system: particleSystem + Connections { + target: container + onBoomTime: emitter.pulse(100); + } + } + } + } + } + SequentialAnimation { + id: mainAnim + running: true + loops: -1 + PropertyAction { target: g1; property: "y"; value: -128} + PropertyAction { target: g1; property: "opacity"; value: 1} + PropertyAction { target: s1; property: "y"; value: 0} + PropertyAction { target: s1; property: "opacity"; value: 1} + NumberAnimation { target: g1; property: "y"; from: -96; to: -48; duration: dur} + ParallelAnimation { + NumberAnimation { target: g1; property: "y"; from: -48; to: 0; duration: dur} + NumberAnimation { target: s1; property: "y"; from: 0; to: 48; duration: dur } + } + PauseAnimation { duration: dur } + ScriptAction { script: container.boomTime(); } + ParallelAnimation { + NumberAnimation { target: g1; property: "opacity"; to: 0; duration: dur } + NumberAnimation { target: s1; property: "opacity"; to: 0; duration: dur } + } + PropertyAction { target: s1; property: "y"; value: -128} + PropertyAction { target: s1; property: "opacity"; value: 1} + NumberAnimation { target: s1; property: "y"; from: -96; to: 0; duration: dur * 2} + } +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/MenuEmitter.qml b/basicsuite/qt5-launchpresentation/samegame/content/MenuEmitter.qml new file mode 100644 index 0000000..16c7660 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/MenuEmitter.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Emitter { + anchors.fill: parent + velocity: AngleDirection{angleVariation: 360; magnitude: 140; magnitudeVariation: 40} + enabled: false; + lifeSpan: 500; + emitRate: 1 + size: 28 + endSize: 14 + group: "yellow" +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/PaintEmitter.qml b/basicsuite/qt5-launchpresentation/samegame/content/PaintEmitter.qml new file mode 100644 index 0000000..4a67c4a --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/PaintEmitter.qml @@ -0,0 +1,98 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 +import "../settings.js" as Settings + +Emitter { + property Item block: parent + anchors.fill: parent + shape: EllipseShape { fill: true } + group: { + if (block.type == 0){ + "redspots"; + } else if (block.type == 1) { + "bluespots"; + } else if (block.type == 2) { + "greenspots"; + } else { + "yellowspots"; + } + } + size: Settings.blockSize * 2 + endSize: Settings.blockSize/2 + lifeSpan: 30000 + enabled: false + emitRate: 60 + maximumEmitted: 60 + velocity: PointDirection{ y: 4; yVariation: 4 } + /* Possibly better, but dependent on gerrit change,28212 + property real mainIntensity: 0.8 + property real subIntensity: 0.1 + property real colorVariation: 0.005 + onEmitParticles: {//One group, many colors, for better stacking + for (var i=0; i
    Clear in three moves..." + startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , + 0 , 0 , 0 , 0 , 0 , 1 , 1 , 2 , 1 , 1 , + 0 , 0 , 0 , 1 , 1 , 3 , 3 , 3 , 3 , 3 , + 0 , 1 , 1 , 3 , 3 , 3 , 1 , 3 , 1 , 1 , + 1 , 2 , 3 , 3 , 1 , 1 , 3 , 3 , 3 , 3 , + 1 , 3 , 3 , 2 , 3 , 3 , 3 , 3 , 1 , 1 , + 1 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/levels/level1.qml b/basicsuite/qt5-launchpresentation/samegame/content/levels/level1.qml new file mode 100644 index 0000000..4bb15cb --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/levels/level1.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + timeTarget: 10 + goalText: "2 of 10

    Clear in 10 seconds..." + startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 1 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 2 , 2 , + 1 , 2 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 2 , + 2 , 2 , 1 , 3 , 3 , 3 , 1 , 1 , 1 , 2 , + 2 , 1 , 1 , 1 , 3 , 3 , 3 , 1 , 2 , 2 , + 1 , 1 , 1 , 1 , 1 , 3 , 3 , 3 , 2 , 1 ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/levels/level2.qml b/basicsuite/qt5-launchpresentation/samegame/content/levels/level2.qml new file mode 100644 index 0000000..a319479 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/levels/level2.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + scoreTarget: 1200 + timeTarget: 60 + goalText: "3 of 10

    Score over 1200 points in one minute..." + mustClear: false + startingGrid: [ 3 , 1 , 2 , 1 , 1 , 2 , 1 , 1 , 3 , 3 , + 1 , 3 , 3 , 2 , 3 , 3 , 1 , 1 , 3 , 1 , + 3 , 1 , 3 , 3 , 2 , 3 , 3 , 3 , 1 , 2 , + 3 , 2 , 2 , 1 , 3 , 3 , 2 , 1 , 1 , 2 , + 3 , 1 , 2 , 2 , 2 , 2 , 2 , 1 , 3 , 1 , + 2 , 3 , 1 , 2 , 2 , 3 , 3 , 1 , 3 , 2 , + 3 , 2 , 1 , 1 , 3 , 3 , 3 , 2 , 2 , 1 , + 1 , 2 , 2 , 3 , 2 , 3 , 3 , 3 , 1 , 1 , + 1 , 3 , 3 , 3 , 1 , 2 , 2 , 3 , 3 , 1 , + 3 , 3 , 2 , 1 , 2 , 2 , 1 , 1 , 1 , 3 , + 2 , 1 , 3 , 2 , 3 , 2 , 3 , 2 , 2 , 1 , + 1 , 3 , 1 , 2 , 1 , 2 , 3 , 1 , 2 , 2 , + 1 , 2 , 2 , 2 , 1 , 1 , 2 , 3 , 1 , 2 ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/levels/level3.qml b/basicsuite/qt5-launchpresentation/samegame/content/levels/level3.qml new file mode 100644 index 0000000..43e82d7 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/levels/level3.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + scoreTarget: 3000 + timeTarget: 60 + goalText: "4 of 10
    Clear the board with over 3000 points in under a minute..." + startingGrid: [ 3 , 3 , 1 , 1 , 1 , 2 , 2 , 4 , 3 , 3 , + 4 , 3 , 1 , 4 , 2 , 2 , 2 , 4 , 3 , 4 , + 4 , 3 , 3 , 4 , 1 , 1 , 3 , 3 , 4 , 4 , + 3 , 3 , 3 , 3 , 3 , 1 , 3 , 2 , 2 , 4 , + 4 , 4 , 3 , 4 , 3 , 1 , 4 , 4 , 4 , 4 , + 4 , 4 , 3 , 4 , 1 , 1 , 4 , 4 , 3 , 3 , + 4 , 2 , 2 , 2 , 2 , 2 , 4 , 4 , 4 , 1 , + 4 , 4 , 2 , 4 , 2 , 2 , 1 , 1 , 1 , 1 , + 4 , 4 , 2 , 4 , 2 , 2 , 1 , 4 , 4 , 1 , + 4 , 1 , 1 , 4 , 3 , 3 , 4 , 2 , 4 , 1 , + 4 , 1 , 1 , 2 , 3 , 3 , 4 , 2 , 2 , 1 , + 1 , 1 , 2 , 2 , 2 , 3 , 3 , 3 , 2 , 1 , + 4 , 1 , 1 , 2 , 2 , 3 , 4 , 3 , 4 , 4 ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/levels/level4.qml b/basicsuite/qt5-launchpresentation/samegame/content/levels/level4.qml new file mode 100644 index 0000000..46ad42f --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/levels/level4.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + goalText: "5 of 10

    Clear the level..." + startingGrid: [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , + 1 , 3 , 2 , 1 , 1 , 1 , 1 , 3 , 2 , 3 , + 1 , 2 , 3 , 1 , 3 , 2 , 2 , 1 , 1 , 2 , + 3 , 2 , 2 , 2 , 1 , 1 , 1 , 1 , 3 , 3 , + 2 , 1 , 1 , 3 , 2 , 1 , 1 , 2 , 1 , 3 , + 1 , 3 , 3 , 1 , 2 , 1 , 2 , 1 , 3 , 3 , + 1 , 3 , 2 , 2 , 2 , 1 , 1 , 3 , 2 , 3 , + 1 , 1 , 3 , 2 , 3 , 3 , 2 , 1 , 1 , 1 , + 1 , 2 , 2 , 3 , 2 , 2 , 1 , 3 , 1 , 3 ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/levels/level5.qml b/basicsuite/qt5-launchpresentation/samegame/content/levels/level5.qml new file mode 100644 index 0000000..3716264 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/levels/level5.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + moveTarget: 4 + goalText: "6 of 10

    Clear in four or less moves..." + startingGrid: [ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , + 4 , 2 , 2 , 2 , 4 , 3 , 3 , 3 , 4 , 4 , + 4 , 2 , 4 , 4 , 4 , 3 , 2 , 3 , 4 , 4 , + 4 , 2 , 2 , 2 , 4 , 3 , 3 , 3 , 4 , 4 , + 4 , 4 , 4 , 2 , 4 , 3 , 4 , 3 , 4 , 4 , + 4 , 2 , 2 , 2 , 4 , 3 , 4 , 3 , 4 , 4 , + 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , + 4 , 3 , 4 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , + 4 , 3 , 3 , 3 , 4 , 2 , 4 , 4 , 4 , 3 , + 4 , 3 , 3 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , + 4 , 3 , 4 , 3 , 4 , 2 , 4 , 4 , 4 , 4 , + 4 , 3 , 4 , 3 , 4 , 2 , 2 , 2 , 4 , 3 , + 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/levels/level6.qml b/basicsuite/qt5-launchpresentation/samegame/content/levels/level6.qml new file mode 100644 index 0000000..4547b75 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/levels/level6.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + moveTarget: 20 + timeTarget: 40 + goalText: "7 of 10

    Clear with 20 moves in 40 seconds (or better)." + startingGrid: [ 1 , 3 , 1 , 1 , 1 , 1 , 2 , 1 , 2 , 2 , + 2 , 1 , 2 , 3 , 3 , 1 , 3 , 1 , 1 , 3 , + 3 , 1 , 1 , 1 , 2 , 2 , 3 , 2 , 3 , 1 , + 1 , 3 , 1 , 1 , 3 , 1 , 1 , 1 , 2 , 3 , + 2 , 1 , 1 , 1 , 3 , 2 , 3 , 3 , 2 , 3 , + 3 , 3 , 3 , 3 , 2 , 2 , 3 , 1 , 3 , 2 , + 2 , 2 , 3 , 2 , 2 , 3 , 2 , 2 , 2 , 2 , + 1 , 2 , 1 , 2 , 1 , 3 , 2 , 3 , 2 , 3 , + 1 , 1 , 2 , 3 , 3 , 3 , 3 , 1 , 1 , 2 , + 3 , 3 , 2 , 2 , 2 , 2 , 3 , 1 , 3 , 1 , + 1 , 2 , 3 , 3 , 3 , 1 , 3 , 2 , 1 , 2 , + 1 , 2 , 1 , 1 , 2 , 3 , 1 , 2 , 1 , 3 , + 3 , 1 , 2 , 2 , 1 , 3 , 3 , 1 , 3 , 2 ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/levels/level7.qml b/basicsuite/qt5-launchpresentation/samegame/content/levels/level7.qml new file mode 100644 index 0000000..5d71d7c --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/levels/level7.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + goalText: "8 of 10

    Clear the grid." + startingGrid: [ 2 , 4 , 3 , 2 , 3 , 2 , 3 , 3 , 4 , 3 , + 2 , 2 , 3 , 3 , 1 , 4 , 3 , 3 , 3 , 2 , + 1 , 4 , 2 , 3 , 4 , 3 , 3 , 1 , 1 , 1 , + 2 , 1 , 2 , 4 , 4 , 2 , 2 , 3 , 2 , 1 , + 3 , 4 , 4 , 1 , 3 , 2 , 4 , 2 , 1 , 1 , + 2 , 2 , 3 , 1 , 2 , 4 , 1 , 2 , 1 , 2 , + 1 , 2 , 3 , 2 , 4 , 4 , 3 , 1 , 1 , 2 , + 4 , 4 , 2 , 1 , 2 , 4 , 2 , 2 , 4 , 3 , + 4 , 2 , 4 , 1 , 3 , 4 , 1 , 4 , 2 , 4 , + 4 , 3 , 4 , 1 , 4 , 3 , 1 , 3 , 1 , 1 , + 3 , 3 , 2 , 3 , 2 , 4 , 1 , 2 , 4 , 4 , + 3 , 4 , 2 , 2 , 4 , 3 , 4 , 1 , 3 , 2 , + 4 , 3 , 3 , 4 , 2 , 4 , 1 , 2 , 3 , 2 ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/levels/level8.qml b/basicsuite/qt5-launchpresentation/samegame/content/levels/level8.qml new file mode 100644 index 0000000..9dbb8c2 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/levels/level8.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + scoreTarget: 1000 + goalText: "9 of 10

    Score over 1000 points" + startingGrid: [ 1 , 4 , 4 , 3 , 2 , 1 , 4 , 2 , 4 , 2 , + 2 , 3 , 4 , 4 , 1 , 1 , 1 , 4 , 4 , 4 , + 1 , 3 , 1 , 2 , 2 , 1 , 2 , 1 , 4 , 2 , + 4 , 3 , 4 , 2 , 1 , 4 , 1 , 2 , 2 , 3 , + 3 , 4 , 2 , 4 , 4 , 3 , 2 , 2 , 2 , 1 , + 4 , 4 , 3 , 2 , 4 , 4 , 2 , 1 , 1 , 1 , + 1 , 2 , 1 , 3 , 4 , 1 , 1 , 3 , 2 , 3 , + 3 , 4 , 2 , 2 , 1 , 3 , 2 , 2 , 4 , 2 , + 2 , 4 , 1 , 2 , 2 , 4 , 3 , 3 , 3 , 1 , + 1 , 2 , 2 , 4 , 1 , 2 , 2 , 3 , 3 , 3 , + 4 , 4 , 1 , 4 , 3 , 1 , 3 , 3 , 3 , 4 , + 1 , 2 , 4 , 1 , 2 , 1 , 1 , 4 , 2 , 1 , + 1 , 2 , 3 , 4 , 2 , 4 , 4 , 2 , 1 , 3 ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/levels/level9.qml b/basicsuite/qt5-launchpresentation/samegame/content/levels/level9.qml new file mode 100644 index 0000000..4e8bf19 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/levels/level9.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TemplateBase{ + scoreTarget: 2000 + timeTarget: 60 + moveTarget: 20 + mustClear: false + goalText: "10 of 10

    Score 2000 in one minute with less than 20 moves!" + startingGrid: [ 3 , 2 , 3 , 1 , 3 , 3 , 4 , 1 , 3 , 3 , + 2 , 3 , 2 , 1 , 1 , 2 , 2 , 2 , 4 , 1 , + 2 , 4 , 4 , 4 , 3 , 1 , 4 , 4 , 4 , 1 , + 3 , 1 , 3 , 4 , 4 , 2 , 2 , 2 , 2 , 3 , + 2 , 1 , 4 , 4 , 3 , 3 , 1 , 1 , 3 , 2 , + 3 , 2 , 1 , 4 , 3 , 4 , 1 , 3 , 4 , 2 , + 3 , 3 , 1 , 4 , 4 , 4 , 2 , 1 , 2 , 3 , + 2 , 3 , 4 , 3 , 4 , 1 , 1 , 3 , 2 , 4 , + 4 , 4 , 1 , 2 , 4 , 3 , 2 , 2 , 2 , 4 , + 1 , 4 , 2 , 2 , 1 , 1 , 2 , 1 , 1 , 4 , + 1 , 4 , 3 , 3 , 3 , 1 , 3 , 4 , 4 , 2 , + 3 , 4 , 1 , 1 , 2 , 2 , 2 , 3 , 2 , 1 , + 3 , 3 , 4 , 3 , 1 , 1 , 1 , 4 , 4 , 3 ] +} diff --git a/basicsuite/qt5-launchpresentation/samegame/content/samegame.js b/basicsuite/qt5-launchpresentation/samegame/content/samegame.js new file mode 100755 index 0000000..7b226cb --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/content/samegame.js @@ -0,0 +1,581 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* This script file handles the game logic */ +.pragma library +.import QtQuick.LocalStorage 2.0 as Sql +.import "../settings.js" as Settings + +var maxColumn = 10; +var maxRow = 13; +var types = 3; +var maxIndex = maxColumn*maxRow; +var board = new Array(maxIndex); +var blockSrc = "Block.qml"; +var gameDuration; +var component = Qt.createComponent(blockSrc); +var gameCanvas; +var betweenTurns = false; + +var puzzleLevel = null; +var puzzlePath = ""; + +var gameMode = "arcade"; //Set in new game, then tweaks behaviour of other functions +var gameOver = false; + +function changeBlock(src) +{ + blockSrc = src; + component = Qt.createComponent(blockSrc); +} + +// Index function used instead of a 2D array +function index(column, row) +{ + return column + row * maxColumn; +} + +function timeStr(msecs) +{ + var secs = Math.floor(msecs/1000); + var m = Math.floor(secs/60); + var ret = "" + m + "m " + (secs%60) + "s"; + return ret; +} + +function cleanUp() +{ + if (gameCanvas == undefined) + return; + // Delete blocks from previous game + for (var i = 0; i < maxIndex; i++) { + if (board[i] != null) + board[i].destroy(); + board[i] = null; + } + if (puzzleLevel != null){ + puzzleLevel.destroy(); + puzzleLevel = null; + } + gameCanvas.mode = "" +} + +function startNewGame(gc, mode, map) +{ + gameCanvas = gc; + if (mode == undefined) + gameMode = "arcade"; + else + gameMode = mode; + gameOver = false; + + cleanUp(); + + gc.gameOver = false; + gc.mode = gameMode; + // Calculate board size + maxColumn = Math.floor(gameCanvas.width/Settings.blockSize); + maxRow = Math.floor(gameCanvas.height/Settings.blockSize); + maxIndex = maxRow * maxColumn; + if (gameMode == "arcade") //Needs to be after board sizing + getHighScore(); + + + // Initialize Board + board = new Array(maxIndex); + gameCanvas.score = 0; + gameCanvas.score2 = 0; + gameCanvas.moves = 0; + gameCanvas.curTurn = 1; + if (gameMode == "puzzle") + loadMap(map); + else//Note that we load them in reverse order for correct visual stacking + for (var column = maxColumn - 1; column >= 0; column--) + for (var row = maxRow - 1; row >= 0; row--) + createBlock(column, row); + if (gameMode == "puzzle") + getLevelHistory();//Needs to be after map load + gameDuration = new Date(); +} + +var fillFound; // Set after a floodFill call to the number of blocks found +var floodBoard; // Set to 1 if the floodFill reaches off that node + +// NOTE: Be careful with vars named x,y, as the calling object's x,y are still in scope +function handleClick(x,y) +{ + if (betweenTurns || gameOver || gameCanvas == undefined) + return; + var column = Math.floor(x/Settings.blockSize); + var row = Math.floor(y/Settings.blockSize); + if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) + return; + if (board[index(column, row)] == null) + return; + // If it's a valid block, remove it and all connected (does nothing if it's not connected) + floodFill(column,row, -1); + if (fillFound <= 0) + return; + if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) + gameCanvas.score2 += (fillFound - 1) * (fillFound - 1); + else + gameCanvas.score += (fillFound - 1) * (fillFound - 1); + if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) + shuffleUp(); + else + shuffleDown(); + gameCanvas.moves += 1; + if (gameMode == "endless") + refill(); + else if (gameMode != "multiplayer") + victoryCheck(); + if (gameMode == "multiplayer" && !gc.gameOver){ + betweenTurns = true; + gameCanvas.swapPlayers();//signal, animate and call turnChange() when ready + } +} + +function floodFill(column,row,type) +{ + if (board[index(column, row)] == null) + return; + var first = false; + if (type == -1) { + first = true; + type = board[index(column,row)].type; + + // Flood fill initialization + fillFound = 0; + floodBoard = new Array(maxIndex); + } + if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) + return; + if (floodBoard[index(column, row)] == 1 || (!first && type != board[index(column, row)].type)) + return; + floodBoard[index(column, row)] = 1; + floodFill(column + 1, row, type); + floodFill(column - 1, row, type); + floodFill(column, row + 1, type); + floodFill(column, row - 1, type); + if (first == true && fillFound == 0) + return; // Can't remove single blocks + board[index(column, row)].dying = true; + board[index(column, row)] = null; + fillFound += 1; +} + +function shuffleDown() +{ + // Fall down + for (var column = 0; column < maxColumn; column++) { + var fallDist = 0; + for (var row = maxRow - 1; row >= 0; row--) { + if (board[index(column,row)] == null) { + fallDist += 1; + } else { + if (fallDist > 0) { + var obj = board[index(column, row)]; + obj.y = (row + fallDist) * Settings.blockSize; + board[index(column, row + fallDist)] = obj; + board[index(column, row)] = null; + } + } + } + } + // Fall to the left + fallDist = 0; + for (column = 0; column < maxColumn; column++) { + if (board[index(column, maxRow - 1)] == null) { + fallDist += 1; + } else { + if (fallDist > 0) { + for (row = 0; row < maxRow; row++) { + obj = board[index(column, row)]; + if (obj == null) + continue; + obj.x = (column - fallDist) * Settings.blockSize; + board[index(column - fallDist,row)] = obj; + board[index(column, row)] = null; + } + } + } + } +} + + +function shuffleUp() +{ + // Fall up + for (var column = 0; column < maxColumn; column++) { + var fallDist = 0; + for (var row = 0; row < maxRow; row++) { + if (board[index(column,row)] == null) { + fallDist += 1; + } else { + if (fallDist > 0) { + var obj = board[index(column, row)]; + obj.y = (row - fallDist) * Settings.blockSize; + board[index(column, row - fallDist)] = obj; + board[index(column, row)] = null; + } + } + } + } + // Fall to the left (or should it be right, so as to be left for P2?) + fallDist = 0; + for (column = 0; column < maxColumn; column++) { + if (board[index(column, 0)] == null) { + fallDist += 1; + } else { + if (fallDist > 0) { + for (row = 0; row < maxRow; row++) { + obj = board[index(column, row)]; + if (obj == null) + continue; + obj.x = (column - fallDist) * Settings.blockSize; + board[index(column - fallDist,row)] = obj; + board[index(column, row)] = null; + } + } + } + } +} + +function turnChange()//called by ui outside +{ + betweenTurns = false; + if (gameCanvas.curTurn == 1){ + shuffleUp(); + gameCanvas.curTurn = 2; + victoryCheck(); + }else{ + shuffleDown(); + gameCanvas.curTurn = 1; + victoryCheck(); + } +} + +function refill() +{ + for (var column = 0; column < maxColumn; column++) { + for (var row = 0; row < maxRow; row++) { + if (board[index(column, row)] == null) + createBlock(column, row); + } + } +} + +function victoryCheck() +{ + // Awards bonuses for no blocks left + var deservesBonus = true; + if (board[index(0,maxRow - 1)] != null || board[index(0,0)] != null) + deservesBonus = false; + // Checks for game over + if (deservesBonus){ + if (gameCanvas.curTurn = 1) + gameCanvas.score += 1000; + else + gameCanvas.score2 += 1000; + } + gameOver = deservesBonus; + if (gameCanvas.curTurn == 1){ + if (!(floodMoveCheck(0, maxRow - 1, -1))) + gameOver = true; + }else{ + if (!(floodMoveCheck(0, 0, -1, true))) + gameOver = true; + } + if (gameMode == "puzzle"){ + puzzleVictoryCheck(deservesBonus);//Takes it from here + return; + } + if (gameOver) { + var winnerScore = Math.max(gameCanvas.score, gameCanvas.score2); + if (gameMode == "multiplayer"){ + gameCanvas.score = winnerScore; + saveHighScore(gameCanvas.score2); + } + saveHighScore(gameCanvas.score); + gameDuration = new Date() - gameDuration; + gameCanvas.gameOver = true; + } +} + +// Only floods up and right, to see if it can find adjacent same-typed blocks +function floodMoveCheck(column, row, type, goDownInstead) +{ + if (column >= maxColumn || column < 0 || row >= maxRow || row < 0) + return false; + if (board[index(column, row)] == null) + return false; + var myType = board[index(column, row)].type; + if (type == myType) + return true; + if (goDownInstead) + return floodMoveCheck(column + 1, row, myType, goDownInstead) || + floodMoveCheck(column, row + 1, myType, goDownInstead); + else + return floodMoveCheck(column + 1, row, myType) || + floodMoveCheck(column, row - 1, myType); +} + +function createBlock(column,row,type) +{ + // Note that we don't wait for the component to become ready. This will + // only work if the block QML is a local file. Otherwise the component will + // not be ready immediately. There is a statusChanged signal on the + // component you could use if you want to wait to load remote files. + if (component.status == 1){ + if (type == undefined) + type = Math.floor(Math.random() * types); + if (type < 0 || type > 4) { + console.log("Invalid type requested");//TODO: Is this triggered by custom levels much? + return; + } + var dynamicObject = component.createObject(gameCanvas, + {"type": type, + "x": column*Settings.blockSize, + "y": -1*Settings.blockSize, + "width": Settings.blockSize, + "height": Settings.blockSize, + "particleSystem": gameCanvas.ps}); + if (dynamicObject == null){ + console.log("error creating block"); + console.log(component.errorString()); + return false; + } + dynamicObject.y = row*Settings.blockSize; + dynamicObject.spawned = true; + + board[index(column,row)] = dynamicObject; + }else{ + console.log("error loading block component"); + console.log(component.errorString()); + return false; + } + return true; +} + +function showPuzzleError(str) +{ + //TODO: Nice user visible UI? + console.log(str); +} + +function loadMap(map) +{ + puzzlePath = map; + var levelComp = Qt.createComponent(puzzlePath); + if (levelComp.status != 1){ + console.log("Error loading level"); + showPuzzleError(levelComp.errorString()); + return; + } + puzzleLevel = levelComp.createObject(); + if (puzzleLevel == null || !puzzleLevel.startingGrid instanceof Array) { + showPuzzleError("Bugger!"); + return; + } + gameCanvas.showPuzzleGoal(puzzleLevel.goalText); + //showPuzzleGoal should call finishLoadingMap as the next thing it does, before handling more events +} + +function finishLoadingMap() +{ + for (var i in puzzleLevel.startingGrid) + if (! (puzzleLevel.startingGrid[i] >= 0 && puzzleLevel.startingGrid[i] <= 9) ) + puzzleLevel.startingGrid[i] = 0; + //TODO: Don't allow loading larger levels, leads to cheating + while (puzzleLevel.startingGrid.length > maxIndex) puzzleLevel.startingGrid.shift(); + while (puzzleLevel.startingGrid.length < maxIndex) puzzleLevel.startingGrid.unshift(0); + for (var i in puzzleLevel.startingGrid) + if (puzzleLevel.startingGrid[i] > 0) + createBlock(i % maxColumn, Math.floor(i / maxColumn), puzzleLevel.startingGrid[i] - 1); + + //### Experimental feature - allow levels to contain arbitrary QML scenes as well! + //while (puzzleLevel.children.length) + // puzzleLevel.children[0].parent = gameCanvas; + gameDuration = new Date(); //Don't start until we finish loading +} + +function puzzleVictoryCheck(clearedAll)//gameOver has also been set if no more moves +{ + var won = true; + var soFar = new Date() - gameDuration; + if (puzzleLevel.scoreTarget != -1 && gameCanvas.score < puzzleLevel.scoreTarget){ + won = false; + } if (puzzleLevel.scoreTarget != -1 && gameCanvas.score >= puzzleLevel.scoreTarget && !puzzleLevel.mustClear){ + gameOver = true; + } if (puzzleLevel.timeTarget != -1 && soFar/1000.0 > puzzleLevel.timeTarget){ + gameOver = true; + } if (puzzleLevel.moveTarget != -1 && gameCanvas.moves >= puzzleLevel.moveTarget){ + gameOver = true; + } if (puzzleLevel.mustClear && gameOver && !clearedAll) { + won = false; + } + + if (gameOver) { + gameCanvas.gameOver = true; + gameCanvas.showPuzzleEnd(won); + + if (won) { + // Store progress + saveLevelHistory(); + } + } +} + +function getHighScore() +{ + var db = Sql.LocalStorage.openDatabaseSync( + "SameGame", + "2.0", + "SameGame Local Data", + 100 + ); + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(game TEXT, score NUMBER, gridSize TEXT, time NUMBER)'); + // Only show results for the current grid size + var rs = tx.executeSql('SELECT * FROM Scores WHERE gridSize = "' + + maxColumn + "x" + maxRow + '" AND game = "' + gameMode + '" ORDER BY score desc'); + if (rs.rows.length > 0) + gameCanvas.highScore = rs.rows.item(0).score; + else + gameCanvas.highScore = 0; + } + ); +} + +function saveHighScore(score) +{ + // Offline storage + var db = Sql.LocalStorage.openDatabaseSync( + "SameGame", + "2.0", + "SameGame Local Data", + 100 + ); + var dataStr = "INSERT INTO Scores VALUES(?, ?, ?, ?)"; + var data = [ + gameMode, + score, + maxColumn + "x" + maxRow, + Math.floor(gameDuration / 1000) + ]; + if (score >= gameCanvas.highScore)//Update UI field + gameCanvas.highScore = score; + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Scores(game TEXT, score NUMBER, gridSize TEXT, time NUMBER)'); + tx.executeSql(dataStr, data); + } + ); +} + +function getLevelHistory() +{ + var db = Sql.LocalStorage.openDatabaseSync( + "SameGame", + "2.0", + "SameGame Local Data", + 100 + ); + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Puzzle(level TEXT, score NUMBER, moves NUMBER, time NUMBER)'); + var rs = tx.executeSql('SELECT * FROM Puzzle WHERE level = "' + puzzlePath + '" ORDER BY score desc'); + if (rs.rows.length > 0) { + gameCanvas.puzzleWon = true; + gameCanvas.highScore = rs.rows.item(0).score; + } else { + gameCanvas.puzzleWon = false; + gameCanvas.highScore = 0; + } + } + ); +} + +function saveLevelHistory() +{ + var db = Sql.LocalStorage.openDatabaseSync( + "SameGame", + "2.0", + "SameGame Local Data", + 100 + ); + var dataStr = "INSERT INTO Puzzle VALUES(?, ?, ?, ?)"; + var data = [ + puzzlePath, + gameCanvas.score, + gameCanvas.moves, + Math.floor(gameDuration / 1000) + ]; + gameCanvas.puzzleWon = true; + + db.transaction( + function(tx) { + tx.executeSql('CREATE TABLE IF NOT EXISTS Puzzle(level TEXT, score NUMBER, moves NUMBER, time NUMBER)'); + tx.executeSql(dataStr, data); + } + ); +} + +function nuke() //For "Debug mode" +{ + for (var row = 1; row <= 5; row++) { + for (var col = 0; col < 5; col++) { + if (board[index(col, maxRow - row)] != null) { + board[index(col, maxRow - row)].dying = true; + board[index(col, maxRow - row)] = null; + } + } + } + if (gameMode == "multiplayer" && gameCanvas.curTurn == 2) + shuffleUp(); + else + shuffleDown(); + if (gameMode == "endless") + refill(); + else + victoryCheck(); +} diff --git a/basicsuite/qt5-launchpresentation/samegame/settings.js b/basicsuite/qt5-launchpresentation/samegame/settings.js new file mode 100644 index 0000000..e09dee9 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/samegame/settings.js @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Research In Motion +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +.pragma library + +//This should be switched over once a proper QML settings API exists + +var menuDelay = 500 + +var headerHeight = 20 // 70 on BB10 +var footerHeight = 44 // 100 on BB10 + +var fontPixelSize = 14 // 55 on BB10 + +var blockSize = 32 // 64 on BB10 + +var toolButtonHeight = 32 // 64 on BB10 + +var menuButtonSpacing = 0 // 15 on BB10 diff --git a/basicsuite/qt5-launchpresentation/title.txt b/basicsuite/qt5-launchpresentation/title.txt new file mode 100644 index 0000000..d475d8a --- /dev/null +++ b/basicsuite/qt5-launchpresentation/title.txt @@ -0,0 +1 @@ +Qt5 Launch Presentation diff --git a/basicsuite/qt5-particlesdemo/content/burstandpulse.qml b/basicsuite/qt5-particlesdemo/content/burstandpulse.qml new file mode 100644 index 0000000..c44c8dc --- /dev/null +++ b/basicsuite/qt5-particlesdemo/content/burstandpulse.qml @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Rectangle { + width: 320 + height: 480 + color: "black" + property bool lastWasPulse: false + Timer { + interval: 3500 + triggeredOnStart: true + running: true + repeat: true + onTriggered: { + //! [0] + if (lastWasPulse) { + burstEmitter.burst(500); + lastWasPulse = false; + } else { + pulseEmitter.pulse(500); + lastWasPulse = true; + } + //! [0] + } + } + ParticleSystem { + id: particles + anchors.fill: parent + ImageParticle { + source: "../images/star.png" + alpha: 0 + colorVariation: 0.6 + } + + Emitter { + id: burstEmitter + x: parent.width/2 + y: parent.height/3 + emitRate: 1000 + lifeSpan: 2000 + enabled: false + velocity: AngleDirection{magnitude: 64; angleVariation: 360} + size: 24 + sizeVariation: 8 + Text { + anchors.centerIn: parent + color: "white" + font.pixelSize: 18 + text: "Burst" + } + } + Emitter { + id: pulseEmitter + x: parent.width/2 + y: 2*parent.height/3 + emitRate: 1000 + lifeSpan: 2000 + enabled: false + velocity: AngleDirection{magnitude: 64; angleVariation: 360} + size: 24 + sizeVariation: 8 + Text { + anchors.centerIn: parent + color: "white" + font.pixelSize: 18 + text: "Pulse" + } + } + } +} diff --git a/basicsuite/qt5-particlesdemo/content/customemitter.qml b/basicsuite/qt5-particlesdemo/content/customemitter.qml new file mode 100644 index 0000000..bcf7da3 --- /dev/null +++ b/basicsuite/qt5-particlesdemo/content/customemitter.qml @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +ParticleSystem { + id: sys + width: 360 + height: 600 + running: true + Rectangle { + z: -1 + anchors.fill: parent + color: "black" + } + + property real petalLength: 180 + property real petalRotation: 0 + NumberAnimation on petalRotation { + from: 0; + to: 360; + loops: -1; + running: true + duration: 24000 + } + + function convert(a) {return a*(Math.PI/180);} + Emitter { + lifeSpan: 4000 + emitRate: 120 + size: 12 + anchors.centerIn: parent + //! [0] + onEmitParticles: { + for (var i=0; i + + emitters.qml + content/burstandpulse.qml + content/customemitter.qml + content/emitmask.qml + content/maximumemitted.qml + content/shapeanddirection.qml + content/trailemitter.qml + content/velocityfrommotion.qml + + diff --git a/basicsuite/qt5-particlesdemo/images/_explo.png b/basicsuite/qt5-particlesdemo/images/_explo.png new file mode 100644 index 0000000..4297245 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/_explo.png differ diff --git a/basicsuite/qt5-particlesdemo/images/backgroundLeaves.jpg b/basicsuite/qt5-particlesdemo/images/backgroundLeaves.jpg new file mode 100755 index 0000000..08be167 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/backgroundLeaves.jpg differ diff --git a/basicsuite/qt5-particlesdemo/images/bear_tiles.png b/basicsuite/qt5-particlesdemo/images/bear_tiles.png new file mode 100644 index 0000000..6bbb2a9 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/bear_tiles.png differ diff --git a/basicsuite/qt5-particlesdemo/images/candle.png b/basicsuite/qt5-particlesdemo/images/candle.png new file mode 100644 index 0000000..8fa3193 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/candle.png differ diff --git a/basicsuite/qt5-particlesdemo/images/colortable.png b/basicsuite/qt5-particlesdemo/images/colortable.png new file mode 100644 index 0000000..a62ceeb Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/colortable.png differ diff --git a/basicsuite/qt5-particlesdemo/images/finalfrontier.png b/basicsuite/qt5-particlesdemo/images/finalfrontier.png new file mode 100644 index 0000000..2ba1815 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/finalfrontier.png differ diff --git a/basicsuite/qt5-particlesdemo/images/flower.png b/basicsuite/qt5-particlesdemo/images/flower.png new file mode 100644 index 0000000..b5c6062 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/flower.png differ diff --git a/basicsuite/qt5-particlesdemo/images/matchmask.png b/basicsuite/qt5-particlesdemo/images/matchmask.png new file mode 100644 index 0000000..e575875 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/matchmask.png differ diff --git a/basicsuite/qt5-particlesdemo/images/meteor.png b/basicsuite/qt5-particlesdemo/images/meteor.png new file mode 100644 index 0000000..e8c368a Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/meteor.png differ diff --git a/basicsuite/qt5-particlesdemo/images/meteor_explo.png b/basicsuite/qt5-particlesdemo/images/meteor_explo.png new file mode 100644 index 0000000..e659bfe Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/meteor_explo.png differ diff --git a/basicsuite/qt5-particlesdemo/images/meteors.png b/basicsuite/qt5-particlesdemo/images/meteors.png new file mode 100644 index 0000000..bada8a1 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/meteors.png differ diff --git a/basicsuite/qt5-particlesdemo/images/nullRock.png b/basicsuite/qt5-particlesdemo/images/nullRock.png new file mode 100644 index 0000000..4076327 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/nullRock.png differ diff --git a/basicsuite/qt5-particlesdemo/images/particle.png b/basicsuite/qt5-particlesdemo/images/particle.png new file mode 100644 index 0000000..5c83896 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/particle.png differ diff --git a/basicsuite/qt5-particlesdemo/images/particle2.png b/basicsuite/qt5-particlesdemo/images/particle2.png new file mode 100644 index 0000000..36349c6 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/particle2.png differ diff --git a/basicsuite/qt5-particlesdemo/images/particle3.png b/basicsuite/qt5-particlesdemo/images/particle3.png new file mode 100644 index 0000000..905d8f3 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/particle3.png differ diff --git a/basicsuite/qt5-particlesdemo/images/particle4.png b/basicsuite/qt5-particlesdemo/images/particle4.png new file mode 100644 index 0000000..bc95b70 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/particle4.png differ diff --git a/basicsuite/qt5-particlesdemo/images/particleA.png b/basicsuite/qt5-particlesdemo/images/particleA.png new file mode 100644 index 0000000..c63acde Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/particleA.png differ diff --git a/basicsuite/qt5-particlesdemo/images/portal_bg.png b/basicsuite/qt5-particlesdemo/images/portal_bg.png new file mode 100644 index 0000000..3c59eea Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/portal_bg.png differ diff --git a/basicsuite/qt5-particlesdemo/images/realLeaf1.png b/basicsuite/qt5-particlesdemo/images/realLeaf1.png new file mode 100644 index 0000000..6cabf29 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/realLeaf1.png differ diff --git a/basicsuite/qt5-particlesdemo/images/realLeaf2.png b/basicsuite/qt5-particlesdemo/images/realLeaf2.png new file mode 100644 index 0000000..bfeca86 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/realLeaf2.png differ diff --git a/basicsuite/qt5-particlesdemo/images/realLeaf3.png b/basicsuite/qt5-particlesdemo/images/realLeaf3.png new file mode 100644 index 0000000..b1071e8 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/realLeaf3.png differ diff --git a/basicsuite/qt5-particlesdemo/images/realLeaf4.png b/basicsuite/qt5-particlesdemo/images/realLeaf4.png new file mode 100644 index 0000000..d61d53d Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/realLeaf4.png differ diff --git a/basicsuite/qt5-particlesdemo/images/rocket.png b/basicsuite/qt5-particlesdemo/images/rocket.png new file mode 100644 index 0000000..a171610 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/rocket.png differ diff --git a/basicsuite/qt5-particlesdemo/images/rocket2.png b/basicsuite/qt5-particlesdemo/images/rocket2.png new file mode 100644 index 0000000..7110f8f Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/rocket2.png differ diff --git a/basicsuite/qt5-particlesdemo/images/sizeInOut.png b/basicsuite/qt5-particlesdemo/images/sizeInOut.png new file mode 100644 index 0000000..0a306ea Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/sizeInOut.png differ diff --git a/basicsuite/qt5-particlesdemo/images/snowflake.png b/basicsuite/qt5-particlesdemo/images/snowflake.png new file mode 100644 index 0000000..490887a Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/snowflake.png differ diff --git a/basicsuite/qt5-particlesdemo/images/sparkleSize.png b/basicsuite/qt5-particlesdemo/images/sparkleSize.png new file mode 100644 index 0000000..7520565 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/sparkleSize.png differ diff --git a/basicsuite/qt5-particlesdemo/images/star.png b/basicsuite/qt5-particlesdemo/images/star.png new file mode 100644 index 0000000..0d592cf Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/star.png differ diff --git a/basicsuite/qt5-particlesdemo/images/starfish_0.png b/basicsuite/qt5-particlesdemo/images/starfish_0.png new file mode 100644 index 0000000..8747f02 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/starfish_0.png differ diff --git a/basicsuite/qt5-particlesdemo/images/starfish_1.png b/basicsuite/qt5-particlesdemo/images/starfish_1.png new file mode 100644 index 0000000..1f3f159 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/starfish_1.png differ diff --git a/basicsuite/qt5-particlesdemo/images/starfish_2.png b/basicsuite/qt5-particlesdemo/images/starfish_2.png new file mode 100644 index 0000000..c6c7e5a Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/starfish_2.png differ diff --git a/basicsuite/qt5-particlesdemo/images/starfish_3.png b/basicsuite/qt5-particlesdemo/images/starfish_3.png new file mode 100644 index 0000000..307a89f Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/starfish_3.png differ diff --git a/basicsuite/qt5-particlesdemo/images/starfish_4.png b/basicsuite/qt5-particlesdemo/images/starfish_4.png new file mode 100644 index 0000000..d61c265 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/starfish_4.png differ diff --git a/basicsuite/qt5-particlesdemo/images/starfish_mask.png b/basicsuite/qt5-particlesdemo/images/starfish_mask.png new file mode 100644 index 0000000..2ef74f9 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/images/starfish_mask.png differ diff --git a/basicsuite/qt5-particlesdemo/main.cpp b/basicsuite/qt5-particlesdemo/main.cpp new file mode 100644 index 0000000..66e7ce4 --- /dev/null +++ b/basicsuite/qt5-particlesdemo/main.cpp @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "../../shared/shared.h" +DECLARATIVE_EXAMPLE_MAIN(particles/emitters/emitters) diff --git a/basicsuite/qt5-particlesdemo/main.qml b/basicsuite/qt5-particlesdemo/main.qml new file mode 100644 index 0000000..2b9a338 --- /dev/null +++ b/basicsuite/qt5-particlesdemo/main.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "shared" as Examples + +Item { + height: 480 + width: 320 + Examples.LauncherList { + id: ll + anchors.fill: parent + Component.onCompleted: { + addExample("Velocity from Motion", "Particle motion just by moving emitters", Qt.resolvedUrl("content/velocityfrommotion.qml")); + addExample("Burst and Pulse", "Emit imperatively", Qt.resolvedUrl("content/burstandpulse.qml")); + addExample("Custom Emitter", "Custom starting state", Qt.resolvedUrl("content/customemitter.qml")); + addExample("Emit Mask", "Emit arbitrary shapes", Qt.resolvedUrl("content/emitmask.qml")); + addExample("Maximum Emitted", "Put a limit on emissions", Qt.resolvedUrl("content/maximumemitted.qml")); + addExample("Shape and Direction", "Creates a portal effect", Qt.resolvedUrl("content/shapeanddirection.qml")); + addExample("TrailEmitter", "Emit from other particles", Qt.resolvedUrl("content/trailemitter.qml")); + } + } +} diff --git a/basicsuite/qt5-particlesdemo/preview_l.jpg b/basicsuite/qt5-particlesdemo/preview_l.jpg new file mode 100644 index 0000000..fa0db59 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/preview_l.jpg differ diff --git a/basicsuite/qt5-particlesdemo/qt5-particlesdemo.pro b/basicsuite/qt5-particlesdemo/qt5-particlesdemo.pro new file mode 100644 index 0000000..88e2467 --- /dev/null +++ b/basicsuite/qt5-particlesdemo/qt5-particlesdemo.pro @@ -0,0 +1,14 @@ +TARGET = qt5-particlesdemo + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + content \ + images \ + shared +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content diff --git a/basicsuite/qt5-particlesdemo/shared/Button.qml b/basicsuite/qt5-particlesdemo/shared/Button.qml new file mode 100644 index 0000000..9bbc01a --- /dev/null +++ b/basicsuite/qt5-particlesdemo/shared/Button.qml @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: container + + property string text: "Button" + property string subText: "" + signal clicked + property alias containsMouse: mouseArea.containsMouse + property alias pressed: mouseArea.pressed + implicitHeight: col.height + height: implicitHeight + width: buttonLabel.width + 20 + + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: container.clicked() + hoverEnabled: true + } + + Column { + spacing: 2 + id: col + anchors.verticalCenter: parent.verticalCenter + width: parent.width + Text { + id: buttonLabel + anchors.left: parent.left + anchors.leftMargin: 10 + anchors.right: parent.right + anchors.rightMargin: 10 + text: container.text + color: "black" + font.pixelSize: 22 + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + styleColor: "white" + style: Text.Raised + + } + Text { + id: buttonLabel2 + anchors.left: parent.left + anchors.leftMargin: 10 + text: container.subText + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + color: "#666" + font.pixelSize: 12 + } + } +} diff --git a/basicsuite/qt5-particlesdemo/shared/LauncherList.qml b/basicsuite/qt5-particlesdemo/shared/LauncherList.qml new file mode 100644 index 0000000..4336cf3 --- /dev/null +++ b/basicsuite/qt5-particlesdemo/shared/LauncherList.qml @@ -0,0 +1,148 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Item { + //model is a list of {"name":"somename", "url":"file:///some/url/mainfile.qml"} + //function used to add to model A) to enforce scheme B) to allow Qt.resolveUrl in url assignments + + function addExample(name, desc, url) + { + myModel.append({"name":name, "description":desc, "url":url}) + } + function hideExample() + { + ei.visible = false; + } + + ListView { + clip: true + delegate: SimpleLauncherDelegate{exampleItem: ei} + model: ListModel {id:myModel} + anchors.fill: parent + visible: !ei.visible + } + + Item { + id: ei + visible: false + clip: true + property url exampleUrl + onExampleUrlChanged: visible = (exampleUrl == '' ? false : true); //Setting exampleUrl automatically shows example + anchors.fill: parent + anchors.bottomMargin: 40 + MouseArea{ + anchors.fill: parent + enabled: ei.visible + //Eats mouse events + } + Loader{ + focus: true + source: ei.exampleUrl + anchors.fill: parent + } + } + Rectangle { + id: bar + visible: ei.visible + anchors.bottom: parent.bottom + width: parent.width + height: 40 + + Rectangle { + height: 1 + color: "#ccc" + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + } + + Rectangle { + height: 1 + color: "#fff" + anchors.top: parent.top + anchors.topMargin: 1 + anchors.left: parent.left + anchors.right: parent.right + } + + gradient: Gradient { + GradientStop { position: 0 ; color: "#eee" } + GradientStop { position: 1 ; color: "#ccc" } + } + + MouseArea{ + anchors.fill: parent + enabled: ei.visible + //Eats mouse events + } + + Image { + id: back + source: "images/back.png" + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: 2 + anchors.left: parent.left + anchors.leftMargin: 16 + + MouseArea { + id: mouse + hoverEnabled: true + anchors.centerIn: parent + width: 38 + height: 31 + anchors.verticalCenterOffset: -1 + onClicked: ei.exampleUrl = "" + Rectangle { + anchors.fill: parent + opacity: mouse.pressed ? 1 : 0 + Behavior on opacity { NumberAnimation{ duration: 100 }} + gradient: Gradient { + GradientStop { position: 0 ; color: "#22000000" } + GradientStop { position: 0.2 ; color: "#11000000" } + } + border.color: "darkgray" + antialiasing: true + radius: 4 + } + } + } + } +} diff --git a/basicsuite/qt5-particlesdemo/shared/README b/basicsuite/qt5-particlesdemo/shared/README new file mode 100644 index 0000000..bf16f23 --- /dev/null +++ b/basicsuite/qt5-particlesdemo/shared/README @@ -0,0 +1,11 @@ +These files are shared between multiple examples as a set of common and +reusuable components. While they do demonstrate the building of reusable +components in QML, they are not official examples themselves. +Consequently they do not have entries in the Qt documentation, and are +documented only through the code comments within the files. Developers +new to QML are strongly encouraged to go through the official examples +before delving into this directory. + +For most application use, see the Qt Quick Components project to find +ready-made Components you can use in your own projects. Qt Declarative +examples do not use them only to avoid external dependencies. diff --git a/basicsuite/qt5-particlesdemo/shared/SimpleLauncherDelegate.qml b/basicsuite/qt5-particlesdemo/shared/SimpleLauncherDelegate.qml new file mode 100644 index 0000000..e891266 --- /dev/null +++ b/basicsuite/qt5-particlesdemo/shared/SimpleLauncherDelegate.qml @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 + +Rectangle { + id: container + property Item exampleItem + width: ListView.view.width + height: button.implicitHeight + 22 + + gradient: Gradient { + GradientStop { + position: 0 + Behavior on color {ColorAnimation { duration: 100 }} + color: button.pressed ? "#e0e0e0" : "#fff" + } + GradientStop { + position: 1 + Behavior on color {ColorAnimation { duration: 100 }} + color: button.pressed ? "#e0e0e0" : button.containsMouse ? "#f5f5f5" : "#eee" + } + } + + Image { + id: image + opacity: 0.7 + Behavior on opacity {NumberAnimation {duration: 100}} + source: "images/next.png" + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 16 + } + + Button { + id: button + anchors.top: parent.top + anchors.left: parent.left + anchors.bottom: parent.bottom + anchors.right:image.left + text: name + subText: description + onClicked: exampleItem.exampleUrl = url; + } + + Rectangle { + height: 1 + color: "#ccc" + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + } +} diff --git a/basicsuite/qt5-particlesdemo/shared/images/back.png b/basicsuite/qt5-particlesdemo/shared/images/back.png new file mode 100644 index 0000000..5340209 Binary files /dev/null and b/basicsuite/qt5-particlesdemo/shared/images/back.png differ diff --git a/basicsuite/qt5-particlesdemo/shared/images/next.png b/basicsuite/qt5-particlesdemo/shared/images/next.png new file mode 100644 index 0000000..cdef8db Binary files /dev/null and b/basicsuite/qt5-particlesdemo/shared/images/next.png differ diff --git a/basicsuite/qt5-particlesdemo/shared/qmldir b/basicsuite/qt5-particlesdemo/shared/qmldir new file mode 100644 index 0000000..2f1e56a --- /dev/null +++ b/basicsuite/qt5-particlesdemo/shared/qmldir @@ -0,0 +1,3 @@ +Button 2.0 Button.qml +LauncherList 2.0 LauncherList.qml +SimpleLauncherDelegate 2.0 SimpleLauncherDelegate.qml diff --git a/basicsuite/qt5-particlesdemo/shared/quick_shared.qrc b/basicsuite/qt5-particlesdemo/shared/quick_shared.qrc new file mode 100644 index 0000000..9fc114d --- /dev/null +++ b/basicsuite/qt5-particlesdemo/shared/quick_shared.qrc @@ -0,0 +1,8 @@ + + + LauncherList.qml + SimpleLauncherDelegate.qml + Button.qml + images/back.png + + diff --git a/basicsuite/qt5-particlesdemo/shared/shared.h b/basicsuite/qt5-particlesdemo/shared/shared.h new file mode 100644 index 0000000..eab15f3 --- /dev/null +++ b/basicsuite/qt5-particlesdemo/shared/shared.h @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include +#include +#define DECLARATIVE_EXAMPLE_MAIN(NAME) int main(int argc, char* argv[]) \ +{\ + QGuiApplication app(argc,argv);\ + QQuickView view;\ + view.connect(view.engine(), SIGNAL(quit()), &app, SLOT(quit()));\ + view.setSource(QUrl("qrc:///" #NAME ".qml")); \ + if (QGuiApplication::platformName() == QLatin1String("qnx") || \ + QGuiApplication::platformName() == QLatin1String("eglfs")) {\ + view.setResizeMode(QQuickView::SizeRootObjectToView);\ + view.showFullScreen();\ + } else {\ + view.show();\ + }\ + return app.exec();\ +} diff --git a/basicsuite/qt5-particlesdemo/shared/shared.qrc b/basicsuite/qt5-particlesdemo/shared/shared.qrc new file mode 100644 index 0000000..4ac856e --- /dev/null +++ b/basicsuite/qt5-particlesdemo/shared/shared.qrc @@ -0,0 +1,8 @@ + + + LauncherList.qml + SimpleLauncherDelegate.qml + Button.qml + images/back.png + + diff --git a/basicsuite/qt5-particlesdemo/title.txt b/basicsuite/qt5-particlesdemo/title.txt new file mode 100644 index 0000000..8abe769 --- /dev/null +++ b/basicsuite/qt5-particlesdemo/title.txt @@ -0,0 +1 @@ +Qt5 Particles Demo diff --git a/basicsuite/sensorexplorer/app.pro b/basicsuite/sensorexplorer/app.pro new file mode 100644 index 0000000..5bf498d --- /dev/null +++ b/basicsuite/sensorexplorer/app.pro @@ -0,0 +1,10 @@ +TARGET = sensorexplorer + +include(../shared/shared.pri) + +content.files = *.qml +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/sensorexplorer/description.txt b/basicsuite/sensorexplorer/description.txt new file mode 100644 index 0000000..606dc9b --- /dev/null +++ b/basicsuite/sensorexplorer/description.txt @@ -0,0 +1 @@ +This example provides a list of all available sensors installed on the system for which Qt has a backend. Start a sensor to see how values change depending from environment and user-device interaction. diff --git a/basicsuite/sensorexplorer/doc/src/sensor_explorer.qdoc b/basicsuite/sensorexplorer/doc/src/sensor_explorer.qdoc new file mode 100644 index 0000000..35f28d0 --- /dev/null +++ b/basicsuite/sensorexplorer/doc/src/sensor_explorer.qdoc @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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 sensorexplorer + \title Sensor Explorer + \brief The Sensor Explorer example demonstrates how to read the meta-data of available sensors. + \ingroup b2qt-demos + + \section2 Sensor Explorer in QML + + + This example is divided into two parts: + + \list + \li A C++ plug-in that provides QML alternatives for QSensorExplorer, QPropertyInfo and the QSensorItem classes. + \li A QML Application that uses the QML alternatives to read the sensors meta-data and present it. + \endlist + + + This is a pure QML application that can be run from Qt Creator or directly using the + \c qmlscene binary. You should install the other C++ plug-in before trying to run + this example, otherwise it will not find its dependencies. + + \code + qmlscene main.qml + \endcode + + To write a QML application that will use the Explorer QML type you need to do the following steps: + + Import the Explorer 1.0 declarative plugin: + + \snippet sensorexplorer/main.qml 0 + + Create a SensorExplorer QML item: + + \snippet sensorexplorer/main.qml 1 + + You can retrieve a list of all available sensors using the SensorExplorer: + + \snippet sensorexplorer/main.qml 2 + + To retrieve the properties of a SensorItem use: + + \snippet sensorexplorer/main.qml 3 + + Changing a property value can be done like: + + \snippet sensorexplorer/main.qml 4 + + Starting and stopping a sensor can be done like: + + \snippet sensorexplorer/main.qml 5 +*/ + diff --git a/basicsuite/sensorexplorer/imports/explorer.cpp b/basicsuite/sensorexplorer/imports/explorer.cpp new file mode 100644 index 0000000..f9edc90 --- /dev/null +++ b/basicsuite/sensorexplorer/imports/explorer.cpp @@ -0,0 +1,136 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "explorer.h" +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +/* + \class QSensorExplorer + \brief The QSensorExplorer type provides an easy access for reading all avalaible sensors installed on the system. +*/ + +/* + Construct a QSensorExplorer object with parent \a parent +*/ +QSensorExplorer::QSensorExplorer(QObject* parent) + : QObject(parent) + , _selectedSensorItem(0) +{ + loadSensors(); +} + +/* + Destructor of a QSensorExplorer +*/ +QSensorExplorer::~QSensorExplorer() +{ +} + +/* + Load all available sensors and store it in a list. +*/ +void QSensorExplorer::loadSensors() +{ + _availableSensors.clear(); + foreach (const QByteArray &type, QSensor::sensorTypes()) { + foreach (const QByteArray &identifier, QSensor::sensorsForType(type)) { + // Don't put in sensors we can't connect to + QSensor* sensor = new QSensor(type, this); + //sensor->setIdentifier(identifier); + if (!sensor->connectToBackend()) { + qWarning() << "Couldn't connect to" << sensor->description(); + continue; + } + _availableSensors.append(new QSensorItem(sensor, this)); + } + } + emit availableSensorsChanged(); +} + +/* + \fn QSensorExplorer::availableSensorsChanged() + Notifies the client if the list of the available sensors was changed +*/ + +/* + \property QSensorExplorer::availableSensors + Returns a list of all available sensor. +*/ +QQmlListProperty QSensorExplorer::availableSensors() +{ + return QQmlListProperty(this,_availableSensors); +} + +/* + \fn QSensorExplorer::selectedSensorItemChanged() + Notifies the client if the selected sensor has been changed +*/ + +/* + \property QSensorExplorer::selectedSensorItem + Returns the current selected sensor item. +*/ +QSensorItem* QSensorExplorer::selectedSensorItem() +{ + return _selectedSensorItem; +} + +/* + \fn QSensorExplorer::setSelectedSensorItem(QSensorItem* selitem) + Sets the QSensorItem \a selitem as the current selected QSensorItem. +*/ +void QSensorExplorer::setSelectedSensorItem(QSensorItem* selitem) +{ + if (selitem && _selectedSensorItem != selitem) { + if (_selectedSensorItem) + _selectedSensorItem->unSelect(); + _selectedSensorItem = selitem; + _selectedSensorItem->select(); + emit selectedSensorItemChanged(); + } +} + +QT_END_NAMESPACE diff --git a/basicsuite/sensorexplorer/imports/explorer.h b/basicsuite/sensorexplorer/imports/explorer.h new file mode 100644 index 0000000..d9d9546 --- /dev/null +++ b/basicsuite/sensorexplorer/imports/explorer.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSEONSOREXPLORER_H +#define QSEONSOREXPLORER_H + +#include +#include +#include "sensoritem.h" + +QT_BEGIN_NAMESPACE + +class QSensorExplorer : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQmlListProperty availableSensors READ availableSensors NOTIFY availableSensorsChanged) + Q_PROPERTY(QSensorItem* selectedSensorItem READ selectedSensorItem WRITE setSelectedSensorItem NOTIFY selectedSensorItemChanged) +public: + QSensorExplorer(QObject* parent = 0); + virtual ~QSensorExplorer(); + +private: + QQmlListProperty availableSensors(); + void loadSensors(); + void setSelectedSensorItem(QSensorItem* selitem); + QSensorItem* selectedSensorItem(); + +Q_SIGNALS: + void availableSensorsChanged(); + void selectedSensorItemChanged(); + +private: + QList _availableSensors; + QSensorItem* _selectedSensorItem; +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QSensorExplorer) + +#endif // QSEONSOREXPLORER_H diff --git a/basicsuite/sensorexplorer/imports/imports.pro b/basicsuite/sensorexplorer/imports/imports.pro new file mode 100644 index 0000000..c596185 --- /dev/null +++ b/basicsuite/sensorexplorer/imports/imports.pro @@ -0,0 +1,17 @@ +CXX_MODULE = qml +TARGET = sensorexplorer +TARGETPATH = Explorer +IMPORT_VERSION = 1.0 + +QT += qml sensors + +SOURCES = main.cpp \ + explorer.cpp \ + sensoritem.cpp \ + propertyinfo.cpp \ + +HEADERS = explorer.h \ + sensoritem.h \ + propertyinfo.h \ + +load(qml_plugin) diff --git a/basicsuite/sensorexplorer/imports/main.cpp b/basicsuite/sensorexplorer/imports/main.cpp new file mode 100644 index 0000000..3a8f506 --- /dev/null +++ b/basicsuite/sensorexplorer/imports/main.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include "explorer.h" + +QT_BEGIN_NAMESPACE + +class SensorExplorerDeclarativeModule : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json") +public: + virtual void registerTypes(const char *uri) + { + Q_ASSERT(QLatin1String(uri) == QLatin1String("Explorer")); + qmlRegisterType(uri, 1, 0, "SensorExplorer"); + qmlRegisterType(uri, 1, 0, "SensorItem"); + qmlRegisterType(uri, 1, 0, "PropertyInfo"); + } +}; + +QT_END_NAMESPACE + +#include "main.moc" diff --git a/basicsuite/sensorexplorer/imports/plugin.json b/basicsuite/sensorexplorer/imports/plugin.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/basicsuite/sensorexplorer/imports/plugin.json @@ -0,0 +1 @@ +{} diff --git a/basicsuite/sensorexplorer/imports/propertyinfo.cpp b/basicsuite/sensorexplorer/imports/propertyinfo.cpp new file mode 100644 index 0000000..0481d4d --- /dev/null +++ b/basicsuite/sensorexplorer/imports/propertyinfo.cpp @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "sensoritem.h" +#include +#include + +QT_BEGIN_NAMESPACE + +/* + \class QPropertyInfo + \brief The QPropertyInfo type provides an easy access for reading and writing the property values. +*/ + +/* + Construct a QPropertyInfo object with parent \a parent +*/ +QPropertyInfo::QPropertyInfo(QObject* parent) + : QObject(parent) + , _index(0) + , _isWriteable(false) + , _name("") + , _typeName("") + , _value("") +{} + +/* + Construct a QPropertyInfo object with parent \a parent, property name \a name, property index \a index, + property write access \a writeable, property type \a typeName and property value \a value +*/ +QPropertyInfo::QPropertyInfo(const QString& name, int index, bool writeable, const QString& typeName, const QString& value, QObject* parent) + : QObject(parent) + , _index(index) + , _isWriteable(writeable) + , _name(name) + , _typeName(typeName) + , _value(value) +{} + +/* + \property QPropertyInfo::name + Returns the name of the property +*/ +QString QPropertyInfo::name() +{ + return _name; +} + +/* + \property QPropertyInfo::typeName + Returns the type of the property +*/ +QString QPropertyInfo::typeName() +{ + return _typeName; +} + +/* + \property QPropertyInfo::value + Returns the current value of the property +*/ +QString QPropertyInfo::value() +{ + return _value; +} + +/* + \fn void QPropertyInfo::valueChanged() + Signal that notifies the client if the property value was changed. +*/ + +/* + \fn QPropertyInfo::setValue(const QString& value) + Sets the value \a value of the property +*/ +void QPropertyInfo::setValue(const QString& value) +{ + if (value != _value){ + _value = value; + emit valueChanged(); + } +} + +/* + \fn QPropertyInfo::index() + Returns the meta-data index of the property +*/ +int QPropertyInfo::index() +{ + return _index; +} + +/* + \property QPropertyInfo::isWriteable + Returns true if the property is writeable false if property is read only +*/ +bool QPropertyInfo::isWriteable() +{ + return _isWriteable; +} + +QT_END_NAMESPACE diff --git a/basicsuite/sensorexplorer/imports/propertyinfo.h b/basicsuite/sensorexplorer/imports/propertyinfo.h new file mode 100644 index 0000000..72ce640 --- /dev/null +++ b/basicsuite/sensorexplorer/imports/propertyinfo.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPROPERTYINFO_H +#define QPROPERTYINFO_H + +#include +#include + +QT_BEGIN_NAMESPACE + +class QPropertyInfo : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString name READ name CONSTANT) + Q_PROPERTY(QString typeName READ typeName CONSTANT) + Q_PROPERTY(QString value READ value NOTIFY valueChanged) + Q_PROPERTY(bool isWriteable READ isWriteable CONSTANT) + +public: + QPropertyInfo(QObject* parent = 0); + QPropertyInfo(const QString& name, int index, bool writeable, const QString& typeName, const QString& value, QObject* parent=0); + QString name(); + QString typeName(); + QString value(); + void setValue(const QString& value); + int index(); + bool isWriteable(); + +Q_SIGNALS: + void valueChanged(); + +private: + int _index; + bool _isWriteable; + QString _name; + QString _typeName; + QString _value; +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QPropertyInfo) + +#endif // QPROPERTYINFO_H diff --git a/basicsuite/sensorexplorer/imports/qmldir b/basicsuite/sensorexplorer/imports/qmldir new file mode 100644 index 0000000..ad67d81 --- /dev/null +++ b/basicsuite/sensorexplorer/imports/qmldir @@ -0,0 +1,2 @@ +module Explorer +plugin sensorexplorer diff --git a/basicsuite/sensorexplorer/imports/sensoritem.cpp b/basicsuite/sensorexplorer/imports/sensoritem.cpp new file mode 100644 index 0000000..cd33549 --- /dev/null +++ b/basicsuite/sensorexplorer/imports/sensoritem.cpp @@ -0,0 +1,322 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "sensoritem.h" +#include +#include + +QT_BEGIN_NAMESPACE + +/* + \class QSensorItem + \brief The QSensorItem type provides information about the meta-data from a sensors installed on the system. +*/ + +/* + Construct a QSensorItem object with parent \a parent +*/ +QSensorItem::QSensorItem(QObject* parent) + : QObject(parent) + , _qsensor(0) +{ +} + +/* + Construct a QSensorItem object with QSensor \a sensor and parent \a parent +*/ +QSensorItem::QSensorItem(QSensor* sensor, QObject* parent) + : QObject(parent) + , _qsensor(sensor) +{ +} + +/* + Destructor of a QSensorItem +*/ +QSensorItem::~QSensorItem() +{ +} + +/* + \fn QSensorItem::startChanged() + Notifies the client if the sensors has changed its start active status +*/ + +/* + \property QSensorItem::start + This property starts or stops the sensor +*/ +bool QSensorItem::start() +{ + return (_qsensor ? _qsensor->isActive() : false); +} + +void QSensorItem::setStart(bool run) +{ + if (_qsensor) + _qsensor->setActive(run); +} + +/* + \property QSensorItem::id + Returns the sensor id of the sensor item +*/ +QString QSensorItem::id() +{ + return (_qsensor ? _qsensor->description() : ""); +} + +/* + Set the new value \a val to the QPropertyInfo object \a property +*/ +void QSensorItem::changePropertyValue(QPropertyInfo* property, const QString& val) +{ + if (_qsensor && _sensorProperties.contains(property)){ + if ( _qsensor->setProperty(property->name().toLatin1().constData(), QVariant(val))) + updateSensorPropertyValues(); + else + qWarning() << "new property value couldn't be set"; + } +} + +/* + Reading the meta-data and activates the sensor. +*/ +void QSensorItem::select() +{ + if (_sensorProperties.isEmpty()) { + // Probe the reading using Qt's meta-object facilities + //Read properties from reader + QSensorReading *reading = _qsensor->reading(); + const QMetaObject *mo = reading->metaObject(); + int firstProperty = QSensorReading::staticMetaObject.propertyOffset(); + + for (int i = firstProperty; i < mo->propertyCount(); ++i) { + QString typeName = QLatin1String(mo->property(i).typeName()); + int crap = typeName.lastIndexOf("::"); + if (crap != -1) + typeName = typeName.mid(crap + 2); + + QPropertyInfo* pi = new QPropertyInfo(mo->property(i).name() + , i + , isWriteable(mo->property(i).name()) + , typeName + , "-" + , this); + _readerProperties.append(pi); + } + + //Read properties from sensor + const QMetaObject *mo1 = _qsensor->metaObject(); + firstProperty = QSensorReading::staticMetaObject.propertyOffset(); + + for (int i = firstProperty; i < mo1->propertyCount(); ++i) { + QString propertyname = mo1->property(i).name(); + if (ignoreProperty(propertyname)) + continue; + + QString typeName = QLatin1String(mo1->property(i).typeName()); + int crap = typeName.lastIndexOf("::"); + if (crap != -1) + typeName = typeName.mid(crap + 2); + + QPropertyInfo* pi = new QPropertyInfo(propertyname + , i + , isWriteable(propertyname) + , typeName + , "-" + , this); + _sensorProperties.append(pi); + } + updateSensorPropertyValues(); + connect(_qsensor, SIGNAL(readingChanged()), this, SLOT(sensorReadingChanged())); + } + connect(_qsensor, SIGNAL(activeChanged()), SIGNAL(startChanged())); +} + +/* + Unselect the sensor by stopping the sensor. +*/ +void QSensorItem::unSelect() +{ + _qsensor->stop(); + disconnect(_qsensor, SIGNAL(activeChanged()), this , SIGNAL(startChanged())); +} + +/* + Updates the property values from QSensor +*/ +void QSensorItem::updateSensorPropertyValues() +{ + if (_qsensor){ + const QMetaObject *mo = _qsensor->metaObject(); + for (int i = 0; i < _sensorProperties.count(); i++){ + QVariant val = mo->property(_sensorProperties[i]->index()).read(_qsensor); + _sensorProperties[i]->setValue(convertValue(_sensorProperties[i]->typeName(), val)); + } + } +} + +/* + \fn QSensorItem::propertiesChanged() + Notifies the client if the list of the properties was changed +*/ + +/* + Updates the property values from the QSensorReader +*/ +void QSensorItem::sensorReadingChanged() +{ + QSensorReading *reading = _qsensor->reading(); + const QMetaObject *mo = reading->metaObject(); + for (int i = 0; i < _readerProperties.count(); i++){ + QVariant val = mo->property(_readerProperties[i]->index()).read(reading); + _readerProperties[i]->setValue(convertValue(_readerProperties[i]->typeName(), val)); + } +} + +/* + Returns true if the property with the name \a propertyname should be ignored +*/ +bool QSensorItem::ignoreProperty(const QString& propertyname) +{ + if (propertyname == "reading" || + propertyname == "active" || + propertyname == "identifier" || + propertyname == "connectedToBackend" || + propertyname == "busy") + return true; + + return false; +} + +/* + Returns true if the property with the name \a propertyname is writeable +*/ +bool QSensorItem::isWriteable(const QString& propertyname) +{ + if (_qsensor){ + const QMetaObject *mo = _qsensor->metaObject(); + int propertyindex = mo->indexOfProperty(propertyname.toLocal8Bit().constData()); + if (propertyindex >= 0){ + QMetaProperty prop = mo->property(propertyindex); + return prop.isWritable(); + } + else { + QSensorReading *reading = _qsensor->reading(); + const QMetaObject *moreader = reading->metaObject(); + propertyindex = moreader->indexOfProperty(propertyname.toLocal8Bit().constData()); + if (propertyindex >= 0){ + QMetaProperty prop = mo->property(propertyindex); + return prop.isWritable(); + } + } + } + + return false; +} + +/* + Convert the variant \a val dependent on the type \a type and returns the converted value as a QString +*/ +QString QSensorItem::convertValue(const QString& type, const QVariant& val) +{ + if (type == "LightLevel"){ + switch (val.toInt()) { + case 1: return "Dark"; + case 2: return "Twilight"; + case 3: return "Light"; + case 4: return "Bright"; + case 5: return "Sunny"; + default: return "Undefined"; + } + } + else if (type == "Orientation"){ + switch (val.toInt()) { + case 1: return "TopUp"; + case 2: return "TopDown"; + case 3: return "LeftUp"; + case 4: return "RightUp"; + case 5: return "FaceUp"; + case 6: return "FaceDown"; + default: return "Undefined"; + } + } + else if (type == "qrangelist"){ + qrangelist rangelist = val.value(); + QStringList ranges; + foreach (const qrange &r, rangelist) { + if (r.first == r.second) + ranges << QString("%1 Hz").arg(r.first); + else + ranges << QString("%1-%2 Hz").arg(r.first).arg(r.second); + } + if (ranges.count() > 0) + return ranges.join(", "); + return "-"; + } + else if (type == "qoutputrangelist") { + qoutputrangelist rangelist = val.value(); + QStringList ranges; + foreach (const qoutputrange &r, rangelist) { + ranges << QString("(%1, %2) += %3").arg(r.minimum).arg(r.maximum).arg(r.accuracy); + } + if (ranges.count() > 0) + return ranges.join(", "); + return "-"; + } + + return val.toString(); +} + +/* + \property QSensorItem::properties + Returns a list of all properties from the sensor +*/ +QQmlListProperty QSensorItem::properties() +{ + _properties.clear(); + _properties.append(_sensorProperties); + _properties.append(_readerProperties); + return QQmlListProperty (this, _properties); +} + +QT_END_NAMESPACE diff --git a/basicsuite/sensorexplorer/imports/sensoritem.h b/basicsuite/sensorexplorer/imports/sensoritem.h new file mode 100644 index 0000000..b17d8ed --- /dev/null +++ b/basicsuite/sensorexplorer/imports/sensoritem.h @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSENSORITEM_H +#define QSENSORITEM_H + +#include +#include +#include "propertyinfo.h" + +QT_BEGIN_NAMESPACE + +class QSensor; +class QSensorItem : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool start READ start WRITE setStart NOTIFY startChanged) + Q_PROPERTY(QString id READ id CONSTANT) + Q_PROPERTY(QQmlListProperty properties READ properties NOTIFY propertiesChanged) +public: + QSensorItem(QObject* parent = 0); + QSensorItem(QSensor* sensor, QObject* parent = 0); + virtual ~QSensorItem(); + +public slots: + void select(); + void unSelect(); + void changePropertyValue(QPropertyInfo* property, const QString& val); + +private slots: + void sensorReadingChanged(); + +private: + QString id(); + bool start(); + void setStart(bool run); + QQmlListProperty properties(); + QString convertValue(const QString& type, const QVariant& val); + bool isWriteable(const QString& propertyname); + bool ignoreProperty(const QString& propertyname); + void updateSensorPropertyValues(); + +Q_SIGNALS: + void propertiesChanged(); + void startChanged(); + +private: + QSensor* _qsensor; + QList _properties; + QList _readerProperties; + QList _sensorProperties; +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QSensorItem) + +#endif // QSENSORITEM_H diff --git a/basicsuite/sensorexplorer/main.qml b/basicsuite/sensorexplorer/main.qml new file mode 100644 index 0000000..2a58709 --- /dev/null +++ b/basicsuite/sensorexplorer/main.qml @@ -0,0 +1,224 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtSensors module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 1.0 +import QtSensors 5.0 + +//! [0] +import Explorer 1.0 +//! [0] + +Item { + id: root + width: 800 + height: 1280 + + Rectangle { + id: main + width: root.width + height: root.height + anchors.centerIn: parent + + //! [1] + SensorExplorer { + id: explorer + } + //! [1] + + Column { + anchors.fill: parent + anchors.margins: 8 + spacing: 8 + + GroupBox { + id: topBox + title: qsTr("Available Sensors") + width: parent.width + height: main.height * 0.4 + + TableView { + id: sensorList + width: parent.width + height: parent.height * 0.80 + anchors.top: parent.top + anchors.topMargin: 22 + //! [2] + model: explorer.availableSensors + //! [2] + + TableViewColumn { role: "id"; title: qsTr("ID"); width: main.width * 0.7 } + TableViewColumn { role: "start"; title: qsTr("Running"); width: main.width * 0.15 } + + onClicked: { + explorer.selectedSensorItem = explorer.availableSensors[row] + //! [3] + propertyList.model = explorer.selectedSensorItem.properties + //! [3] + button.update() + } + } + + Button { + id: button + anchors.top: sensorList.bottom + anchors.right: parent.right + anchors.topMargin: 8 + text: qsTr("Start") + enabled: explorer.selectedSensorItem !== null + + function update() { + text = (explorer.selectedSensorItem !== null ? + (explorer.selectedSensorItem.start === true ? + qsTr("Stop") : qsTr("Start")) : qsTr("Start")) + } + + onClicked: { + if (explorer.selectedSensorItem !== null) { + //! [5] + if (text === "Start") { + explorer.selectedSensorItem.start = true; + text = "Stop"; + } + else { + explorer.selectedSensorItem.start = false; + text = "Start"; + } + //! [5] + } + } + } + + } + + GroupBox { + title: qsTr("Properties") + width: parent.width + height: main.height - topBox.height - 30 + enabled: explorer.selectedSensorItem != null + + TableView { + id: propertyList + property PropertyInfo selectedItem: null + + anchors.fill: parent + anchors.topMargin: 22 + + TableViewColumn { role: "name"; title: qsTr("Name"); width: 140 } + TableViewColumn { role: "value"; title: qsTr("Value"); width: 140 } + + onClicked: { + selectedItem = model[row] + } + + itemDelegate: { + if (selectedItem && selectedItem.isWriteable) + return editableDelegate; + return readOnlyDelegate; + } + + Component { + id: readOnlyDelegate + Item { + Text { + width: parent.width + anchors.margins: 4 + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + elide: styleData.elideMode + text: styleData.value + color: propertyList.model[styleData.row].isWriteable ? + styleData.textColor : Qt.lighter(styleData.textColor) + } + } + } + + Component { + id: editableDelegate + Item { + Text { + width: parent.width + anchors.margins: 4 + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + elide: styleData.elideMode + text: styleData.value + color: styleData.textColor + visible: !styleData.selected || styleData.column === 0 + } + Loader { // Initialize text editor lazily to improve performance + id: loaderEditor + anchors.margins: 4 + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + Connections { + target: loaderEditor.item + onAccepted: { + //! [4] + explorer.selectedSensorItem.changePropertyValue(propertyList.selectedItem, loaderEditor.item.text); + //! [4] + } + } + + // Load the editor for selected 'Value' cell + sourceComponent: (styleData.selected && styleData.column === 1) ? editor : null + + Component { + id: editor + TextInput { // ### TODO - this needs to utilize a virtual keyboard + id: textinput + color: styleData.textColor + text: styleData.value + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: true + onClicked: textinput.forceActiveFocus() + } + } + } + } + } + } + } + } + } + } +} diff --git a/basicsuite/sensorexplorer/preview_l.jpg b/basicsuite/sensorexplorer/preview_l.jpg new file mode 100644 index 0000000..b0469e5 Binary files /dev/null and b/basicsuite/sensorexplorer/preview_l.jpg differ diff --git a/basicsuite/sensorexplorer/sensorexplorer.pro b/basicsuite/sensorexplorer/sensorexplorer.pro new file mode 100644 index 0000000..22ef5b8 --- /dev/null +++ b/basicsuite/sensorexplorer/sensorexplorer.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs +CONFIG += ordered +SUBDIRS += \ + imports \ + app.pro + diff --git a/basicsuite/sensorexplorer/title.txt b/basicsuite/sensorexplorer/title.txt new file mode 100644 index 0000000..c56fed8 --- /dev/null +++ b/basicsuite/sensorexplorer/title.txt @@ -0,0 +1 @@ +Sensor Explorer diff --git a/basicsuite/sensors/1.png b/basicsuite/sensors/1.png new file mode 100644 index 0000000..8dd146b Binary files /dev/null and b/basicsuite/sensors/1.png differ diff --git a/basicsuite/sensors/2.png b/basicsuite/sensors/2.png new file mode 100644 index 0000000..362abaf Binary files /dev/null and b/basicsuite/sensors/2.png differ diff --git a/basicsuite/sensors/3.png b/basicsuite/sensors/3.png new file mode 100644 index 0000000..c8d3f8c Binary files /dev/null and b/basicsuite/sensors/3.png differ diff --git a/basicsuite/sensors/Accelbubble.qml b/basicsuite/sensors/Accelbubble.qml new file mode 100644 index 0000000..d0ab880 --- /dev/null +++ b/basicsuite/sensors/Accelbubble.qml @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtSensors 5.0 + +Item { + Rectangle { + id: field + color: "lightblue" + border.width: 1 + border.color: "darkblue" + width: parent.width + height: parent.height + Accelerometer { + id: accel + active:true + onReadingChanged: { + var newX = (bubble.x + calcRoll(accel.reading.x, accel.reading.y, accel.reading.z) * .1) + var newY = (bubble.y - calcPitch(accel.reading.x, accel.reading.y, accel.reading.z) * .1) + + if (newX < 0) + newX = 0 + if (newY < 0) + newY = 0 + + var right = field.width - bubble.width + var bottom = field.height - bubble.height + + if (newX > right) + newX = right + if (newY > bottom) + newY = bottom + + bubble.x = newX + bubble.y = newY + } + } + + Image { + id: bubble + source: "bluebubble.png" + property real centerX: parent.width / 2 + property real centerY: parent.height / 2; + property real bubbleCenter: bubble.width / 2 + x: centerX - bubbleCenter + y: centerY - bubbleCenter + smooth: true + + Behavior on y { + SmoothedAnimation { + easing.type: Easing.Linear + duration: 100 + } + } + Behavior on x { + SmoothedAnimation { + easing.type: Easing.Linear + duration: 100 + } + } + } + } + + function calcPitch(x,y,z) { + return Math.atan(y / Math.sqrt(x*x + z*z)) * 57.2957795; + } + function calcRoll(x,y,z) { + return Math.atan(x / Math.sqrt(y*y + z*z)) * 57.2957795; + } +} diff --git a/basicsuite/sensors/Light.qml b/basicsuite/sensors/Light.qml new file mode 100644 index 0000000..fd71790 --- /dev/null +++ b/basicsuite/sensors/Light.qml @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtSensors 5.0 + +Item { + rotation: 180 + Rectangle { + id: bg + width: parent.width + height: parent.height + Text { + id: illuminanceLevel + anchors.horizontalCenter: parent.horizontalCenter + font.pointSize: 26 + anchors.top: parent.top + } + Image { + id: avatar + anchors.top: illuminanceLevel.bottom + anchors.topMargin: 30 + anchors.centerIn: parent + } + + AmbientLightSensor { + active: true + onReadingChanged: { + if (reading.lightLevel === AmbientLightReading.Dark) { + avatar.source = "3.png" + bg.color = "midnightblue" + } else if (reading.lightLevel === AmbientLightReading.Twilight + || reading.lightLevel === AmbientLightReading.Light) { + avatar.source = "2.png" + bg.color = "steelblue" + } else if (reading.lightLevel === AmbientLightReading.Bright + || reading.lightLevel === AmbientLightReading.Sunny) { + avatar.source = "1.png" + bg.color = "yellow" + } else { + avatar.text = "Unknown light level" + } + } + } + + LightSensor { + active: true + onReadingChanged: { + illuminanceLevel.text = "Illuminance: " + reading.illuminance + } + } + } +} diff --git a/basicsuite/sensors/bluebubble.png b/basicsuite/sensors/bluebubble.png new file mode 100644 index 0000000..f96126e Binary files /dev/null and b/basicsuite/sensors/bluebubble.png differ diff --git a/basicsuite/sensors/description.txt b/basicsuite/sensors/description.txt new file mode 100644 index 0000000..f6048cc --- /dev/null +++ b/basicsuite/sensors/description.txt @@ -0,0 +1,4 @@ +This demo utilizes the accelerometer and light sensor readings in an application. + +For the accelometer, tilting the device moves the bubble around. For the light sensor, +exposing the device to different lighting conditions changes the display. diff --git a/basicsuite/sensors/main.qml b/basicsuite/sensors/main.qml new file mode 100644 index 0000000..359306c --- /dev/null +++ b/basicsuite/sensors/main.qml @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtSensors 5.0 +import QtSensors 5.0 as Sensors + +Item { + id: root + width: 800 + height: 1280 + + Component { + id: sensorExample + Rectangle { + id: main + width: root.height + height: root.width + rotation: 90 + border.width: 1 + Light { + id: lys + width: main.width + height: main.height / 2 + } + + Accelbubble { + width: main.width + height: main.height / 2 + anchors.top: lys.bottom + } + } + } + + Component { + id: message + Rectangle { + width: root.width + height: root.height + Text { + font.pixelSize: 22 + anchors.centerIn: parent + text: "It appears that this device doesn't provide the required sensors!" + } + } + } + + Loader { + id: pageLoader + anchors.centerIn: parent + } + + Component.onCompleted: { + var typesList = Sensors.QmlSensors.sensorTypes(); + var count = 0 + for (var i = 0; i < typesList.length; ++i) { + if (typesList[i] == "QAccelerometer") + count++ + if (typesList[i] == "QLightSensor") + count++ + } + + if (count > 1) + pageLoader.sourceComponent = sensorExample + else + pageLoader.sourceComponent = message + } +} diff --git a/basicsuite/sensors/preview_l.jpg b/basicsuite/sensors/preview_l.jpg new file mode 100644 index 0000000..7ce979d Binary files /dev/null and b/basicsuite/sensors/preview_l.jpg differ diff --git a/basicsuite/sensors/sensors.pro b/basicsuite/sensors/sensors.pro new file mode 100644 index 0000000..bb1373e --- /dev/null +++ b/basicsuite/sensors/sensors.pro @@ -0,0 +1,12 @@ +TARGET = sensors + +include(../shared/shared.pri) + +content.files = \ + *.qml \ + *.png +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/sensors/title.txt b/basicsuite/sensors/title.txt new file mode 100644 index 0000000..558b7c0 --- /dev/null +++ b/basicsuite/sensors/title.txt @@ -0,0 +1 @@ +Sensors Demo diff --git a/basicsuite/shared/engine.cpp b/basicsuite/shared/engine.cpp new file mode 100644 index 0000000..669bbf4 --- /dev/null +++ b/basicsuite/shared/engine.cpp @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ +#include "engine.h" +#include +#include + +DummyEngine::DummyEngine(QObject *parent) + : QObject(parent) +{ + QScreen *screen = QGuiApplication::primaryScreen(); + m_screenSize = screen->size(); + m_dpcm = screen->physicalDotsPerInchY() / 2.54f; + + // Make the buttons smaller for smaller screens to compensate for that + // one typically holds it nearer to the eyes. + float low = 5; + float high = 20; + float screenSizeCM = qMax(qMin(m_screenSize.width(), m_screenSize.height()) / m_dpcm, low); + m_dpcm *= (screenSizeCM - low) / (high - low) * 0.5 + 0.5; +} diff --git a/basicsuite/shared/engine.h b/basicsuite/shared/engine.h new file mode 100644 index 0000000..78479db --- /dev/null +++ b/basicsuite/shared/engine.h @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ +#ifndef ENGINE_H +#define ENGINE_H + +#include +#include + +class QQmlEngine; +class QQuickItem; +class FpsCounter; +class QQuickWindow; + +/*! + A simplified version of the one used by b2qt-launcher +*/ +class DummyEngine : public QObject +{ + Q_OBJECT + +public: + explicit DummyEngine(QObject *parent = 0); + + Q_INVOKABLE int smallFontSize() const { return qMax(m_dpcm * 0.4, 10); } + Q_INVOKABLE int fontSize() const { return qMax(m_dpcm * 0.6, 14); } + Q_INVOKABLE int titleFontSize() const { return qMax(m_dpcm * 0.9, 20); } + Q_INVOKABLE int centimeter() const { return m_dpcm; } + +private: + QSize m_screenSize; + qreal m_dpcm; +}; + +#endif // ENGINE_H diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp new file mode 100644 index 0000000..748b22a --- /dev/null +++ b/basicsuite/shared/main.cpp @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "engine.h" + + +int main(int argc, char **argv) +{ + qputenv("QT_IM_MODULE", QByteArray("b2qtinputcontext")); + + QGuiApplication app(argc, argv); + QString path = app.applicationDirPath(); + + QPalette pal; + pal.setColor(QPalette::Text, Qt::black); + pal.setColor(QPalette::WindowText, Qt::black); + pal.setColor(QPalette::ButtonText, Qt::black); + pal.setColor(QPalette::Base, Qt::white); + QGuiApplication::setPalette(pal); + + QString target = qgetenv("B2QT_BASE") + "-" + qgetenv("B2QT_PLATFORM"); + QFile excludeFile(path + QStringLiteral("/exclude.txt")); + if (excludeFile.open(QFile::ReadOnly)) { + const QStringList excludeList = QString::fromUtf8(excludeFile.readAll()).split(":"); + if (excludeList.contains(target)) + qDebug("Warning: This example may not be fully functional on this platform"); + excludeFile.close(); + } + + QString fontName = QStringLiteral("/system/lib/fonts/OpenSans-Regular.ttf"); + if (QFile::exists(fontName)) { + QFontDatabase::addApplicationFont(fontName); + QFont font("Open Sans"); + font.setPixelSize(12); + QGuiApplication::setFont(font); + } else { + QFont font; + font.setStyleHint(QFont::SansSerif); + QGuiApplication::setFont(font); + } + + QQuickView view; + + DummyEngine engine; + view.rootContext()->setContextProperty("engine", &engine); + view.setColor(Qt::black); + view.setResizeMode(QQuickView::SizeRootObjectToView); + view.setSource(QUrl::fromLocalFile(path + QStringLiteral("/main.qml"))); + view.show(); + + app.exec(); +} diff --git a/basicsuite/shared/shared.pri b/basicsuite/shared/shared.pri new file mode 100644 index 0000000..2ae3d3d --- /dev/null +++ b/basicsuite/shared/shared.pri @@ -0,0 +1,13 @@ +QT += quick + +DESTPATH = /data/user/$$TARGET +target.path = $$DESTPATH + +excludeFile.files = exclude.txt +excludeFile.path = $$DESTPATH +INSTALLS += excludeFile + +SOURCES += $$PWD/main.cpp \ + $$PWD/engine.cpp + +HEADERS += $$PWD/engine.h diff --git a/basicsuite/textinput/ScrollBar.qml b/basicsuite/textinput/ScrollBar.qml new file mode 100644 index 0000000..e6a8143 --- /dev/null +++ b/basicsuite/textinput/ScrollBar.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + property var scrollArea: parent + + width: 6 + opacity: scrollArea && scrollArea.movingVertically ? 1.0 : 0.0 + visible: scrollArea && scrollArea.contentHeight >= scrollArea.height + anchors { right: parent.right; top: parent.top; bottom: parent.bottom; margins: 2 } + + Behavior on opacity { NumberAnimation { properties: "opacity"; duration: 600 } } + + function size() { + var nh = scrollArea.visibleArea.heightRatio * height + var ny = scrollArea.visibleArea.yPosition * height + return ny > 3 ? Math.min(nh, Math.ceil(height - 3 - ny)) : nh + ny + } + Rectangle { + x: 1 + y: scrollArea ? Math.max(2, scrollArea.visibleArea.yPosition * parent.height) : 0 + height: scrollArea ? size() : 0 + width: parent.width - 2 + color: Qt.rgba(1.0, 1.0, 1.0, 0.5) + radius: 1 + } +} diff --git a/basicsuite/textinput/TextArea.qml b/basicsuite/textinput/TextArea.qml new file mode 100644 index 0000000..cf337f6 --- /dev/null +++ b/basicsuite/textinput/TextArea.qml @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TextBase { + id: textArea + + property alias color: textEdit.color + property alias text: textEdit.text + property alias textWidth: textEdit.width + property alias readOnly: textEdit.readOnly + property alias inputMethodHints: textEdit.inputMethodHints + + editor: textEdit + + Repeater { + model: Math.floor((parent.height - 30) / editor.cursorRectangle.height) + Rectangle { + x: 8 + y: (index+1)*editor.cursorRectangle.height+6 + height: 1; width: textArea.width-24 + color: Qt.rgba(1.0, 1.0, 1.0, 0.5) + } + } + TextEdit { + id: textEdit + + property alias enterKeyText: textArea.enterKeyText + property alias enterKeyEnabled: textArea.enterKeyEnabled + + y: 6 + focus: true + color: "#EEEEEE" + wrapMode: TextEdit.Wrap + cursorVisible: activeFocus + height: Math.max(implicitHeight, 60) + font.pixelSize: textArea.fontPixelSize + selectionColor: Qt.rgba(1.0, 1.0, 1.0, 0.5) + selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8) + anchors { left: parent.left; right: parent.right; margins: 12 } + cursorDelegate: Rectangle { + width: 2 + opacity: 0.7 + color: "#EEEEEE" + visible: textEdit.activeFocus + } + + onActiveFocusChanged: if (!activeFocus) deselect() + } +} diff --git a/basicsuite/textinput/TextBase.qml b/basicsuite/textinput/TextBase.qml new file mode 100644 index 0000000..a26c6c6 --- /dev/null +++ b/basicsuite/textinput/TextBase.qml @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +FocusScope { + id: textBase + + property var editor + property bool previewTextActive: !editor.activeFocus && text.length === 0 + property int fontPixelSize: 32 + property string previewText + property string enterKeyText + property bool enterKeyEnabled: true + property alias mouseParent: mouseArea.parent + + implicitHeight: editor.height + 12 + + signal enterKeyClicked + + Keys.onReleased: { + if (event.key === Qt.Key_Return) + enterKeyClicked() + } + + Rectangle { + // background + radius: 5.0 + anchors.fill: parent + color: Qt.rgba(1.0, 1.0, 1.0, 0.2) + border { width: editor.activeFocus ? 2 : 0; color: "#CCCCCC" } + } + Text { + id: previewText + + y: 8 + color: "#CCCCCC" + visible: previewTextActive + text: textBase.previewText + font.pixelSize: 28 + anchors { left: parent.left; right: parent.right; margins: 12 } + + } + MouseArea { + id: mouseArea + + z: 1 + parent: textBase + anchors.fill: parent + onClicked: { + var positionInEditor = mapToItem(editor, mouseX, mouseY) + var cursorPosition = editor.positionAt(positionInEditor.x, positionInEditor.y) + editor.cursorPosition = cursorPosition + editor.forceActiveFocus() + Qt.inputMethod.show() + } + } +} diff --git a/basicsuite/textinput/TextField.qml b/basicsuite/textinput/TextField.qml new file mode 100644 index 0000000..aa6768e --- /dev/null +++ b/basicsuite/textinput/TextField.qml @@ -0,0 +1,93 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +TextBase { + id: textField + + property alias color: textInput.color + property alias text: textInput.text + property alias textWidth: textInput.width + property alias readOnly: textInput.readOnly + property alias inputMethodHints: textInput.inputMethodHints + property alias validator: textInput.validator + property alias echoMode: textInput.echoMode + + editor: textInput + mouseParent: flickable + + Flickable { + id: flickable + + x: 12 + clip: true + width: parent.width-24 + height: parent.height + flickableDirection: Flickable.HorizontalFlick + interactive: contentWidth - 4 > width + + contentWidth: textInput.width+2 + contentHeight: textInput.height + TextInput { + id: textInput + + property alias enterKeyText: textField.enterKeyText + property alias enterKeyEnabled: textField.enterKeyEnabled + + y: 6 + focus: true + color: "#EEEEEE" + cursorVisible: activeFocus + passwordCharacter: "\u2022" + font.pixelSize: textField.fontPixelSize + selectionColor: Qt.rgba(1.0, 1.0, 1.0, 0.5) + selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8) + width: Math.max(flickable.width, implicitWidth)-2 + cursorDelegate: Rectangle { + width: 2 + opacity: 0.7 + color: "#EEEEEE" + visible: textInput.activeFocus + } + onActiveFocusChanged: if (!activeFocus) deselect() + } + } +} diff --git a/basicsuite/textinput/description.txt b/basicsuite/textinput/description.txt new file mode 100644 index 0000000..c60d036 --- /dev/null +++ b/basicsuite/textinput/description.txt @@ -0,0 +1,6 @@ +This examples illustrates how Qt can handle input on touch devices. + +The launcher loads a custom platform input context plugin and contains a virtual keyboard. When a text control in Qt Quick gets focus, the input context will trigger the virtual keyboard to show on screen and clicks in the virtual keyboard are delegated to the text control. + +Our demo virtual keyboard has support for english, finnish and arabic. The input context API is plugin based and users can replace existing plugins with whatever they desire. Qt has a ready made plugin for Maliit, an open-source, cross-platform input method framework for mobile and embedded. + diff --git a/basicsuite/textinput/main.qml b/basicsuite/textinput/main.qml new file mode 100644 index 0000000..b67d960 --- /dev/null +++ b/basicsuite/textinput/main.qml @@ -0,0 +1,113 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Flickable { + id: flickable + + property real scrollMarginVertical: 20 + + anchors.fill: parent + contentWidth: content.width + contentHeight: content.height + interactive: contentHeight > height + flickableDirection: Flickable.VerticalFlick + children: ScrollBar {} + + MouseArea { + id: content + + width: flickable.width + height: textEditors.height + 24 + + onClicked: focus = true + + Column { + id: textEditors + spacing: 15 + x: 12; y: 12 + width: parent.width - 26 + + Text { + color: "#EEEEEE" + text: "Tap fields to enter text" + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 22 + } + TextField { + width: parent.width + previewText: "One line field" + enterKeyText: "Next" + enterKeyEnabled: text.length > 0 + onEnterKeyClicked: passwordField.focus = true + } + TextField { + id: passwordField + + width: parent.width + echoMode: TextInput.PasswordEchoOnEdit + previewText: "Password field" + inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText + enterKeyText: "Next" + enterKeyEnabled: text.length > 0 + onEnterKeyClicked: numberField.focus = true + } + TextField { + id: numberField + + validator: RegExpValidator { regExp: /^[0-9\+\-\#\*\ ]{6,}$/ } + width: parent.width + previewText: "Phone number field" + inputMethodHints: Qt.ImhDialableCharactersOnly + enterKeyText: "Next" + enterKeyEnabled: text.length > 0 + onEnterKeyClicked: textArea.focus = true + } + TextArea { + id: textArea + + width: parent.width + previewText: "Multiple lines field" + height: Math.max(206, implicitHeight) + } + } + } +} diff --git a/basicsuite/textinput/preview_l.jpg b/basicsuite/textinput/preview_l.jpg new file mode 100644 index 0000000..f415a86 Binary files /dev/null and b/basicsuite/textinput/preview_l.jpg differ diff --git a/basicsuite/textinput/textinput.pro b/basicsuite/textinput/textinput.pro new file mode 100644 index 0000000..a0f18c0 --- /dev/null +++ b/basicsuite/textinput/textinput.pro @@ -0,0 +1,12 @@ +TARGET = textinput + +include(../shared/shared.pri) + +content.files = \ + *.qml + *.png +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content diff --git a/basicsuite/textinput/title.txt b/basicsuite/textinput/title.txt new file mode 100644 index 0000000..607f060 --- /dev/null +++ b/basicsuite/textinput/title.txt @@ -0,0 +1 @@ +Text Input diff --git a/doc/b2qt-demos.qdoc b/doc/b2qt-demos.qdoc index 67fe0fa..771b4c3 100644 --- a/doc/b2qt-demos.qdoc +++ b/doc/b2qt-demos.qdoc @@ -31,63 +31,63 @@ */ /*! - \example About Boot to Qt + \example about-b2qt \title About Boot to Qt \ingroup b2qt-demos \brief Displays information about the Boot to Qt software stack. */ /*! - \example Camera + \example camera \title Camera \ingroup b2qt-demos \brief Demonstrates using camera in a QML application. */ /*! - \example Controls Layouts + \example controls-layouts \title Controls Layouts \ingroup b2qt-demos \brief Demonstrates using Qt Quick Controls Layouts. */ /*! - \example Controls Touch + \example controls-touch \title Controls Touch \ingroup b2qt-demos \brief Demonstrates a touch UI implemented with Qt Quick Controls. */ /*! - \example Graphical Effects + \example graphicaleffects \title Graphical Effects \ingroup b2qt-demos \brief Demonstrates the different graphical effects that can be used in a QML application. */ /*! - \example Media Player + \example mediaplayer \title Media Player \ingroup b2qt-demos \brief A media player implemented in QML. */ /*! - \example Photo Gallery + \example photogallery \title Photo Gallery \ingroup b2qt-demos \brief A photo gallery implemented in QML. */ /*! - \example Qt5 Cinematic Demo + \example qt5-cinematicdemo \title Qt5 Cinematic Demo \ingroup b2qt-demos \brief A cool demonstration of the graphical prowess of Qt 5 and Qt Quick 2. */ /*! - \example Qt5Everywhere + \example qt5-everywhere \title Qt 5 Everywhere \ingroup b2qt-demos \brief Highlights the versatility and cross-platform capability of Qt @@ -96,16 +96,22 @@ */ /*! - \example Sensors + \example sensors \title Sensors \ingroup b2qt-demos \brief Demostrates using the accelerometer and light sensors in a QML application. */ /*! - \example Text Input + \example textinput \title Text Input \ingroup b2qt-demos \brief Demostrates text input capabilities and the virtual keyboard in a QML application. */ +/*! + \example launchersettings + \title Launcher Settings + \ingroup b2qt-demos + \brief Displays information and settings available for the Boot to Qt launcher. +*/ diff --git a/doc/b2qt-demos.qdocconf b/doc/b2qt-demos.qdocconf index 068ed36..ae55795 100644 --- a/doc/b2qt-demos.qdocconf +++ b/doc/b2qt-demos.qdocconf @@ -17,7 +17,7 @@ examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhc examples.imageextensions = "*.png *.jpg *.gif" exampledirs = ../basicsuite -examplesinstallpath = ../../../../sources/b2qt-demos/basicsuite +examplesinstallpath = ../../../Boot2Qt-2.x/sources/b2qt-demos/basicsuite qhp.projects = QtEnterpriseEmbeddedDemos -- cgit v1.2.3 From 2d218473e845e2b382baf6543fb89256992769ac Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 27 Jan 2014 10:45:38 +0100 Subject: Remove Controls Layouts demo and docs for Launcher Settings Remove Controls Layouts demo which is not very useful in a touch environment. Layouts themselves are covered by Qt examples and documentation. Also, stop showing Launcher Settings as an stand-alone example in Qt Creator. It's not functional as a stand-alone app (controls do nothing). Change-Id: I1c869b546b92ca911ee2ac268ee21fd3f078b709 Reviewed-by: Eirik Aavitsland --- basicsuite/controls-layouts/controls-layouts.pro | 10 -- basicsuite/controls-layouts/description.txt | 3 - basicsuite/controls-layouts/main.qml | 118 ----------------------- basicsuite/controls-layouts/preview_l.jpg | Bin 11273 -> 0 bytes basicsuite/controls-layouts/title.txt | 1 - doc/b2qt-demos.qdoc | 9 +- 6 files changed, 2 insertions(+), 139 deletions(-) delete mode 100644 basicsuite/controls-layouts/controls-layouts.pro delete mode 100644 basicsuite/controls-layouts/description.txt delete mode 100644 basicsuite/controls-layouts/main.qml delete mode 100644 basicsuite/controls-layouts/preview_l.jpg delete mode 100644 basicsuite/controls-layouts/title.txt diff --git a/basicsuite/controls-layouts/controls-layouts.pro b/basicsuite/controls-layouts/controls-layouts.pro deleted file mode 100644 index bbf91d5..0000000 --- a/basicsuite/controls-layouts/controls-layouts.pro +++ /dev/null @@ -1,10 +0,0 @@ -TARGET = controls-layouts - -include(../shared/shared.pri) - -content.files = *.qml -content.path = $$DESTPATH - -OTHER_FILES += $${content.files} - -INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/controls-layouts/description.txt b/basicsuite/controls-layouts/description.txt deleted file mode 100644 index 393f0dd..0000000 --- a/basicsuite/controls-layouts/description.txt +++ /dev/null @@ -1,3 +0,0 @@ -The "Controls Layout" demonstration aims to show some of the features available in the layout system of the Qt Quick Controls. The layout system in Qt Quick Controls adds GridLayout, RowLayout and ColumnLayout which interact with size-hints from individual controls, making it possible to create interfaces that adapt to various dimensions and still look good. - -The example has been adapted slightly to run inside this launcher, the original is available in the Qt Quick Controls repository. diff --git a/basicsuite/controls-layouts/main.qml b/basicsuite/controls-layouts/main.qml deleted file mode 100644 index b12b6c8..0000000 --- a/basicsuite/controls-layouts/main.qml +++ /dev/null @@ -1,118 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - - - - -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Layouts 1.0 - -Rectangle { - - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 1; color: "lightgray" } - } - - property int margin: 11 - width: 1280 - height: 720 - - ColumnLayout { - id: mainLayout - anchors.fill: parent - anchors.margins: margin - GroupBox { - id: rowBox - title: "Row layout" - Layout.fillWidth: true - - RowLayout { - id: rowLayout - anchors.fill: parent - TextField { - placeholderText: "This wants to grow horizontally" - Layout.fillWidth: true - } - Button { - text: "Button" - } - } - } - - GroupBox { - id: gridBox - title: "Grid layout" - Layout.fillWidth: true - - GridLayout { - id: gridLayout - rows: 3 - flow: GridLayout.TopToBottom - anchors.fill: parent - - Label { text: "Line 1" } - Label { text: "Line 2" } - Label { text: "Line 3" } - - TextField { } - TextField { } - TextField { } - - TextArea { - text: "This widget spans over three rows in the GridLayout.\n" - + "All items in the GridLayout are implicitly positioned from top to bottom." - Layout.rowSpan: 3 - Layout.fillHeight: true - Layout.fillWidth: true - } - } - } - TextArea { - id: t3 - text: "This fills the whole cell" - Layout.minimumHeight: 30 - Layout.fillHeight: true - Layout.fillWidth: true - } - } -} diff --git a/basicsuite/controls-layouts/preview_l.jpg b/basicsuite/controls-layouts/preview_l.jpg deleted file mode 100644 index 03df43a..0000000 Binary files a/basicsuite/controls-layouts/preview_l.jpg and /dev/null differ diff --git a/basicsuite/controls-layouts/title.txt b/basicsuite/controls-layouts/title.txt deleted file mode 100644 index 914d6c2..0000000 --- a/basicsuite/controls-layouts/title.txt +++ /dev/null @@ -1 +0,0 @@ -Controls: Layouts diff --git a/doc/b2qt-demos.qdoc b/doc/b2qt-demos.qdoc index 771b4c3..7e9e640 100644 --- a/doc/b2qt-demos.qdoc +++ b/doc/b2qt-demos.qdoc @@ -44,13 +44,6 @@ \brief Demonstrates using camera in a QML application. */ -/*! - \example controls-layouts - \title Controls Layouts - \ingroup b2qt-demos - \brief Demonstrates using Qt Quick Controls Layouts. -*/ - /*! \example controls-touch \title Controls Touch @@ -110,8 +103,10 @@ */ /*! + \omit \example launchersettings \title Launcher Settings \ingroup b2qt-demos \brief Displays information and settings available for the Boot to Qt launcher. + \endomit */ -- cgit v1.2.3 From 274baa15819458003555749d4e0509ac665f8526 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 21 Jan 2014 14:26:36 +0100 Subject: [Launcher Settings] Add Wifi GroupBox Change-Id: I3d9850335c79640d29bb335c24acbfbb79375a1c Reviewed-by: Gatis Paeglis --- .../launchersettings/BrightnessController.qml | 2 +- basicsuite/launchersettings/NetworkController.qml | 2 +- basicsuite/launchersettings/NetworkList.qml | 199 +++++++++++++++++++++ basicsuite/launchersettings/PoweroffAction.qml | 2 +- basicsuite/launchersettings/RebootAction.qml | 2 +- basicsuite/launchersettings/WifiController.qml | 58 ++++++ basicsuite/launchersettings/WifiGroupBox.qml | 92 ++++++++++ basicsuite/launchersettings/main.qml | 38 ++-- experimental/Wifi/main.qml | 199 --------------------- 9 files changed, 380 insertions(+), 214 deletions(-) create mode 100644 basicsuite/launchersettings/NetworkList.qml create mode 100644 basicsuite/launchersettings/WifiController.qml create mode 100644 basicsuite/launchersettings/WifiGroupBox.qml delete mode 100644 experimental/Wifi/main.qml diff --git a/basicsuite/launchersettings/BrightnessController.qml b/basicsuite/launchersettings/BrightnessController.qml index 8ac6118..777fa30 100644 --- a/basicsuite/launchersettings/BrightnessController.qml +++ b/basicsuite/launchersettings/BrightnessController.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/launchersettings/NetworkController.qml b/basicsuite/launchersettings/NetworkController.qml index 1962843..85a8de6 100644 --- a/basicsuite/launchersettings/NetworkController.qml +++ b/basicsuite/launchersettings/NetworkController.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/launchersettings/NetworkList.qml b/basicsuite/launchersettings/NetworkList.qml new file mode 100644 index 0000000..1f26537 --- /dev/null +++ b/basicsuite/launchersettings/NetworkList.qml @@ -0,0 +1,199 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import Qt.labs.wifi 0.1 + +Item { + Component { + id: listDelegate + Rectangle { + id: delegateBackground + property bool expanded: false + property bool connected: wifiManager.connectedSSID == network.ssid + property variant networkModel: model + property alias ssidText: ssidLabel.text + height: expanded ? 300 : 70 + clip: true // ### fixme + + Behavior on height { NumberAnimation { duration: 500; easing.type: Easing.InOutCubic } } + + width: parent.width + + gradient: Gradient { + GradientStop { position: 0; color: "white" } + GradientStop { position: 1; color: "lightgray" } + } + + Text { + id: ssidLabel + anchors.top: parent.top + anchors.left: parent.left + anchors.margins: 10 + font.pixelSize: 20 + font.bold: true + text: network.ssid + (connected ? " (connected)" : ""); + } + + Text { + id: bssidLabel + anchors.top: ssidLabel.bottom + anchors.left: parent.left + anchors.margins: 5 + anchors.leftMargin: 40 + text: network.bssid + color: "gray" + font.pixelSize: ssidLabel.font.pixelSize * 0.5 + } + + Text { + id: flagsLabel + x: 200 + anchors.top: bssidLabel.top + text: (network.supportsWPA2 ? "WPA2 " : "") + + (network.supportsWPA ? "WPA " : "") + + (network.supportsWEP ? "WEP " : "") + + (network.supportsWPS ? "WPS " : ""); + color: "gray" + font.pixelSize: ssidLabel.font.pixelSize * 0.5 + font.italic: true + } + + Rectangle { + width: Math.max(100 + network.signalStrength, 0) / 100 * parent.width; + height: 20 + radius: 10 + antialiasing: true + anchors.margins: 20 + anchors.right: parent.right + anchors.top: parent.top + color: "lightblue" + border.color: "lightgray" + } + + MouseArea { + anchors.fill: parent + onClicked: { + parent.expanded = !expanded + } + } + + Rectangle { + id: passwordInputBackground + anchors.fill: passwordInput + anchors.margins: -5 + color: "white" + radius: 5 + border.color: "gray" + } + + TextInput { + id: passwordInput + y: 100 + width: 300 + height: 50 + text: "" + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 18 + } + + Rectangle { + id: connectButton + anchors.top: passwordInput.bottom + anchors.margins: 20 + anchors.horizontalCenter: parent.horizontalCenter + width: passwordInput.width + height: passwordInputBackground.height + enabled: wifiManager.networkState != WifiManager.ObtainingIPAddress + + gradient: Gradient { + GradientStop { position: 0; color: "white" } + GradientStop { position: 1; color: buttonMouse.pressed ? "steelblue" : "lightsteelblue" } + } + + border.color: "gray" + + Text { + anchors.centerIn: parent + font.pixelSize: 24 + text: connected ? "Disconnect" : "Connect" + } + MouseArea { + id: buttonMouse + anchors.fill: parent + onClicked: { + networkView.currentIndex = index + if (connected) { + wifiManager.disconnect() + } else { + networkView.activeNetwork = networkView.currentItem + wifiManager.connect(network, passwordInput.text); + } + } + } + } + + } + } + + ListView { + id: networkView + anchors.fill: parent + model: wifiManager.networks + delegate: listDelegate + + property variant activeNetwork: "" + property variant networkState: wifiManager.networkState + + onNetworkStateChanged: { + if (activeNetwork) { + var ssid = activeNetwork.networkModel.ssid + var state = "" + if (networkState == WifiManager.ObtainingIPAddress) + state = " (obtaining ip..)" + else if (networkState == WifiManager.DhcpRequestFailed) + state = " (dhcp request failed)" + else if (networkState == WifiManager.Connected) + state = " (connected)" + activeNetwork.ssidText = ssid + state + } + } + } +} diff --git a/basicsuite/launchersettings/PoweroffAction.qml b/basicsuite/launchersettings/PoweroffAction.qml index 14c100d..8c14b79 100644 --- a/basicsuite/launchersettings/PoweroffAction.qml +++ b/basicsuite/launchersettings/PoweroffAction.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/launchersettings/RebootAction.qml b/basicsuite/launchersettings/RebootAction.qml index 476bdaf..e6f57ca 100644 --- a/basicsuite/launchersettings/RebootAction.qml +++ b/basicsuite/launchersettings/RebootAction.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/launchersettings/WifiController.qml b/basicsuite/launchersettings/WifiController.qml new file mode 100644 index 0000000..3725478 --- /dev/null +++ b/basicsuite/launchersettings/WifiController.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import Qt.labs.wifi 0.1 as Wifi + +QtObject { + function createWifiGroupBox() + { + if (Wifi.Interface.wifiSupported()) { + var component = Qt.createComponent("WifiGroupBox.qml"); + var wifi = component.createObject(wifiOptions.contentItem); + if (wifi == null) { + wifiOptions.visible = false + print("Error creating WifiGroupBox"); + } + } else { + wifiOptions.visible = false + } + } +} diff --git a/basicsuite/launchersettings/WifiGroupBox.qml b/basicsuite/launchersettings/WifiGroupBox.qml new file mode 100644 index 0000000..f58c129 --- /dev/null +++ b/basicsuite/launchersettings/WifiGroupBox.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of the examples of the Qt Enterprise Embedded. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 2.0 +import QtQuick.Controls 1.0 +import QtQuick.Layouts 1.0 + +import Qt.labs.wifi 0.1 + +ColumnLayout { + + anchors.fill:parent + + WifiManager { + id: wifiManager + scanning: backendReady + } + + ColumnLayout { + anchors.fill: parent + + RowLayout { + + Button { + id: wifiOnOffButton + text: (wifiManager.backendReady) ? "Switch Off" : "Switch On" + onClicked: { + if (wifiManager.backendReady) { + if (networkList.visible) + networkList.visible = false + wifiManager.stop() + } else { + wifiManager.start() + } + } + } + + Button { + id: listNetworksButton + visible: wifiManager.backendReady + text: (networkList.visible) ? "Hide wifi networks" + : "List available wifi networks" + onClicked: networkList.visible = !networkList.visible + } + } + + NetworkList { + id: networkList + implicitHeight: 400 + Layout.fillWidth: true + visible: false + clip: true + } + } +} diff --git a/basicsuite/launchersettings/main.qml b/basicsuite/launchersettings/main.qml index 7cd510c..41054fd 100644 --- a/basicsuite/launchersettings/main.qml +++ b/basicsuite/launchersettings/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** @@ -44,7 +44,7 @@ import QtQuick.Controls 1.0 import QtQuick.Layouts 1.0 Rectangle { - id: root; + id: root gradient: Gradient { GradientStop { position: 0; color: "white" } @@ -76,16 +76,19 @@ Rectangle { source: "NetworkController.qml" } - Flickable { + Loader { + id: wifiControllerLoader + source: "WifiController.qml" + } + + ScrollView { + anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter anchors.margins: margin anchors.topMargin: 50 height: parent.height - width: mainLayout.width - - contentHeight: mainLayout.height - contentWidth: mainLayout.width + width: mainLayout.width + 40 ColumnLayout { id: mainLayout @@ -95,12 +98,12 @@ Rectangle { GroupBox { id: powerOptions - title: "Power Options" + title: "Power" Layout.fillWidth: true RowLayout { - id: powerButtonColumn + id: powerButtonRow anchors.fill: parent @@ -123,7 +126,7 @@ Rectangle { GroupBox { id: displayOptions - title: "Display Options" + title: "Display" Layout.fillWidth: true @@ -156,7 +159,7 @@ Rectangle { GroupBox { id: networkOptions - title: "Network Options" + title: "Network" Layout.fillWidth: true @@ -187,6 +190,19 @@ Rectangle { } } + + GroupBox { + id: wifiOptions + title: "Wifi" + Layout.fillWidth: true + } + + Component.onCompleted: { + if (wifiControllerLoader.item != undefined) + wifiControllerLoader.item.createWifiGroupBox() + else + wifiOptions.visible = false + } } } } diff --git a/experimental/Wifi/main.qml b/experimental/Wifi/main.qml deleted file mode 100644 index 0f4862c..0000000 --- a/experimental/Wifi/main.qml +++ /dev/null @@ -1,199 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: For any questions to Digia, please use the contact form at -** http://qt.digia.com/ -** -** This file is part of the examples of the Qt Enterprise Embedded. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 -import Qt.labs.wifi 0.1 - -Rectangle -{ - id: root - - color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1); - - QWifiManager { - id: wifiManager; - - Component.onCompleted: start(); - - onReadyChanged: { - print("QML: QWifiManager is now connected..."); - } - - onOnlineChanged: print(online ? "QML: WifiManager is online" : "QML: WifiManager is not online..."); - - //scanning: ready && connectedSSID == ""; - scanning: ready - } - - Component { - id: listDelegate - - Rectangle { - id: delegateBackground - property bool expanded: false - height: expanded ? 300 : 70 - clip: true // ### fixme - - Behavior on height { NumberAnimation { duration: 500; easing.type: Easing.InOutCubic } } - - width: parent.width - - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 67 / delegateBackground.height; color: "lightgray" } - GradientStop { position: 1; color: "gray" } - } - - Text { - id: ssidLabel - anchors.top: parent.top - anchors.left: parent.left - anchors.margins: 10 - font.pixelSize: 24 - font.bold: true - text: network.ssid + (wifiManager.connectedSSID == network.ssid ? " (connected)" : ""); - } - - Text { - id: bssidLabel - anchors.top: ssidLabel.bottom - anchors.left: parent.left - anchors.margins: 5 - anchors.leftMargin: 40 - text: network.bssid - color: "gray" - font.pixelSize: ssidLabel.font.pixelSize * 0.5 - } - - Text { - id: flagsLabel - x: 200 - anchors.top: bssidLabel.top - text: (network.supportsWPA2 ? "WPA2 " : "") - + (network.supportsWPA ? "WPA " : "") - + (network.supportsWEP ? "WEP " : "") - + (network.supportsWPS ? "WPS " : ""); - color: "gray" - font.pixelSize: ssidLabel.font.pixelSize * 0.5 - font.italic: true - } - - Rectangle { - width: Math.max(100 + network.signalStrength, 0) / 100 * parent.width; - height: 20 - radius: 10 - antialiasing: true - anchors.margins: 20 - anchors.right: parent.right - anchors.top: parent.top - color: "lightblue" - border.color: "lightgray" - } - - MouseArea { - anchors.fill: parent - onClicked: { - parent.expanded = !expanded - } - } - - Rectangle { - id: passwordInputBackground - anchors.fill: passwordInput - anchors.margins: -5 - color: "white" - radius: 5 - border.color: "gray" - } - - TextInput { - id: passwordInput - //echoMode: TextInput.PasswordEchoOnEdit - y: 100 - width: 300 - height: 50 - anchors.horizontalCenter: parent.horizontalCenter - font.pixelSize: 18 - } - - Rectangle { - id: connectButton - anchors.top: passwordInput.bottom - anchors.margins: 20 - anchors.horizontalCenter: parent.horizontalCenter - width: passwordInput.width - height: passwordInputBackground.height - - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 1; color: buttonMouse.pressed ? "steelblue" : "lightsteelblue" } - } - - border.color: "gray" - - Text { - anchors.centerIn: parent - font.pixelSize: 24 - text: "Connect" - } - MouseArea { - id: buttonMouse - anchors.fill: parent - onClicked: wifiManager.connect(network, passwordInput.text); - } - } - - } - } - - ListView { - anchors.fill: root - model: wifiManager.networks - delegate: listDelegate; - } - - Image { - source: wifiManager.online ? "http://img3.imageshack.us/img3/9870/magepicture.jpg" : "" - anchors.bottom: parent.bottom - - width: parent.width - height: sourceSize.height * (width / sourceSize.width); - } -} -- cgit v1.2.3 From b2957ef0efbf55872d36762705b62822cc828cf3 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 29 Jan 2014 11:20:03 +0100 Subject: Enable virtual keyboard when building demos stand-alone Add a shared QML file that defines an InputPanel and loads the main QML for each demo. Also, - Do not define QT_IM_MODULE (set already in the system) - Improved exclude file parsing to match b2qt-launcher Change-Id: Ibdd0371a57878ef7bc585aa67fcd148377f54bc6 Reviewed-by: Eirik Aavitsland --- basicsuite/about-b2qt/about-b2qt.pro | 1 + basicsuite/camera/app.pro | 1 + basicsuite/controls-touch/controls-touch.pro | 1 + basicsuite/graphicaleffects/graphicaleffects.pro | 1 + basicsuite/launchersettings/launchersettings.pro | 1 + basicsuite/mediaplayer/mediaplayer.pro | 1 + basicsuite/photogallery/photogallery.pro | 1 + basicsuite/qt5-cinematicdemo/qt5-cinematicdemo.pro | 1 + basicsuite/qt5-everywhere/app.pro | 1 + .../qt5-lauchpresentation.pro | 1 + basicsuite/qt5-particlesdemo/qt5-particlesdemo.pro | 1 + basicsuite/sensorexplorer/app.pro | 1 + basicsuite/sensors/sensors.pro | 1 + basicsuite/shared/loader.qml | 62 ++++++++++++++++++++++ basicsuite/shared/main.cpp | 7 +-- basicsuite/shared/shared.pri | 15 ++++-- basicsuite/textinput/textinput.pro | 3 +- 17 files changed, 92 insertions(+), 8 deletions(-) create mode 100644 basicsuite/shared/loader.qml diff --git a/basicsuite/about-b2qt/about-b2qt.pro b/basicsuite/about-b2qt/about-b2qt.pro index 175be57..a99c8e6 100644 --- a/basicsuite/about-b2qt/about-b2qt.pro +++ b/basicsuite/about-b2qt/about-b2qt.pro @@ -1,6 +1,7 @@ TARGET = about-b2qt include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/camera/app.pro b/basicsuite/camera/app.pro index 70633a5..b588a0d 100644 --- a/basicsuite/camera/app.pro +++ b/basicsuite/camera/app.pro @@ -1,6 +1,7 @@ TARGET = camera include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/controls-touch/controls-touch.pro b/basicsuite/controls-touch/controls-touch.pro index cf4b6fa..0a4ad03 100644 --- a/basicsuite/controls-touch/controls-touch.pro +++ b/basicsuite/controls-touch/controls-touch.pro @@ -1,6 +1,7 @@ TARGET = controls-touch include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/graphicaleffects/graphicaleffects.pro b/basicsuite/graphicaleffects/graphicaleffects.pro index 8f9c8cf..42e14ec 100644 --- a/basicsuite/graphicaleffects/graphicaleffects.pro +++ b/basicsuite/graphicaleffects/graphicaleffects.pro @@ -1,6 +1,7 @@ TARGET = graphicaleffects include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/launchersettings/launchersettings.pro b/basicsuite/launchersettings/launchersettings.pro index 1f9323e..bb0f2de 100644 --- a/basicsuite/launchersettings/launchersettings.pro +++ b/basicsuite/launchersettings/launchersettings.pro @@ -1,6 +1,7 @@ TARGET = launchersettings include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = *.qml content.path = $$DESTPATH diff --git a/basicsuite/mediaplayer/mediaplayer.pro b/basicsuite/mediaplayer/mediaplayer.pro index d0ce9e3..893539f 100644 --- a/basicsuite/mediaplayer/mediaplayer.pro +++ b/basicsuite/mediaplayer/mediaplayer.pro @@ -1,6 +1,7 @@ TARGET = mediaplayer include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/photogallery/photogallery.pro b/basicsuite/photogallery/photogallery.pro index 04c33f3..3b1476a 100644 --- a/basicsuite/photogallery/photogallery.pro +++ b/basicsuite/photogallery/photogallery.pro @@ -1,6 +1,7 @@ TARGET = photogallery include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/qt5-cinematicdemo/qt5-cinematicdemo.pro b/basicsuite/qt5-cinematicdemo/qt5-cinematicdemo.pro index eb67555..b4c5ae8 100644 --- a/basicsuite/qt5-cinematicdemo/qt5-cinematicdemo.pro +++ b/basicsuite/qt5-cinematicdemo/qt5-cinematicdemo.pro @@ -1,6 +1,7 @@ TARGET = qt5-cinematicdemo include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/qt5-everywhere/app.pro b/basicsuite/qt5-everywhere/app.pro index 6edb532..be46a9c 100644 --- a/basicsuite/qt5-everywhere/app.pro +++ b/basicsuite/qt5-everywhere/app.pro @@ -1,6 +1,7 @@ TARGET = qt5-everywhere include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro b/basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro index 0a1a2b2..c3aba46 100644 --- a/basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro +++ b/basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro @@ -1,6 +1,7 @@ TARGET = qt5-launchpresentation include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/qt5-particlesdemo/qt5-particlesdemo.pro b/basicsuite/qt5-particlesdemo/qt5-particlesdemo.pro index 88e2467..29afc4f 100644 --- a/basicsuite/qt5-particlesdemo/qt5-particlesdemo.pro +++ b/basicsuite/qt5-particlesdemo/qt5-particlesdemo.pro @@ -1,6 +1,7 @@ TARGET = qt5-particlesdemo include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/sensorexplorer/app.pro b/basicsuite/sensorexplorer/app.pro index 5bf498d..bc968c2 100644 --- a/basicsuite/sensorexplorer/app.pro +++ b/basicsuite/sensorexplorer/app.pro @@ -1,6 +1,7 @@ TARGET = sensorexplorer include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = *.qml content.path = $$DESTPATH diff --git a/basicsuite/sensors/sensors.pro b/basicsuite/sensors/sensors.pro index bb1373e..0b431b8 100644 --- a/basicsuite/sensors/sensors.pro +++ b/basicsuite/sensors/sensors.pro @@ -1,6 +1,7 @@ TARGET = sensors include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ *.qml \ diff --git a/basicsuite/shared/loader.qml b/basicsuite/shared/loader.qml new file mode 100644 index 0000000..42232d2 --- /dev/null +++ b/basicsuite/shared/loader.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ +import QtQuick 2.0 +import QtVkb 1.0 + +Item { + id: root + + Loader { + anchors.left: parent.left + anchors.top: parent.top + anchors.right: parent.right + anchors.bottom: inputPanel.top + + source: "main.qml" + } + + InputPanel { + id: inputPanel + z: 99 + y: root.height + anchors.left: root.left + anchors.right: root.right + + states: State { + name: "visible" + when: Qt.inputMethod.visible + PropertyChanges { + target: inputPanel + y: root.height - inputPanel.height + } + } + transitions: Transition { + from: "" + to: "visible" + reversible: true + ParallelAnimation { + NumberAnimation { + properties: "y" + duration: 250 + easing.type: Easing.InOutQuad + } + } + } + } +} + diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp index 748b22a..ac2fba4 100644 --- a/basicsuite/shared/main.cpp +++ b/basicsuite/shared/main.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -34,7 +35,7 @@ int main(int argc, char **argv) { - qputenv("QT_IM_MODULE", QByteArray("b2qtinputcontext")); + //qputenv("QT_IM_MODULE", QByteArray("qtvkb")); QGuiApplication app(argc, argv); QString path = app.applicationDirPath(); @@ -49,7 +50,7 @@ int main(int argc, char **argv) QString target = qgetenv("B2QT_BASE") + "-" + qgetenv("B2QT_PLATFORM"); QFile excludeFile(path + QStringLiteral("/exclude.txt")); if (excludeFile.open(QFile::ReadOnly)) { - const QStringList excludeList = QString::fromUtf8(excludeFile.readAll()).split(":"); + const QStringList excludeList = QString::fromUtf8(excludeFile.readAll()).split(QRegExp(":|\\s+")); if (excludeList.contains(target)) qDebug("Warning: This example may not be fully functional on this platform"); excludeFile.close(); @@ -73,7 +74,7 @@ int main(int argc, char **argv) view.rootContext()->setContextProperty("engine", &engine); view.setColor(Qt::black); view.setResizeMode(QQuickView::SizeRootObjectToView); - view.setSource(QUrl::fromLocalFile(path + QStringLiteral("/main.qml"))); + view.setSource(QUrl::fromLocalFile(path + QStringLiteral("/loader.qml"))); view.show(); app.exec(); diff --git a/basicsuite/shared/shared.pri b/basicsuite/shared/shared.pri index 2ae3d3d..b785913 100644 --- a/basicsuite/shared/shared.pri +++ b/basicsuite/shared/shared.pri @@ -3,11 +3,18 @@ QT += quick DESTPATH = /data/user/$$TARGET target.path = $$DESTPATH -excludeFile.files = exclude.txt -excludeFile.path = $$DESTPATH -INSTALLS += excludeFile - SOURCES += $$PWD/main.cpp \ $$PWD/engine.cpp HEADERS += $$PWD/engine.h + +defineTest(b2qtdemo_deploy_defaults) { + commonFiles.files = \ + exclude.txt \ + ../shared/loader.qml + commonFiles.path = $$DESTPATH + OTHER_FILES += $${commonFiles.files} + INSTALLS += commonFiles + export(OTHER_FILES) + export(INSTALLS) +} diff --git a/basicsuite/textinput/textinput.pro b/basicsuite/textinput/textinput.pro index a0f18c0..b5b97b2 100644 --- a/basicsuite/textinput/textinput.pro +++ b/basicsuite/textinput/textinput.pro @@ -1,9 +1,10 @@ TARGET = textinput include(../shared/shared.pri) +b2qtdemo_deploy_defaults() content.files = \ - *.qml + *.qml \ *.png content.path = $$DESTPATH -- cgit v1.2.3 From 25a4745f5e187ed9e11e9a3a76be6bc0d8bafa1e Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 28 Nov 2013 13:44:10 +0100 Subject: Add Enterprise Controls demos to the qtlauncher Change-Id: I4d8873343b47157e0d5733129c321b3b0f5e5d56 Reviewed-by: Eirik Aavitsland --- .../enterprise-dashboard/DashboardGaugeStyle.qml | 144 ++++++++++ basicsuite/enterprise-dashboard/IconGaugeStyle.qml | 103 +++++++ .../enterprise-dashboard/TachometerStyle.qml | 95 +++++++ basicsuite/enterprise-dashboard/TurnIndicator.qml | 88 ++++++ basicsuite/enterprise-dashboard/ValueSource.qml | 300 +++++++++++++++++++++ basicsuite/enterprise-dashboard/description.txt | 1 + .../enterprise-dashboard/images/fuel-icon.png | Bin 0 -> 666 bytes .../images/temperature-icon.png | Bin 0 -> 3302 bytes basicsuite/enterprise-dashboard/main.qml | 155 +++++++++++ basicsuite/enterprise-dashboard/preview_l.jpg | Bin 0 -> 11239 bytes basicsuite/enterprise-dashboard/title.txt | 1 + .../enterprise-gallery/BlackButtonBackground.qml | 51 ++++ basicsuite/enterprise-gallery/BlackButtonStyle.qml | 44 +++ .../enterprise-gallery/CircularGaugeDarkStyle.qml | 76 ++++++ .../CircularGaugeDefaultStyle.qml | 26 ++ .../enterprise-gallery/CircularGaugeLightStyle.qml | 77 ++++++ .../enterprise-gallery/CircularGaugeView.qml | 204 ++++++++++++++ basicsuite/enterprise-gallery/ControlView.qml | 168 ++++++++++++ .../enterprise-gallery/ControlViewToolbar.qml | 82 ++++++ .../enterprise-gallery/CustomizerCheckBox.qml | 45 ++++ basicsuite/enterprise-gallery/CustomizerLabel.qml | 28 ++ basicsuite/enterprise-gallery/CustomizerSlider.qml | 55 ++++ .../enterprise-gallery/FlickableMoreIndicator.qml | 56 ++++ .../enterprise-gallery/PieMenuControlView.qml | 195 ++++++++++++++ basicsuite/enterprise-gallery/PieMenuDarkStyle.qml | 26 ++ .../enterprise-gallery/PieMenuDefaultStyle.qml | 24 ++ basicsuite/enterprise-gallery/StylePicker.qml | 79 ++++++ basicsuite/enterprise-gallery/description.txt | 3 + basicsuite/enterprise-gallery/fonts/LICENSE.txt | 202 ++++++++++++++ .../enterprise-gallery/fonts/OpenSans-Regular.ttf | Bin 0 -> 217360 bytes .../enterprise-gallery/images/background-light.png | Bin 0 -> 46832 bytes .../enterprise-gallery/images/background.png | Bin 0 -> 45497 bytes .../enterprise-gallery/images/center-light.png | Bin 0 -> 2113 bytes basicsuite/enterprise-gallery/images/center.png | Bin 0 -> 2392 bytes basicsuite/enterprise-gallery/images/icon-go.png | Bin 0 -> 536 bytes .../enterprise-gallery/images/icon-settings.png | Bin 0 -> 576 bytes basicsuite/enterprise-gallery/images/info.png | Bin 0 -> 709 bytes .../enterprise-gallery/images/needle-light.png | Bin 0 -> 2105 bytes basicsuite/enterprise-gallery/images/needle.png | Bin 0 -> 4891 bytes basicsuite/enterprise-gallery/images/qt-logo.png | Bin 0 -> 5149 bytes basicsuite/enterprise-gallery/images/zoom_in.png | Bin 0 -> 829 bytes basicsuite/enterprise-gallery/images/zoom_out.png | Bin 0 -> 779 bytes basicsuite/enterprise-gallery/main.qml | 254 +++++++++++++++++ basicsuite/enterprise-gallery/preview_l.jpg | Bin 0 -> 9016 bytes basicsuite/enterprise-gallery/title.txt | 1 + 45 files changed, 2583 insertions(+) create mode 100644 basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml create mode 100644 basicsuite/enterprise-dashboard/IconGaugeStyle.qml create mode 100644 basicsuite/enterprise-dashboard/TachometerStyle.qml create mode 100644 basicsuite/enterprise-dashboard/TurnIndicator.qml create mode 100644 basicsuite/enterprise-dashboard/ValueSource.qml create mode 100644 basicsuite/enterprise-dashboard/description.txt create mode 100644 basicsuite/enterprise-dashboard/images/fuel-icon.png create mode 100644 basicsuite/enterprise-dashboard/images/temperature-icon.png create mode 100644 basicsuite/enterprise-dashboard/main.qml create mode 100644 basicsuite/enterprise-dashboard/preview_l.jpg create mode 100644 basicsuite/enterprise-dashboard/title.txt create mode 100644 basicsuite/enterprise-gallery/BlackButtonBackground.qml create mode 100644 basicsuite/enterprise-gallery/BlackButtonStyle.qml create mode 100644 basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml create mode 100644 basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml create mode 100644 basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml create mode 100644 basicsuite/enterprise-gallery/CircularGaugeView.qml create mode 100644 basicsuite/enterprise-gallery/ControlView.qml create mode 100644 basicsuite/enterprise-gallery/ControlViewToolbar.qml create mode 100644 basicsuite/enterprise-gallery/CustomizerCheckBox.qml create mode 100644 basicsuite/enterprise-gallery/CustomizerLabel.qml create mode 100644 basicsuite/enterprise-gallery/CustomizerSlider.qml create mode 100644 basicsuite/enterprise-gallery/FlickableMoreIndicator.qml create mode 100644 basicsuite/enterprise-gallery/PieMenuControlView.qml create mode 100644 basicsuite/enterprise-gallery/PieMenuDarkStyle.qml create mode 100644 basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml create mode 100644 basicsuite/enterprise-gallery/StylePicker.qml create mode 100644 basicsuite/enterprise-gallery/description.txt create mode 100644 basicsuite/enterprise-gallery/fonts/LICENSE.txt create mode 100644 basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttf create mode 100644 basicsuite/enterprise-gallery/images/background-light.png create mode 100644 basicsuite/enterprise-gallery/images/background.png create mode 100644 basicsuite/enterprise-gallery/images/center-light.png create mode 100644 basicsuite/enterprise-gallery/images/center.png create mode 100644 basicsuite/enterprise-gallery/images/icon-go.png create mode 100644 basicsuite/enterprise-gallery/images/icon-settings.png create mode 100644 basicsuite/enterprise-gallery/images/info.png create mode 100644 basicsuite/enterprise-gallery/images/needle-light.png create mode 100644 basicsuite/enterprise-gallery/images/needle.png create mode 100644 basicsuite/enterprise-gallery/images/qt-logo.png create mode 100644 basicsuite/enterprise-gallery/images/zoom_in.png create mode 100644 basicsuite/enterprise-gallery/images/zoom_out.png create mode 100644 basicsuite/enterprise-gallery/main.qml create mode 100644 basicsuite/enterprise-gallery/preview_l.jpg create mode 100644 basicsuite/enterprise-gallery/title.txt diff --git a/basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml b/basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml new file mode 100644 index 0000000..109351c --- /dev/null +++ b/basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml @@ -0,0 +1,144 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Enterprise.Controls.Styles 1.0 + +CircularGaugeStyle { + tickmarkInset: toPixels(0.04) + minorTickmarkInset: tickmarkInset + labelStepSize: 20 + labelInset: toPixels(0.23) + + property real xCenter: outerRadius + property real yCenter: outerRadius + property real needleLength: outerRadius - tickmarkInset * 1.25 + property real needleTipWidth: toPixels(0.02) + property real needleBaseWidth: toPixels(0.06) + property bool halfGauge: false + + function toPixels(percentage) { + return percentage * outerRadius; + } + + function degToRad(degrees) { + return degrees * (Math.PI / 180); + } + + function radToDeg(radians) { + return radians * (180 / Math.PI); + } + + function paintBackground(ctx) { + if (halfGauge) { + ctx.beginPath(); + ctx.rect(0, 0, ctx.canvas.width, ctx.canvas.height / 2); + ctx.clip(); + } + + ctx.beginPath(); + ctx.fillStyle = "black"; + ctx.ellipse(0, 0, ctx.canvas.width, ctx.canvas.height); + ctx.fill(); + + ctx.beginPath(); + ctx.lineWidth = tickmarkInset; + ctx.strokeStyle = "black"; + ctx.arc(xCenter, yCenter, outerRadius - ctx.lineWidth / 2, outerRadius - ctx.lineWidth / 2, 0, Math.PI * 2); + ctx.stroke(); + + ctx.beginPath(); + ctx.lineWidth = tickmarkInset / 2; + ctx.strokeStyle = "#222"; + ctx.arc(xCenter, yCenter, outerRadius - ctx.lineWidth / 2, outerRadius - ctx.lineWidth / 2, 0, Math.PI * 2); + ctx.stroke(); + + ctx.beginPath(); + var gradient = ctx.createRadialGradient(xCenter, yCenter, outerRadius * 0.8, xCenter, yCenter, outerRadius); + gradient.addColorStop(0, Qt.rgba(1, 1, 1, 0)); + gradient.addColorStop(0.7, Qt.rgba(1, 1, 1, 0.13)); + gradient.addColorStop(1, Qt.rgba(1, 1, 1, 1)); + ctx.fillStyle = gradient; + ctx.arc(xCenter, yCenter, outerRadius - tickmarkInset, outerRadius - tickmarkInset, 0, Math.PI * 2); + ctx.fill(); + } + + background: Canvas { + onPaint: { + var ctx = getContext("2d"); + ctx.reset(); + paintBackground(ctx); + } + + Text { + id: speedText + font.pixelSize: toPixels(0.3) + text: kphInt + color: "white" + horizontalAlignment: Text.AlignRight + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.verticalCenter + anchors.topMargin: toPixels(0.1) + + readonly property int kphInt: control.value + } + Text { + text: "km/h" + color: "white" + font.pixelSize: toPixels(0.09) + anchors.top: speedText.bottom + anchors.horizontalCenter: parent.horizontalCenter + } + } + + needle: Canvas { + width: needleBaseWidth + height: needleLength + + property real xCenter: width / 2 + property real yCenter: height / 2 + + onPaint: { + var ctx = getContext("2d"); + ctx.reset(); + + ctx.beginPath(); + ctx.moveTo(xCenter, height); + ctx.lineTo(xCenter - needleBaseWidth / 2, height - needleBaseWidth / 2); + ctx.lineTo(xCenter - needleTipWidth / 2, 0); + ctx.lineTo(xCenter, yCenter - needleLength); + ctx.lineTo(xCenter, 0); + ctx.closePath(); + ctx.fillStyle = Qt.rgba(0.66, 0, 0, 0.66); + ctx.fill(); + + ctx.beginPath(); + ctx.moveTo(xCenter, height) + ctx.lineTo(width, height - needleBaseWidth / 2); + ctx.lineTo(xCenter + needleTipWidth / 2, 0); + ctx.lineTo(xCenter, 0); + ctx.closePath(); + ctx.fillStyle = Qt.lighter(Qt.rgba(0.66, 0, 0, 0.66)); + ctx.fill(); + } + } + + foreground: null +} diff --git a/basicsuite/enterprise-dashboard/IconGaugeStyle.qml b/basicsuite/enterprise-dashboard/IconGaugeStyle.qml new file mode 100644 index 0000000..32092d7 --- /dev/null +++ b/basicsuite/enterprise-dashboard/IconGaugeStyle.qml @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Enterprise.Controls.Styles 1.0 + +DashboardGaugeStyle { + id: fuelGaugeStyle + minimumValueAngle: 300 + maximumValueAngle: 60 + tickmarkStepSize: 1 + labelStepSize: 1 + labelInset: toPixels(-0.25) + minorTickmarkCount: 3 + + needleLength: toPixels(0.85) + needleBaseWidth: toPixels(0.08) + needleTipWidth: toPixels(0.03) + + halfGauge: true + + property string icon: "" + property color minWarningColor: "transparent" + property color maxWarningColor: "transparent" + readonly property real minWarningStartAngle: minimumValueAngle - 90 + readonly property real maxWarningStartAngle: maximumValueAngle - 90 + + tickmark: Rectangle { + width: toPixels(0.06) + antialiasing: true + height: toPixels(0.2) + color: "#c8c8c8" + } + + minorTickmark: Rectangle { + width: toPixels(0.03) + antialiasing: true + height: toPixels(0.15) + color: "#c8c8c8" + } + + background: Item { + Canvas { + anchors.fill: parent + onPaint: { + var ctx = getContext("2d"); + ctx.reset(); + + paintBackground(ctx); + + if (minWarningColor != "transparent") { + ctx.beginPath(); + ctx.lineWidth = fuelGaugeStyle.toPixels(0.08); + ctx.strokeStyle = minWarningColor; + ctx.arc(outerRadius, outerRadius, + // Start the line in from the decorations, and account for the width of the line itself. + outerRadius - tickmarkInset - ctx.lineWidth / 2, + degToRad(minWarningStartAngle), + degToRad(minWarningStartAngle + angleRange / (minorTickmarkCount + 1)), false); + ctx.stroke(); + } + if (maxWarningColor != "transparent") { + ctx.beginPath(); + ctx.lineWidth = fuelGaugeStyle.toPixels(0.08); + ctx.strokeStyle = maxWarningColor; + ctx.arc(outerRadius, outerRadius, + // Start the line in from the decorations, and account for the width of the line itself. + outerRadius - tickmarkInset - ctx.lineWidth / 2, + degToRad(maxWarningStartAngle - angleRange / (minorTickmarkCount + 1)), + degToRad(maxWarningStartAngle), false); + ctx.stroke(); + } + } + } + + Image { + source: icon + anchors.bottom: parent.verticalCenter + anchors.bottomMargin: toPixels(0.3) + anchors.horizontalCenter: parent.horizontalCenter + width: toPixels(0.3) + height: width + fillMode: Image.PreserveAspectFit + } + } +} diff --git a/basicsuite/enterprise-dashboard/TachometerStyle.qml b/basicsuite/enterprise-dashboard/TachometerStyle.qml new file mode 100644 index 0000000..e601dbb --- /dev/null +++ b/basicsuite/enterprise-dashboard/TachometerStyle.qml @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Enterprise.Controls.Styles 1.0 + +DashboardGaugeStyle { + id: tachometerStyle + tickmarkStepSize: 1 + labelStepSize: 1 + needleLength: toPixels(0.85) + needleBaseWidth: toPixels(0.08) + needleTipWidth: toPixels(0.03) + + tickmark: Rectangle { + width: toPixels(0.03) + antialiasing: true + height: toPixels(0.08) + color: styleData.index === 7 || styleData.index === 8 ? Qt.rgba(0.5, 0, 0, 1) : "#c8c8c8" + } + + minorTickmark: null + + tickmarkLabel: Text { + font.pixelSize: Math.max(6, toPixels(0.12)) + text: styleData.value + color: styleData.index === 7 || styleData.index === 8 ? Qt.rgba(0.5, 0, 0, 1) : "#c8c8c8" + antialiasing: true + } + + background: Canvas { + onPaint: { + var ctx = getContext("2d"); + ctx.reset(); + paintBackground(ctx); + + ctx.beginPath(); + ctx.lineWidth = tachometerStyle.toPixels(0.08); + ctx.strokeStyle = Qt.rgba(0.5, 0, 0, 1); + var warningCircumference = maximumValueAngle - minimumValueAngle * 0.1; + var startAngle = maximumValueAngle - 90; + ctx.arc(outerRadius, outerRadius, + // Start the line in from the decorations, and account for the width of the line itself. + outerRadius - tickmarkInset - ctx.lineWidth / 2, + degToRad(startAngle - angleRange / 8 + angleRange * 0.015), + degToRad(startAngle - angleRange * 0.015), false); + ctx.stroke(); + } + + Text { + id: rpmText + font.pixelSize: tachometerStyle.toPixels(0.3) + text: rpmInt + color: "white" + horizontalAlignment: Text.AlignRight + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.verticalCenter + anchors.topMargin: 20 + + readonly property int rpmInt: valueSource.rpm + } + Text { + text: "x1000" + color: "white" + font.pixelSize: tachometerStyle.toPixels(0.1) + anchors.top: parent.top + anchors.topMargin: parent.height / 4 + anchors.horizontalCenter: parent.horizontalCenter + } + Text { + text: "RPM" + color: "white" + font.pixelSize: tachometerStyle.toPixels(0.1) + anchors.top: rpmText.bottom + anchors.horizontalCenter: parent.horizontalCenter + } + } +} diff --git a/basicsuite/enterprise-dashboard/TurnIndicator.qml b/basicsuite/enterprise-dashboard/TurnIndicator.qml new file mode 100644 index 0000000..576b811 --- /dev/null +++ b/basicsuite/enterprise-dashboard/TurnIndicator.qml @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Enterprise.Controls.Styles 1.0 + +Item { + // This enum is actually keyboard-related, but it serves its purpose + // as an indication of direction for us. + property int direction: Qt.LeftArrow + property bool on: false + + property bool flashing: false + + scale: direction === Qt.LeftArrow ? 1 : -1 + + Timer { + id: flashTimer + interval: 500 + running: on + repeat: true + onTriggered: flashing = !flashing + } + + function paintOutlinePath(ctx) { + ctx.beginPath(); + ctx.moveTo(0, height * 0.5); + ctx.lineTo(0.6 * width, 0); + ctx.lineTo(0.6 * width, height * 0.28); + ctx.lineTo(width, height * 0.28); + ctx.lineTo(width, height * 0.72); + ctx.lineTo(0.6 * width, height * 0.72); + ctx.lineTo(0.6 * width, height); + ctx.lineTo(0, height * 0.5); + } + + Canvas { + id: backgroundCanvas + anchors.fill: parent + + onPaint: { + var ctx = getContext("2d"); + ctx.reset(); + + paintOutlinePath(ctx); + + ctx.lineWidth = 1; + ctx.strokeStyle = "black"; + ctx.stroke(); + +// ctx.fillStyle = "#552222"; +// ctx.fill(); + } + } + + Canvas { + id: foregroundCanvas + anchors.fill: parent + visible: on && flashing + + onPaint: { + var ctx = getContext("2d"); + ctx.reset(); + + paintOutlinePath(ctx); + + ctx.fillStyle = "green"; + ctx.fill(); + } + } +} diff --git a/basicsuite/enterprise-dashboard/ValueSource.qml b/basicsuite/enterprise-dashboard/ValueSource.qml new file mode 100644 index 0000000..10f6ee2 --- /dev/null +++ b/basicsuite/enterprise-dashboard/ValueSource.qml @@ -0,0 +1,300 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: valueSource + property real kph: 0 + property real rpm: 1 + property real fuel: 0.85 + property string gear: { + var g; + if (kph == 0) { + return "P"; + } + if (kph < 30) { + return "1"; + } + if (kph < 50) { + return "2"; + } + if (kph < 80) { + return "3"; + } + if (kph < 120) { + return "4"; + } + if (kph < 160) { + return "5"; + } + } + property int turnSignal: gear == "P" && !start ? randomDirection() : -1 + property real temperature: 0.6 + property bool start: true + + function randomDirection() { + return Math.random() > 0.5 ? Qt.LeftArrow : Qt.RightArrow; + } + + SequentialAnimation { + running: true + loops: 1 + + // We want a small pause at the beginning, but we only want it to happen once. + PauseAnimation { + duration: 1000 + } + + PropertyAction { + target: valueSource + property: "start" + value: false + } + + SequentialAnimation { + loops: Animation.Infinite + + ParallelAnimation { + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.InOutSine + from: 0 + to: 30 + duration: 3000 + } + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + from: 1 + to: 6.1 + duration: 3000 + } + } + ParallelAnimation { + // We changed gears so we lost a bit of speed. + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.InOutSine + from: 30 + to: 26 + duration: 600 + } + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + from: 6 + to: 2.4 + duration: 600 + } + } + ParallelAnimation { + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.InOutSine + to: 60 + duration: 3000 + } + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 5.6 + duration: 3000 + } + } + ParallelAnimation { + // We changed gears so we lost a bit of speed. + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.InOutSine + to: 56 + duration: 600 + } + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 2.3 + duration: 600 + } + } + ParallelAnimation { + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.InOutSine + to: 100 + duration: 3000 + } + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 5.1 + duration: 3000 + } + } + ParallelAnimation { + // We changed gears so we lost a bit of speed. + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.InOutSine + to: 96 + duration: 600 + } + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 2.2 + duration: 600 + } + } + + ParallelAnimation { + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.InOutSine + to: 140 + duration: 3000 + } + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 6.2 + duration: 3000 + } + } + + // Start downshifting. + + // Fifth to fourth gear. + ParallelAnimation { + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.Linear + to: 100 + duration: 5000 + } + + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 3.1 + duration: 5000 + } + } + + // Fourth to third gear. + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 5.5 + duration: 600 + } + + ParallelAnimation { + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.InOutSine + to: 60 + duration: 5000 + } + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 2.6 + duration: 5000 + } + } + + // Third to second gear. + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 6.3 + duration: 600 + } + + ParallelAnimation { + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.InOutSine + to: 30 + duration: 5000 + } + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 2.6 + duration: 5000 + } + } + + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 6.5 + duration: 600 + } + + // Second to first gear. + ParallelAnimation { + NumberAnimation { + target: valueSource + property: "kph" + easing.type: Easing.InOutSine + to: 0 + duration: 5000 + } + NumberAnimation { + target: valueSource + property: "rpm" + easing.type: Easing.InOutSine + to: 1 + duration: 4500 + } + } + + PauseAnimation { + duration: 5000 + } + } + } +} diff --git a/basicsuite/enterprise-dashboard/description.txt b/basicsuite/enterprise-dashboard/description.txt new file mode 100644 index 0000000..dcf2b94 --- /dev/null +++ b/basicsuite/enterprise-dashboard/description.txt @@ -0,0 +1 @@ +The dashboard demo uses Qt Quick Enterprise Controls to create a digital dashboard for a car. diff --git a/basicsuite/enterprise-dashboard/images/fuel-icon.png b/basicsuite/enterprise-dashboard/images/fuel-icon.png new file mode 100644 index 0000000..f521e90 Binary files /dev/null and b/basicsuite/enterprise-dashboard/images/fuel-icon.png differ diff --git a/basicsuite/enterprise-dashboard/images/temperature-icon.png b/basicsuite/enterprise-dashboard/images/temperature-icon.png new file mode 100644 index 0000000..5a4334e Binary files /dev/null and b/basicsuite/enterprise-dashboard/images/temperature-icon.png differ diff --git a/basicsuite/enterprise-dashboard/main.qml b/basicsuite/enterprise-dashboard/main.qml new file mode 100644 index 0000000..5fbbb64 --- /dev/null +++ b/basicsuite/enterprise-dashboard/main.qml @@ -0,0 +1,155 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Window 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 +import QtQuick.Enterprise.Controls 1.0 +import QtQuick.Enterprise.Controls.Styles 1.0 + +Rectangle { + id: root + visible: true + width: 1024 + height: 600 + + color: "#161616" + //title: "QtQuick Enterprise Controls Demo" + + ValueSource { + id: valueSource + } + + // Dashboards are typically in a landscape orientation, so we need to ensure + // our height is never greater than our width. + Item { + id: container + width: root.width + height: Math.min(root.width, root.height) + anchors.centerIn: parent + + Row { + id: gaugeRow + spacing: container.width * 0.02 + anchors.centerIn: parent + + TurnIndicator { + id: leftIndicator + anchors.verticalCenter: parent.verticalCenter + width: height + height: container.height * 0.1 - gaugeRow.spacing + + direction: Qt.LeftArrow + on: valueSource.turnSignal == Qt.LeftArrow + } + + Item { + width: height + height: container.height * 0.25 - gaugeRow.spacing + anchors.verticalCenter: parent.verticalCenter + + CircularGauge { + id: fuelGauge + value: valueSource.fuel + maximumValue: 1 + y: parent.height / 2 - height / 2 - container.height * 0.01 + width: parent.width + height: parent.height * 0.7 + + style: IconGaugeStyle { + id: fuelGaugeStyle + + icon: "images/fuel-icon.png" + minWarningColor: Qt.rgba(0.5, 0, 0, 1) + + tickmarkLabel: Text { + color: "white" + visible: styleData.value === 0 || styleData.value === 1 + font.pixelSize: fuelGaugeStyle.toPixels(0.225) + text: styleData.value === 0 ? "E" : (styleData.value === 1 ? "F" : "") + } + } + } + + CircularGauge { + value: valueSource.temperature + maximumValue: 1 + width: parent.width + height: parent.height * 0.7 + y: parent.height / 2 + container.height * 0.01 + + style: IconGaugeStyle { + id: tempGaugeStyle + + icon: "images/temperature-icon.png" + maxWarningColor: Qt.rgba(0.5, 0, 0, 1) + + tickmarkLabel: Text { + color: "white" + visible: styleData.value === 0 || styleData.value === 1 + font.pixelSize: tempGaugeStyle.toPixels(0.225) + text: styleData.value === 0 ? "C" : (styleData.value === 1 ? "H" : "") + } + } + } + } + + CircularGauge { + id: speedometer + value: valueSource.kph + anchors.verticalCenter: parent.verticalCenter + maximumValue: 280 + // We set the width to the height, because the height will always be + // the more limited factor. Also, all circular controls letterbox + // their contents to ensure that they remain circular. However, we + // don't want to extra space on the left and right of our gauges, + // because they're laid out horizontally, and that would create + // large horizontal gaps between gauges on wide screens. + width: height + height: container.height * 0.5 + + style: DashboardGaugeStyle {} + } + + CircularGauge { + id: tachometer + width: height + height: container.height * 0.25 - gaugeRow.spacing + value: valueSource.rpm + maximumValue: 8 + anchors.verticalCenter: parent.verticalCenter + + style: TachometerStyle {} + } + + TurnIndicator { + id: rightIndicator + anchors.verticalCenter: parent.verticalCenter + width: height + height: container.height * 0.1 - gaugeRow.spacing + + direction: Qt.RightArrow + on: valueSource.turnSignal == Qt.RightArrow + } + + } + } +} diff --git a/basicsuite/enterprise-dashboard/preview_l.jpg b/basicsuite/enterprise-dashboard/preview_l.jpg new file mode 100644 index 0000000..eb2e3b5 Binary files /dev/null and b/basicsuite/enterprise-dashboard/preview_l.jpg differ diff --git a/basicsuite/enterprise-dashboard/title.txt b/basicsuite/enterprise-dashboard/title.txt new file mode 100644 index 0000000..1a3fb29 --- /dev/null +++ b/basicsuite/enterprise-dashboard/title.txt @@ -0,0 +1 @@ +Qt Quick Enterprise Controls - Dashboard diff --git a/basicsuite/enterprise-gallery/BlackButtonBackground.qml b/basicsuite/enterprise-gallery/BlackButtonBackground.qml new file mode 100644 index 0000000..084d4e5 --- /dev/null +++ b/basicsuite/enterprise-gallery/BlackButtonBackground.qml @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Rectangle { + property bool pressed: false + + gradient: Gradient { + GradientStop { + color: pressed ? "#222" : "#333" + position: 0 + } + GradientStop { + color: "#222" + position: 1 + } + } + Rectangle { + height: 1 + width: parent.width + anchors.top: parent.top + color: "#444" + visible: !pressed + } + Rectangle { + height: 1 + width: parent.width + anchors.bottom: parent.bottom + color: "#000" + } +} diff --git a/basicsuite/enterprise-gallery/BlackButtonStyle.qml b/basicsuite/enterprise-gallery/BlackButtonStyle.qml new file mode 100644 index 0000000..dde237f --- /dev/null +++ b/basicsuite/enterprise-gallery/BlackButtonStyle.qml @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +ButtonStyle { + property color fontColor; + + background: BlackButtonBackground { + pressed: control.pressed + } + label: Item { + Text { + text: control.text + color: fontColor + font.pixelSize: control.height * 0.25 + font.family: openSans.name + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: 20 + } + } +} diff --git a/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml new file mode 100644 index 0000000..34991f9 --- /dev/null +++ b/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Enterprise.Controls.Styles 1.0 + +CircularGaugeStyle { + id: root + tickmarkStepSize: 10 + minorTickmarkCount: 1 + labelStepSize: 20 + tickmarkInset: outerRadius * 0.06 + minorTickmarkInset: tickmarkInset + labelInset: outerRadius * 0.23 + + background: Image { + source: "images/background.png" + } + + needle: Image { + id: needleImage + transformOrigin: Item.Bottom + source: "images/needle.png" + scale: { + var distanceFromLabelToRadius = labelInset / 2; + var idealHeight = outerRadius - distanceFromLabelToRadius; + var originalImageHeight = needleImage.sourceSize.height; + idealHeight / originalImageHeight; + } + } + + foreground: Item { + Image { + anchors.centerIn: parent + source: "images/center.png" + scale: (outerRadius * 0.25) / sourceSize.height + } + } + + tickmark: Rectangle { + width: outerRadius * 0.02 + antialiasing: true + height: outerRadius * 0.05 + color: "#888" + } + + minorTickmark: Rectangle { + width: outerRadius * 0.01 + antialiasing: true + height: outerRadius * 0.02 + color: "#444" + } + + tickmarkLabel: Text { + font.pixelSize: Math.max(6, outerRadius * 0.1) + text: styleData.value + color: "white" + } +} diff --git a/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml new file mode 100644 index 0000000..3340bf3 --- /dev/null +++ b/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml @@ -0,0 +1,26 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Enterprise.Controls.Styles 1.0 + +CircularGaugeStyle { + labelStepSize: 20 +} diff --git a/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml new file mode 100644 index 0000000..fbd71d7 --- /dev/null +++ b/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Enterprise.Controls.Styles 1.0 + +CircularGaugeStyle { + id: root + tickmarkStepSize: 10 + minorTickmarkCount: 2 + labelStepSize: 40 + tickmarkInset: outerRadius * 0.06 + minorTickmarkInset: tickmarkInset + labelInset: outerRadius * 0.23 + + background: Image { + source: "images/background-light.png" + } + + needle: Image { + id: needleImage + source: "images/needle-light.png" + transformOrigin: Item.Bottom + scale: { + var distanceFromLabelToRadius = labelInset / 2; + var idealHeight = outerRadius - distanceFromLabelToRadius; + var originalImageHeight = needleImage.sourceSize.height; + idealHeight / originalImageHeight; + } + } + + foreground: Item { + Image { + anchors.centerIn: parent + source: "images/center-light.png" + scale: (outerRadius * 0.25) / sourceSize.height + } + } + + tickmark: Rectangle { + width: outerRadius * 0.01 + antialiasing: true + height: outerRadius * 0.04 + color: "#999" + } + + minorTickmark: Rectangle { + width: outerRadius * 0.01 + antialiasing: true + height: outerRadius * 0.02 + color: "#bbb" + } + + tickmarkLabel: Text { + font.family: "Helvetica neue" + font.pixelSize: Math.max(6, outerRadius * 0.1) + text: styleData.value + color: "#333" + } +} diff --git a/basicsuite/enterprise-gallery/CircularGaugeView.qml b/basicsuite/enterprise-gallery/CircularGaugeView.qml new file mode 100644 index 0000000..f72fc2f --- /dev/null +++ b/basicsuite/enterprise-gallery/CircularGaugeView.qml @@ -0,0 +1,204 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 1.0 +import QtQuick.Enterprise.Controls 1.0 + +ControlView { + id: controlView + darkBackground: customizerItem.currentStyleDark + + property color fontColor: darkBackground ? "white" : "black" + + property bool accelerating: false + + Keys.onSpacePressed: accelerating = true + Keys.onReleased: { + if (event.key === Qt.Key_Space) { + accelerating = false; + event.accepted = true; + } + } + + Button { + id: accelerate + text: "Accelerate" + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + height: root.height * 0.125 + + onPressedChanged: accelerating = pressed + + style: BlackButtonStyle { + background: BlackButtonBackground { + pressed: control.pressed + } + label: Text { + text: control.text + color: "white" + font.pixelSize: root.toPixels(0.04) + font.family: openSans.name + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + } + + control: CircularGauge { + id: gauge + minimumValue: customizerItem.minimumValue + maximumValue: customizerItem.maximumValue + width: root.toPixels(0.65) + height: width + + value: accelerating ? maximumValue : 0 + style: styleMap[customizerItem.currentStylePath] + + // This stops the styles being recreated when a new one is chosen. + property var styleMap: { + var styles = {}; + for (var i = 0; i < customizerItem.allStylePaths.length; ++i) { + var path = customizerItem.allStylePaths[i]; + styles[path] = Qt.createComponent(path, gauge); + } + styles; + } + + // Called to update the style after the user has edited a property. + Connections { + target: customizerItem + onMinimumValueAngleChanged: __style.minimumValueAngle = customizerItem.minimumValueAngle + onMaximumValueAngleChanged: __style.maximumValueAngle = customizerItem.maximumValueAngle + onLabelStepSizeChanged: __style.tickmarkStepSize = __style.labelStepSize = customizerItem.labelStepSize + } + + Behavior on value { + NumberAnimation { + easing.type: Easing.OutCubic + duration: 6000 + } + } + } + + customizer: Column { + readonly property var allStylePaths: { + var paths = []; + for (var i = 0; i < stylePicker.model.count; ++i) { + paths.push(stylePicker.model.get(i).path); + } + paths; + } + property alias currentStylePath: stylePicker.currentStylePath + property alias currentStyleDark: stylePicker.currentStyleDark + property alias minimumValue: minimumValueSlider.value + property alias maximumValue: maximumValueSlider.value + property alias minimumValueAngle: minimumAngleSlider.value + property alias maximumValueAngle: maximumAngleSlider.value + property alias labelStepSize: labelStepSizeSlider.value + + id: circularGaugeColumn + spacing: customizerPropertySpacing + + readonly property bool isDefaultStyle: stylePicker.model.get(stylePicker.currentIndex).name === "Default" + + StylePicker { + id: stylePicker + currentIndex: 1 + + model: ListModel { + ListElement { + name: "Default" + path: "CircularGaugeDefaultStyle.qml" + dark: true + } + ListElement { + name: "Dark" + path: "CircularGaugeDarkStyle.qml" + dark: true + } + ListElement { + name: "Light" + path: "CircularGaugeLightStyle.qml" + dark: false + } + } + } + + CustomizerLabel { + text: "Minimum angle" + } + + CustomizerSlider { + id: minimumAngleSlider + minimumValue: 0 + value: 215 + maximumValue: 360 + width: parent.width + } + + CustomizerLabel { + text: "Maximum angle" + } + + CustomizerSlider { + id: maximumAngleSlider + minimumValue: 0 + value: 145 + maximumValue: 360 + } + + CustomizerLabel { + text: "Minimum value" + } + + CustomizerSlider { + id: minimumValueSlider + minimumValue: 0 + value: 0 + maximumValue: 360 + stepSize: labelStepSizeSlider.stepSize + } + + CustomizerLabel { + text: "Maximum value" + } + + CustomizerSlider { + id: maximumValueSlider + minimumValue: 0 + value: 220 + maximumValue: 300 + stepSize: labelStepSizeSlider.stepSize + } + + CustomizerLabel { + text: "Label step size" + } + + CustomizerSlider { + id: labelStepSizeSlider + minimumValue: 10 + value: 20 + maximumValue: 100 + stepSize: 20 + } + } +} diff --git a/basicsuite/enterprise-gallery/ControlView.qml b/basicsuite/enterprise-gallery/ControlView.qml new file mode 100644 index 0000000..17f5784 --- /dev/null +++ b/basicsuite/enterprise-gallery/ControlView.qml @@ -0,0 +1,168 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 1.0 + +Rectangle { + id: view + color: darkBackground ? "transparent" : lightBackgroundColor + + Keys.onReleased: { + if (event.key === Qt.Key_Back) { + stackView.pop(); + event.accepted = true; + } + } + + property bool darkBackground: true + + property Component control + property Component customizer + + property alias controlItem: controlLoader.item + property alias customizerItem: customizerLoader.item + + property bool isCustomizerVisible: false + + property real margin: root.toPixels(0.05) + + property rect controlBounds: Qt.rect(largestControlItem.x + controlBoundsItem.x, + largestControlItem.y + controlBoundsItem.y, controlBoundsItem.width, controlBoundsItem.height) + + Item { + id: largestControlItem + x: margin + y: margin + width: isCustomizerVisible ? widthWhenCustomizing : widthWhenNotCustomizing + height: isCustomizerVisible ? heightWhenCustomizing : heightWhenNotCustomizing + + readonly property real widthWhenCustomizing: (!isScreenPortrait ? parent.width / 2 : parent.width) - margin * 2 + readonly property real heightWhenCustomizing: (isScreenPortrait ? parent.height / 2 : parent.height - toolbar.height) - margin * 2 + readonly property real widthWhenNotCustomizing: parent.width - margin * 2 + readonly property real heightWhenNotCustomizing: parent.height - toolbar.height - margin * 2 + + Item { + id: controlBoundsItem + x: parent.width / 2 - controlBoundsItem.width / 2 + y: customizer && customizerItem.visible ? 0 : (isScreenPortrait ? (parent.height / 2) - (controlBoundsItem.height / 2) : 0) + width: Math.min(parent.widthWhenCustomizing, parent.widthWhenNotCustomizing) + height: Math.min(parent.heightWhenCustomizing, parent.heightWhenNotCustomizing) + + Behavior on x { + id: controlXBehavior + enabled: false + NumberAnimation {} + } + + Behavior on y { + id: controlYBehavior + enabled: false + NumberAnimation {} + } + + Loader { + id: controlLoader + sourceComponent: control + anchors.centerIn: parent + + property alias view: view + } + } + } + + Flickable { + id: flickable + // Hide the customizer on the right of the screen if it's not visible. + x: (isScreenPortrait ? 0 : (isCustomizerVisible ? largestControlItem.x + largestControlItem.width + margin : view.width)) + margin + y: (isScreenPortrait ? largestControlItem.y + largestControlItem.height : 0) + margin + width: largestControlItem.width + height: parent.height - y - toolbar.height - margin + anchors.leftMargin: margin + anchors.rightMargin: margin + visible: customizerLoader.opacity > 0 + + flickableDirection: Flickable.VerticalFlick + + clip: true + contentWidth: width + contentHeight: customizerLoader.height + + Behavior on x { + id: flickableXBehavior + enabled: false + NumberAnimation {} + } + + Behavior on y { + id: flickableYBehavior + enabled: false + NumberAnimation {} + } + + Loader { + id: customizerLoader + sourceComponent: customizer + opacity: 0 + width: flickable.width + + property alias view: view + + Behavior on opacity { + NumberAnimation { + duration: 300 + } + } + } + } + + ControlViewToolbar { + id: toolbar + + onCustomizeClicked: { + controlXBehavior.enabled = !isScreenPortrait; + controlYBehavior.enabled = isScreenPortrait; + + isCustomizerVisible = !isCustomizerVisible; + + if (isScreenPortrait) { + flickableXBehavior.enabled = false; + flickableYBehavior.enabled = true; + } else { + flickableXBehavior.enabled = true; + flickableYBehavior.enabled = false; + } + + customizerLoader.opacity = isCustomizerVisible ? 1 : 0; + } + } + + FlickableMoreIndicator { + flickable: flickable + atTop: true + gradientColor: view.darkBackground ? darkBackgroundColor : lightBackgroundColor + } + + FlickableMoreIndicator { + flickable: flickable + atTop: false + gradientColor: view.darkBackground ? darkBackgroundColor : lightBackgroundColor + } +} diff --git a/basicsuite/enterprise-gallery/ControlViewToolbar.qml b/basicsuite/enterprise-gallery/ControlViewToolbar.qml new file mode 100644 index 0000000..f23b2d2 --- /dev/null +++ b/basicsuite/enterprise-gallery/ControlViewToolbar.qml @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 1.0 + +BlackButtonBackground { + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + height: root.height * 0.125 + + signal customizeClicked + + gradient: Gradient { + GradientStop { + color: "#333" + position: 0 + } + GradientStop { + color: "#222" + position: 1 + } + } + + Button { + id: back + width: parent.height + height: parent.height + anchors.left: parent.left + anchors.bottom: parent.bottom + + onClicked: stackView.pop() + + style: BlackButtonStyle { + } + + Image { + source: "images/icon-go.png" + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + scale: -1 + } + } + + Button { + id: customize + width: parent.height + height: parent.height + anchors.right: parent.right + anchors.bottom: parent.bottom + visible: customizer + + style: BlackButtonStyle { + } + + onClicked: customizeClicked() + + Image { + source: "images/icon-settings.png" + anchors.centerIn: parent + scale: -1 + } + } +} diff --git a/basicsuite/enterprise-gallery/CustomizerCheckBox.qml b/basicsuite/enterprise-gallery/CustomizerCheckBox.qml new file mode 100644 index 0000000..9426dc6 --- /dev/null +++ b/basicsuite/enterprise-gallery/CustomizerCheckBox.qml @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +CheckBox { + id: checkBox + anchors.horizontalCenter: parent.horizontalCenter + width: root.width * 0.04 + height: width + + style: CheckBoxStyle { + indicator: Rectangle { + color: "#666" + height: control.height + width: height + + Rectangle { + anchors.fill: parent + anchors.margins: Math.round(checkBox.width * 0.1) + color: "#111" + visible: control.checked + } + } + } +} diff --git a/basicsuite/enterprise-gallery/CustomizerLabel.qml b/basicsuite/enterprise-gallery/CustomizerLabel.qml new file mode 100644 index 0000000..c830832 --- /dev/null +++ b/basicsuite/enterprise-gallery/CustomizerLabel.qml @@ -0,0 +1,28 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Text { + color: fontColor + font.pixelSize: root.toPixels(0.04) + font.family: openSans.name + anchors.horizontalCenter: parent.horizontalCenter +} diff --git a/basicsuite/enterprise-gallery/CustomizerSlider.qml b/basicsuite/enterprise-gallery/CustomizerSlider.qml new file mode 100644 index 0000000..b98c06d --- /dev/null +++ b/basicsuite/enterprise-gallery/CustomizerSlider.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Slider { + id: slider + width: parent.width + height: root.toPixels(0.1) + + style: SliderStyle { + handle: Rectangle { + height: root.toPixels(0.06) + width: height + radius: width/2 + color: "#fff" + } + + groove: Rectangle { + implicitHeight: root.toPixels(0.015) + implicitWidth: 100 + radius: height/2 + border.color: "#333" + color: "#222" + Rectangle { + height: parent.height + width: styleData.handlePosition + implicitHeight: 6 + implicitWidth: 100 + radius: height/2 + color: "#555" + } + } + + } +} diff --git a/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml b/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml new file mode 100644 index 0000000..c935de2 --- /dev/null +++ b/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + anchors.top: atTop ? flickable.top : undefined + anchors.bottom: atTop ? undefined : flickable.bottom + anchors.left: isScreenPortrait ? parent.left : parent.horizontalCenter + anchors.right: parent.right + height: 30 + visible: flickable.visible + opacity: atTop + ? (flickable.contentY > showDistance ? 1 : 0) + : (flickable.contentY < flickable.contentHeight - showDistance ? 1 : 0) + scale: atTop ? 1 : -1 + + readonly property real showDistance: 0 + property Flickable flickable + property color gradientColor + /*! \c true if this indicator is at the top of the item */ + property bool atTop + + Behavior on opacity { + NumberAnimation { + } + } + + gradient: Gradient { + GradientStop { + position: 0.0 + color: gradientColor + } + GradientStop { + position: 1.0 + color: "transparent" + } + } +} diff --git a/basicsuite/enterprise-gallery/PieMenuControlView.qml b/basicsuite/enterprise-gallery/PieMenuControlView.qml new file mode 100644 index 0000000..91dae94 --- /dev/null +++ b/basicsuite/enterprise-gallery/PieMenuControlView.qml @@ -0,0 +1,195 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 +import QtQuick.Controls 1.0 +import QtQuick.Enterprise.Controls 1.0 + +Rectangle { + id: view + color: customizerItem.currentStyleDark ? "#111" : "#555" + + Behavior on color { + ColorAnimation {} + } + + Keys.onReleased: { + if (event.key === Qt.Key_Back) { + stackView.pop(); + event.accepted = true; + } + } + + property bool darkBackground: true + + property Component mouseArea + + property Component customizer: Column { + property alias currentStylePath: stylePicker.currentStylePath + property alias currentStyleDark: stylePicker.currentStyleDark + + StylePicker { + id: stylePicker + currentIndex: 0 + + model: ListModel { + ListElement { + name: "Default" + path: "PieMenuDefaultStyle.qml" + dark: false + } + ListElement { + name: "Dark" + path: "PieMenuDarkStyle.qml" + dark: true + } + } + } + } + + property alias controlItem: pieMenu + property alias customizerItem: customizerLoader.item + + Item { + id: controlBoundsItem + width: parent.width + height: parent.height - toolbar.height + visible: customizerLoader.opacity === 0 + + Image { + id: bgImage + anchors.centerIn: parent + height: 48 + Text { + id: bgLabel + anchors.top: parent.bottom + anchors.topMargin: 20 + anchors.horizontalCenter: parent.horizontalCenter + text: "Tap to open" + color: "#999" + font.pointSize: 20 + } + } + + MouseArea { + id: touchArea + anchors.fill: parent + + onClicked: { + pieMenu.popup(touchArea.mouseX, touchArea.mouseY) + } + } + + Item { + width: labelText.width + height: labelText.height + anchors.bottom: pieMenu.top + anchors.bottomMargin: 10 + anchors.horizontalCenter: pieMenu.horizontalCenter + visible: pieMenu.visible + + Item { + id: labelBlurGuard + anchors.centerIn: parent + width: labelText.implicitWidth * 2 + height: labelText.implicitHeight * 2 + + Text { + id: labelText + font.pointSize: 20 + text: pieMenu.currentIndex !== -1 ? pieMenu.menuItems[pieMenu.currentIndex].text : "" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + anchors.centerIn: parent + color: "#ccc" + antialiasing: true + } + } + } + + PieMenu { + id: pieMenu + activationMode: ActivationMode.ActivateOnClick + width: Math.min(controlBoundsItem.width, controlBoundsItem.height) * 0.5 + height: width + + style: Qt.createComponent(customizerItem.currentStylePath) + + MenuItem { + text: "Zoom In" + onTriggered: { + bgImage.source = iconSource + bgLabel.text = text + " selected" + } + iconSource: "images/zoom_in.png" + } + MenuItem { + text: "Zoom Out" + onTriggered: { + bgImage.source = iconSource + bgLabel.text = text + " selected" + } + iconSource: "images/zoom_out.png" + } + MenuItem { + text: "Info" + onTriggered: { + bgImage.source = iconSource + bgLabel.text = text + " selected" + } + iconSource: "images/info.png" + } + } + } + Loader { + id: customizerLoader + sourceComponent: customizer + opacity: 0 + anchors.left: parent.left + anchors.right: parent.right + anchors.leftMargin: 30 + anchors.rightMargin: 30 + y: parent.height / 2 - height / 2 - toolbar.height + visible: customizerLoader.opacity > 0 + + property alias view: view + + Behavior on y { + NumberAnimation { + duration: 300 + } + } + + Behavior on opacity { + NumberAnimation { + duration: 300 + } + } + } + + ControlViewToolbar { + id: toolbar + + onCustomizeClicked: { + customizerLoader.opacity = customizerLoader.opacity == 0 ? 1 : 0; + } + } +} diff --git a/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml b/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml new file mode 100644 index 0000000..fa2a638 --- /dev/null +++ b/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml @@ -0,0 +1,26 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick.Enterprise.Controls.Styles 1.0 + +PieMenuStyle { + backgroundColor: "#222" + shadowColor: Qt.rgba(1, 1, 1, 0.26) +} diff --git a/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml b/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml new file mode 100644 index 0000000..2f43dd1 --- /dev/null +++ b/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml @@ -0,0 +1,24 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick.Enterprise.Controls.Styles 1.0 + +PieMenuStyle { +} diff --git a/basicsuite/enterprise-gallery/StylePicker.qml b/basicsuite/enterprise-gallery/StylePicker.qml new file mode 100644 index 0000000..542abaa --- /dev/null +++ b/basicsuite/enterprise-gallery/StylePicker.qml @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 +import QtQuick.Enterprise.Controls 1.0 +import QtQuick.Enterprise.Controls.Styles 1.0 + +ListView { + id: stylePicker + width: parent.width + height: root.height * 0.06 + interactive: false + spacing: -1 + + orientation: ListView.Horizontal + + readonly property string currentStylePath: stylePicker.model.get(stylePicker.currentIndex).path + readonly property bool currentStyleDark: stylePicker.model.get(stylePicker.currentIndex).dark !== undefined + ? stylePicker.model.get(stylePicker.currentIndex).dark + : true + + ExclusiveGroup { + id: styleExclusiveGroup + } + + delegate: Button { + width: stylePicker.width / stylePicker.model.count + height: stylePicker.height + checkable: true + checked: index == ListView.view.currentIndex + exclusiveGroup: styleExclusiveGroup + + onCheckedChanged: { + if (checked) { + ListView.view.currentIndex = index; + } + } + + style: ButtonStyle { + background: Rectangle { + readonly property color checkedColor: currentStyleDark ? "#444" : "#777" + readonly property color uncheckedColor: currentStyleDark ? "#222" : "#bbb" + color: checked ? checkedColor : uncheckedColor + border.color: checkedColor + border.width: 1 + radius: 1 + } + + label: Text { + text: name + color: currentStyleDark ? "white" : (checked ? "white" : "black") + font.pixelSize: root.toPixels(0.04) + font.family: openSans.name + anchors.centerIn: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + } +} diff --git a/basicsuite/enterprise-gallery/description.txt b/basicsuite/enterprise-gallery/description.txt new file mode 100644 index 0000000..ba0806c --- /dev/null +++ b/basicsuite/enterprise-gallery/description.txt @@ -0,0 +1,3 @@ +The Gallery example showcases Qt Quick Enterprise Controls. If you have any suggestions for improvements to existing controls or ideas for new controls please email them to Qt.Enterprise-Controls@digia.com. + +Each control can be customized and styled through the API. We have included a small subset of these customization options in the gallery example, which you can explore and interact with under the "cog" or "gear" icon on the lower right corner of each control's page. diff --git a/basicsuite/enterprise-gallery/fonts/LICENSE.txt b/basicsuite/enterprise-gallery/fonts/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/basicsuite/enterprise-gallery/fonts/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttf b/basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..db43334 Binary files /dev/null and b/basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttf differ diff --git a/basicsuite/enterprise-gallery/images/background-light.png b/basicsuite/enterprise-gallery/images/background-light.png new file mode 100644 index 0000000..2f76984 Binary files /dev/null and b/basicsuite/enterprise-gallery/images/background-light.png differ diff --git a/basicsuite/enterprise-gallery/images/background.png b/basicsuite/enterprise-gallery/images/background.png new file mode 100644 index 0000000..a3f4302 Binary files /dev/null and b/basicsuite/enterprise-gallery/images/background.png differ diff --git a/basicsuite/enterprise-gallery/images/center-light.png b/basicsuite/enterprise-gallery/images/center-light.png new file mode 100644 index 0000000..75add20 Binary files /dev/null and b/basicsuite/enterprise-gallery/images/center-light.png differ diff --git a/basicsuite/enterprise-gallery/images/center.png b/basicsuite/enterprise-gallery/images/center.png new file mode 100644 index 0000000..b18a5fa Binary files /dev/null and b/basicsuite/enterprise-gallery/images/center.png differ diff --git a/basicsuite/enterprise-gallery/images/icon-go.png b/basicsuite/enterprise-gallery/images/icon-go.png new file mode 100644 index 0000000..ed86c2d Binary files /dev/null and b/basicsuite/enterprise-gallery/images/icon-go.png differ diff --git a/basicsuite/enterprise-gallery/images/icon-settings.png b/basicsuite/enterprise-gallery/images/icon-settings.png new file mode 100644 index 0000000..6f37083 Binary files /dev/null and b/basicsuite/enterprise-gallery/images/icon-settings.png differ diff --git a/basicsuite/enterprise-gallery/images/info.png b/basicsuite/enterprise-gallery/images/info.png new file mode 100644 index 0000000..5c7a9df Binary files /dev/null and b/basicsuite/enterprise-gallery/images/info.png differ diff --git a/basicsuite/enterprise-gallery/images/needle-light.png b/basicsuite/enterprise-gallery/images/needle-light.png new file mode 100644 index 0000000..d486d9e Binary files /dev/null and b/basicsuite/enterprise-gallery/images/needle-light.png differ diff --git a/basicsuite/enterprise-gallery/images/needle.png b/basicsuite/enterprise-gallery/images/needle.png new file mode 100644 index 0000000..6b10c60 Binary files /dev/null and b/basicsuite/enterprise-gallery/images/needle.png differ diff --git a/basicsuite/enterprise-gallery/images/qt-logo.png b/basicsuite/enterprise-gallery/images/qt-logo.png new file mode 100644 index 0000000..14ddf2a Binary files /dev/null and b/basicsuite/enterprise-gallery/images/qt-logo.png differ diff --git a/basicsuite/enterprise-gallery/images/zoom_in.png b/basicsuite/enterprise-gallery/images/zoom_in.png new file mode 100644 index 0000000..4128210 Binary files /dev/null and b/basicsuite/enterprise-gallery/images/zoom_in.png differ diff --git a/basicsuite/enterprise-gallery/images/zoom_out.png b/basicsuite/enterprise-gallery/images/zoom_out.png new file mode 100644 index 0000000..772d6ac Binary files /dev/null and b/basicsuite/enterprise-gallery/images/zoom_out.png differ diff --git a/basicsuite/enterprise-gallery/main.qml b/basicsuite/enterprise-gallery/main.qml new file mode 100644 index 0000000..43ad848 --- /dev/null +++ b/basicsuite/enterprise-gallery/main.qml @@ -0,0 +1,254 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtQuick Enterprise Controls Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 +import QtQuick.Controls.Private 1.0 +import QtQuick.Dialogs 1.0 +import QtQuick.Enterprise.Controls 1.0 +import QtQuick.Enterprise.Controls.Styles 1.0 +import QtQuick.Window 2.1 + +Rectangle { + id: root + visible: true + width: 480 + height: 800 + + color: "#161616" + //title: "QtQuick Enterprise Controls Demo" + + function toPixels(percentage) { + return percentage * Math.min(root.width, root.height); + } + + property bool isScreenPortrait: height > width + property color fontColor: "white" + readonly property color lightBackgroundColor: "#ccc" + readonly property color darkBackgroundColor: "#161616" + property real customizerPropertySpacing: 10 + property real colorPickerRowSpacing: 8 + + property Component circularGauge: CircularGaugeView {} + + property Component dial: ControlView { + darkBackground: false + + control: Dial { + id: dial + width: root.toPixels(0.3) + height: width + + /*! + Determines whether the dial animates its rotation to the new value when + a single click or touch is received on the dial. + */ + property bool animate: customizerItem.animate + + Behavior on value { + enabled: dial.animate && !dial.pressed + NumberAnimation { + duration: 300 + easing.type: Easing.OutSine + } + } + + Text { + text: "Volume" + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: dial.bottom + anchors.topMargin: 10 + font.pixelSize: root.toPixels(0.045) + color: "#4e4e4e" + styleColor: "#ffffff" + style: Text.Raised + } + } + + customizer: Column { + spacing: customizerPropertySpacing + + property alias animate: animateCheckBox.checked + + CustomizerLabel { + text: "Animate" + color: "black" + } + + CustomizerCheckBox { + id: animateCheckBox + } + } + } + + property Component delayButton: ControlView { + darkBackground: false + + control: DelayButton { + text: "Alarm" + anchors.centerIn: parent + width: toPixels(0.3) + height: width + } + } + + property Component gauge: ControlView { + id: gaugeView + control: Gauge { + id: gauge + width: orientation === Qt.Vertical ? root.toPixels(0.15) : gaugeView.controlBounds.width * 0.65 + height: orientation === Qt.Vertical ? root.toPixels(0.65) : gaugeView.controlBounds.height * 0.15 + anchors.centerIn: parent + + minimumValue: 0 + value: customizerItem.value + maximumValue: 100 + orientation: customizerItem.orientationFlag ? Qt.Vertical : Qt.Horizontal + tickmarkAlignment: orientation === Qt.Vertical + ? (customizerItem.alignFlag ? Qt.AlignLeft : Qt.AlignRight) + : (customizerItem.alignFlag ? Qt.AlignTop : Qt.AlignBottom) + } + + customizer: Column { + spacing: customizerPropertySpacing + + property alias value: valueSlider.value + property alias orientationFlag: orientationCheckBox.checked + property alias alignFlag: alignCheckBox.checked + + CustomizerLabel { + text: "Value" + } + + CustomizerSlider { + id: valueSlider + minimumValue: 0 + value: 50 + maximumValue: 100 + } + + CustomizerLabel { + text: "Vertical orientation" + } + + CustomizerCheckBox { + id: orientationCheckBox + checked: true + } + + CustomizerLabel { + text: controlItem.orientation === Qt.Vertical ? "Left align" : "Top align" + } + + CustomizerCheckBox { + id: alignCheckBox + checked: true + } + } + } + + property Component toggleButton: ControlView { + darkBackground: false + + control: ToggleButton { + text: checked ? "On" : "Off" + width: toPixels(0.3) + height: width + anchors.centerIn: parent + } + } + + property Component pieMenu: PieMenuControlView {} + + FontLoader { + id: openSans + Component.onCompleted: { + // QTBUG-35909 + if (Qt.platform.os === "ios") + name = "Open Sans" + else + source = "fonts/OpenSans-Regular.ttf" + } + } + + property var componentMap: { + "CircularGauge": circularGauge, + "DelayButton": delayButton, + "Dial": dial, + "Gauge": gauge, + "PieMenu": pieMenu, + "ToggleButton": toggleButton + } + + StackView { + id: stackView + anchors.fill: parent + + initialItem: ListView { + model: ListModel { + ListElement { + title: "CircularGauge" + } + ListElement { + title: "DelayButton" + } + ListElement { + title: "Dial" + } + ListElement { + title: "Gauge" + } + //ListElement { + // title: "PieMenu" + //} + ListElement { + title: "ToggleButton" + } + } + + delegate: Button { + width: stackView.width + height: root.height * 0.125 + text: title + + Image { + source: "images/icon-go.png" + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 30 + } + + style: BlackButtonStyle { + fontColor: root.fontColor + } + + onClicked: { + if (stackView.depth == 1) { + // Only push the control view if we haven't already pushed it... + stackView.push({item: componentMap[title]}); + stackView.currentItem.forceActiveFocus(); + } + } + } + } + } +} diff --git a/basicsuite/enterprise-gallery/preview_l.jpg b/basicsuite/enterprise-gallery/preview_l.jpg new file mode 100644 index 0000000..8ddcad8 Binary files /dev/null and b/basicsuite/enterprise-gallery/preview_l.jpg differ diff --git a/basicsuite/enterprise-gallery/title.txt b/basicsuite/enterprise-gallery/title.txt new file mode 100644 index 0000000..4ffcc0f --- /dev/null +++ b/basicsuite/enterprise-gallery/title.txt @@ -0,0 +1 @@ +Qt Quick Enterprise Controls - Gallery -- cgit v1.2.3 From 5e40b0da297d20e89fade0ec006cbc4cb961fe97 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 29 Jan 2014 17:30:35 +0100 Subject: [qt5-everywhere] Fix shader path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5705acafc25f5cd7df258dc543d86007d023cc22 Reviewed-by: Topi Reiniö --- .../qt5-everywhere/demos/shaders/import/shaderfilereader.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp index 36a3632..1623fb7 100644 --- a/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp +++ b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp @@ -41,12 +41,19 @@ #include "shaderfilereader.h" #include #include +#include +#include ShaderFileReader::ShaderFileReader(QObject* parent) : QObject(parent) { if (qEnvironmentVariableIsEmpty("QT_SHADER_PATH")) - setenv("QT_SHADER_PATH", "/data/user/qt/Qt5Everywhere/demos/shaders/",1); + setenv("QT_SHADER_PATH", "/data/user/qt/qt5-everywhere/demos/shaders/",1); + // check if directory contains shader files + QByteArray shaderPath(qgetenv("QT_SHADER_PATH").append("shaders/")); + QDir shaderDir(shaderPath); + if (shaderDir.entryInfoList(QStringList() << "*.fsh").length() < 1) + qWarning() << "ShaderFileReader: can not find shader files in " << shaderPath; } ShaderFileReader::~ShaderFileReader() -- cgit v1.2.3 From 7196460986361623677b76bc228dd9887a68368a Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 30 Jan 2014 14:05:48 +0100 Subject: Add Qt Charts demos to the qtlauncher This change depends on a2f0bd6002708aa0c782684ca6e6982e6e766015 in b2qt-launcher. Change-Id: If76be005a905546e9c474d6597dffeeb095f97f8 Reviewed-by: Eirik Aavitsland --- basicsuite/enterprise-charts/View1.qml | 54 +++++++++++++ basicsuite/enterprise-charts/View10.qml | 42 +++++++++++ basicsuite/enterprise-charts/View11.qml | 43 +++++++++++ basicsuite/enterprise-charts/View12.qml | 68 +++++++++++++++++ basicsuite/enterprise-charts/View13.qml | 87 +++++++++++++++++++++ basicsuite/enterprise-charts/View14.qml | 74 ++++++++++++++++++ basicsuite/enterprise-charts/View15.qml | 77 +++++++++++++++++++ basicsuite/enterprise-charts/View2.qml | 45 +++++++++++ basicsuite/enterprise-charts/View3.qml | 45 +++++++++++ basicsuite/enterprise-charts/View4.qml | 109 +++++++++++++++++++++++++++ basicsuite/enterprise-charts/View5.qml | 57 ++++++++++++++ basicsuite/enterprise-charts/View6.qml | 43 +++++++++++ basicsuite/enterprise-charts/View7.qml | 43 +++++++++++ basicsuite/enterprise-charts/View8.qml | 42 +++++++++++ basicsuite/enterprise-charts/View9.qml | 43 +++++++++++ basicsuite/enterprise-charts/description.txt | 3 + basicsuite/enterprise-charts/loader.qml | 37 +++++++++ basicsuite/enterprise-charts/main.qml | 92 ++++++++++++++++++++++ basicsuite/enterprise-charts/preview_l.jpg | Bin 0 -> 11070 bytes basicsuite/enterprise-charts/title.txt | 1 + 20 files changed, 1005 insertions(+) create mode 100644 basicsuite/enterprise-charts/View1.qml create mode 100644 basicsuite/enterprise-charts/View10.qml create mode 100644 basicsuite/enterprise-charts/View11.qml create mode 100644 basicsuite/enterprise-charts/View12.qml create mode 100644 basicsuite/enterprise-charts/View13.qml create mode 100644 basicsuite/enterprise-charts/View14.qml create mode 100644 basicsuite/enterprise-charts/View15.qml create mode 100644 basicsuite/enterprise-charts/View2.qml create mode 100644 basicsuite/enterprise-charts/View3.qml create mode 100644 basicsuite/enterprise-charts/View4.qml create mode 100644 basicsuite/enterprise-charts/View5.qml create mode 100644 basicsuite/enterprise-charts/View6.qml create mode 100644 basicsuite/enterprise-charts/View7.qml create mode 100644 basicsuite/enterprise-charts/View8.qml create mode 100644 basicsuite/enterprise-charts/View9.qml create mode 100644 basicsuite/enterprise-charts/description.txt create mode 100644 basicsuite/enterprise-charts/loader.qml create mode 100644 basicsuite/enterprise-charts/main.qml create mode 100644 basicsuite/enterprise-charts/preview_l.jpg create mode 100644 basicsuite/enterprise-charts/title.txt diff --git a/basicsuite/enterprise-charts/View1.qml b/basicsuite/enterprise-charts/View1.qml new file mode 100644 index 0000000..308cacd --- /dev/null +++ b/basicsuite/enterprise-charts/View1.qml @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//![2] +import QtQuick 2.0 +//![2] +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + property variant othersSlice: 0 + + //![1] + ChartView { + id: chart + title: "Top-5 car brand shares in Finland" + anchors.fill: parent + legend.alignment: Qt.AlignBottom + antialiasing: true + + PieSeries { + id: pieSeries + PieSlice { label: "Volkswagen"; value: 13.5 } + PieSlice { label: "Toyota"; value: 10.9 } + PieSlice { label: "Ford"; value: 8.6 } + PieSlice { label: "Skoda"; value: 8.2 } + PieSlice { label: "Volvo"; value: 6.8 } + } + } + + Component.onCompleted: { + // You can also manipulate slices dynamically + othersSlice = pieSeries.append("Others", 52.0); + pieSeries.find("Volkswagen").exploded = true; + } + //![1] +} diff --git a/basicsuite/enterprise-charts/View10.qml b/basicsuite/enterprise-charts/View10.qml new file mode 100644 index 0000000..2074b70 --- /dev/null +++ b/basicsuite/enterprise-charts/View10.qml @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + title: "Horizontal Stacked Bar series" + anchors.fill: parent + legend.alignment: Qt.AlignBottom + antialiasing: true + + HorizontalStackedBarSeries { + axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } + BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } + BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } + } + } + //![1] +} diff --git a/basicsuite/enterprise-charts/View11.qml b/basicsuite/enterprise-charts/View11.qml new file mode 100644 index 0000000..27166fa --- /dev/null +++ b/basicsuite/enterprise-charts/View11.qml @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + title: "Horizontal Percent Bar series" + anchors.fill: parent + legend.alignment: Qt.AlignBottom + antialiasing: true + + HorizontalPercentBarSeries { + axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } + BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } + BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } + } + } + //![1] +} + diff --git a/basicsuite/enterprise-charts/View12.qml b/basicsuite/enterprise-charts/View12.qml new file mode 100644 index 0000000..4bf89aa --- /dev/null +++ b/basicsuite/enterprise-charts/View12.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.3 + +Rectangle { + anchors.fill: parent + //![1] + PolarChartView { + title: "Two Series, Common Axes" + anchors.fill: parent + legend.visible: false + + ValueAxis { + id: axisAngular + min: 0 + max: 20 + tickCount: 9 + } + + ValueAxis { + id: axisRadial + min: -0.5 + max: 1.5 + } + + SplineSeries { + id: series1 + axisAngular: axisAngular + axisRadial: axisRadial + pointsVisible: true + } + + ScatterSeries { + id: series2 + axisAngular: axisAngular + axisRadial: axisRadial + markerSize: 10 + } + } + + // Add data dynamically to the series + Component.onCompleted: { + for (var i = 0; i <= 20; i++) { + series1.append(i, Math.random()); + series2.append(i, Math.random()); + } + } + //![1] +} diff --git a/basicsuite/enterprise-charts/View13.qml b/basicsuite/enterprise-charts/View13.qml new file mode 100644 index 0000000..1f6aec1 --- /dev/null +++ b/basicsuite/enterprise-charts/View13.qml @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.3 + +Rectangle { + anchors.fill: parent + + PolarChartView { + title: "Historical Area Series" + anchors.fill: parent + legend.visible: false + + DateTimeAxis { + id: axis1 + format: "yyyy MMM" + tickCount: 13 + } + ValueAxis { + id: axis2 + } + LineSeries { + id: lowerLine + axisAngular: axis1 + axisRadial: axis2 + + // Please note that month in JavaScript months are zero based, so 2 means March + XYPoint { x: toMsecsSinceEpoch(new Date(1950, 0, 1)); y: 15 } + XYPoint { x: toMsecsSinceEpoch(new Date(1962, 4, 1)); y: 35 } + XYPoint { x: toMsecsSinceEpoch(new Date(1970, 0, 1)); y: 50 } + XYPoint { x: toMsecsSinceEpoch(new Date(1978, 2, 1)); y: 75 } + XYPoint { x: toMsecsSinceEpoch(new Date(1987, 11, 1)); y: 102 } + XYPoint { x: toMsecsSinceEpoch(new Date(1992, 1, 1)); y: 132 } + XYPoint { x: toMsecsSinceEpoch(new Date(1998, 7, 1)); y: 100 } + XYPoint { x: toMsecsSinceEpoch(new Date(2002, 4, 1)); y: 120 } + XYPoint { x: toMsecsSinceEpoch(new Date(2012, 8, 1)); y: 140 } + XYPoint { x: toMsecsSinceEpoch(new Date(2013, 5, 1)); y: 150 } + } + LineSeries { + id: upperLine + axisAngular: axis1 + axisRadial: axis2 + + // Please note that month in JavaScript months are zero based, so 2 means March + XYPoint { x: toMsecsSinceEpoch(new Date(1950, 0, 1)); y: 30 } + XYPoint { x: toMsecsSinceEpoch(new Date(1962, 4, 1)); y: 55 } + XYPoint { x: toMsecsSinceEpoch(new Date(1970, 0, 1)); y: 80 } + XYPoint { x: toMsecsSinceEpoch(new Date(1978, 2, 1)); y: 105 } + XYPoint { x: toMsecsSinceEpoch(new Date(1987, 11, 1)); y: 125 } + XYPoint { x: toMsecsSinceEpoch(new Date(1992, 1, 1)); y: 160 } + XYPoint { x: toMsecsSinceEpoch(new Date(1998, 7, 1)); y: 140 } + XYPoint { x: toMsecsSinceEpoch(new Date(2002, 4, 1)); y: 140 } + XYPoint { x: toMsecsSinceEpoch(new Date(2012, 8, 1)); y: 170 } + XYPoint { x: toMsecsSinceEpoch(new Date(2013, 5, 1)); y: 200 } + } + AreaSeries { + axisAngular: axis1 + axisRadial: axis2 + lowerSeries: lowerLine + upperSeries: upperLine + } + } + // DateTimeAxis is based on QDateTimes so we must convert our JavaScript dates to + // milliseconds since epoch to make them match the DateTimeAxis values + function toMsecsSinceEpoch(date) { + var msecs = date.getTime(); + return msecs; + } +} diff --git a/basicsuite/enterprise-charts/View14.qml b/basicsuite/enterprise-charts/View14.qml new file mode 100644 index 0000000..bae0e8a --- /dev/null +++ b/basicsuite/enterprise-charts/View14.qml @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.3 + +Rectangle { + anchors.fill: parent + + PolarChartView { + title: "Numerical Data for Dummies" + anchors.fill: parent + legend.visible: false + + LineSeries { + axisRadial: CategoryAxis { + min: 0 + max: 30 + CategoryRange { + label: "critical" + endValue: 2 + } + CategoryRange { + label: "low" + endValue: 7 + } + CategoryRange { + label: "normal" + endValue: 12 + } + CategoryRange { + label: "high" + endValue: 18 + } + CategoryRange { + label: "extremely high" + endValue: 30 + } + } + + axisAngular: ValueAxis { + tickCount: 13 + } + + XYPoint { x: 0; y: 4.3 } + XYPoint { x: 1; y: 4.1 } + XYPoint { x: 2; y: 4.7 } + XYPoint { x: 3; y: 3.9 } + XYPoint { x: 4; y: 5.2 } + XYPoint { x: 5; y: 5.3 } + XYPoint { x: 6; y: 6.1 } + XYPoint { x: 7; y: 7.7 } + XYPoint { x: 8; y: 12.9 } + XYPoint { x: 9; y: 19.2 } + } + } +} diff --git a/basicsuite/enterprise-charts/View15.qml b/basicsuite/enterprise-charts/View15.qml new file mode 100644 index 0000000..57db474 --- /dev/null +++ b/basicsuite/enterprise-charts/View15.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + id: chart + title: "Production costs" + anchors.fill: parent + legend.visible: false + antialiasing: true + + PieSeries { + id: pieOuter + size: 0.96 + holeSize: 0.7 + PieSlice { id: slice; label: "Alpha"; value: 19511; color: "#8AB846"; borderColor: "#163430" } + PieSlice { label: "Epsilon"; value: 11105; color: "#C0EEFF"; borderColor: "#3B391C" } + PieSlice { label: "Psi"; value: 9352; color: "#DF8939"; borderColor: "#13060C" } + } + + PieSeries { + size: 0.7 + id: pieInner + holeSize: 0.25 + + PieSlice { label: "Materials"; value: 10334; color: "#8AB846"; borderColor: "#163430" } + PieSlice { label: "Employee"; value: 3066; color: "#AAE356"; borderColor: "#163430" } + PieSlice { label: "Logistics"; value: 6111; color: "#99CC4E"; borderColor: "#163430" } + + PieSlice { label: "Materials"; value: 7371; color: "#C0EEFF"; borderColor: "#3B391C" } + PieSlice { label: "Employee"; value: 2443; color: "#C9FAFF"; borderColor: "#3B391C" } + PieSlice { label: "Logistics"; value: 1291; color: "#B0FAFF"; borderColor: "#3B391C" } + + PieSlice { label: "Materials"; value: 4022; color: "#DF8939"; borderColor: "#13060C" } + PieSlice { label: "Employee"; value: 3998; color: "#FC9D42"; borderColor: "#13060C" } + PieSlice { label: "Logistics"; value: 1332; color: "#F2963F"; borderColor: "#13060C" } + } + } + + Component.onCompleted: { + // Set the common slice properties dynamically for convenience + for (var i = 0; i < pieOuter.count; i++) { + pieOuter.at(i).labelPosition = PieSlice.LabelOutside; + pieOuter.at(i).labelVisible = true; + pieOuter.at(i).borderWidth = 3; + } + for (var i = 0; i < pieInner.count; i++) { + pieInner.at(i).labelPosition = PieSlice.LabelInsideNormal; + pieInner.at(i).labelVisible = true; + pieInner.at(i).borderWidth = 2; + } + } + //![1] +} diff --git a/basicsuite/enterprise-charts/View2.qml b/basicsuite/enterprise-charts/View2.qml new file mode 100644 index 0000000..698bd2d --- /dev/null +++ b/basicsuite/enterprise-charts/View2.qml @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + title: "Line" + anchors.fill: parent + antialiasing: true + + LineSeries { + name: "LineSeries" + XYPoint { x: 0; y: 0 } + XYPoint { x: 1.1; y: 2.1 } + XYPoint { x: 1.9; y: 3.3 } + XYPoint { x: 2.1; y: 2.1 } + XYPoint { x: 2.9; y: 4.9 } + XYPoint { x: 3.4; y: 3.0 } + XYPoint { x: 4.1; y: 3.3 } + } + } + //![1] +} diff --git a/basicsuite/enterprise-charts/View3.qml b/basicsuite/enterprise-charts/View3.qml new file mode 100644 index 0000000..88974de --- /dev/null +++ b/basicsuite/enterprise-charts/View3.qml @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + title: "Spline" + anchors.fill: parent + antialiasing: true + + SplineSeries { + name: "SplineSeries" + XYPoint { x: 0; y: 0.0 } + XYPoint { x: 1.1; y: 3.2 } + XYPoint { x: 1.9; y: 2.4 } + XYPoint { x: 2.1; y: 2.1 } + XYPoint { x: 2.9; y: 2.6 } + XYPoint { x: 3.4; y: 2.3 } + XYPoint { x: 4.1; y: 3.1 } + } + } + //![1] +} diff --git a/basicsuite/enterprise-charts/View4.qml b/basicsuite/enterprise-charts/View4.qml new file mode 100644 index 0000000..fc5c539 --- /dev/null +++ b/basicsuite/enterprise-charts/View4.qml @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + title: "NHL All-Star Team Players" + anchors.fill: parent + antialiasing: true + + ValueAxis { + id: valueAxis + min: 2000 + max: 2011 + tickCount: 12 + labelFormat: "%.0f" + } + + AreaSeries { + name: "Russian" + color: "#FFD52B1E" + borderColor: "#FF0039A5" + borderWidth: 3 + axisX: valueAxis + upperSeries: LineSeries { + XYPoint { x: 2000; y: 1 } + XYPoint { x: 2001; y: 1 } + XYPoint { x: 2002; y: 1 } + XYPoint { x: 2003; y: 1 } + XYPoint { x: 2004; y: 1 } + XYPoint { x: 2005; y: 0 } + XYPoint { x: 2006; y: 1 } + XYPoint { x: 2007; y: 1 } + XYPoint { x: 2008; y: 4 } + XYPoint { x: 2009; y: 3 } + XYPoint { x: 2010; y: 2 } + XYPoint { x: 2011; y: 1 } + } + } + // ... + //![1] + + AreaSeries { + name: "Swedish" + color: "#AF005292" + borderColor: "#AFFDCA00" + borderWidth: 3 + axisX: valueAxis + upperSeries: LineSeries { + XYPoint { x: 2000; y: 1 } + XYPoint { x: 2001; y: 1 } + XYPoint { x: 2002; y: 3 } + XYPoint { x: 2003; y: 3 } + XYPoint { x: 2004; y: 2 } + XYPoint { x: 2005; y: 0 } + XYPoint { x: 2006; y: 2 } + XYPoint { x: 2007; y: 1 } + XYPoint { x: 2008; y: 2 } + XYPoint { x: 2009; y: 1 } + XYPoint { x: 2010; y: 3 } + XYPoint { x: 2011; y: 3 } + } + } + + AreaSeries { + name: "Finnish" + color: "#00357F" + borderColor: "#FEFEFE" + borderWidth: 3 + axisX: valueAxis + upperSeries: LineSeries { + XYPoint { x: 2000; y: 0 } + XYPoint { x: 2001; y: 0 } + XYPoint { x: 2002; y: 0 } + XYPoint { x: 2003; y: 0 } + XYPoint { x: 2004; y: 0 } + XYPoint { x: 2005; y: 0 } + XYPoint { x: 2006; y: 1 } + XYPoint { x: 2007; y: 0 } + XYPoint { x: 2008; y: 0 } + XYPoint { x: 2009; y: 0 } + XYPoint { x: 2010; y: 0 } + XYPoint { x: 2011; y: 1 } + } + } + } +} diff --git a/basicsuite/enterprise-charts/View5.qml b/basicsuite/enterprise-charts/View5.qml new file mode 100644 index 0000000..6077816 --- /dev/null +++ b/basicsuite/enterprise-charts/View5.qml @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + title: "Scatters" + anchors.fill: parent + antialiasing: true + + ScatterSeries { + id: scatter1 + name: "Scatter1" + XYPoint { x: 1.5; y: 1.5 } + XYPoint { x: 1.5; y: 1.6 } + XYPoint { x: 1.57; y: 1.55 } + XYPoint { x: 1.8; y: 1.8 } + XYPoint { x: 1.9; y: 1.6 } + XYPoint { x: 2.1; y: 1.3 } + XYPoint { x: 2.5; y: 2.1 } + } + + ScatterSeries { + name: "Scatter2" + // ... + //![1] + XYPoint { x: 2.0; y: 2.0 } + XYPoint { x: 2.0; y: 2.1 } + XYPoint { x: 2.07; y: 2.05 } + XYPoint { x: 2.2; y: 2.9 } + XYPoint { x: 2.4; y: 2.7 } + XYPoint { x: 2.67; y: 2.65 } + } + } +} diff --git a/basicsuite/enterprise-charts/View6.qml b/basicsuite/enterprise-charts/View6.qml new file mode 100644 index 0000000..1ce795a --- /dev/null +++ b/basicsuite/enterprise-charts/View6.qml @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + title: "Bar series" + anchors.fill: parent + legend.alignment: Qt.AlignBottom + antialiasing: true + + BarSeries { + id: mySeries + axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } + BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } + BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } + } + } + //![1] +} diff --git a/basicsuite/enterprise-charts/View7.qml b/basicsuite/enterprise-charts/View7.qml new file mode 100644 index 0000000..99776b7 --- /dev/null +++ b/basicsuite/enterprise-charts/View7.qml @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + title: "Stacked Bar series" + anchors.fill: parent + legend.alignment: Qt.AlignBottom + antialiasing: true + + StackedBarSeries { + id: mySeries + axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } + BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } + BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } + } + } + //![1] +} diff --git a/basicsuite/enterprise-charts/View8.qml b/basicsuite/enterprise-charts/View8.qml new file mode 100644 index 0000000..cad360d --- /dev/null +++ b/basicsuite/enterprise-charts/View8.qml @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + title: "Percent Bar series" + anchors.fill: parent + legend.alignment: Qt.AlignBottom + antialiasing: true + + PercentBarSeries { + axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } + BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } + BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } + } + } + //![1] +} diff --git a/basicsuite/enterprise-charts/View9.qml b/basicsuite/enterprise-charts/View9.qml new file mode 100644 index 0000000..0f5796d --- /dev/null +++ b/basicsuite/enterprise-charts/View9.qml @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtCommercial.Chart 1.1 + +Rectangle { + anchors.fill: parent + + //![1] + ChartView { + title: "Horizontal Bar series" + anchors.fill: parent + legend.alignment: Qt.AlignBottom + antialiasing: true + + HorizontalBarSeries { + axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } + BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } + BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } + } + } + //![1] +} + diff --git a/basicsuite/enterprise-charts/description.txt b/basicsuite/enterprise-charts/description.txt new file mode 100644 index 0000000..6c8d488 --- /dev/null +++ b/basicsuite/enterprise-charts/description.txt @@ -0,0 +1,3 @@ +This demo presents different types of charts that are available from Qt Charts library. + +Qt Charts is part of the Qt Enterprise addons package which provides a set of easy to use chart components. It uses the Qt Graphics View Framework, therefore charts can be easily integrated to modern user interfaces. Qt Charts can be used as QWidgets, QGraphicsWidget, or QML types. diff --git a/basicsuite/enterprise-charts/loader.qml b/basicsuite/enterprise-charts/loader.qml new file mode 100644 index 0000000..080fce6 --- /dev/null +++ b/basicsuite/enterprise-charts/loader.qml @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: container + width: 600 + height: 400 + Component.onCompleted: { + var co = Qt.createComponent("main.qml") + if (co.status == Component.Ready) { + var o = co.createObject(container) + } else { + console.log(co.errorString()) + console.log("QtCommercial.Chart 1.1 not available") + console.log("Please use correct QML_IMPORT_PATH export") + } + } +} diff --git a/basicsuite/enterprise-charts/main.qml b/basicsuite/enterprise-charts/main.qml new file mode 100644 index 0000000..b3c02e3 --- /dev/null +++ b/basicsuite/enterprise-charts/main.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Enterprise Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//![1] +import QtQuick 2.0 +//![1] + +Rectangle { + width: 600 + height: 400 + property int viewNumber: 1 + + Loader { + id: loader + anchors.fill: parent + source: "View" + viewNumber + ".qml"; + } + + Rectangle { + id: infoText + anchors.centerIn: parent + width: parent.width + height: 40 + color: "black" + Text { + color: "white" + anchors.centerIn: parent + text: "Use left and right arrow keys or tap on the screen to navigate between chart types" + } + + Behavior on opacity { + NumberAnimation { duration: 400 } + } + } + + MouseArea { + focus: true + anchors.fill: parent + onClicked: { + if (infoText.opacity > 0) { + infoText.opacity = 0.0; + } else { + nextView(); + } + } + Keys.onPressed: { + if (infoText.opacity > 0) { + infoText.opacity = 0.0; + } else { + if (event.key == Qt.Key_Left) { + previousView(); + } else { + // tapping on the screen advances to the next view + nextView(); + } + } + } + } + + function nextView() { + var i = viewNumber + 1; + if (i > 15) + viewNumber = 1; + else + viewNumber = i; + } + + function previousView() { + var i = viewNumber - 1; + if (i <= 0) + viewNumber = 15; + else + viewNumber = i; + } +} diff --git a/basicsuite/enterprise-charts/preview_l.jpg b/basicsuite/enterprise-charts/preview_l.jpg new file mode 100644 index 0000000..2776b0b Binary files /dev/null and b/basicsuite/enterprise-charts/preview_l.jpg differ diff --git a/basicsuite/enterprise-charts/title.txt b/basicsuite/enterprise-charts/title.txt new file mode 100644 index 0000000..d3ce063 --- /dev/null +++ b/basicsuite/enterprise-charts/title.txt @@ -0,0 +1 @@ +Qt Charts - Gallery -- cgit v1.2.3 From 203ffaab105b1f868689656bfbdfabb7f55b9e56 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 31 Jan 2014 12:19:24 +0100 Subject: Improve description of the Text Input demo Change-Id: Ia8d0e61c0592c28f98e7d489f4bc533ab261a507 Reviewed-by: Rainer Keller Reviewed-by: Kalle Viironen Reviewed-by: Eirik Aavitsland --- basicsuite/textinput/description.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/basicsuite/textinput/description.txt b/basicsuite/textinput/description.txt index c60d036..d9b2f4f 100644 --- a/basicsuite/textinput/description.txt +++ b/basicsuite/textinput/description.txt @@ -1,6 +1,3 @@ -This examples illustrates how Qt can handle input on touch devices. - -The launcher loads a custom platform input context plugin and contains a virtual keyboard. When a text control in Qt Quick gets focus, the input context will trigger the virtual keyboard to show on screen and clicks in the virtual keyboard are delegated to the text control. - -Our demo virtual keyboard has support for english, finnish and arabic. The input context API is plugin based and users can replace existing plugins with whatever they desire. Qt has a ready made plugin for Maliit, an open-source, cross-platform input method framework for mobile and embedded. +This examples illustrates how to handle input on touch devices. +The Boot to Qt stack comes with Qt Virtual Keyboard - a framework that consists of a C++ back end with support for custom input methods, as well as a reference keyboard front end implemented in QML, supporting multiple languages. -- cgit v1.2.3 From 7887008b43e27aba29c9e66ee78e012f13614b96 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 3 Feb 2014 13:22:43 +0100 Subject: Doc: Improve demo documentation and descriptions - Copy thumbnails from launcher to example documentation - Fix typos and improve demo descriptions and use them also in the example docs - Add missing docs for Qt 5 Launch Presentation, fix typo in its .pro file name. Change-Id: Ic658b7e536853d7272aaee26c6fd8769bc3fc060 Reviewed-by: Eirik Aavitsland --- basicsuite/graphicaleffects/description.txt | 4 +- basicsuite/mediaplayer/description.txt | 4 +- basicsuite/photogallery/description.txt | 2 +- basicsuite/qt5-everywhere/description.txt | 2 +- .../qt5-lauchpresentation.pro | 18 ---- .../qt5-launchpresentation.pro | 18 ++++ basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc | 2 + .../sensorexplorer/doc/src/sensor_explorer.qdoc | 5 +- basicsuite/sensors/description.txt | 5 +- basicsuite/textinput/description.txt | 2 +- doc/b2qt-demos.qdoc | 98 ++++++++++++++++++++- doc/b2qt-demos.qdocconf | 3 +- doc/images/b2qt-demo-about-b2qt.jpg | Bin 0 -> 28727 bytes doc/images/b2qt-demo-camera.jpg | Bin 0 -> 33458 bytes doc/images/b2qt-demo-controls-touch.jpg | Bin 0 -> 11179 bytes doc/images/b2qt-demo-graphicaleffects.jpg | Bin 0 -> 33841 bytes doc/images/b2qt-demo-mediaplayer.jpg | Bin 0 -> 29015 bytes doc/images/b2qt-demo-photogallery.jpg | Bin 0 -> 55274 bytes doc/images/b2qt-demo-qt5-cinematicdemo.jpg | Bin 0 -> 36830 bytes doc/images/b2qt-demo-qt5-everywhere.jpg | Bin 0 -> 34331 bytes doc/images/b2qt-demo-qt5-launchpresentation.jpg | Bin 0 -> 16252 bytes doc/images/b2qt-demo-qt5-particlesdemo.jpg | Bin 0 -> 8889 bytes doc/images/b2qt-demo-sensorexplorer.jpg | Bin 0 -> 21553 bytes doc/images/b2qt-demo-sensors.jpg | Bin 0 -> 19464 bytes doc/images/b2qt-demo-textinput.jpg | Bin 0 -> 16465 bytes 25 files changed, 129 insertions(+), 34 deletions(-) delete mode 100644 basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro create mode 100644 basicsuite/qt5-launchpresentation/qt5-launchpresentation.pro create mode 100644 doc/images/b2qt-demo-about-b2qt.jpg create mode 100644 doc/images/b2qt-demo-camera.jpg create mode 100644 doc/images/b2qt-demo-controls-touch.jpg create mode 100644 doc/images/b2qt-demo-graphicaleffects.jpg create mode 100644 doc/images/b2qt-demo-mediaplayer.jpg create mode 100644 doc/images/b2qt-demo-photogallery.jpg create mode 100644 doc/images/b2qt-demo-qt5-cinematicdemo.jpg create mode 100644 doc/images/b2qt-demo-qt5-everywhere.jpg create mode 100644 doc/images/b2qt-demo-qt5-launchpresentation.jpg create mode 100644 doc/images/b2qt-demo-qt5-particlesdemo.jpg create mode 100644 doc/images/b2qt-demo-sensorexplorer.jpg create mode 100644 doc/images/b2qt-demo-sensors.jpg create mode 100644 doc/images/b2qt-demo-textinput.jpg diff --git a/basicsuite/graphicaleffects/description.txt b/basicsuite/graphicaleffects/description.txt index e2d3acf..c19b2c4 100644 --- a/basicsuite/graphicaleffects/description.txt +++ b/basicsuite/graphicaleffects/description.txt @@ -1,2 +1,4 @@ -This example shows the Qt Quick 2.0 ShaderEffect type and the QtGraphicalEffect module. Qt Quick 2.0 provides the ability to use inline GLSL in your Qt Quick applications to create stunning visual effects. However, as UIs typically reuse many of the same effects, the QtGraphicalEffects module provides a set of predefined, commonly used effects. This includes blur, drop-shadows, glow, blending, opacity masks and more. +This example shows the Qt Quick 2.0 ShaderEffect type and the Qt Graphical Effects module. Qt Quick 2.0 provides the ability to use inline GLSL in your Qt Quick applications to create stunning visual effects. + +However, as UIs typically reuse many of the same effects, the Qt Graphical Effects module provides a set of predefined, commonly used effects. This includes blur, drop-shadows, glow, blending, opacity masks and more. diff --git a/basicsuite/mediaplayer/description.txt b/basicsuite/mediaplayer/description.txt index bf034e5..0868473 100644 --- a/basicsuite/mediaplayer/description.txt +++ b/basicsuite/mediaplayer/description.txt @@ -1,3 +1,3 @@ -The Media Player example demonstrates the use of the media playback features of Qt Multimedia with Qt Quick. +The Media Player example demonstrates the use of media playback features provided by Qt Multimedia with Qt Quick. -It can play from a file or from Internet, both videos and music. +It can play content either from a file or a network source, both videos and music. diff --git a/basicsuite/photogallery/description.txt b/basicsuite/photogallery/description.txt index f5e302c..f47f907 100644 --- a/basicsuite/photogallery/description.txt +++ b/basicsuite/photogallery/description.txt @@ -1 +1 @@ -This is a simple photo gallery, showing images found in /data/images. +This is a simple photo gallery, showing images found in /data/images. Images captured with the Camera demo will also appear in this folder. diff --git a/basicsuite/qt5-everywhere/description.txt b/basicsuite/qt5-everywhere/description.txt index efa4b99..4846702 100644 --- a/basicsuite/qt5-everywhere/description.txt +++ b/basicsuite/qt5-everywhere/description.txt @@ -1 +1 @@ -This demo contains several Qt Quick 2 applications which you can launch by tapping the devices. +This demo shows how to use different user interface styles in several platforms and device types with one source code. It contains several Qt Quick 2 applications which you can launch by tapping each device. diff --git a/basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro b/basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro deleted file mode 100644 index c3aba46..0000000 --- a/basicsuite/qt5-launchpresentation/qt5-lauchpresentation.pro +++ /dev/null @@ -1,18 +0,0 @@ -TARGET = qt5-launchpresentation - -include(../shared/shared.pri) -b2qtdemo_deploy_defaults() - -content.files = \ - *.qml \ - calqlatr \ - maroon \ - particles \ - presentation \ - samegame \ - images -content.path = $$DESTPATH - -OTHER_FILES += $${content.files} - -INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/qt5-launchpresentation/qt5-launchpresentation.pro b/basicsuite/qt5-launchpresentation/qt5-launchpresentation.pro new file mode 100644 index 0000000..c3aba46 --- /dev/null +++ b/basicsuite/qt5-launchpresentation/qt5-launchpresentation.pro @@ -0,0 +1,18 @@ +TARGET = qt5-launchpresentation + +include(../shared/shared.pri) +b2qtdemo_deploy_defaults() + +content.files = \ + *.qml \ + calqlatr \ + maroon \ + particles \ + presentation \ + samegame \ + images +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc b/basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc index ead695c..f19d981 100644 --- a/basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc +++ b/basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc @@ -30,6 +30,8 @@ \ingroup b2qt-demos \brief This is a collection of examples using Emitters in the QML particle system. + \image b2qt-demo-qt5-particlesdemo.jpg + This is a collection of small QML examples relating to using Emitters in the particle system. Each example is a small QML file emphasizing a particular element or feature. diff --git a/basicsuite/sensorexplorer/doc/src/sensor_explorer.qdoc b/basicsuite/sensorexplorer/doc/src/sensor_explorer.qdoc index 35f28d0..c9921a1 100644 --- a/basicsuite/sensorexplorer/doc/src/sensor_explorer.qdoc +++ b/basicsuite/sensorexplorer/doc/src/sensor_explorer.qdoc @@ -31,8 +31,11 @@ \brief The Sensor Explorer example demonstrates how to read the meta-data of available sensors. \ingroup b2qt-demos - \section2 Sensor Explorer in QML + \image b2qt-demo-sensorexplorer.jpg + This example provides a list of all available sensors installed on the system for which Qt has + a backend. Start a sensor to see how values change depending from environment and user-device + interaction. This example is divided into two parts: diff --git a/basicsuite/sensors/description.txt b/basicsuite/sensors/description.txt index f6048cc..e306066 100644 --- a/basicsuite/sensors/description.txt +++ b/basicsuite/sensors/description.txt @@ -1,4 +1,3 @@ -This demo utilizes the accelerometer and light sensor readings in an application. +Demonstrates using the accelerometer and light sensors in a QML application. -For the accelometer, tilting the device moves the bubble around. For the light sensor, -exposing the device to different lighting conditions changes the display. +Tilting the device moves the bubble around, based on readings from the accelerometer sensor. For the light sensor, exposing the device to different lighting conditions changes the displayed image. diff --git a/basicsuite/textinput/description.txt b/basicsuite/textinput/description.txt index d9b2f4f..e65bb3e 100644 --- a/basicsuite/textinput/description.txt +++ b/basicsuite/textinput/description.txt @@ -1,3 +1,3 @@ -This examples illustrates how to handle input on touch devices. +This example illustrates how to handle input on touch devices. The Boot to Qt stack comes with Qt Virtual Keyboard - a framework that consists of a C++ back end with support for custom input methods, as well as a reference keyboard front end implemented in QML, supporting multiple languages. diff --git a/doc/b2qt-demos.qdoc b/doc/b2qt-demos.qdoc index 7e9e640..4b41067 100644 --- a/doc/b2qt-demos.qdoc +++ b/doc/b2qt-demos.qdoc @@ -35,6 +35,13 @@ \title About Boot to Qt \ingroup b2qt-demos \brief Displays information about the Boot to Qt software stack. + + \image b2qt-demo-about-b2qt.jpg + + The \e {About Boot to Qt} demo provides an introduction to what Boot to Qt is all about. + + It talks briefly about how the software stack is built up, rough hardware requirements + and how Boot to Qt differs from the more traditional Qt editions. */ /*! @@ -42,6 +49,17 @@ \title Camera \ingroup b2qt-demos \brief Demonstrates using camera in a QML application. + + \image b2qt-demo-camera.jpg + + This example demonstrates the use of the camera features provided by Qt Multimedia with + Qt Quick. + + Demo can be used to take pictures. Files are saved inside the \c {/data/images/} folder + and can be then viewed with the \l {Photo Gallery} demo application. + + Camera parameters such as flash mode, scene mode or white balance can be changed. The + availability of parameters depends on what the camera driver provides. */ /*! @@ -49,6 +67,14 @@ \title Controls Touch \ingroup b2qt-demos \brief Demonstrates a touch UI implemented with Qt Quick Controls. + + \image b2qt-demo-controls-touch.jpg + + The purpose of this example is to show Qt Quick Controls in practice. The example uses a + StackView to navigate between pages and illustrates the use of many of the controls provided + by Qt Quick Control, including Button, Slider, ProgressBar, TabBar and TextInput types. The + style in the example is a custom style made to look like the Android theme, it is written + purely in QML. */ /*! @@ -56,6 +82,14 @@ \title Graphical Effects \ingroup b2qt-demos \brief Demonstrates the different graphical effects that can be used in a QML application. + + \image b2qt-demo-graphicaleffects.jpg + + This example shows the Qt Quick 2.0 ShaderEffect type and the Qt Graphical Effects module. Qt Quick + 2.0 provides the ability to use inline GLSL in your Qt Quick applications to create stunning visual + effects. However, as UIs typically reuse many of the same effects, the Qt Graphical Effects module + provides a set of predefined, commonly used effects. This includes blur, drop-shadows, glow, + blending, opacity masks and more. */ /*! @@ -63,6 +97,12 @@ \title Media Player \ingroup b2qt-demos \brief A media player implemented in QML. + + \image b2qt-demo-mediaplayer.jpg + The Media Player example demonstrates the use of the media playback features of Qt Multimedia with + Qt Quick. + + It can play from a file or from a network source, both videos and music. */ /*! @@ -70,13 +110,44 @@ \title Photo Gallery \ingroup b2qt-demos \brief A photo gallery implemented in QML. + + \image b2qt-demo-photogallery.jpg + + This is a simple photo gallery, showing images found in \c {/data/images} directory. */ /*! \example qt5-cinematicdemo - \title Qt5 Cinematic Demo + \title Qt 5 Cinematic Demo \ingroup b2qt-demos \brief A cool demonstration of the graphical prowess of Qt 5 and Qt Quick 2. + + \image b2qt-demo-qt5-cinematicdemo.jpg + + The Qt5 Cinematic Experience is a demo by "QUIt Coding", a small group of talented individuals + enjoying software development with cutting edge technologies. They are official members of the + Qt Ambassador Program. + + The demo shows off a number features of Qt Quick 2.0. A nicely styled list control of movie + covers with lighting effects, particles and transitions. The information roll-down curvy + curtain is implemented using inline GLSL in the QML file. + + More awesome looking Qt Quick examples are available from \l {http://quitcoding.com}. +*/ + +/*! + \example qt5-launchpresentation + \title Qt 5 Launch Presentation + \ingroup b2qt-demos + \brief A quick tour of what is new in Qt 5. + + \image b2qt-demo-qt5-launchpresentation.jpg + + This is an application written with Qt Quick, based on Qt 5. + + The source code is also available here: \l {https://qt.gitorious.org/qt-labs/qt5-launch-demo}. + The demo makes use of the QML Presentation System, available from + \c {ssh://codereview.qt-project.org/qt-labs/qml-presentation-system.git} repository. */ /*! @@ -85,21 +156,40 @@ \ingroup b2qt-demos \brief Highlights the versatility and cross-platform capability of Qt - The Qt 5 Everywhere demo shows how to use different user interface styles in several platforms and device types with one source code. + \image b2qt-demo-qt5-everywhere.jpg + + The Qt 5 Everywhere demo shows how to use different user interface styles in several platforms + and device types with one source code. + + The demo contains several Qt Quick 2 applications which you can launch by tapping the devices. */ /*! \example sensors \title Sensors \ingroup b2qt-demos - \brief Demostrates using the accelerometer and light sensors in a QML application. + \brief Demonstrates using the accelerometer and light sensors in a QML application. + + \image b2qt-demo-sensors.jpg + + Tilting the device moves the bubble around, based on readings from the accelerometer sensor. + For the light sensor, exposing the device to different lighting conditions changes the + displayed image. */ /*! \example textinput \title Text Input \ingroup b2qt-demos - \brief Demostrates text input capabilities and the virtual keyboard in a QML application. + \brief Demonstrates text input capabilities and the virtual keyboard in a QML application. + + \image b2qt-demo-textinput.jpg + + This example illustrates how to handle input on touch devices. + + The Boot to Qt stack comes with Qt Virtual Keyboard - a framework that consists of a C++ back + end with support for custom input methods, as well as a reference keyboard front end + implemented in QML, supporting multiple languages. */ /*! diff --git a/doc/b2qt-demos.qdocconf b/doc/b2qt-demos.qdocconf index ae55795..d1dec94 100644 --- a/doc/b2qt-demos.qdocconf +++ b/doc/b2qt-demos.qdocconf @@ -31,9 +31,8 @@ qhp.QtEnterpriseEmbeddedDemos.subprojects = demos qhp.QtEnterpriseEmbeddedDemos.subprojects.demos.title = Qt Enterprise Embedded Examples and Demos qhp.QtEnterpriseEmbeddedDemos.subprojects.demos.indexTitle = Qt Enterprise Embedded Examples and Demos -# Add a thumbnail for all examples manifestmeta.filters = thumbnail -manifestmeta.thumbnail.attributes = "imageUrl:qthelp\://com.digia.b2qt-demos.200/b2qt-demos/images/b2qt-demo.png" +#manifestmeta.thumbnail.attributes = "imageUrl:qthelp\://com.digia.b2qt-demos.200/b2qt-demos/images/b2qt-demo.png" manifestmeta.thumbnail.tags = "b2qt,qtee" manifestmeta.thumbnail.names = "QtEnterpriseEmbeddedDemos/*" diff --git a/doc/images/b2qt-demo-about-b2qt.jpg b/doc/images/b2qt-demo-about-b2qt.jpg new file mode 100644 index 0000000..f2eb2e0 Binary files /dev/null and b/doc/images/b2qt-demo-about-b2qt.jpg differ diff --git a/doc/images/b2qt-demo-camera.jpg b/doc/images/b2qt-demo-camera.jpg new file mode 100644 index 0000000..3f15310 Binary files /dev/null and b/doc/images/b2qt-demo-camera.jpg differ diff --git a/doc/images/b2qt-demo-controls-touch.jpg b/doc/images/b2qt-demo-controls-touch.jpg new file mode 100644 index 0000000..c57eac3 Binary files /dev/null and b/doc/images/b2qt-demo-controls-touch.jpg differ diff --git a/doc/images/b2qt-demo-graphicaleffects.jpg b/doc/images/b2qt-demo-graphicaleffects.jpg new file mode 100644 index 0000000..80fbbd5 Binary files /dev/null and b/doc/images/b2qt-demo-graphicaleffects.jpg differ diff --git a/doc/images/b2qt-demo-mediaplayer.jpg b/doc/images/b2qt-demo-mediaplayer.jpg new file mode 100644 index 0000000..0fff215 Binary files /dev/null and b/doc/images/b2qt-demo-mediaplayer.jpg differ diff --git a/doc/images/b2qt-demo-photogallery.jpg b/doc/images/b2qt-demo-photogallery.jpg new file mode 100644 index 0000000..0b67f1d Binary files /dev/null and b/doc/images/b2qt-demo-photogallery.jpg differ diff --git a/doc/images/b2qt-demo-qt5-cinematicdemo.jpg b/doc/images/b2qt-demo-qt5-cinematicdemo.jpg new file mode 100644 index 0000000..21bb2f9 Binary files /dev/null and b/doc/images/b2qt-demo-qt5-cinematicdemo.jpg differ diff --git a/doc/images/b2qt-demo-qt5-everywhere.jpg b/doc/images/b2qt-demo-qt5-everywhere.jpg new file mode 100644 index 0000000..1bb40bf Binary files /dev/null and b/doc/images/b2qt-demo-qt5-everywhere.jpg differ diff --git a/doc/images/b2qt-demo-qt5-launchpresentation.jpg b/doc/images/b2qt-demo-qt5-launchpresentation.jpg new file mode 100644 index 0000000..8decd76 Binary files /dev/null and b/doc/images/b2qt-demo-qt5-launchpresentation.jpg differ diff --git a/doc/images/b2qt-demo-qt5-particlesdemo.jpg b/doc/images/b2qt-demo-qt5-particlesdemo.jpg new file mode 100644 index 0000000..fa0db59 Binary files /dev/null and b/doc/images/b2qt-demo-qt5-particlesdemo.jpg differ diff --git a/doc/images/b2qt-demo-sensorexplorer.jpg b/doc/images/b2qt-demo-sensorexplorer.jpg new file mode 100644 index 0000000..b0469e5 Binary files /dev/null and b/doc/images/b2qt-demo-sensorexplorer.jpg differ diff --git a/doc/images/b2qt-demo-sensors.jpg b/doc/images/b2qt-demo-sensors.jpg new file mode 100644 index 0000000..7ce979d Binary files /dev/null and b/doc/images/b2qt-demo-sensors.jpg differ diff --git a/doc/images/b2qt-demo-textinput.jpg b/doc/images/b2qt-demo-textinput.jpg new file mode 100644 index 0000000..f415a86 Binary files /dev/null and b/doc/images/b2qt-demo-textinput.jpg differ -- cgit v1.2.3 From 7e7fefd2a1b1a5d40534da6792af6c9a2a18aa97 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 6 Feb 2014 15:02:27 +0100 Subject: Ensure common files are deployed when building demos stand-alone In addition to exporting the INSTALLS variable, we also need to export the files and their path to have correct deployment targets generated. Change-Id: I1e84cd5673f9a2e9f7d32ec237ca31f090e50e5f Reviewed-by: Eirik Aavitsland --- basicsuite/shared/shared.pri | 2 ++ 1 file changed, 2 insertions(+) diff --git a/basicsuite/shared/shared.pri b/basicsuite/shared/shared.pri index b785913..08f749e 100644 --- a/basicsuite/shared/shared.pri +++ b/basicsuite/shared/shared.pri @@ -15,6 +15,8 @@ defineTest(b2qtdemo_deploy_defaults) { commonFiles.path = $$DESTPATH OTHER_FILES += $${commonFiles.files} INSTALLS += commonFiles + export(commonFiles.files) + export(commonFiles.path) export(OTHER_FILES) export(INSTALLS) } -- cgit v1.2.3 From 0134eb7eec39e3e70014e77e086ab4a3de08b85d Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 5 Feb 2014 12:13:53 +0200 Subject: Exclude sensor demos from devices that don't have sensors Sensor demos make sense only on devices that have sensors, i.e., emulators and nexus7. Change-Id: I3c49cce9675a0e37e3b20f73b61fcd71e1b5baf9 Reviewed-by: Eirik Aavitsland --- basicsuite/sensorexplorer/exclude.txt | 1 + basicsuite/sensors/exclude.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 basicsuite/sensorexplorer/exclude.txt create mode 100644 basicsuite/sensors/exclude.txt diff --git a/basicsuite/sensorexplorer/exclude.txt b/basicsuite/sensorexplorer/exclude.txt new file mode 100644 index 0000000..e20e515 --- /dev/null +++ b/basicsuite/sensorexplorer/exclude.txt @@ -0,0 +1 @@ +android-beaglebone:android-iMX6:linux-iMX6:linux-raspberrypi:linux-beagleboard:linux-beaglebone diff --git a/basicsuite/sensors/exclude.txt b/basicsuite/sensors/exclude.txt new file mode 100644 index 0000000..e20e515 --- /dev/null +++ b/basicsuite/sensors/exclude.txt @@ -0,0 +1 @@ +android-beaglebone:android-iMX6:linux-iMX6:linux-raspberrypi:linux-beagleboard:linux-beaglebone -- cgit v1.2.3 From cc919f8de14d23ca4785b831f9bee677616a5196 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 6 Feb 2014 15:58:12 +0100 Subject: Doc: Add documentation for enterprise examples Add documentation for enterprise examples and make them run stand-alone. Change-Id: I579a57bd32c97649b6d619f73caa681174b56381 Reviewed-by: Eirik Aavitsland --- basicsuite/enterprise-charts/enterprise-charts.pro | 12 ++++++++ .../enterprise-dashboard/enterprise-dashboard.pro | 13 ++++++++ .../enterprise-gallery/enterprise-gallery.pro | 14 +++++++++ doc/b2qt-demos.qdoc | 34 +++++++++++++++++++++ doc/images/b2qt-demo-enterprise-charts.jpg | Bin 0 -> 11070 bytes doc/images/b2qt-demo-enterprise-dashboard.jpg | Bin 0 -> 11239 bytes doc/images/b2qt-demo-enterprise-gallery.jpg | Bin 0 -> 9016 bytes 7 files changed, 73 insertions(+) create mode 100644 basicsuite/enterprise-charts/enterprise-charts.pro create mode 100644 basicsuite/enterprise-dashboard/enterprise-dashboard.pro create mode 100644 basicsuite/enterprise-gallery/enterprise-gallery.pro create mode 100644 doc/images/b2qt-demo-enterprise-charts.jpg create mode 100644 doc/images/b2qt-demo-enterprise-dashboard.jpg create mode 100644 doc/images/b2qt-demo-enterprise-gallery.jpg diff --git a/basicsuite/enterprise-charts/enterprise-charts.pro b/basicsuite/enterprise-charts/enterprise-charts.pro new file mode 100644 index 0000000..13c41cf --- /dev/null +++ b/basicsuite/enterprise-charts/enterprise-charts.pro @@ -0,0 +1,12 @@ +TARGET = enterprise-charts + +include(../shared/shared.pri) +b2qtdemo_deploy_defaults() + +content.files = \ + *.qml +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/enterprise-dashboard/enterprise-dashboard.pro b/basicsuite/enterprise-dashboard/enterprise-dashboard.pro new file mode 100644 index 0000000..9fb29f2 --- /dev/null +++ b/basicsuite/enterprise-dashboard/enterprise-dashboard.pro @@ -0,0 +1,13 @@ +TARGET = enterprise-dashboard + +include(../shared/shared.pri) +b2qtdemo_deploy_defaults() + +content.files = \ + *.qml \ + images +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/basicsuite/enterprise-gallery/enterprise-gallery.pro b/basicsuite/enterprise-gallery/enterprise-gallery.pro new file mode 100644 index 0000000..3601432 --- /dev/null +++ b/basicsuite/enterprise-gallery/enterprise-gallery.pro @@ -0,0 +1,14 @@ +TARGET = enterprise-gallery + +include(../shared/shared.pri) +b2qtdemo_deploy_defaults() + +content.files = \ + *.qml \ + fonts \ + images +content.path = $$DESTPATH + +OTHER_FILES += $${content.files} + +INSTALLS += target content \ No newline at end of file diff --git a/doc/b2qt-demos.qdoc b/doc/b2qt-demos.qdoc index 4b41067..704561b 100644 --- a/doc/b2qt-demos.qdoc +++ b/doc/b2qt-demos.qdoc @@ -192,6 +192,40 @@ implemented in QML, supporting multiple languages. */ +/*! + \example enterprise-charts + \title Charts + \ingroup b2qt-demos + \brief Showcases the different types of charts available from the Qt Charts library. + + \image b2qt-demo-enterprise-charts.jpg + + Qt Charts is part of the Qt Enterprise addons package which provides a set of easy to use + chart components. This demo showcases the different charts that are available as QML types. +*/ + +/*! + \example enterprise-dashboard + \title Dashboard + \ingroup b2qt-demos + \brief A car dashboard created using Qt Quick Enterprise Controls. + + \image b2qt-demo-enterprise-dashboard.jpg + + This example project demonstrates using several CircularGauge controls to create a car dashboard. +*/ + +/*! + \example enterprise-gallery + \title Enterprise Controls Gallery + \ingroup b2qt-demos + \brief An interactive showcase for Qt Quick Enterprise Controls. + + \image b2qt-demo-enterprise-gallery.jpg + + This example project demonstrates the various UI controls provided by Qt Quick Enterprise Controls. +*/ + /*! \omit \example launchersettings diff --git a/doc/images/b2qt-demo-enterprise-charts.jpg b/doc/images/b2qt-demo-enterprise-charts.jpg new file mode 100644 index 0000000..2776b0b Binary files /dev/null and b/doc/images/b2qt-demo-enterprise-charts.jpg differ diff --git a/doc/images/b2qt-demo-enterprise-dashboard.jpg b/doc/images/b2qt-demo-enterprise-dashboard.jpg new file mode 100644 index 0000000..eb2e3b5 Binary files /dev/null and b/doc/images/b2qt-demo-enterprise-dashboard.jpg differ diff --git a/doc/images/b2qt-demo-enterprise-gallery.jpg b/doc/images/b2qt-demo-enterprise-gallery.jpg new file mode 100644 index 0000000..8ddcad8 Binary files /dev/null and b/doc/images/b2qt-demo-enterprise-gallery.jpg differ -- cgit v1.2.3 From 779108c8dac9c101610cca8a82ecea4f11c1445d Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 12 Feb 2014 12:11:36 +0100 Subject: Fix license issues in demo sources Change-Id: I6c87139bb729f2970ae22d7ef92688de647f8e3c Reviewed-by: Eirik Aavitsland --- basicsuite/qt5-cinematicdemo/README | 2 +- basicsuite/textinput/ScrollBar.qml | 13 +++++++------ basicsuite/textinput/TextArea.qml | 13 +++++++------ basicsuite/textinput/TextBase.qml | 13 +++++++------ basicsuite/textinput/TextField.qml | 13 +++++++------ basicsuite/textinput/main.qml | 15 ++++++++------- 6 files changed, 37 insertions(+), 32 deletions(-) diff --git a/basicsuite/qt5-cinematicdemo/README b/basicsuite/qt5-cinematicdemo/README index 1f16c7e..37ef43e 100644 --- a/basicsuite/qt5-cinematicdemo/README +++ b/basicsuite/qt5-cinematicdemo/README @@ -44,6 +44,6 @@ License. http://creativecommons.org/licenses/by/3.0/ No attribution required, but feel free to mention us or contact info@quitcoding.com -Qt, and the Qt logo are trademarks of Nokia Corporation +Qt, and the Qt logo are trademarks of Digia Plc. Movie reviews copyright © IMDb.com DVD cover icons from http://www.iconarchive.com diff --git a/basicsuite/textinput/ScrollBar.qml b/basicsuite/textinput/ScrollBar.qml index e6a8143..93a89e9 100644 --- a/basicsuite/textinput/ScrollBar.qml +++ b/basicsuite/textinput/ScrollBar.qml @@ -1,9 +1,10 @@ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the examples of the Qt Enterprise Embedded. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -17,10 +18,10 @@ ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/basicsuite/textinput/TextArea.qml b/basicsuite/textinput/TextArea.qml index cf337f6..430a3ad 100644 --- a/basicsuite/textinput/TextArea.qml +++ b/basicsuite/textinput/TextArea.qml @@ -1,9 +1,10 @@ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the examples of the Qt Enterprise Embedded. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -17,10 +18,10 @@ ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/basicsuite/textinput/TextBase.qml b/basicsuite/textinput/TextBase.qml index a26c6c6..7256af7 100644 --- a/basicsuite/textinput/TextBase.qml +++ b/basicsuite/textinput/TextBase.qml @@ -1,9 +1,10 @@ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the examples of the Qt Enterprise Embedded. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -17,10 +18,10 @@ ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/basicsuite/textinput/TextField.qml b/basicsuite/textinput/TextField.qml index aa6768e..c780962 100644 --- a/basicsuite/textinput/TextField.qml +++ b/basicsuite/textinput/TextField.qml @@ -1,9 +1,10 @@ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the examples of the Qt Enterprise Embedded. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -17,10 +18,10 @@ ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/basicsuite/textinput/main.qml b/basicsuite/textinput/main.qml index b67d960..263de12 100644 --- a/basicsuite/textinput/main.qml +++ b/basicsuite/textinput/main.qml @@ -1,9 +1,10 @@ /**************************************************************************** ** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: For any questions to Digia, please use the contact form at +** http://qt.digia.com/ ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the examples of the Qt Enterprise Embedded. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: @@ -17,10 +18,10 @@ ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- cgit v1.2.3 From f21ed3e486d813ff56571330e5ccfae2421a420f Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 12 Feb 2014 11:32:22 +0100 Subject: Limit camera & mediaplayer demos to working devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I81d3f3a7e142eb0f5f0fef251de7daa9a3f7a7a9 Reviewed-by: Topi Reiniö --- basicsuite/camera/exclude.txt | 9 ++++++++- basicsuite/mediaplayer/exclude.txt | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/basicsuite/camera/exclude.txt b/basicsuite/camera/exclude.txt index 5716448..b481e58 100644 --- a/basicsuite/camera/exclude.txt +++ b/basicsuite/camera/exclude.txt @@ -1 +1,8 @@ -android-beagleboard:linux-iMX6:linux-raspberrypi: +android-beaglebone +android-iMX6 +android-emulator +linux-beagleboard +linux-beaglebone +linux-iMX6 +linux-raspberrypi +linux-emulator diff --git a/basicsuite/mediaplayer/exclude.txt b/basicsuite/mediaplayer/exclude.txt index 952c994..565a2f5 100644 --- a/basicsuite/mediaplayer/exclude.txt +++ b/basicsuite/mediaplayer/exclude.txt @@ -1 +1,2 @@ -android-beagleboard: +android-beaglebone +android-emulator -- cgit v1.2.3 From 9fc7566c002dfd378f3dd0b94b349319e27959c0 Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 12 Feb 2014 13:44:10 +0100 Subject: Update copyright year MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I55381dedffc4d86bc25b0c3f6ef18230d70272ee Reviewed-by: Topi Reiniö --- basicsuite/about-b2qt/AboutBoot2Qt.qml | 2 +- basicsuite/about-b2qt/Box.qml | 2 +- basicsuite/about-b2qt/ContentText.qml | 2 +- basicsuite/about-b2qt/QtForAndroid.qml | 2 +- basicsuite/about-b2qt/QtFramework.qml | 2 +- basicsuite/about-b2qt/Title.qml | 2 +- basicsuite/about-b2qt/main.qml | 2 +- basicsuite/camera/CameraControlButton.qml | 2 +- basicsuite/camera/CameraSetting.qml | 2 +- basicsuite/camera/CaptureControl.qml | 2 +- basicsuite/camera/CapturePreview.qml | 2 +- basicsuite/camera/Controls.qml | 2 +- basicsuite/camera/FocusControl.qml | 2 +- basicsuite/camera/Picker.qml | 2 +- basicsuite/camera/RecordingTime.qml | 2 +- basicsuite/camera/Slider.qml | 2 +- basicsuite/camera/ZoomControl.qml | 2 +- basicsuite/camera/camerautils/camerautils.cpp | 2 +- basicsuite/camera/camerautils/camerautils.h | 2 +- basicsuite/camera/camerautils/plugin.cpp | 2 +- basicsuite/camera/main.qml | 2 +- basicsuite/controls-touch/content/AndroidDelegate.qml | 2 +- basicsuite/controls-touch/content/ButtonPage.qml | 2 +- basicsuite/controls-touch/content/ProgressBarPage.qml | 2 +- basicsuite/controls-touch/content/SliderPage.qml | 2 +- basicsuite/controls-touch/content/TabBarPage.qml | 2 +- basicsuite/controls-touch/content/TextInputPage.qml | 2 +- basicsuite/controls-touch/main.qml | 2 +- basicsuite/enterprise-charts/View1.qml | 2 +- basicsuite/enterprise-charts/View10.qml | 2 +- basicsuite/enterprise-charts/View11.qml | 2 +- basicsuite/enterprise-charts/View12.qml | 2 +- basicsuite/enterprise-charts/View13.qml | 2 +- basicsuite/enterprise-charts/View14.qml | 2 +- basicsuite/enterprise-charts/View15.qml | 2 +- basicsuite/enterprise-charts/View2.qml | 2 +- basicsuite/enterprise-charts/View3.qml | 2 +- basicsuite/enterprise-charts/View4.qml | 2 +- basicsuite/enterprise-charts/View5.qml | 2 +- basicsuite/enterprise-charts/View6.qml | 2 +- basicsuite/enterprise-charts/View7.qml | 2 +- basicsuite/enterprise-charts/View8.qml | 2 +- basicsuite/enterprise-charts/View9.qml | 2 +- basicsuite/enterprise-charts/loader.qml | 2 +- basicsuite/enterprise-charts/main.qml | 2 +- basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml | 2 +- basicsuite/enterprise-dashboard/IconGaugeStyle.qml | 2 +- basicsuite/enterprise-dashboard/TachometerStyle.qml | 2 +- basicsuite/enterprise-dashboard/TurnIndicator.qml | 2 +- basicsuite/enterprise-dashboard/ValueSource.qml | 2 +- basicsuite/enterprise-dashboard/main.qml | 2 +- basicsuite/enterprise-gallery/BlackButtonBackground.qml | 2 +- basicsuite/enterprise-gallery/BlackButtonStyle.qml | 2 +- basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml | 2 +- basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml | 2 +- basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml | 2 +- basicsuite/enterprise-gallery/CircularGaugeView.qml | 2 +- basicsuite/enterprise-gallery/ControlView.qml | 2 +- basicsuite/enterprise-gallery/ControlViewToolbar.qml | 2 +- basicsuite/enterprise-gallery/CustomizerCheckBox.qml | 2 +- basicsuite/enterprise-gallery/CustomizerLabel.qml | 2 +- basicsuite/enterprise-gallery/CustomizerSlider.qml | 2 +- basicsuite/enterprise-gallery/FlickableMoreIndicator.qml | 2 +- basicsuite/enterprise-gallery/PieMenuControlView.qml | 2 +- basicsuite/enterprise-gallery/PieMenuDarkStyle.qml | 2 +- basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml | 2 +- basicsuite/enterprise-gallery/StylePicker.qml | 2 +- basicsuite/enterprise-gallery/main.qml | 2 +- basicsuite/graphicaleffects/Checkers.qml | 2 +- basicsuite/graphicaleffects/effect_BrightnessContrast.qml | 2 +- basicsuite/graphicaleffects/effect_Colorize.qml | 2 +- basicsuite/graphicaleffects/effect_CustomDissolve.qml | 2 +- basicsuite/graphicaleffects/effect_CustomWave.qml | 2 +- basicsuite/graphicaleffects/effect_Displacement.qml | 2 +- basicsuite/graphicaleffects/effect_DropShadow.qml | 2 +- basicsuite/graphicaleffects/effect_GaussianBlur.qml | 2 +- basicsuite/graphicaleffects/effect_Glow.qml | 2 +- basicsuite/graphicaleffects/effect_HueSaturation.qml | 2 +- basicsuite/graphicaleffects/effect_OpacityMask.qml | 2 +- basicsuite/graphicaleffects/effect_ThresholdMask.qml | 2 +- basicsuite/graphicaleffects/main.qml | 2 +- basicsuite/mediaplayer/ControlBar.qml | 2 +- basicsuite/mediaplayer/ImageButton.qml | 2 +- basicsuite/mediaplayer/Intro.qml | 2 +- basicsuite/mediaplayer/MetadataView.qml | 2 +- basicsuite/mediaplayer/PlaybackControl.qml | 2 +- basicsuite/mediaplayer/SeekControl.qml | 2 +- basicsuite/mediaplayer/Slider.qml | 2 +- basicsuite/mediaplayer/UrlBar.qml | 2 +- basicsuite/mediaplayer/VolumeControl.qml | 2 +- basicsuite/photogallery/main.qml | 2 +- basicsuite/qt5-everywhere/Button.qml | 2 +- basicsuite/qt5-everywhere/Cloud.qml | 2 +- basicsuite/qt5-everywhere/DialogButton.qml | 2 +- basicsuite/qt5-everywhere/Element.qml | 2 +- basicsuite/qt5-everywhere/Group.qml | 2 +- basicsuite/qt5-everywhere/HelpScreen.qml | 2 +- basicsuite/qt5-everywhere/IslandElementContainer.qml | 2 +- basicsuite/qt5-everywhere/NavigationPanel.qml | 2 +- basicsuite/qt5-everywhere/QuitDialog.qml | 2 +- basicsuite/qt5-everywhere/Slide.qml | 2 +- basicsuite/qt5-everywhere/SplashScreen.qml | 2 +- basicsuite/qt5-everywhere/WorldCanvas.qml | 2 +- basicsuite/qt5-everywhere/WorldMouseArea.qml | 2 +- basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml | 2 +- basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml | 2 +- basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml | 2 +- basicsuite/qt5-everywhere/demos/gridrssnews/main.qml | 2 +- basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js | 2 +- basicsuite/qt5-everywhere/demos/heartmonitor/main.qml | 2 +- basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml | 2 +- basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml | 2 +- basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml | 2 +- basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml | 2 +- basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml | 2 +- basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml | 2 +- basicsuite/qt5-everywhere/demos/radio/radio.qml | 2 +- basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml | 2 +- basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml | 2 +- basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml | 2 +- basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml | 2 +- basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml | 2 +- basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/Block.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/Button.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/PrimaryPack.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/PuzzleBlock.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/SimpleBlock.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/SmokeText.qml | 2 +- .../qt5-everywhere/demos/samegame/content/levels/TemplateBase.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/levels/level0.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml | 2 +- basicsuite/qt5-everywhere/demos/samegame/content/samegame.js | 2 +- basicsuite/qt5-everywhere/demos/samegame/samegame.qml | 2 +- basicsuite/qt5-everywhere/demos/shaders/Logo.qml | 2 +- basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml | 2 +- basicsuite/qt5-everywhere/demos/shaders/Slider.qml | 2 +- basicsuite/qt5-everywhere/demos/shaders/import/main.cpp | 2 +- basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp | 2 +- basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h | 2 +- .../qt5-everywhere/demos/touchgallery/content/AndroidDelegate.qml | 2 +- basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml | 2 +- .../qt5-everywhere/demos/touchgallery/content/CustomAppWindow.qml | 2 +- .../qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml | 2 +- basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml | 2 +- basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml | 2 +- basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml | 2 +- basicsuite/qt5-everywhere/demos/touchgallery/main.qml | 2 +- basicsuite/qt5-everywhere/demos/video/ControlBar.qml | 2 +- basicsuite/qt5-everywhere/demos/video/ImageButton.qml | 2 +- basicsuite/qt5-everywhere/demos/video/PlaybackControl.qml | 2 +- basicsuite/qt5-everywhere/demos/video/ScrollBar.qml | 2 +- basicsuite/qt5-everywhere/demos/video/SeekControl.qml | 2 +- basicsuite/qt5-everywhere/demos/video/Slider.qml | 2 +- basicsuite/qt5-everywhere/demos/video/VideoDelegate.qml | 2 +- basicsuite/qt5-everywhere/demos/video/VideoSelector.qml | 2 +- basicsuite/qt5-everywhere/demos/video/VolumeControl.qml | 2 +- basicsuite/qt5-everywhere/engine.js | 2 +- basicsuite/qt5-everywhere/main.qml | 2 +- basicsuite/qt5-everywhere/style.js | 2 +- basicsuite/qt5-launchpresentation/WebKitSlideContent.qml | 2 +- basicsuite/qt5-launchpresentation/WebkitSlide.qml | 2 +- basicsuite/qt5-particlesdemo/content/burstandpulse.qml | 2 +- basicsuite/qt5-particlesdemo/content/customemitter.qml | 2 +- basicsuite/qt5-particlesdemo/content/emitmask.qml | 2 +- basicsuite/qt5-particlesdemo/content/maximumemitted.qml | 2 +- basicsuite/qt5-particlesdemo/content/shapeanddirection.qml | 2 +- basicsuite/qt5-particlesdemo/content/trailemitter.qml | 2 +- basicsuite/qt5-particlesdemo/content/velocityfrommotion.qml | 2 +- basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc | 2 +- basicsuite/qt5-particlesdemo/main.cpp | 2 +- basicsuite/qt5-particlesdemo/main.qml | 2 +- basicsuite/qt5-particlesdemo/shared/Button.qml | 2 +- basicsuite/qt5-particlesdemo/shared/LauncherList.qml | 2 +- basicsuite/qt5-particlesdemo/shared/SimpleLauncherDelegate.qml | 2 +- basicsuite/qt5-particlesdemo/shared/shared.h | 2 +- basicsuite/sensors/Accelbubble.qml | 2 +- basicsuite/sensors/Light.qml | 2 +- basicsuite/sensors/main.qml | 2 +- basicsuite/shared/engine.cpp | 2 +- basicsuite/shared/engine.h | 2 +- basicsuite/shared/main.cpp | 2 +- basicsuite/textinput/ScrollBar.qml | 2 +- basicsuite/textinput/TextArea.qml | 2 +- basicsuite/textinput/TextBase.qml | 2 +- basicsuite/textinput/TextField.qml | 2 +- basicsuite/textinput/main.qml | 2 +- doc/b2qt-demos.qdoc | 2 +- doc/html-offline.qdocconf | 2 +- experimental/Overlay Tester/main.qml | 2 +- experimental/qt5-intro-android/WebKitSlideContent.qml | 2 +- experimental/qt5-intro-android/WebkitSlide.qml | 2 +- experimental/qt5-intro-android/main.cpp | 2 +- 206 files changed, 206 insertions(+), 206 deletions(-) diff --git a/basicsuite/about-b2qt/AboutBoot2Qt.qml b/basicsuite/about-b2qt/AboutBoot2Qt.qml index b97ac3b..f9859ee 100644 --- a/basicsuite/about-b2qt/AboutBoot2Qt.qml +++ b/basicsuite/about-b2qt/AboutBoot2Qt.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/about-b2qt/Box.qml b/basicsuite/about-b2qt/Box.qml index 283ed9f..ab6e971 100644 --- a/basicsuite/about-b2qt/Box.qml +++ b/basicsuite/about-b2qt/Box.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/about-b2qt/ContentText.qml b/basicsuite/about-b2qt/ContentText.qml index 55d3e36..ec4b791 100644 --- a/basicsuite/about-b2qt/ContentText.qml +++ b/basicsuite/about-b2qt/ContentText.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/about-b2qt/QtForAndroid.qml b/basicsuite/about-b2qt/QtForAndroid.qml index 9c1aa38..7e53e2f 100644 --- a/basicsuite/about-b2qt/QtForAndroid.qml +++ b/basicsuite/about-b2qt/QtForAndroid.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/about-b2qt/QtFramework.qml b/basicsuite/about-b2qt/QtFramework.qml index 7085469..70c6c6e 100644 --- a/basicsuite/about-b2qt/QtFramework.qml +++ b/basicsuite/about-b2qt/QtFramework.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/about-b2qt/Title.qml b/basicsuite/about-b2qt/Title.qml index 62d0ba7..0f7f792 100644 --- a/basicsuite/about-b2qt/Title.qml +++ b/basicsuite/about-b2qt/Title.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/about-b2qt/main.qml b/basicsuite/about-b2qt/main.qml index ba726d5..865aca4 100644 --- a/basicsuite/about-b2qt/main.qml +++ b/basicsuite/about-b2qt/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/CameraControlButton.qml b/basicsuite/camera/CameraControlButton.qml index a740be7..f0dc438 100644 --- a/basicsuite/camera/CameraControlButton.qml +++ b/basicsuite/camera/CameraControlButton.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/CameraSetting.qml b/basicsuite/camera/CameraSetting.qml index 0912c38..bf8fb6b 100644 --- a/basicsuite/camera/CameraSetting.qml +++ b/basicsuite/camera/CameraSetting.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/CaptureControl.qml b/basicsuite/camera/CaptureControl.qml index 7d09151..5a14e4e 100644 --- a/basicsuite/camera/CaptureControl.qml +++ b/basicsuite/camera/CaptureControl.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/CapturePreview.qml b/basicsuite/camera/CapturePreview.qml index 64c5f79..db01ca4 100644 --- a/basicsuite/camera/CapturePreview.qml +++ b/basicsuite/camera/CapturePreview.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/Controls.qml b/basicsuite/camera/Controls.qml index bd0db07..cc1e1ad 100644 --- a/basicsuite/camera/Controls.qml +++ b/basicsuite/camera/Controls.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/FocusControl.qml b/basicsuite/camera/FocusControl.qml index 5245cfe..83fd2fe 100644 --- a/basicsuite/camera/FocusControl.qml +++ b/basicsuite/camera/FocusControl.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/Picker.qml b/basicsuite/camera/Picker.qml index 9cbf27f..e29d70f 100644 --- a/basicsuite/camera/Picker.qml +++ b/basicsuite/camera/Picker.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/RecordingTime.qml b/basicsuite/camera/RecordingTime.qml index 2156b74..941f76a 100644 --- a/basicsuite/camera/RecordingTime.qml +++ b/basicsuite/camera/RecordingTime.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/Slider.qml b/basicsuite/camera/Slider.qml index a9d3c10..18853ad 100644 --- a/basicsuite/camera/Slider.qml +++ b/basicsuite/camera/Slider.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/ZoomControl.qml b/basicsuite/camera/ZoomControl.qml index 15f2875..0c1cbdd 100644 --- a/basicsuite/camera/ZoomControl.qml +++ b/basicsuite/camera/ZoomControl.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/camerautils/camerautils.cpp b/basicsuite/camera/camerautils/camerautils.cpp index f6b6672..9e890d5 100644 --- a/basicsuite/camera/camerautils/camerautils.cpp +++ b/basicsuite/camera/camerautils/camerautils.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/camerautils/camerautils.h b/basicsuite/camera/camerautils/camerautils.h index 1f61c7c..67c5b0d 100644 --- a/basicsuite/camera/camerautils/camerautils.h +++ b/basicsuite/camera/camerautils/camerautils.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/camera/camerautils/plugin.cpp b/basicsuite/camera/camerautils/plugin.cpp index 2a8c3ea..5e74e71 100644 --- a/basicsuite/camera/camerautils/plugin.cpp +++ b/basicsuite/camera/camerautils/plugin.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/camera/main.qml b/basicsuite/camera/main.qml index b7437de..a0cf449 100644 --- a/basicsuite/camera/main.qml +++ b/basicsuite/camera/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/controls-touch/content/AndroidDelegate.qml b/basicsuite/controls-touch/content/AndroidDelegate.qml index 36a439a..e4870cc 100644 --- a/basicsuite/controls-touch/content/AndroidDelegate.qml +++ b/basicsuite/controls-touch/content/AndroidDelegate.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/controls-touch/content/ButtonPage.qml b/basicsuite/controls-touch/content/ButtonPage.qml index f431a52..e315d72 100644 --- a/basicsuite/controls-touch/content/ButtonPage.qml +++ b/basicsuite/controls-touch/content/ButtonPage.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/controls-touch/content/ProgressBarPage.qml b/basicsuite/controls-touch/content/ProgressBarPage.qml index dc0f552..d370d39 100644 --- a/basicsuite/controls-touch/content/ProgressBarPage.qml +++ b/basicsuite/controls-touch/content/ProgressBarPage.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/controls-touch/content/SliderPage.qml b/basicsuite/controls-touch/content/SliderPage.qml index 8eb9190..eb5d70c 100644 --- a/basicsuite/controls-touch/content/SliderPage.qml +++ b/basicsuite/controls-touch/content/SliderPage.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/controls-touch/content/TabBarPage.qml b/basicsuite/controls-touch/content/TabBarPage.qml index 7651a3c..f13ab78 100644 --- a/basicsuite/controls-touch/content/TabBarPage.qml +++ b/basicsuite/controls-touch/content/TabBarPage.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/controls-touch/content/TextInputPage.qml b/basicsuite/controls-touch/content/TextInputPage.qml index 605afef..058ff53 100644 --- a/basicsuite/controls-touch/content/TextInputPage.qml +++ b/basicsuite/controls-touch/content/TextInputPage.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/controls-touch/main.qml b/basicsuite/controls-touch/main.qml index e4d2562..929f31e 100644 --- a/basicsuite/controls-touch/main.qml +++ b/basicsuite/controls-touch/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/enterprise-charts/View1.qml b/basicsuite/enterprise-charts/View1.qml index 308cacd..e3850ae 100644 --- a/basicsuite/enterprise-charts/View1.qml +++ b/basicsuite/enterprise-charts/View1.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View10.qml b/basicsuite/enterprise-charts/View10.qml index 2074b70..2a5a297 100644 --- a/basicsuite/enterprise-charts/View10.qml +++ b/basicsuite/enterprise-charts/View10.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View11.qml b/basicsuite/enterprise-charts/View11.qml index 27166fa..2b2d444 100644 --- a/basicsuite/enterprise-charts/View11.qml +++ b/basicsuite/enterprise-charts/View11.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View12.qml b/basicsuite/enterprise-charts/View12.qml index 4bf89aa..2a0dc55 100644 --- a/basicsuite/enterprise-charts/View12.qml +++ b/basicsuite/enterprise-charts/View12.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View13.qml b/basicsuite/enterprise-charts/View13.qml index 1f6aec1..1322e97 100644 --- a/basicsuite/enterprise-charts/View13.qml +++ b/basicsuite/enterprise-charts/View13.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View14.qml b/basicsuite/enterprise-charts/View14.qml index bae0e8a..e6662a1 100644 --- a/basicsuite/enterprise-charts/View14.qml +++ b/basicsuite/enterprise-charts/View14.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View15.qml b/basicsuite/enterprise-charts/View15.qml index 57db474..74d9789 100644 --- a/basicsuite/enterprise-charts/View15.qml +++ b/basicsuite/enterprise-charts/View15.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View2.qml b/basicsuite/enterprise-charts/View2.qml index 698bd2d..a7e0ace 100644 --- a/basicsuite/enterprise-charts/View2.qml +++ b/basicsuite/enterprise-charts/View2.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View3.qml b/basicsuite/enterprise-charts/View3.qml index 88974de..d56ceeb 100644 --- a/basicsuite/enterprise-charts/View3.qml +++ b/basicsuite/enterprise-charts/View3.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View4.qml b/basicsuite/enterprise-charts/View4.qml index fc5c539..5ca5906 100644 --- a/basicsuite/enterprise-charts/View4.qml +++ b/basicsuite/enterprise-charts/View4.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View5.qml b/basicsuite/enterprise-charts/View5.qml index 6077816..4b0882c 100644 --- a/basicsuite/enterprise-charts/View5.qml +++ b/basicsuite/enterprise-charts/View5.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View6.qml b/basicsuite/enterprise-charts/View6.qml index 1ce795a..b9db3ac 100644 --- a/basicsuite/enterprise-charts/View6.qml +++ b/basicsuite/enterprise-charts/View6.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View7.qml b/basicsuite/enterprise-charts/View7.qml index 99776b7..998097a 100644 --- a/basicsuite/enterprise-charts/View7.qml +++ b/basicsuite/enterprise-charts/View7.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View8.qml b/basicsuite/enterprise-charts/View8.qml index cad360d..fcb8a72 100644 --- a/basicsuite/enterprise-charts/View8.qml +++ b/basicsuite/enterprise-charts/View8.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/View9.qml b/basicsuite/enterprise-charts/View9.qml index 0f5796d..5ba3d36 100644 --- a/basicsuite/enterprise-charts/View9.qml +++ b/basicsuite/enterprise-charts/View9.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/loader.qml b/basicsuite/enterprise-charts/loader.qml index 080fce6..f9b7569 100644 --- a/basicsuite/enterprise-charts/loader.qml +++ b/basicsuite/enterprise-charts/loader.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-charts/main.qml b/basicsuite/enterprise-charts/main.qml index b3c02e3..10376c8 100644 --- a/basicsuite/enterprise-charts/main.qml +++ b/basicsuite/enterprise-charts/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml b/basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml index 109351c..7958fca 100644 --- a/basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml +++ b/basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-dashboard/IconGaugeStyle.qml b/basicsuite/enterprise-dashboard/IconGaugeStyle.qml index 32092d7..0b24351 100644 --- a/basicsuite/enterprise-dashboard/IconGaugeStyle.qml +++ b/basicsuite/enterprise-dashboard/IconGaugeStyle.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-dashboard/TachometerStyle.qml b/basicsuite/enterprise-dashboard/TachometerStyle.qml index e601dbb..c4649da 100644 --- a/basicsuite/enterprise-dashboard/TachometerStyle.qml +++ b/basicsuite/enterprise-dashboard/TachometerStyle.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-dashboard/TurnIndicator.qml b/basicsuite/enterprise-dashboard/TurnIndicator.qml index 576b811..9dd7d5f 100644 --- a/basicsuite/enterprise-dashboard/TurnIndicator.qml +++ b/basicsuite/enterprise-dashboard/TurnIndicator.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-dashboard/ValueSource.qml b/basicsuite/enterprise-dashboard/ValueSource.qml index 10f6ee2..6bd1952 100644 --- a/basicsuite/enterprise-dashboard/ValueSource.qml +++ b/basicsuite/enterprise-dashboard/ValueSource.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-dashboard/main.qml b/basicsuite/enterprise-dashboard/main.qml index 5fbbb64..da5f296 100644 --- a/basicsuite/enterprise-dashboard/main.qml +++ b/basicsuite/enterprise-dashboard/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/BlackButtonBackground.qml b/basicsuite/enterprise-gallery/BlackButtonBackground.qml index 084d4e5..008668f 100644 --- a/basicsuite/enterprise-gallery/BlackButtonBackground.qml +++ b/basicsuite/enterprise-gallery/BlackButtonBackground.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/BlackButtonStyle.qml b/basicsuite/enterprise-gallery/BlackButtonStyle.qml index dde237f..73f6373 100644 --- a/basicsuite/enterprise-gallery/BlackButtonStyle.qml +++ b/basicsuite/enterprise-gallery/BlackButtonStyle.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml index 34991f9..fb85f86 100644 --- a/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml +++ b/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml index 3340bf3..7aec7b6 100644 --- a/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml +++ b/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml index fbd71d7..7d00c1f 100644 --- a/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml +++ b/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/CircularGaugeView.qml b/basicsuite/enterprise-gallery/CircularGaugeView.qml index f72fc2f..92ee6c5 100644 --- a/basicsuite/enterprise-gallery/CircularGaugeView.qml +++ b/basicsuite/enterprise-gallery/CircularGaugeView.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/ControlView.qml b/basicsuite/enterprise-gallery/ControlView.qml index 17f5784..2c6a7cf 100644 --- a/basicsuite/enterprise-gallery/ControlView.qml +++ b/basicsuite/enterprise-gallery/ControlView.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/ControlViewToolbar.qml b/basicsuite/enterprise-gallery/ControlViewToolbar.qml index f23b2d2..5aac041 100644 --- a/basicsuite/enterprise-gallery/ControlViewToolbar.qml +++ b/basicsuite/enterprise-gallery/ControlViewToolbar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/CustomizerCheckBox.qml b/basicsuite/enterprise-gallery/CustomizerCheckBox.qml index 9426dc6..542e09a 100644 --- a/basicsuite/enterprise-gallery/CustomizerCheckBox.qml +++ b/basicsuite/enterprise-gallery/CustomizerCheckBox.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/CustomizerLabel.qml b/basicsuite/enterprise-gallery/CustomizerLabel.qml index c830832..c4cb69c 100644 --- a/basicsuite/enterprise-gallery/CustomizerLabel.qml +++ b/basicsuite/enterprise-gallery/CustomizerLabel.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/CustomizerSlider.qml b/basicsuite/enterprise-gallery/CustomizerSlider.qml index b98c06d..fb09a17 100644 --- a/basicsuite/enterprise-gallery/CustomizerSlider.qml +++ b/basicsuite/enterprise-gallery/CustomizerSlider.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml b/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml index c935de2..c8b9fe5 100644 --- a/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml +++ b/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/PieMenuControlView.qml b/basicsuite/enterprise-gallery/PieMenuControlView.qml index 91dae94..cba341b 100644 --- a/basicsuite/enterprise-gallery/PieMenuControlView.qml +++ b/basicsuite/enterprise-gallery/PieMenuControlView.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml b/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml index fa2a638..354775d 100644 --- a/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml +++ b/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml b/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml index 2f43dd1..1ad8480 100644 --- a/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml +++ b/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/StylePicker.qml b/basicsuite/enterprise-gallery/StylePicker.qml index 542abaa..48c1298 100644 --- a/basicsuite/enterprise-gallery/StylePicker.qml +++ b/basicsuite/enterprise-gallery/StylePicker.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/enterprise-gallery/main.qml b/basicsuite/enterprise-gallery/main.qml index 43ad848..f1f2e17 100644 --- a/basicsuite/enterprise-gallery/main.qml +++ b/basicsuite/enterprise-gallery/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/graphicaleffects/Checkers.qml b/basicsuite/graphicaleffects/Checkers.qml index 9e42b1c..4dc37b1 100644 --- a/basicsuite/graphicaleffects/Checkers.qml +++ b/basicsuite/graphicaleffects/Checkers.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_BrightnessContrast.qml b/basicsuite/graphicaleffects/effect_BrightnessContrast.qml index fb8302d..c4d425b 100644 --- a/basicsuite/graphicaleffects/effect_BrightnessContrast.qml +++ b/basicsuite/graphicaleffects/effect_BrightnessContrast.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_Colorize.qml b/basicsuite/graphicaleffects/effect_Colorize.qml index 4244f21..a6007b2 100644 --- a/basicsuite/graphicaleffects/effect_Colorize.qml +++ b/basicsuite/graphicaleffects/effect_Colorize.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_CustomDissolve.qml b/basicsuite/graphicaleffects/effect_CustomDissolve.qml index 43be640..ec1926c 100644 --- a/basicsuite/graphicaleffects/effect_CustomDissolve.qml +++ b/basicsuite/graphicaleffects/effect_CustomDissolve.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_CustomWave.qml b/basicsuite/graphicaleffects/effect_CustomWave.qml index 5bde628..eff9a45 100644 --- a/basicsuite/graphicaleffects/effect_CustomWave.qml +++ b/basicsuite/graphicaleffects/effect_CustomWave.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_Displacement.qml b/basicsuite/graphicaleffects/effect_Displacement.qml index 3c7b6d0..2ca3b6a 100644 --- a/basicsuite/graphicaleffects/effect_Displacement.qml +++ b/basicsuite/graphicaleffects/effect_Displacement.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_DropShadow.qml b/basicsuite/graphicaleffects/effect_DropShadow.qml index 0dd3c48..342e531 100644 --- a/basicsuite/graphicaleffects/effect_DropShadow.qml +++ b/basicsuite/graphicaleffects/effect_DropShadow.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_GaussianBlur.qml b/basicsuite/graphicaleffects/effect_GaussianBlur.qml index 7acfa3b..33e5317 100644 --- a/basicsuite/graphicaleffects/effect_GaussianBlur.qml +++ b/basicsuite/graphicaleffects/effect_GaussianBlur.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_Glow.qml b/basicsuite/graphicaleffects/effect_Glow.qml index 728f8cc..96d1a4b 100644 --- a/basicsuite/graphicaleffects/effect_Glow.qml +++ b/basicsuite/graphicaleffects/effect_Glow.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_HueSaturation.qml b/basicsuite/graphicaleffects/effect_HueSaturation.qml index e6ba039..e799ae8 100644 --- a/basicsuite/graphicaleffects/effect_HueSaturation.qml +++ b/basicsuite/graphicaleffects/effect_HueSaturation.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_OpacityMask.qml b/basicsuite/graphicaleffects/effect_OpacityMask.qml index 47df139..fcf4df8 100644 --- a/basicsuite/graphicaleffects/effect_OpacityMask.qml +++ b/basicsuite/graphicaleffects/effect_OpacityMask.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/effect_ThresholdMask.qml b/basicsuite/graphicaleffects/effect_ThresholdMask.qml index 18cb07b..b2b87b3 100644 --- a/basicsuite/graphicaleffects/effect_ThresholdMask.qml +++ b/basicsuite/graphicaleffects/effect_ThresholdMask.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/graphicaleffects/main.qml b/basicsuite/graphicaleffects/main.qml index 66c97ff..0108180 100644 --- a/basicsuite/graphicaleffects/main.qml +++ b/basicsuite/graphicaleffects/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/mediaplayer/ControlBar.qml b/basicsuite/mediaplayer/ControlBar.qml index a3d0ae2..b6c1b9e 100755 --- a/basicsuite/mediaplayer/ControlBar.qml +++ b/basicsuite/mediaplayer/ControlBar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/mediaplayer/ImageButton.qml b/basicsuite/mediaplayer/ImageButton.qml index 3644f37..6dcb6dd 100755 --- a/basicsuite/mediaplayer/ImageButton.qml +++ b/basicsuite/mediaplayer/ImageButton.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/mediaplayer/Intro.qml b/basicsuite/mediaplayer/Intro.qml index 5e1332f..094fe3e 100644 --- a/basicsuite/mediaplayer/Intro.qml +++ b/basicsuite/mediaplayer/Intro.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/mediaplayer/MetadataView.qml b/basicsuite/mediaplayer/MetadataView.qml index 4d45b75..c9a9ccf 100644 --- a/basicsuite/mediaplayer/MetadataView.qml +++ b/basicsuite/mediaplayer/MetadataView.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/mediaplayer/PlaybackControl.qml b/basicsuite/mediaplayer/PlaybackControl.qml index f83f358..65bb7ca 100755 --- a/basicsuite/mediaplayer/PlaybackControl.qml +++ b/basicsuite/mediaplayer/PlaybackControl.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/mediaplayer/SeekControl.qml b/basicsuite/mediaplayer/SeekControl.qml index 19a1fb7..9a75517 100755 --- a/basicsuite/mediaplayer/SeekControl.qml +++ b/basicsuite/mediaplayer/SeekControl.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/mediaplayer/Slider.qml b/basicsuite/mediaplayer/Slider.qml index da9732f..20a3aa7 100644 --- a/basicsuite/mediaplayer/Slider.qml +++ b/basicsuite/mediaplayer/Slider.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/mediaplayer/UrlBar.qml b/basicsuite/mediaplayer/UrlBar.qml index c3cd648..5da4d64 100644 --- a/basicsuite/mediaplayer/UrlBar.qml +++ b/basicsuite/mediaplayer/UrlBar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/mediaplayer/VolumeControl.qml b/basicsuite/mediaplayer/VolumeControl.qml index 62375f1..9844350 100755 --- a/basicsuite/mediaplayer/VolumeControl.qml +++ b/basicsuite/mediaplayer/VolumeControl.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/photogallery/main.qml b/basicsuite/photogallery/main.qml index 5fbab8a..a7f114e 100644 --- a/basicsuite/photogallery/main.qml +++ b/basicsuite/photogallery/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/qt5-everywhere/Button.qml b/basicsuite/qt5-everywhere/Button.qml index 43e93b8..d3b30a7 100644 --- a/basicsuite/qt5-everywhere/Button.qml +++ b/basicsuite/qt5-everywhere/Button.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/Cloud.qml b/basicsuite/qt5-everywhere/Cloud.qml index b399308..00fce39 100644 --- a/basicsuite/qt5-everywhere/Cloud.qml +++ b/basicsuite/qt5-everywhere/Cloud.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/DialogButton.qml b/basicsuite/qt5-everywhere/DialogButton.qml index 7f24e5d..ff0e235 100644 --- a/basicsuite/qt5-everywhere/DialogButton.qml +++ b/basicsuite/qt5-everywhere/DialogButton.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/Element.qml b/basicsuite/qt5-everywhere/Element.qml index 097a3fc..8692f76 100644 --- a/basicsuite/qt5-everywhere/Element.qml +++ b/basicsuite/qt5-everywhere/Element.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/Group.qml b/basicsuite/qt5-everywhere/Group.qml index 6ee3304..b3c6aa3 100644 --- a/basicsuite/qt5-everywhere/Group.qml +++ b/basicsuite/qt5-everywhere/Group.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/HelpScreen.qml b/basicsuite/qt5-everywhere/HelpScreen.qml index 3fb540c..3f5980f 100644 --- a/basicsuite/qt5-everywhere/HelpScreen.qml +++ b/basicsuite/qt5-everywhere/HelpScreen.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/IslandElementContainer.qml b/basicsuite/qt5-everywhere/IslandElementContainer.qml index c191d68..66d1e64 100644 --- a/basicsuite/qt5-everywhere/IslandElementContainer.qml +++ b/basicsuite/qt5-everywhere/IslandElementContainer.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/NavigationPanel.qml b/basicsuite/qt5-everywhere/NavigationPanel.qml index e73cc7f..62d542b 100644 --- a/basicsuite/qt5-everywhere/NavigationPanel.qml +++ b/basicsuite/qt5-everywhere/NavigationPanel.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/QuitDialog.qml b/basicsuite/qt5-everywhere/QuitDialog.qml index 897afb9..c246fc7 100644 --- a/basicsuite/qt5-everywhere/QuitDialog.qml +++ b/basicsuite/qt5-everywhere/QuitDialog.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/Slide.qml b/basicsuite/qt5-everywhere/Slide.qml index 36e0b08..be94aca 100644 --- a/basicsuite/qt5-everywhere/Slide.qml +++ b/basicsuite/qt5-everywhere/Slide.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/SplashScreen.qml b/basicsuite/qt5-everywhere/SplashScreen.qml index 42dd8d3..10b99a5 100644 --- a/basicsuite/qt5-everywhere/SplashScreen.qml +++ b/basicsuite/qt5-everywhere/SplashScreen.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/WorldCanvas.qml b/basicsuite/qt5-everywhere/WorldCanvas.qml index f73116b..0972cf2 100644 --- a/basicsuite/qt5-everywhere/WorldCanvas.qml +++ b/basicsuite/qt5-everywhere/WorldCanvas.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/WorldMouseArea.qml b/basicsuite/qt5-everywhere/WorldMouseArea.qml index ee22054..f3a6620 100644 --- a/basicsuite/qt5-everywhere/WorldMouseArea.qml +++ b/basicsuite/qt5-everywhere/WorldMouseArea.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml b/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml index e2b3bb0..7d68c55 100644 --- a/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml +++ b/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml index b0c2047..87b25c2 100644 --- a/basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml +++ b/basicsuite/qt5-everywhere/demos/gridrssnews/RssDelegate.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml index dae206b..3a8fea9 100644 --- a/basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml +++ b/basicsuite/qt5-everywhere/demos/gridrssnews/ScrollBar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml index d85d292..3041242 100644 --- a/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml +++ b/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js b/basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js index 467e431..d3ad154 100644 --- a/basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js +++ b/basicsuite/qt5-everywhere/demos/heartmonitor/HeartData.js @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/heartmonitor/main.qml b/basicsuite/qt5-everywhere/demos/heartmonitor/main.qml index 08b8f28..7594bdd 100644 --- a/basicsuite/qt5-everywhere/demos/heartmonitor/main.qml +++ b/basicsuite/qt5-everywhere/demos/heartmonitor/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml b/basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml index eb4e29e..ca1e55e 100644 --- a/basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml +++ b/basicsuite/qt5-everywhere/demos/particledemo/BootScreenDemo.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml b/basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml index fc74037..531b7c3 100644 --- a/basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml +++ b/basicsuite/qt5-everywhere/demos/particledemo/ParticleSysComponent.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml b/basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml index c3f8253..235a2cd 100644 --- a/basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml +++ b/basicsuite/qt5-everywhere/demos/particledemo/particledemo.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml b/basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml index 6ca2626..d96a9bd 100644 --- a/basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml +++ b/basicsuite/qt5-everywhere/demos/photosurface/photosurface.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml b/basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml index 76635b6..11b687e 100644 --- a/basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml +++ b/basicsuite/qt5-everywhere/demos/radio/VolumeButton.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml b/basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml index c107823..a491860 100644 --- a/basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml +++ b/basicsuite/qt5-everywhere/demos/radio/VolumePoint.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/radio/radio.qml b/basicsuite/qt5-everywhere/demos/radio/radio.qml index 8615f9b..9bd7152 100644 --- a/basicsuite/qt5-everywhere/demos/radio/radio.qml +++ b/basicsuite/qt5-everywhere/demos/radio/radio.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml index c16f582..97065b2 100644 --- a/basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml +++ b/basicsuite/qt5-everywhere/demos/rssnews/content/BusyIndicator.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQml module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml index 2916d1b..ae70e44 100644 --- a/basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml +++ b/basicsuite/qt5-everywhere/demos/rssnews/content/CategoryDelegate.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQml module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml index 4050af6..7080312 100644 --- a/basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml +++ b/basicsuite/qt5-everywhere/demos/rssnews/content/NewsDelegate.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQml module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml index da26d6a..2f0591b 100644 --- a/basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml +++ b/basicsuite/qt5-everywhere/demos/rssnews/content/RssFeeds.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQml module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml b/basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml index d3cf4a6..02ad7ea 100644 --- a/basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml +++ b/basicsuite/qt5-everywhere/demos/rssnews/content/ScrollBar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQml module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml index 5eae0a0..5bb1868 100644 --- a/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml +++ b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQml module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/Block.qml b/basicsuite/qt5-everywhere/demos/samegame/content/Block.qml index 0b10b7f..b643f4e 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/Block.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/Block.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml b/basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml index ba6261c..f2c975f 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/BlockEmitter.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/Button.qml b/basicsuite/qt5-everywhere/demos/samegame/content/Button.qml index 4b825ba..5fcc578 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/Button.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/Button.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml b/basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml index 6e72161..3a9e59b 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/GameArea.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml b/basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml index fb050e7..0322c67 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/LogoAnimation.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml b/basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml index 93089fc..c74b7a3 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/MenuEmitter.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml b/basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml index fe758af..c448cba 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/PaintEmitter.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/PrimaryPack.qml b/basicsuite/qt5-everywhere/demos/samegame/content/PrimaryPack.qml index 3fe7fb1..166fcb8 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/PrimaryPack.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/PrimaryPack.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/PuzzleBlock.qml b/basicsuite/qt5-everywhere/demos/samegame/content/PuzzleBlock.qml index 4f5b043..963565a 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/PuzzleBlock.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/PuzzleBlock.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/SimpleBlock.qml b/basicsuite/qt5-everywhere/demos/samegame/content/SimpleBlock.qml index 5ae4782..e389abd 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/SimpleBlock.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/SimpleBlock.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/SmokeText.qml b/basicsuite/qt5-everywhere/demos/samegame/content/SmokeText.qml index 46bc509..d4c4365 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/SmokeText.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/SmokeText.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/TemplateBase.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/TemplateBase.qml index 48ea399..d02f26d 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/TemplateBase.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/TemplateBase.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level0.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level0.qml index 7ac7ed8..0e6e0a8 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level0.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level0.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml index 0b7a889..0467c5b 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level1.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml index 986f217..332af0f 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level2.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml index eff5182..9504baf 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level3.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml index 4438de1..d5d01f0 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level4.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml index ee48217..d602567 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level5.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml index 2b34baa..5dd42f8 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level6.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml index 280bbb1..87633b4 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level7.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml index 7661485..9d25e31 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level8.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml index c75d8e5..755268d 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/content/levels/level9.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/content/samegame.js b/basicsuite/qt5-everywhere/demos/samegame/content/samegame.js index 96b8167..9035b12 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/content/samegame.js +++ b/basicsuite/qt5-everywhere/demos/samegame/content/samegame.js @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/samegame/samegame.qml b/basicsuite/qt5-everywhere/demos/samegame/samegame.qml index 49eab55..e81a8bf 100644 --- a/basicsuite/qt5-everywhere/demos/samegame/samegame.qml +++ b/basicsuite/qt5-everywhere/demos/samegame/samegame.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/shaders/Logo.qml b/basicsuite/qt5-everywhere/demos/shaders/Logo.qml index 2e2617a..04bcd36 100644 --- a/basicsuite/qt5-everywhere/demos/shaders/Logo.qml +++ b/basicsuite/qt5-everywhere/demos/shaders/Logo.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml b/basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml index 1237305..57b3505 100644 --- a/basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml +++ b/basicsuite/qt5-everywhere/demos/shaders/LogoContainer.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/shaders/Slider.qml b/basicsuite/qt5-everywhere/demos/shaders/Slider.qml index 5ceefcc..2e21010 100644 --- a/basicsuite/qt5-everywhere/demos/shaders/Slider.qml +++ b/basicsuite/qt5-everywhere/demos/shaders/Slider.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/main.cpp b/basicsuite/qt5-everywhere/demos/shaders/import/main.cpp index 0475ea8..fe03f0e 100644 --- a/basicsuite/qt5-everywhere/demos/shaders/import/main.cpp +++ b/basicsuite/qt5-everywhere/demos/shaders/import/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp index 1623fb7..629f4b7 100644 --- a/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp +++ b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h index bfa82f7..30a68f3 100644 --- a/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h +++ b/basicsuite/qt5-everywhere/demos/shaders/import/shaderfilereader.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/AndroidDelegate.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/AndroidDelegate.qml index 21160eb..e84d6b1 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/AndroidDelegate.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/AndroidDelegate.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml index 63f9646..19c317f 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/CustomAppWindow.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/CustomAppWindow.qml index e0e7bcd..afaa951 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/CustomAppWindow.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/CustomAppWindow.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml index dc0f552..d370d39 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml index a1c0045..75a75fb 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml index c96314b..8cba319 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml index 605afef..058ff53 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/main.qml b/basicsuite/qt5-everywhere/demos/touchgallery/main.qml index 95d737b..2708b8b 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/main.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Quick Controls module of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/video/ControlBar.qml b/basicsuite/qt5-everywhere/demos/video/ControlBar.qml index c8e3b97..f013dcf 100644 --- a/basicsuite/qt5-everywhere/demos/video/ControlBar.qml +++ b/basicsuite/qt5-everywhere/demos/video/ControlBar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/video/ImageButton.qml b/basicsuite/qt5-everywhere/demos/video/ImageButton.qml index 937a075..428f6de 100644 --- a/basicsuite/qt5-everywhere/demos/video/ImageButton.qml +++ b/basicsuite/qt5-everywhere/demos/video/ImageButton.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/video/PlaybackControl.qml b/basicsuite/qt5-everywhere/demos/video/PlaybackControl.qml index 9716825..2d7307e 100644 --- a/basicsuite/qt5-everywhere/demos/video/PlaybackControl.qml +++ b/basicsuite/qt5-everywhere/demos/video/PlaybackControl.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/video/ScrollBar.qml b/basicsuite/qt5-everywhere/demos/video/ScrollBar.qml index 37c2eab..8ac0d31 100644 --- a/basicsuite/qt5-everywhere/demos/video/ScrollBar.qml +++ b/basicsuite/qt5-everywhere/demos/video/ScrollBar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/video/SeekControl.qml b/basicsuite/qt5-everywhere/demos/video/SeekControl.qml index 8003951..2e037e3 100644 --- a/basicsuite/qt5-everywhere/demos/video/SeekControl.qml +++ b/basicsuite/qt5-everywhere/demos/video/SeekControl.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/video/Slider.qml b/basicsuite/qt5-everywhere/demos/video/Slider.qml index 8a99cfe..cc45537 100644 --- a/basicsuite/qt5-everywhere/demos/video/Slider.qml +++ b/basicsuite/qt5-everywhere/demos/video/Slider.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/video/VideoDelegate.qml b/basicsuite/qt5-everywhere/demos/video/VideoDelegate.qml index 6109f81..fedc9f4 100644 --- a/basicsuite/qt5-everywhere/demos/video/VideoDelegate.qml +++ b/basicsuite/qt5-everywhere/demos/video/VideoDelegate.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml b/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml index aa54e33..df3e3e2 100644 --- a/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml +++ b/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/demos/video/VolumeControl.qml b/basicsuite/qt5-everywhere/demos/video/VolumeControl.qml index 6e75fd2..4754951 100644 --- a/basicsuite/qt5-everywhere/demos/video/VolumeControl.qml +++ b/basicsuite/qt5-everywhere/demos/video/VolumeControl.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/engine.js b/basicsuite/qt5-everywhere/engine.js index 2618807..fdc9a5b 100644 --- a/basicsuite/qt5-everywhere/engine.js +++ b/basicsuite/qt5-everywhere/engine.js @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/main.qml b/basicsuite/qt5-everywhere/main.qml index 052e5eb..cf77887 100644 --- a/basicsuite/qt5-everywhere/main.qml +++ b/basicsuite/qt5-everywhere/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-everywhere/style.js b/basicsuite/qt5-everywhere/style.js index a6a2966..6f09c42 100644 --- a/basicsuite/qt5-everywhere/style.js +++ b/basicsuite/qt5-everywhere/style.js @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-launchpresentation/WebKitSlideContent.qml b/basicsuite/qt5-launchpresentation/WebKitSlideContent.qml index b0a9c77..ceb103f 100644 --- a/basicsuite/qt5-launchpresentation/WebKitSlideContent.qml +++ b/basicsuite/qt5-launchpresentation/WebKitSlideContent.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/qt5-launchpresentation/WebkitSlide.qml b/basicsuite/qt5-launchpresentation/WebkitSlide.qml index 1873ab1..9febcdf 100644 --- a/basicsuite/qt5-launchpresentation/WebkitSlide.qml +++ b/basicsuite/qt5-launchpresentation/WebkitSlide.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/qt5-particlesdemo/content/burstandpulse.qml b/basicsuite/qt5-particlesdemo/content/burstandpulse.qml index c44c8dc..de140c3 100644 --- a/basicsuite/qt5-particlesdemo/content/burstandpulse.qml +++ b/basicsuite/qt5-particlesdemo/content/burstandpulse.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/content/customemitter.qml b/basicsuite/qt5-particlesdemo/content/customemitter.qml index bcf7da3..1c32cee 100644 --- a/basicsuite/qt5-particlesdemo/content/customemitter.qml +++ b/basicsuite/qt5-particlesdemo/content/customemitter.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/content/emitmask.qml b/basicsuite/qt5-particlesdemo/content/emitmask.qml index 575f9a1..c2b2b2f 100644 --- a/basicsuite/qt5-particlesdemo/content/emitmask.qml +++ b/basicsuite/qt5-particlesdemo/content/emitmask.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/content/maximumemitted.qml b/basicsuite/qt5-particlesdemo/content/maximumemitted.qml index cf87159..11c90fe 100644 --- a/basicsuite/qt5-particlesdemo/content/maximumemitted.qml +++ b/basicsuite/qt5-particlesdemo/content/maximumemitted.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/content/shapeanddirection.qml b/basicsuite/qt5-particlesdemo/content/shapeanddirection.qml index 9d5ea98..c8b7952 100644 --- a/basicsuite/qt5-particlesdemo/content/shapeanddirection.qml +++ b/basicsuite/qt5-particlesdemo/content/shapeanddirection.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/content/trailemitter.qml b/basicsuite/qt5-particlesdemo/content/trailemitter.qml index d876bbb..9278f78 100644 --- a/basicsuite/qt5-particlesdemo/content/trailemitter.qml +++ b/basicsuite/qt5-particlesdemo/content/trailemitter.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/content/velocityfrommotion.qml b/basicsuite/qt5-particlesdemo/content/velocityfrommotion.qml index 40698b1..280d8bf 100644 --- a/basicsuite/qt5-particlesdemo/content/velocityfrommotion.qml +++ b/basicsuite/qt5-particlesdemo/content/velocityfrommotion.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc b/basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc index f19d981..b65f933 100644 --- a/basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc +++ b/basicsuite/qt5-particlesdemo/doc/src/emitters.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/main.cpp b/basicsuite/qt5-particlesdemo/main.cpp index 66e7ce4..15cb10b 100644 --- a/basicsuite/qt5-particlesdemo/main.cpp +++ b/basicsuite/qt5-particlesdemo/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/main.qml b/basicsuite/qt5-particlesdemo/main.qml index 2b9a338..d996b7b 100644 --- a/basicsuite/qt5-particlesdemo/main.qml +++ b/basicsuite/qt5-particlesdemo/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/shared/Button.qml b/basicsuite/qt5-particlesdemo/shared/Button.qml index 9bbc01a..0f85e75 100644 --- a/basicsuite/qt5-particlesdemo/shared/Button.qml +++ b/basicsuite/qt5-particlesdemo/shared/Button.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/shared/LauncherList.qml b/basicsuite/qt5-particlesdemo/shared/LauncherList.qml index 4336cf3..d18212a 100644 --- a/basicsuite/qt5-particlesdemo/shared/LauncherList.qml +++ b/basicsuite/qt5-particlesdemo/shared/LauncherList.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/shared/SimpleLauncherDelegate.qml b/basicsuite/qt5-particlesdemo/shared/SimpleLauncherDelegate.qml index e891266..2e9138b 100644 --- a/basicsuite/qt5-particlesdemo/shared/SimpleLauncherDelegate.qml +++ b/basicsuite/qt5-particlesdemo/shared/SimpleLauncherDelegate.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/qt5-particlesdemo/shared/shared.h b/basicsuite/qt5-particlesdemo/shared/shared.h index eab15f3..9370758 100644 --- a/basicsuite/qt5-particlesdemo/shared/shared.h +++ b/basicsuite/qt5-particlesdemo/shared/shared.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. diff --git a/basicsuite/sensors/Accelbubble.qml b/basicsuite/sensors/Accelbubble.qml index d0ab880..7fba4d4 100644 --- a/basicsuite/sensors/Accelbubble.qml +++ b/basicsuite/sensors/Accelbubble.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/sensors/Light.qml b/basicsuite/sensors/Light.qml index fd71790..f997efd 100644 --- a/basicsuite/sensors/Light.qml +++ b/basicsuite/sensors/Light.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/sensors/main.qml b/basicsuite/sensors/main.qml index 359306c..b5a1207 100644 --- a/basicsuite/sensors/main.qml +++ b/basicsuite/sensors/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/shared/engine.cpp b/basicsuite/shared/engine.cpp index 669bbf4..da021e5 100644 --- a/basicsuite/shared/engine.cpp +++ b/basicsuite/shared/engine.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/shared/engine.h b/basicsuite/shared/engine.h index 78479db..1600fc6 100644 --- a/basicsuite/shared/engine.h +++ b/basicsuite/shared/engine.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp index ac2fba4..198b228 100644 --- a/basicsuite/shared/main.cpp +++ b/basicsuite/shared/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** diff --git a/basicsuite/textinput/ScrollBar.qml b/basicsuite/textinput/ScrollBar.qml index 93a89e9..b4753f2 100644 --- a/basicsuite/textinput/ScrollBar.qml +++ b/basicsuite/textinput/ScrollBar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/textinput/TextArea.qml b/basicsuite/textinput/TextArea.qml index 430a3ad..490e066 100644 --- a/basicsuite/textinput/TextArea.qml +++ b/basicsuite/textinput/TextArea.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/textinput/TextBase.qml b/basicsuite/textinput/TextBase.qml index 7256af7..67ee3e3 100644 --- a/basicsuite/textinput/TextBase.qml +++ b/basicsuite/textinput/TextBase.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/textinput/TextField.qml b/basicsuite/textinput/TextField.qml index c780962..9b01418 100644 --- a/basicsuite/textinput/TextField.qml +++ b/basicsuite/textinput/TextField.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/basicsuite/textinput/main.qml b/basicsuite/textinput/main.qml index 263de12..8f63b83 100644 --- a/basicsuite/textinput/main.qml +++ b/basicsuite/textinput/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/doc/b2qt-demos.qdoc b/doc/b2qt-demos.qdoc index 704561b..6bec313 100644 --- a/doc/b2qt-demos.qdoc +++ b/doc/b2qt-demos.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/doc/html-offline.qdocconf b/doc/html-offline.qdocconf index cd95334..bef6912 100644 --- a/doc/html-offline.qdocconf +++ b/doc/html-offline.qdocconf @@ -39,7 +39,7 @@ HTML.footer = \ " \n" \ "

    \n" \ "

    \n" \ - " © 2013 Digia Plc and/or its\n" \ + " © 2014 Digia Plc and/or its\n" \ " subsidiaries.

    \n" \ "

    \n" \ " Licensees holding valid Qt Commercial licenses may use this document in\n" \ diff --git a/experimental/Overlay Tester/main.qml b/experimental/Overlay Tester/main.qml index 4503a67..e7ae0af 100644 --- a/experimental/Overlay Tester/main.qml +++ b/experimental/Overlay Tester/main.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/experimental/qt5-intro-android/WebKitSlideContent.qml b/experimental/qt5-intro-android/WebKitSlideContent.qml index b0a9c77..ceb103f 100644 --- a/experimental/qt5-intro-android/WebKitSlideContent.qml +++ b/experimental/qt5-intro-android/WebKitSlideContent.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/experimental/qt5-intro-android/WebkitSlide.qml b/experimental/qt5-intro-android/WebkitSlide.qml index 1873ab1..9febcdf 100644 --- a/experimental/qt5-intro-android/WebkitSlide.qml +++ b/experimental/qt5-intro-android/WebkitSlide.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** diff --git a/experimental/qt5-intro-android/main.cpp b/experimental/qt5-intro-android/main.cpp index 1eeedd0..9147a55 100644 --- a/experimental/qt5-intro-android/main.cpp +++ b/experimental/qt5-intro-android/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at ** http://qt.digia.com/ ** -- cgit v1.2.3 From 39240a81e0ddbdcfe38d94bde2bd3a6ac6b30c83 Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 12 Feb 2014 14:31:14 +0100 Subject: fix glsl syntax in graphical effects demo On BBB/eLinux, the Dissolve effect would fail to compile at runtime. Change-Id: Ib9c1383d1543dd8c759634b79eabe4489d7b4868 Reviewed-by: Andy Nichols --- basicsuite/graphicaleffects/effect_CustomDissolve.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicsuite/graphicaleffects/effect_CustomDissolve.qml b/basicsuite/graphicaleffects/effect_CustomDissolve.qml index ec1926c..a7c4522 100644 --- a/basicsuite/graphicaleffects/effect_CustomDissolve.qml +++ b/basicsuite/graphicaleffects/effect_CustomDissolve.qml @@ -147,7 +147,7 @@ Item { varying lowp float vOpacity; // Noise function from: http://stackoverflow.com/questions/4200224/random-noise-functions-for-glsl - highp float rand(vec2 n) { + highp float rand(highp vec2 n) { return fract(sin(dot(n.xy, vec2(12.9898, 78.233))) * 43758.5453); } -- cgit v1.2.3 From 8b59cba6ea76466a605db68130716dfe6e36de28 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Thu, 13 Feb 2014 17:54:48 +0100 Subject: Qt5-Everywhere: show network error message Instead of showing broken applications when there is no available network, we now show an error message indicating that there is no network available. This is neat because now we dont have to let customers know why things are working at shows, and people trying this for themselves will know what they need to do to remedy the issue. Change-Id: Idda904946fb823abce3f8f11c51b5516cb58472c Reviewed-by: Eirik Aavitsland --- .../qt5-everywhere/demos/gridrssnews/main.qml | 26 ++++++++++++++++++++++ basicsuite/qt5-everywhere/demos/radio/radio.qml | 24 ++++++++++++++++++++ .../qt5-everywhere/demos/rssnews/rssnews.qml | 20 +++++++++++++++++ .../qt5-everywhere/demos/video/VideoSelector.qml | 23 +++++++++++++++++++ 4 files changed, 93 insertions(+) diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml index 3041242..2856cfb 100644 --- a/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml +++ b/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml @@ -74,6 +74,8 @@ Rectangle { onStatusChanged: { if (status == XmlListModel.Ready) { playbanner.start(); + } else if (status == XmlListModel.Error) { + networkErrorMessage.start(); } } } @@ -139,6 +141,21 @@ Rectangle { pageSize: grid.visibleArea.widthRatio } + Item { + id: networkErrorBox + opacity: 0 + anchors.fill: parent + + Text { + anchors.centerIn: parent + text: qsTr("Sorry! No network connection") + font.family: uiFont; + font.pixelSize: appHeaderFontSize; + color: textColor + smooth: true + } + } + SequentialAnimation { id: playbanner running: false @@ -146,5 +163,14 @@ Rectangle { NumberAnimation { target: grid; property: "opacity"; to: 1.0; duration: 300} } + NumberAnimation { + id: networkErrorMessage + running: false + target: networkErrorBox + property: "opacity" + to: 1.0 + duration: 300 + } + } diff --git a/basicsuite/qt5-everywhere/demos/radio/radio.qml b/basicsuite/qt5-everywhere/demos/radio/radio.qml index 9bd7152..e81c567 100644 --- a/basicsuite/qt5-everywhere/demos/radio/radio.qml +++ b/basicsuite/qt5-everywhere/demos/radio/radio.qml @@ -102,6 +102,22 @@ FocusScope { radius: height/2 + Item { + id: networkErrorBox + opacity: 0 + anchors.fill: parent + + Text { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: parent.width * 0.1 + text: qsTr("Sorry! No network connection") + font.pixelSize: stationList.height*.1; + color: "white" + smooth: true + } + } + PathView { enabled: root.activeFocus id: stationList @@ -214,6 +230,14 @@ FocusScope { query: "/radio/channel" XmlRole {name: "title"; query: "title/string()"} XmlRole {name: "url"; query: "url/string()"} + + onStatusChanged: { + if (status == XmlListModel.Ready) { + networkErrorBox.opacity = 0; + } else if (status == XmlListModel.Error) { + networkErrorBox.opacity = 1; + } + } } VolumeButton { diff --git a/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml index 5bb1868..213d9e8 100644 --- a/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml +++ b/basicsuite/qt5-everywhere/demos/rssnews/rssnews.qml @@ -67,6 +67,14 @@ Rectangle { XmlRole { name: "title"; query: "title/string()" } XmlRole { name: "link"; query: "link/string()" } XmlRole { name: "description"; query: "description/string()" } + + onStatusChanged: { + if (status == XmlListModel.Error) { + networkErrorBox.opacity = 1.0 + } else if (status == XmlListModel.Ready) { + networkErrorBox.opacity = 0.0 + } + } } Row { @@ -93,9 +101,21 @@ Rectangle { width: window.width - window.listWidth; height: window.height model: feedModel delegate: NewsDelegate {} + + Item { + id: networkErrorBox + opacity: 0 + anchors.fill: parent + + Text { + anchors.centerIn: parent + text: qsTr("Sorry! No network connection") + } + } } } + ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right } Rectangle { x: window.listWidth; height: window.height; width: 1; color: "#cccccc" } } diff --git a/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml b/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml index df3e3e2..8ce8d83 100644 --- a/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml +++ b/basicsuite/qt5-everywhere/demos/video/VideoSelector.qml @@ -67,6 +67,29 @@ Item { XmlRole { name: "thumbnail"; query: "thumbnail/string()" } XmlRole { name: "title"; query: "title/string()" } XmlRole { name: "link"; query: "link/string()" } + + onStatusChanged: { + if (status == XmlListModel.Ready) { + networkErrorBox.opacity = 0.0 + } else if (status == XmlListModel.Error) { + networkErrorBox.opacity = 1.0 + } + } + } + + Item { + id: networkErrorBox + opacity: 0 + anchors.fill: parent + + Text { + anchors.centerIn: parent + text: qsTr("Sorry! No network connection") + font.family: uiFont; + font.pixelSize: tileFontSize * 2; + color: textColor + smooth: true + } } // Grid view -- cgit v1.2.3 From f5b70c4ff2a8935028fcb042f94656d1d128628d Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Thu, 13 Feb 2014 17:52:00 +0100 Subject: Fix Canvas2D error The numbers on the clock were being rendered wrong because of an invalid Context2D font family. Change-Id: I74d3ce15ccfba77dae4997874f940b5d1fff34a9 Reviewed-by: Eirik Aavitsland --- basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml b/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml index 7d68c55..2a79735 100644 --- a/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml +++ b/basicsuite/qt5-everywhere/demos/canvasclock/canvasClock.qml @@ -249,7 +249,7 @@ function drawPointer(context, angle, len, thickness, color){ if (root.dialStyle === 1) x1-=clockContainer.width*0.01 - context.font = 'bold '+Math.floor(clockContainer.width*.1)+'px Arial' + context.font = 'bold '+Math.floor(clockContainer.width*.1)+'px sans-serif' if (i >= 10) -- cgit v1.2.3 From 8260538f263f7109207e0312c850d10c32b752c5 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Thu, 13 Feb 2014 16:32:15 +0100 Subject: Remove Raspberry Pi logo from demo This demo was designed to be run the raspberry pi but we run it on all kinds of devices so I've removed the logo. Change-Id: I72e0101b0cd2c331436037099c8142a0f3780dc7 Reviewed-by: Eirik Aavitsland --- .../qt5-cinematicdemo/content/images/heading.png | Bin 58704 -> 55334 bytes .../content/images/heading_big.png | Bin 58950 -> 53904 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/basicsuite/qt5-cinematicdemo/content/images/heading.png b/basicsuite/qt5-cinematicdemo/content/images/heading.png index 509b12b..c8a5586 100644 Binary files a/basicsuite/qt5-cinematicdemo/content/images/heading.png and b/basicsuite/qt5-cinematicdemo/content/images/heading.png differ diff --git a/basicsuite/qt5-cinematicdemo/content/images/heading_big.png b/basicsuite/qt5-cinematicdemo/content/images/heading_big.png index ec37388..3e3c7fc 100644 Binary files a/basicsuite/qt5-cinematicdemo/content/images/heading_big.png and b/basicsuite/qt5-cinematicdemo/content/images/heading_big.png differ -- cgit v1.2.3 From 724015cb023e5d4364e375ec2fe8d45c1ba6d758 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Thu, 13 Feb 2014 16:24:31 +0100 Subject: Fix issues in qt5-launcher presentation No warnings on start Using a valid fontfamily for Context2D example velocityfrommotion particle demo is now visible Change-Id: Ibc805d32f55950279918935d1711f61afe0d7308 Reviewed-by: Eirik Aavitsland --- basicsuite/qt5-launchpresentation/CanvasSlide.qml | 2 +- basicsuite/qt5-launchpresentation/OpacityTransitionPresentation.qml | 4 ++-- basicsuite/qt5-launchpresentation/particles/velocityfrommotion.qml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/basicsuite/qt5-launchpresentation/CanvasSlide.qml b/basicsuite/qt5-launchpresentation/CanvasSlide.qml index d972b41..46f98ed 100644 --- a/basicsuite/qt5-launchpresentation/CanvasSlide.qml +++ b/basicsuite/qt5-launchpresentation/CanvasSlide.qml @@ -105,7 +105,7 @@ ctx.fill(); ctx.stroke(); ctx.fillStyle = 'aquamarine' -ctx.font = '20px sansserif' +ctx.font = '20px sans-serif' ctx.fillText('HTML Canvas API!', 100, 300); ctx.fillText('Imperative Drawing!', 100, 340); diff --git a/basicsuite/qt5-launchpresentation/OpacityTransitionPresentation.qml b/basicsuite/qt5-launchpresentation/OpacityTransitionPresentation.qml index dc7cc02..542ec6f 100644 --- a/basicsuite/qt5-launchpresentation/OpacityTransitionPresentation.qml +++ b/basicsuite/qt5-launchpresentation/OpacityTransitionPresentation.qml @@ -51,8 +51,8 @@ Presentation { property bool inTransition: false; - property variant fromSlide; - property variant toSlide; + property variant fromSlide: Item { } + property variant toSlide: Item { } property int transitionTime: 500; diff --git a/basicsuite/qt5-launchpresentation/particles/velocityfrommotion.qml b/basicsuite/qt5-launchpresentation/particles/velocityfrommotion.qml index 2aa3617..2824e1d 100644 --- a/basicsuite/qt5-launchpresentation/particles/velocityfrommotion.qml +++ b/basicsuite/qt5-launchpresentation/particles/velocityfrommotion.qml @@ -47,6 +47,7 @@ Item { height: 480 width: 320 + visible: true MouseArea { id: mouseArea -- cgit v1.2.3 From b9e5b195465f1f07524fe0b0bc88aed7ff452dee Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 18 Feb 2014 15:22:57 +0100 Subject: Fix vkb import path Task-number: QTEE-391 Change-Id: I14b1d6ad883bb62bcfd0ec44d083e95b7c4932cd Reviewed-by: Rainer Keller --- basicsuite/shared/loader.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basicsuite/shared/loader.qml b/basicsuite/shared/loader.qml index 42232d2..733fded 100644 --- a/basicsuite/shared/loader.qml +++ b/basicsuite/shared/loader.qml @@ -16,7 +16,8 @@ ** ****************************************************************************/ import QtQuick 2.0 -import QtVkb 1.0 +import QtQuick.Enterprise.VirtualKeyboard 1.0 + Item { id: root -- cgit v1.2.3 From 9c7b85a73bfea7b92729ad9317b8f7a708412f4f Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 19 Feb 2014 11:01:39 +0100 Subject: [qt5-everywhere] update preview image Updated preview image to show clouds with open applications. This way it looks less boring and matches screenshot from Android store. Change-Id: I2669d6afaa98fd20e20d8bd30d6f2129d3e8b870 Reviewed-by: Eirik Aavitsland --- basicsuite/qt5-everywhere/preview_l.jpg | Bin 34331 -> 37050 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/basicsuite/qt5-everywhere/preview_l.jpg b/basicsuite/qt5-everywhere/preview_l.jpg index 1bb40bf..577a64c 100644 Binary files a/basicsuite/qt5-everywhere/preview_l.jpg and b/basicsuite/qt5-everywhere/preview_l.jpg differ -- cgit v1.2.3 From 7c9a7efac837e5f34d9bdb46b10422920bf99103 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 14 Feb 2014 14:16:56 +0100 Subject: [launcher settings] improve visual appearance and fix the UI shrinking issue when vkb is visible. Change-Id: I8609dbc4a852b04e3ed9f3fbd3eb1175f3576f5e Reviewed-by: Andy Nichols --- basicsuite/launchersettings/NetworkList.qml | 82 ++++-------- basicsuite/launchersettings/WifiGroupBox.qml | 4 + .../launchersettings/images/button_default.png | Bin 0 -> 1406 bytes .../launchersettings/images/button_pressed.png | Bin 0 -> 1694 bytes basicsuite/launchersettings/images/groupbox.png | Bin 0 -> 485 bytes basicsuite/launchersettings/launchersettings.pro | 3 +- basicsuite/launchersettings/main.qml | 145 +++++++++++++++------ basicsuite/launchersettings/preview_l.jpg | Bin 12642 -> 18458 bytes 8 files changed, 137 insertions(+), 97 deletions(-) create mode 100644 basicsuite/launchersettings/images/button_default.png create mode 100644 basicsuite/launchersettings/images/button_pressed.png create mode 100644 basicsuite/launchersettings/images/groupbox.png diff --git a/basicsuite/launchersettings/NetworkList.qml b/basicsuite/launchersettings/NetworkList.qml index 1f26537..b733eb6 100644 --- a/basicsuite/launchersettings/NetworkList.qml +++ b/basicsuite/launchersettings/NetworkList.qml @@ -39,8 +39,12 @@ ** ****************************************************************************/ import QtQuick 2.0 +import QtQuick.Controls 1.0 import Qt.labs.wifi 0.1 +// ### TODO +// - only 1 delagate open at the time + Item { Component { id: listDelegate @@ -50,18 +54,16 @@ Item { property bool connected: wifiManager.connectedSSID == network.ssid property variant networkModel: model property alias ssidText: ssidLabel.text - height: expanded ? 300 : 70 + height: (expanded ? (connected ? 180: 260) : 70) clip: true // ### fixme + color: "#5C5C5C" + border.color: "black" + border.width: 1 Behavior on height { NumberAnimation { duration: 500; easing.type: Easing.InOutCubic } } width: parent.width - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 1; color: "lightgray" } - } - Text { id: ssidLabel anchors.top: parent.top @@ -69,6 +71,7 @@ Item { anchors.margins: 10 font.pixelSize: 20 font.bold: true + color: "#E6E6E6" text: network.ssid + (connected ? " (connected)" : ""); } @@ -79,7 +82,7 @@ Item { anchors.margins: 5 anchors.leftMargin: 40 text: network.bssid - color: "gray" + color: "#E6E6E6" font.pixelSize: ssidLabel.font.pixelSize * 0.5 } @@ -91,7 +94,7 @@ Item { + (network.supportsWPA ? "WPA " : "") + (network.supportsWEP ? "WEP " : "") + (network.supportsWPS ? "WPS " : ""); - color: "gray" + color: "#E6E6E6" font.pixelSize: ssidLabel.font.pixelSize * 0.5 font.italic: true } @@ -104,8 +107,8 @@ Item { anchors.margins: 20 anchors.right: parent.right anchors.top: parent.top - color: "lightblue" - border.color: "lightgray" + color: "#BF8888" + border.color: "#212126" } MouseArea { @@ -115,61 +118,32 @@ Item { } } - Rectangle { - id: passwordInputBackground - anchors.fill: passwordInput - anchors.margins: -5 - color: "white" - radius: 5 - border.color: "gray" - } - - TextInput { + TextField { id: passwordInput y: 100 - width: 300 height: 50 - text: "" + width: 300 + placeholderText: "Enter Password" + visible: !connected anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 18 } - Rectangle { - id: connectButton - anchors.top: passwordInput.bottom - anchors.margins: 20 + Button { + style: root.buttonStyle + y: passwordInput.visible ? passwordInput.y + passwordInput.height + 20 : passwordInput.y anchors.horizontalCenter: parent.horizontalCenter - width: passwordInput.width - height: passwordInputBackground.height - enabled: wifiManager.networkState != WifiManager.ObtainingIPAddress - - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 1; color: buttonMouse.pressed ? "steelblue" : "lightsteelblue" } - } - - border.color: "gray" - - Text { - anchors.centerIn: parent - font.pixelSize: 24 - text: connected ? "Disconnect" : "Connect" - } - MouseArea { - id: buttonMouse - anchors.fill: parent - onClicked: { - networkView.currentIndex = index - if (connected) { - wifiManager.disconnect() - } else { - networkView.activeNetwork = networkView.currentItem - wifiManager.connect(network, passwordInput.text); - } + text: connected ? "Disconnect" : "Connect" + onClicked: { + networkView.currentIndex = index + if (connected) { + wifiManager.disconnect() + } else { + networkView.activeNetwork = networkView.currentItem + wifiManager.connect(network, passwordInput.text); } } } - } } diff --git a/basicsuite/launchersettings/WifiGroupBox.qml b/basicsuite/launchersettings/WifiGroupBox.qml index f58c129..e88f5cb 100644 --- a/basicsuite/launchersettings/WifiGroupBox.qml +++ b/basicsuite/launchersettings/WifiGroupBox.qml @@ -60,6 +60,8 @@ ColumnLayout { Button { id: wifiOnOffButton + Layout.fillWidth: true + style: root.buttonStyle text: (wifiManager.backendReady) ? "Switch Off" : "Switch On" onClicked: { if (wifiManager.backendReady) { @@ -74,6 +76,8 @@ ColumnLayout { Button { id: listNetworksButton + Layout.fillWidth: true + style: root.buttonStyle visible: wifiManager.backendReady text: (networkList.visible) ? "Hide wifi networks" : "List available wifi networks" diff --git a/basicsuite/launchersettings/images/button_default.png b/basicsuite/launchersettings/images/button_default.png new file mode 100644 index 0000000..6d6cfd9 Binary files /dev/null and b/basicsuite/launchersettings/images/button_default.png differ diff --git a/basicsuite/launchersettings/images/button_pressed.png b/basicsuite/launchersettings/images/button_pressed.png new file mode 100644 index 0000000..ab78b6e Binary files /dev/null and b/basicsuite/launchersettings/images/button_pressed.png differ diff --git a/basicsuite/launchersettings/images/groupbox.png b/basicsuite/launchersettings/images/groupbox.png new file mode 100644 index 0000000..98585ee Binary files /dev/null and b/basicsuite/launchersettings/images/groupbox.png differ diff --git a/basicsuite/launchersettings/launchersettings.pro b/basicsuite/launchersettings/launchersettings.pro index bb0f2de..e89b4d0 100644 --- a/basicsuite/launchersettings/launchersettings.pro +++ b/basicsuite/launchersettings/launchersettings.pro @@ -5,7 +5,8 @@ b2qtdemo_deploy_defaults() content.files = *.qml content.path = $$DESTPATH +content.files += images OTHER_FILES += $${content.files} -INSTALLS += target content \ No newline at end of file +INSTALLS += target content diff --git a/basicsuite/launchersettings/main.qml b/basicsuite/launchersettings/main.qml index 41054fd..0002076 100644 --- a/basicsuite/launchersettings/main.qml +++ b/basicsuite/launchersettings/main.qml @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: For any questions to Digia, please use the contact form at @@ -42,65 +42,114 @@ import QtQuick 2.0 import QtQuick.Controls 1.0 import QtQuick.Layouts 1.0 +import QtQuick.Controls.Styles 1.0 +import QtQuick.Controls.Private 1.0 Rectangle { id: root - - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 1; color: "lightgray" } - } - width: 1280 height: 800 - + color: "#212126" property int margin: 10 - - Loader { - id: rebootActionLoader - source: "RebootAction.qml" - } - - Loader { - id: poweroffActionLoader - source: "PoweroffAction.qml" - } - - Loader { - id: brightnessControllerLoader - source: "BrightnessController.qml" + property alias buttonStyle: buttonStyle + + // ******************************* STYLES ********************************** + Component { + id: buttonStyle + ButtonStyle { + panel: Item { + implicitHeight: 50 + implicitWidth: 320 + BorderImage { + anchors.fill: parent + antialiasing: true + border.bottom: 8 + border.top: 8 + border.left: 8 + border.right: 8 + anchors.margins: control.pressed ? -4 : 0 + source: control.pressed ? "images/button_pressed.png" : "images/button_default.png" + Text { + text: control.text + anchors.centerIn: parent + color: "white" + font.pixelSize: 23 + renderType: Text.NativeRendering + } + } + } + } } - Loader { - id: networkControllerLoader - source: "NetworkController.qml" - } + // GroupBoxStyle currently is not available as a public API, so we write our own... + Component { + id: groupBoxStyle + Style { + // The margin from the content item to the groupbox + padding { + top: (control.title.length > 0 ? TextSingleton.implicitHeight : 0) + 30 + left: 8 + right: 8 + bottom: 8 + } + // The groupbox frame + property Component panel: Item { + anchors.fill: parent + + Text { + id: label + anchors.bottom: borderImage.top + anchors.margins: 2 + text: control.title + font.pixelSize: 22 + color: "white" + renderType: Text.NativeRendering + } - Loader { - id: wifiControllerLoader - source: "WifiController.qml" + BorderImage { + id: borderImage + anchors.fill: parent + anchors.topMargin: padding.top - 7 + source: "images/groupbox.png" + border.left: 4 + border.right: 4 + border.top: 4 + border.bottom: 4 + } + } + } } - ScrollView { + // ******************************** UI **************************************** + Loader { id: rebootActionLoader; source: "RebootAction.qml" } + Loader { id: poweroffActionLoader; source: "PoweroffAction.qml" } + Loader { id: brightnessControllerLoader; source: "BrightnessController.qml" } + Loader { id: networkControllerLoader; source: "NetworkController.qml" } + Loader { id: wifiControllerLoader; source: "WifiController.qml" } + Flickable { anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter anchors.margins: margin anchors.topMargin: 50 height: parent.height - width: mainLayout.width + 40 + width: mainLayout.width + contentHeight: mainLayout.height + 100 + contentWidth: mainLayout.width + flickableDirection: Flickable.VerticalFlick ColumnLayout { id: mainLayout - - height: implicitHeight; - width: Math.min(root.width, root.height); + width: 800 + height: implicitHeight + anchors.left: parent.left + anchors.right: parent.right GroupBox { id: powerOptions title: "Power" - Layout.fillWidth: true + style: groupBoxStyle RowLayout { id: powerButtonRow @@ -108,13 +157,16 @@ Rectangle { anchors.fill: parent Button { + style: buttonStyle text: "Shut Down" Layout.fillWidth: true action: poweroffActionLoader.item; enabled: action != undefined + } Button { + style: buttonStyle text: "Reboot" Layout.fillWidth: true action: rebootActionLoader.item; @@ -127,7 +179,7 @@ Rectangle { GroupBox { id: displayOptions title: "Display" - + style: groupBoxStyle Layout.fillWidth: true GridLayout { @@ -137,8 +189,8 @@ Rectangle { flow: GridLayout.TopToBottom anchors.fill: parent - Label { text: "Brightness: "; } - Label { text: "Display FPS: "; } + Label { text: "Brightness: "; font.pixelSize: 18; color: "white" } + Label { text: "Display FPS: "; font.pixelSize: 18; color: "white" } Slider { maximumValue: 255 @@ -160,7 +212,7 @@ Rectangle { GroupBox { id: networkOptions title: "Network" - + style: groupBoxStyle Layout.fillWidth: true GridLayout { @@ -171,18 +223,26 @@ Rectangle { flow: GridLayout.TopToBottom anchors.fill: parent - Label { text: "Hostname: "; } - Label { text: "IP address: "; } + Label { text: "Hostname: "; font.pixelSize: 18; color: "white" } + Label { text: "IP address: "; font.pixelSize: 18; color: "white"} TextField { id: hostname + implicitHeight: hostnameButton.height - 8 text: if (networkControllerLoader.item != undefined) { networkControllerLoader.item.getHostname(); } + font.pixelSize: 18 Layout.fillWidth: true } - Label { text: if (networkControllerLoader.item != undefined) { networkControllerLoader.item.getIPAddress(); } } + Label { + text: if (networkControllerLoader.item != undefined) { networkControllerLoader.item.getIPAddress(); } + font.pixelSize: 18 + color: "white" + } Button { + id: hostnameButton + style: buttonStyle text: "Change hostname" onClicked: networkControllerLoader.item.setHostname(hostname.text); enabled: networkControllerLoader.item != undefined @@ -194,6 +254,7 @@ Rectangle { GroupBox { id: wifiOptions title: "Wifi" + style: groupBoxStyle Layout.fillWidth: true } diff --git a/basicsuite/launchersettings/preview_l.jpg b/basicsuite/launchersettings/preview_l.jpg index 118edc4..b9b232b 100644 Binary files a/basicsuite/launchersettings/preview_l.jpg and b/basicsuite/launchersettings/preview_l.jpg differ -- cgit v1.2.3 From 653d4eb2c135f3c3c9449566ec478b2fe4a3e567 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 19 Feb 2014 15:15:51 +0100 Subject: [qt5-launchpresentation] Don't crop the description text on nexus Tesk-number: QTEE-407 Change-Id: I6f89136ceece1e6aae1c6b00c3b2aa53c47c1e4c Reviewed-by: Andy Nichols --- basicsuite/qt5-launchpresentation/description.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/basicsuite/qt5-launchpresentation/description.txt b/basicsuite/qt5-launchpresentation/description.txt index 48d03f3..6ad8936 100644 --- a/basicsuite/qt5-launchpresentation/description.txt +++ b/basicsuite/qt5-launchpresentation/description.txt @@ -1,6 +1,5 @@ -The following is a quick tour of what is new in Qt 5. +The following is a quick tour of what is new in Qt 5. It is an application written with Qt Quick, based on Qt 5, the source code is available from [1]. The demo makes use of the QML Presentation System, available from [2]. Qt5 launch demo has been modified slightly to run in this launcher. -It is an application written with Qt Quick, based on Qt 5. The source code is available from: https://qt.gitorious.org/qt-labs/qt5-launch-demo -The demo makes use of the QML Presentation System, available from: ssh://codereview.qt-project.org/qt-labs/qml-presentation-system.git +[1] https://qt.gitorious.org/qt-labs/qt5-launch-demo +[2] ssh://codereview.qt-project.org/qt-labs/qml-presentation-system.git -The demo has been modified slightly to run in this launcher. -- cgit v1.2.3 From 9212027697bad66cc493b8d8f2cffb2a8547f982 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Wed, 19 Feb 2014 16:21:25 +0100 Subject: Fix layout issues with Qt-Everywhere (touchgallery) Change-Id: I852d90b1c6afdc0316c7d4e45415c53eda94066a Reviewed-by: Gatis Paeglis --- basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml | 2 +- .../qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml | 6 +++--- basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml | 3 +++ basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml | 2 +- .../qt5-everywhere/demos/touchgallery/content/TextInputPage.qml | 2 +- basicsuite/qt5-everywhere/demos/touchgallery/main.qml | 4 ++-- basicsuite/qt5-everywhere/qt5-everywhere.pro | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml index 19c317f..9133158 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/ButtonPage.qml @@ -97,7 +97,7 @@ Item { ButtonStyle { panel: Item { implicitHeight: 50 - implicitWidth: 320 + implicitWidth: 300 BorderImage { anchors.fill: parent antialiasing: true diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml index d370d39..93adc7a 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/ProgressBarPage.qml @@ -73,14 +73,14 @@ Item { ProgressBar { anchors.margins: 20 style: touchStyle - width: 400 + width: 300 value: progress } ProgressBar { anchors.margins: 20 style: touchStyle - width: 400 + width: 300 value: 1 - progress } @@ -88,7 +88,7 @@ Item { anchors.margins: 20 style: touchStyle value: 1 - width: 400 + width: 300 } } diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml index 75a75fb..4a34037 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/SliderPage.qml @@ -53,16 +53,19 @@ Item { Slider { anchors.margins: 20 + width: 280 style: touchStyle value: 0 } Slider { anchors.margins: 20 + width: 280 style: touchStyle value: 0.5 } Slider { anchors.margins: 20 + width: 280 style: touchStyle value: 1.0 } diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml index 8cba319..7731c33 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/TabBarPage.qml @@ -84,7 +84,7 @@ Item { Text { anchors.centerIn: parent color: "white" - text: tab.title.toUpperCase() + text: styleData.title font.pixelSize: 16 } Rectangle { diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml b/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml index 058ff53..0ed71f7 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/content/TextInputPage.qml @@ -91,7 +91,7 @@ Item { font.pixelSize: 28 background: Item { implicitHeight: 50 - implicitWidth: 320 + implicitWidth: 300 BorderImage { source: "../images/textinput.png" border.left: 8 diff --git a/basicsuite/qt5-everywhere/demos/touchgallery/main.qml b/basicsuite/qt5-everywhere/demos/touchgallery/main.qml index 2708b8b..94089cf 100644 --- a/basicsuite/qt5-everywhere/demos/touchgallery/main.qml +++ b/basicsuite/qt5-everywhere/demos/touchgallery/main.qml @@ -81,9 +81,9 @@ CustomAppWindow { } Text { - font.pixelSize: app.height*.07 + font.pixelSize: app.height*.06 Behavior on x { NumberAnimation{ easing.type: Easing.OutCubic} } - x: backButton.x + backButton.width + 20 + x: backButton.x + backButton.width + 10 anchors.verticalCenter: parent.verticalCenter color: "white" text: "Widget Gallery" diff --git a/basicsuite/qt5-everywhere/qt5-everywhere.pro b/basicsuite/qt5-everywhere/qt5-everywhere.pro index fab62cb..245d838 100644 --- a/basicsuite/qt5-everywhere/qt5-everywhere.pro +++ b/basicsuite/qt5-everywhere/qt5-everywhere.pro @@ -2,4 +2,4 @@ TEMPLATE = subdirs CONFIG += ordered SUBDIRS += \ demos \ - app.pro \ No newline at end of file + app.pro -- cgit v1.2.3 From cdb8e537c556d44d2bf19f86c740a36d7b7d2d8d Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 20 Feb 2014 10:28:55 +0100 Subject: Remove Sensor Explorer and Particles demos from launcher Remove the two demos from the launcher. Keep them in the repository still, making it possible to build them stand-alone. Change-Id: I00fc2e91d556584a9a1124ccc8598ec65804bacb Reviewed-by: Gatis Paeglis --- basicsuite/qt5-particlesdemo/exclude.txt | 1 + basicsuite/sensorexplorer/exclude.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 basicsuite/qt5-particlesdemo/exclude.txt diff --git a/basicsuite/qt5-particlesdemo/exclude.txt b/basicsuite/qt5-particlesdemo/exclude.txt new file mode 100644 index 0000000..0702cb5 --- /dev/null +++ b/basicsuite/qt5-particlesdemo/exclude.txt @@ -0,0 +1 @@ +all diff --git a/basicsuite/sensorexplorer/exclude.txt b/basicsuite/sensorexplorer/exclude.txt index e20e515..0702cb5 100644 --- a/basicsuite/sensorexplorer/exclude.txt +++ b/basicsuite/sensorexplorer/exclude.txt @@ -1 +1 @@ -android-beaglebone:android-iMX6:linux-iMX6:linux-raspberrypi:linux-beagleboard:linux-beaglebone +all -- cgit v1.2.3 From 772daaae84a8fcee1eb35707eeb3f15dd17efc1d Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 20 Feb 2014 12:34:35 +0100 Subject: Remove Sensors demo from the Qt Creator's list of examples This demo doesn't work when built stand-alone. Task-number: QTEE-422 Change-Id: Ib5f85f5322e79c8fdf4221f804d9a0147e906740 Reviewed-by: Gatis Paeglis --- doc/b2qt-demos.qdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/b2qt-demos.qdoc b/doc/b2qt-demos.qdoc index 6bec313..d54a32c 100644 --- a/doc/b2qt-demos.qdoc +++ b/doc/b2qt-demos.qdoc @@ -165,6 +165,7 @@ */ /*! + \omit \example sensors \title Sensors \ingroup b2qt-demos @@ -175,6 +176,7 @@ Tilting the device moves the bubble around, based on readings from the accelerometer sensor. For the light sensor, exposing the device to different lighting conditions changes the displayed image. + \endomit */ /*! -- cgit v1.2.3 From 14269df3f2e27199895f6b2374e33a76c11b67a7 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 20 Feb 2014 12:20:16 +0100 Subject: [controls-touch] Deploy images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTEE-418 Change-Id: I11b84680f2e93df27da601b5948336640428d4a1 Reviewed-by: Topi Reiniö --- basicsuite/controls-touch/controls-touch.pro | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/basicsuite/controls-touch/controls-touch.pro b/basicsuite/controls-touch/controls-touch.pro index 0a4ad03..9771bef 100644 --- a/basicsuite/controls-touch/controls-touch.pro +++ b/basicsuite/controls-touch/controls-touch.pro @@ -6,9 +6,11 @@ b2qtdemo_deploy_defaults() content.files = \ *.qml \ *.png \ - content + content \ + images + content.path = $$DESTPATH OTHER_FILES += $${content.files} -INSTALLS += target content \ No newline at end of file +INSTALLS += target content -- cgit v1.2.3 From 71db2bada3de8cc2a930a470ab41ea8dbf748ddf Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Wed, 19 Feb 2014 17:35:50 +0100 Subject: Fix QML GroupBox: Binding loop detected for property QTEE-357 Change-Id: I8f400f5d204f56e61339e097d6288961d3d7133d Reviewed-by: Eirik Aavitsland Reviewed-by: Gatis Paeglis --- basicsuite/launchersettings/main.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/basicsuite/launchersettings/main.qml b/basicsuite/launchersettings/main.qml index 0002076..718bf69 100644 --- a/basicsuite/launchersettings/main.qml +++ b/basicsuite/launchersettings/main.qml @@ -150,6 +150,7 @@ Rectangle { title: "Power" Layout.fillWidth: true style: groupBoxStyle + implicitWidth: 0 RowLayout { id: powerButtonRow @@ -181,6 +182,7 @@ Rectangle { title: "Display" style: groupBoxStyle Layout.fillWidth: true + implicitWidth: 0 GridLayout { id: displayGrid @@ -214,6 +216,7 @@ Rectangle { title: "Network" style: groupBoxStyle Layout.fillWidth: true + implicitWidth: 0 GridLayout { id: networkGrid -- cgit v1.2.3 From b457d0cd3d8f97f1b0ac7984a9056972dd7e1760 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 20 Feb 2014 12:23:26 +0100 Subject: Update content for About Boot to Qt demo - Replace Boot to Qt with Qt Enterprise Embedded where suitable, and update content with current messaging - Rename title to 'About Qt Enterprise Embedded' Task-number: QTEE-390 Change-Id: I30c2ee11954da43dc4010cc890beec9020cc529f Reviewed-by: Kalle Viironen Reviewed-by: Eirik Aavitsland --- basicsuite/about-b2qt/AboutBoot2Qt.qml | 69 ++++++++++++++++++++-------------- basicsuite/about-b2qt/QtForAndroid.qml | 2 +- basicsuite/about-b2qt/QtFramework.qml | 4 +- basicsuite/about-b2qt/main.qml | 2 +- basicsuite/about-b2qt/title.txt | 2 +- 5 files changed, 45 insertions(+), 34 deletions(-) diff --git a/basicsuite/about-b2qt/AboutBoot2Qt.qml b/basicsuite/about-b2qt/AboutBoot2Qt.qml index f9859ee..d050a71 100644 --- a/basicsuite/about-b2qt/AboutBoot2Qt.qml +++ b/basicsuite/about-b2qt/AboutBoot2Qt.qml @@ -50,28 +50,18 @@ Column { Title { id: title - text: "Boot to Qt" + text: "Qt Enterprise Embedded" } ContentText { id: brief width: parent.width - text: '

    Boot to Qt is a light-weight UI stack for embedded systems, based on the Qt Framework by Digia, - offering an elegant means of developing beautiful and performant embedded devices. It supports two different - operating systems: -

      -
    • Boot to Qt for embedded Android places Qt on top of an Android (version 4.1 or higher) - kernel/baselayer.
    • -
    • Boot to Qt for embedded Linux places Qt on top of an Linux kernel/baselayer, built using - Yocto 1.4 \'Dylan\' release.
    • -
    - Both versions have been tested and verified on a number of different hardware configurations. - Boot to Qt support is not limited to the devices used as reference platforms, it can be made to run on a - variety of hardware. - -

    Boot to Qt is part of a commercial-only SDK offering which includes a ready-made stack - with full Qt Creator integration. The SDK allows building and running on device - with just a button. Embedded development has never been this easy!' + text: '

    Qt Enterprise Embedded provides a fully-integrated solution + to get you started immediately with software development on your embedded device + with a tailored user experience for embedded Linux and embedded Android. It + supports your key requirements for high performance, minimal footprint together + with Qt’s flexible full-framework modular architecture to deliver unparalleled + scalability.' } Column { @@ -90,20 +80,41 @@ Column { width: parent.width - text: '

    Boot to Qt has been tested and verified on - a number of different hardware configurations, including: + text: '

    Qt Enterprise Embedded gives you shorter time-to-market + providing you with the productivity-enhancing tools and value-adding components. + You are up-to-speed with development and prototyping since day one. You can just + focus on writing your application with Qt.
    +

    Qt Enterprise Embedded provides you with the following:

      -
    • Google Nexus 7 - NVIDIA Tegra3 Quad Core, 1 GB RAM
    • -
    • Beagle Board xM - ARM Coretex A8 1GHz, 512 MB RAM, PowerVR SGX 530
    • -
    • Freescale i.MX 6 - ARM Cortex A9 1.2GHz, 1 GB RAM, Vivante GC2000
    • -
    - Rough minimal requirements for running Boot to Qt are: -
      -
    • 256Mb of RAM
    • -
    • 500Mhz CPU, 1Ghz preferred for 60 FPS velvet UIs
    • -
    • OpenGL ES 2.0 support
    • -
    • Android 4.0+ compatible hardware
    • +
    • A full-blown, productivity enhancing development environment, + installed on a Linux development desktop. This self-contained environment + is installed and updated through one online installer and features the Qt + Creator Enterprise IDE, with features that facilitate the whole product + creation lifecycle: UI designer, code editor, direct device deployment + via USB or IP, emulator, on-device debugging and profiling.

    • +
    • Shorter time-to-market with the Boot to Qt Software Stack. A + light-weight, Qt-optimized, full software stack that is installed into + the actual target device. The stack comes in two flavors, Embedded Android + and Embedded Linux. The pre-built stack gets you up-to-speed with prototyping + in no time and with our professional tooling you can customize the stack into + your exact production needs.

    • +
    • Full power and scalability of Qt on Embedded. Leverage the + cross-platform C++ native APIs for maximum performance on both beautiful + user interfaces as well as non-GUI operations. With C++, you have full control + over your application code. You can also configure Qt Enterprise Embedded + directly from the source codes into a large variety of supported hardware and + operating systems. As with any Qt project, the same application can be deployed + natively to desktop and mobile OS targets as well.

    • +
    • Value-Adding Components. No need to re-implement the wheel! Full Qt + Enterprise libraries give you a shortcut on development time providing ready-made + solutions, such as a comprehensive virtual keyboard, charts and industrial UI + controls.
    + +

    Qt Enterprise Embedded includes Boot to Qt, a light-weight, + Qt-optimized, full software stack for embedded systems that is installed into the actual + target device. The Boot to Qt stack can be made to run on a variety of hardware - Qt + Enterprise Embedded comes with pre-built images for several reference devices. ' } } diff --git a/basicsuite/about-b2qt/QtForAndroid.qml b/basicsuite/about-b2qt/QtForAndroid.qml index 7e53e2f..16d834a 100644 --- a/basicsuite/about-b2qt/QtForAndroid.qml +++ b/basicsuite/about-b2qt/QtForAndroid.qml @@ -87,7 +87,7 @@ Column { ContentText { width: parent.width text: '

    Boot to Qt for embedded Linux is build from scratch using - Yocto 1.4 tools to contain only components required in the embedded device, + Yocto 1.5 tools to contain only components required in the embedded device, resulting in smaller image sizes while keeping valuable development tools available.' } } diff --git a/basicsuite/about-b2qt/QtFramework.qml b/basicsuite/about-b2qt/QtFramework.qml index 70c6c6e..76c2865 100644 --- a/basicsuite/about-b2qt/QtFramework.qml +++ b/basicsuite/about-b2qt/QtFramework.qml @@ -59,9 +59,9 @@ Column { and mobile platforms.

    • Qt Framework - intuitive APIs for C++ and CSS/JavaScript-like - programming with Qt Quick for rapid UI creation<\li> + programming with Qt Quick for rapid UI creation

    • Qt Creator IDE - powerful cross-platform integrated - development environment, including UI designer tools and on-device debugging
    • + development environment, including UI designer tools and on-device debugging
    • Tools and toolchains - internationalization support, embedded toolchains and more.
    diff --git a/basicsuite/about-b2qt/main.qml b/basicsuite/about-b2qt/main.qml index 865aca4..5c5c6df 100644 --- a/basicsuite/about-b2qt/main.qml +++ b/basicsuite/about-b2qt/main.qml @@ -106,8 +106,8 @@ Item { Item { width: 1; height: engine.smallFontSize() } AboutBoot2Qt { } - QtFramework { } QtForAndroid { } + QtFramework { } Image { id: codeLessImage source: "codeless.png" diff --git a/basicsuite/about-b2qt/title.txt b/basicsuite/about-b2qt/title.txt index 9b133f7..634a26a 100644 --- a/basicsuite/about-b2qt/title.txt +++ b/basicsuite/about-b2qt/title.txt @@ -1 +1 @@ -About Boot to Qt +About Qt Enterprise Embedded -- cgit v1.2.3 From 963688ce86e2a8e47f8268aad74c6303597fd22e Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 20 Feb 2014 12:26:59 +0100 Subject: Update title and description for Text Input demo Rename to 'Virtual Keyboard' and use 'Qt Enterprise Embedded' in the description. Change-Id: Id98b83d2be41d51acf279ee3d357603bfe99295a Reviewed-by: Eirik Aavitsland --- basicsuite/textinput/description.txt | 2 +- basicsuite/textinput/title.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/basicsuite/textinput/description.txt b/basicsuite/textinput/description.txt index e65bb3e..5330313 100644 --- a/basicsuite/textinput/description.txt +++ b/basicsuite/textinput/description.txt @@ -1,3 +1,3 @@ This example illustrates how to handle input on touch devices. -The Boot to Qt stack comes with Qt Virtual Keyboard - a framework that consists of a C++ back end with support for custom input methods, as well as a reference keyboard front end implemented in QML, supporting multiple languages. +Qt Enterprise Embedded comes with Qt Virtual Keyboard - a framework that consists of a C++ back end with support for custom input methods, as well as a reference keyboard front end implemented in QML, supporting multiple languages. diff --git a/basicsuite/textinput/title.txt b/basicsuite/textinput/title.txt index 607f060..932c2f3 100644 --- a/basicsuite/textinput/title.txt +++ b/basicsuite/textinput/title.txt @@ -1 +1 @@ -Text Input +Virtual Keyboard -- cgit v1.2.3 From f261c03c73970a14f361bb9d00864f3357403c1d Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 20 Feb 2014 13:12:47 +0100 Subject: Add QtWidgets dependecy to shared.pri MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTEE-417 Change-Id: I927a6ac2bfe4fbce4819bd740f4a7d1df19466ac Reviewed-by: Kalle Viironen Reviewed-by: Eirik Aavitsland Reviewed-by: Topi Reiniö --- basicsuite/shared/main.cpp | 7 ++++--- basicsuite/shared/shared.pri | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp index 198b228..74781e9 100644 --- a/basicsuite/shared/main.cpp +++ b/basicsuite/shared/main.cpp @@ -16,8 +16,9 @@ ** ****************************************************************************/ #include - -#include +// QtWidget (QApplication) dependecy is required by QtCharts demo, +// when QtWidget dependecy is not required use QGuiApplication from QtGui module +#include #include #include #include @@ -37,7 +38,7 @@ int main(int argc, char **argv) { //qputenv("QT_IM_MODULE", QByteArray("qtvkb")); - QGuiApplication app(argc, argv); + QApplication app(argc, argv); QString path = app.applicationDirPath(); QPalette pal; diff --git a/basicsuite/shared/shared.pri b/basicsuite/shared/shared.pri index 08f749e..dbfd513 100644 --- a/basicsuite/shared/shared.pri +++ b/basicsuite/shared/shared.pri @@ -1,4 +1,5 @@ -QT += quick +# widget dependecy is required by QtCharts demo +QT += quick widgets DESTPATH = /data/user/$$TARGET target.path = $$DESTPATH -- cgit v1.2.3 From 0325d7b4156098ef064f04208905712c5bf0174e Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 20 Feb 2014 13:49:55 +0100 Subject: Fix deployment of QML import plugins when building in Qt Creator Task-number: QTEE-419 Task-number: QTEE-420 Change-Id: Iaa57cf0b4060f1dfb3fad3e81bc4c4d070cc6820 Reviewed-by: Eirik Aavitsland Reviewed-by: Kalle Viironen --- basicsuite/camera/camerautils/camerautils.pro | 5 +++-- .../qt5-everywhere/demos/shaders/import/import.pro | 17 ++++++++++++----- basicsuite/sensorexplorer/imports/imports.pro | 15 +++++++++++---- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/basicsuite/camera/camerautils/camerautils.pro b/basicsuite/camera/camerautils/camerautils.pro index 938a0a9..7e5864e 100644 --- a/basicsuite/camera/camerautils/camerautils.pro +++ b/basicsuite/camera/camerautils/camerautils.pro @@ -12,8 +12,9 @@ HEADERS += camerautils.h pluginfiles.files += \ qmldir \ -target.path += $$[QT_INSTALL_QML]/CameraUtils -pluginfiles.path += $$[QT_INSTALL_QML]/CameraUtils +B2QT_DEPLOYPATH = /data/user/qt/qmlplugins/CameraUtils +target.path += $$B2QT_DEPLOYPATH +pluginfiles.path += $$B2QT_DEPLOYPATH INSTALLS += target pluginfiles diff --git a/basicsuite/qt5-everywhere/demos/shaders/import/import.pro b/basicsuite/qt5-everywhere/demos/shaders/import/import.pro index d72fb60..af51461 100644 --- a/basicsuite/qt5-everywhere/demos/shaders/import/import.pro +++ b/basicsuite/qt5-everywhere/demos/shaders/import/import.pro @@ -1,13 +1,20 @@ -CXX_MODULE = qml +TEMPLATE = lib +CONFIG += plugin + TARGET = shaderreader -TARGETPATH = ShaderReader -IMPORT_VERSION = 1.0 -QT += quick +QT += qml quick SOURCES = main.cpp \ shaderfilereader.cpp \ HEADERS = shaderfilereader.h \ -load(qml_plugin) +pluginfiles.files += \ + qmldir \ + +B2QT_DEPLOYPATH = /data/user/qt/qmlplugins/ShaderReader +target.path += $$B2QT_DEPLOYPATH +pluginfiles.path += $$B2QT_DEPLOYPATH + +INSTALLS += target pluginfiles diff --git a/basicsuite/sensorexplorer/imports/imports.pro b/basicsuite/sensorexplorer/imports/imports.pro index c596185..41a5f18 100644 --- a/basicsuite/sensorexplorer/imports/imports.pro +++ b/basicsuite/sensorexplorer/imports/imports.pro @@ -1,7 +1,7 @@ -CXX_MODULE = qml +TEMPLATE = lib +CONFIG += plugin + TARGET = sensorexplorer -TARGETPATH = Explorer -IMPORT_VERSION = 1.0 QT += qml sensors @@ -14,4 +14,11 @@ HEADERS = explorer.h \ sensoritem.h \ propertyinfo.h \ -load(qml_plugin) +pluginfiles.files += \ + qmldir \ + +B2QT_DEPLOYPATH = /data/user/qt/qmlplugins/Explorer +target.path += $$B2QT_DEPLOYPATH +pluginfiles.path += $$B2QT_DEPLOYPATH + +INSTALLS += target pluginfiles -- cgit v1.2.3