diff --git a/examples/examples.pro b/examples/examples.pro index c1822e57a..fc442bea8 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -15,8 +15,7 @@ player.depends += common greaterThan(QT_MAJOR_VERSION, 4) { # qtHaveModule does not exist in Qt5.0 isEqual(QT_MINOR_VERSION, 0)|qtHaveModule(quick) { - SUBDIRS += QMLPlayer \ - qmlvideofx + SUBDIRS += QMLPlayer QMLPlayer.depends += common } } diff --git a/examples/qmlvideofx/filereader.cpp b/examples/qmlvideofx/filereader.cpp deleted file mode 100644 index 4a6242ce9..000000000 --- a/examples/qmlvideofx/filereader.cpp +++ /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 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$ -** -****************************************************************************/ - -#include "filereader.h" -#include "trace.h" - -#include -#include -#include -#include -#include - -QString FileReader::readFile(const QString &fileName) -{ - qtTrace() << "FileReader::readFile" << "fileName" << fileName; - QString content; - QFile file(fileName); - if (file.open(QIODevice::ReadOnly)) { - QTextStream stream(&file); - content = stream.readAll(); - } - return content; -} - diff --git a/examples/qmlvideofx/filereader.h b/examples/qmlvideofx/filereader.h deleted file mode 100644 index 927f905c2..000000000 --- a/examples/qmlvideofx/filereader.h +++ /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 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$ -** -****************************************************************************/ - -#include - -class FileReader : public QObject -{ - Q_OBJECT -public: - Q_INVOKABLE QString readFile(const QString &fileName); -}; - diff --git a/examples/qmlvideofx/images/close.png b/examples/qmlvideofx/images/close.png deleted file mode 100644 index 6904df0e4..000000000 Binary files a/examples/qmlvideofx/images/close.png and /dev/null differ diff --git a/examples/qmlvideofx/images/folder.png b/examples/qmlvideofx/images/folder.png deleted file mode 100644 index e53e2ad46..000000000 Binary files a/examples/qmlvideofx/images/folder.png and /dev/null differ diff --git a/examples/qmlvideofx/images/qt-logo.png b/examples/qmlvideofx/images/qt-logo.png deleted file mode 100644 index 7d3e97eb3..000000000 Binary files a/examples/qmlvideofx/images/qt-logo.png and /dev/null differ diff --git a/examples/qmlvideofx/images/titlebar.png b/examples/qmlvideofx/images/titlebar.png deleted file mode 100644 index 51c90082d..000000000 Binary files a/examples/qmlvideofx/images/titlebar.png and /dev/null differ diff --git a/examples/qmlvideofx/images/titlebar.sci b/examples/qmlvideofx/images/titlebar.sci deleted file mode 100644 index 0418d94cd..000000000 --- a/examples/qmlvideofx/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/examples/qmlvideofx/images/up.png b/examples/qmlvideofx/images/up.png deleted file mode 100644 index b05f8025d..000000000 Binary files a/examples/qmlvideofx/images/up.png and /dev/null differ diff --git a/examples/qmlvideofx/main.cpp b/examples/qmlvideofx/main.cpp deleted file mode 100644 index 7465deab8..000000000 --- a/examples/qmlvideofx/main.cpp +++ /dev/null @@ -1,147 +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 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$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include "filereader.h" -#include "trace.h" - -#ifdef SMALL_SCREEN_LAYOUT - static const QLatin1String MainQmlFile("main-smallscreen.qml"); -#else - static const QLatin1String MainQmlFile("main-largescreen.qml"); -#endif - -#ifdef PERFORMANCEMONITOR_SUPPORT -#include "performancemonitordeclarative.h" -#endif - -int main(int argc, char *argv[]) -{ - QGuiApplication app(argc, argv); - -#ifdef PERFORMANCEMONITOR_SUPPORT - PerformanceMonitor::qmlRegisterTypes(); -#endif - - QUrl fileName; - qreal volume = 0.5; - QStringList args = app.arguments(); -#ifdef PERFORMANCEMONITOR_SUPPORT - PerformanceMonitor::State performanceMonitorState; -#endif - for (int i = 1; i < args.size(); ++i) { - const QByteArray arg = args.at(i).toUtf8(); - if (arg.startsWith('-')) { - if ("-volume" == arg) { - if (i + 1 < args.size()) - volume = 0.01 * args.at(++i).toInt(); - else - qtTrace() << "Option \"-volume\" takes a value"; - } -#ifdef PERFORMANCEMONITOR_SUPPORT - else if (performanceMonitorState.parseArgument(arg)) { - // Do nothing - } -#endif - else { - qtTrace() << "Option" << arg << "ignored"; - } - } else { - if (fileName.isEmpty()) - fileName = QUrl::fromLocalFile(arg); - else - qtTrace() << "Argument" << arg << "ignored"; - } - } - - QQuickView viewer; - - viewer.setSource(QLatin1String("qrc:///qml/qmlvideofx/") + MainQmlFile); - QQuickItem *rootObject = viewer.rootObject(); - rootObject->setProperty("fileName", fileName); - viewer.rootObject()->setProperty("volume", volume); - -#ifdef PERFORMANCEMONITOR_SUPPORT - if (performanceMonitorState.valid) { - rootObject->setProperty("perfMonitorsLogging", performanceMonitorState.logging); - rootObject->setProperty("perfMonitorsVisible", performanceMonitorState.visible); - } - QObject::connect(&viewer, SIGNAL(afterRendering()), - rootObject, SLOT(qmlFramePainted())); -#endif - - FileReader fileReader; - viewer.rootContext()->setContextProperty("fileReader", &fileReader); - - const QUrl appPath(QUrl::fromLocalFile(app.applicationDirPath())); - const QStringList picturesLocation = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation); - const QUrl imagePath = picturesLocation.isEmpty() ? appPath : QUrl::fromLocalFile(picturesLocation.first()); - viewer.rootContext()->setContextProperty("imagePath", imagePath); - - const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation); - const QUrl videoPath = moviesLocation.isEmpty() ? appPath : QUrl::fromLocalFile(moviesLocation.first()); - viewer.rootContext()->setContextProperty("videoPath", videoPath); - - viewer.setTitle("qmlvideofx"); - viewer.setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | - Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint); - viewer.setMinimumSize(QSize(600, 400)); - -#ifdef SMALL_SCREEN_PHYSICAL - viewer.showFullScreen(); -#else - viewer.show(); -#endif - - // Delay invocation of init until the event loop has started, to work around - // a GL context issue on Harmattan: without this, we get the following error - // when the first ShaderEffectItem is created: - // "QGLShaderProgram::addShader: Program and shader are not associated with same context" - QMetaObject::invokeMethod(viewer.rootObject(), "init", Qt::QueuedConnection); - - return app.exec(); -} - diff --git a/examples/qmlvideofx/qml/qmlvideofx/Button.qml b/examples/qmlvideofx/qml/qmlvideofx/Button.qml deleted file mode 100644 index 7f397b40f..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/Button.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 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 - -Item { - id: root - //color: textColor - //radius: 0.25 * height - - property string text - property color bgColor: "#00000000" - property color bgColorSelected: "#2000ff00" - property color textColor: "white" - property alias enabled: mouseArea.enabled - - signal clicked - - Rectangle { - anchors { fill: parent; margins: 1 } - color: mouseArea.pressed ? bgColorSelected : bgColor - //radius: 0.25 * height - - Text { - id: text - anchors.centerIn: parent - text: root.text - font.pixelSize: 0.5 * parent.height - color: textColor - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - - MouseArea { - id: mouseArea - anchors.fill: parent - onClicked: { - root.clicked() - } - } - } -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/Content.qml b/examples/qmlvideofx/qml/qmlvideofx/Content.qml deleted file mode 100644 index d3a2e9f42..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/Content.qml +++ /dev/null @@ -1,163 +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 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: "black" - property alias effect: effectLoader.item - property alias gripSize: divider.gripSize - property string effectSource - property real volume: 0.5 - - signal videoFramePainted - - Divider { - id: divider - visible: false - z: 1.0 - onValueChanged: updateDivider() - } - - ShaderEffectSource { - id: theSource - smooth: true - hideSource: true - } - - Loader { - id: contentLoader - } - - Loader { - id: effectLoader - source: effectSource - } - - Connections { - id: videoFramePaintedConnection - onFramePainted: { - if (performanceLoader.item) - root.videoFramePainted() - } - ignoreUnknownSignals: true - } - - onWidthChanged: { - if (effectLoader.item) - effectLoader.item.targetWidth = root.width - } - - onHeightChanged: { - if (effectLoader.item) - effectLoader.item.targetHeight = root.height - } - - onEffectSourceChanged: { - console.log("[qmlvideofx] Content.onEffectSourceChanged " + effectSource) - effectLoader.source = effectSource - effectLoader.item.parent = root - effectLoader.item.targetWidth = root.width - effectLoader.item.targetHeight = root.height - updateSource() - effectLoader.item.source = theSource - divider.visible = effectLoader.item.divider - updateDivider() - } - - function init() { - console.log("[qmlvideofx] Content.init") - openImage("qrc:/images/qt-logo.png") - root.effectSource = "EffectPassThrough.qml" - } - - function updateDivider() { - if (effectLoader.item && effectLoader.item.divider) - effectLoader.item.dividerValue = divider.value - } - - function updateSource() { - console.log("[qmlvideofx] Content.updateSource") - if (contentLoader.item) { - contentLoader.item.parent = root - contentLoader.item.anchors.fill = root - theSource.sourceItem = contentLoader.item - if (effectLoader.item) - effectLoader.item.anchors.fill = contentLoader.item - } - } - - function openImage(path) { - console.log("[qmlvideofx] Content.openImage \"" + path + "\"") - stop() - contentLoader.source = "ContentImage.qml" - videoFramePaintedConnection.target = null - contentLoader.item.source = path - updateSource() - } - - function openVideo(path) { - console.log("[qmlvideofx] Content.openVideo \"" + path + "\"") - stop() - contentLoader.source = "ContentVideo.qml" - videoFramePaintedConnection.target = contentLoader.item - contentLoader.item.mediaSource = path - contentLoader.item.volume = volume - contentLoader.item.play() - updateSource() - } - - function openCamera() { - console.log("[qmlvideofx] Content.openCamera") - stop() - contentLoader.source = "ContentCamera.qml" - videoFramePaintedConnection.target = contentLoader.item - updateSource() - } - - function stop() { - console.log("[qmlvideofx] Content.stop") - if (contentLoader.source == "ContentVideo.qml") - contentLoader.item.stop() - theSource.sourceItem = null - } -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/ContentCamera.qml b/examples/qmlvideofx/qml/qmlvideofx/ContentCamera.qml deleted file mode 100644 index 8c29e6d22..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/ContentCamera.qml +++ /dev/null @@ -1,51 +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 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 { - source: camera - - Camera { - id: camera - } -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/ContentImage.qml b/examples/qmlvideofx/qml/qmlvideofx/ContentImage.qml deleted file mode 100644 index 0fa047bb1..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/ContentImage.qml +++ /dev/null @@ -1,47 +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 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 - -Image { - fillMode: Image.PreserveAspectFit - smooth: true -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/ContentVideo.qml b/examples/qmlvideofx/qml/qmlvideofx/ContentVideo.qml deleted file mode 100644 index 15c828719..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/ContentVideo.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 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 QtAV 1.3 - -VideoOutput { - source: mediaPlayer - property alias mediaSource: mediaPlayer.source - property alias volume: mediaPlayer.volume - - MediaPlayer { - id: mediaPlayer - //autoPlay: true - volume: 0.5 - //loops: Audio.Infinite - } - - function play() { mediaPlayer.play() } - function stop() { mediaPlayer.stop() } -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/DisableScreenSaver.qml b/examples/qmlvideofx/qml/qmlvideofx/DisableScreenSaver.qml deleted file mode 100644 index f36b2b14f..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/DisableScreenSaver.qml +++ /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 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 QtMobility.systeminfo 1.1 - -Item { - ScreenSaver { - screenSaverInhibited: true - } -} - diff --git a/examples/qmlvideofx/qml/qmlvideofx/Divider.qml b/examples/qmlvideofx/qml/qmlvideofx/Divider.qml deleted file mode 100644 index 390818bbc..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/Divider.qml +++ /dev/null @@ -1,73 +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 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 - anchors.fill: parent - color: "transparent" - property alias value: slider.value - property alias lineWidth: line.width - property alias gripSize: slider.gripSize - - Rectangle { - id: line - anchors { top: parent.top; bottom: parent.bottom } - x: parent.value * parent.width - (width / 2) - width: 2 - color: "red" - } - - Slider { - id: slider - increment: 0.0 - lineColor: "transparent" - fillColor: "transparent" - gripColor: "red" - anchors { - top: parent.top - topMargin: gripSize / 2 - left: parent.left - right: parent.right - } - } -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/Effect.qml b/examples/qmlvideofx/qml/qmlvideofx/Effect.qml deleted file mode 100644 index 062a278d8..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/Effect.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 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: true - property real dividerValue: 0.5 - property real targetWidth: 0 - property real targetHeight: 0 - 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 - " - } - - // 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 + fileReader.readFile(":shaders/" + fragmentShaderFilename) - onVertexShaderFilenameChanged: - vertexShader = fileReader.readFile(vertexShaderFilename) -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml deleted file mode 100644 index 4e3adc3e2..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectBillboard.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 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: "billboard.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml deleted file mode 100644 index 5e37c70ce..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml +++ /dev/null @@ -1,56 +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 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: "blackandwhite.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectEmboss.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectEmboss.qml deleted file mode 100644 index 58660be32..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectEmboss.qml +++ /dev/null @@ -1,46 +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 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: "emboss.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml deleted file mode 100644 index 00fab0448..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml +++ /dev/null @@ -1,85 +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 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: 0.5 - 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: "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: "gaussianblur_h.fsh" - source: horizontalShaderSource - - ShaderEffectSource { - id: horizontalShaderSource - sourceItem: verticalShader - smooth: true - hideSource: true - } - } -} - diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectGlow.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectGlow.qml deleted file mode 100644 index 6f9ab284f..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectGlow.qml +++ /dev/null @@ -1,46 +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 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: "glow.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml deleted file mode 100644 index f3650419c..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectIsolate.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 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: "isolate.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml deleted file mode 100644 index d93e72c9e..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml +++ /dev/null @@ -1,93 +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 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 - } - - fragmentShaderFilename: "magnify.fsh" - - MouseArea { - anchors.fill: parent - onPositionChanged: { root.posX = mouse.x; root.posY = root.targetHeight - mouse.y } - } -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml deleted file mode 100644 index e4fc1f78f..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectPageCurl.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 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 - - fragmentShaderFilename: "pagecurl.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectPassThrough.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectPassThrough.qml deleted file mode 100644 index d6b2e09df..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectPassThrough.qml +++ /dev/null @@ -1,46 +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 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/examples/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml deleted file mode 100644 index 002a74a46..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml +++ /dev/null @@ -1,56 +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 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: "pixelate.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml deleted file mode 100644 index bda473764..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectPosterize.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 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: "posterize.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectRipple.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectRipple.qml deleted file mode 100644 index 7932b4c12..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectRipple.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 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: "ripple.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectSelectionPanel.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectSelectionPanel.qml deleted file mode 100644 index 4675df5e2..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectSelectionPanel.qml +++ /dev/null @@ -1,155 +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 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 int itemHeight: 25 - property string effectSource: "" - color: "#80101010" - - signal clicked - - QtObject { - id: d - property Item selectedItem - } - - ListModel { - id: sources - ListElement { name: "No effect"; source: "EffectPassThrough.qml" } - ListElement { name: "Billboard"; source: "EffectBillboard.qml" } - ListElement { name: "Black & white"; source: "EffectBlackAndWhite.qml" } - ListElement { name: "Blur"; source: "EffectGaussianBlur.qml" } - ListElement { name: "Edge detection"; source: "EffectSobelEdgeDetection1.qml" } - //ListElement { name: "Edge detection (Sobel, #2)"; source: "EffectSobelEdgeDetection2.qml" } - ListElement { name: "Emboss"; source: "EffectEmboss.qml" } - ListElement { name: "Glow"; source: "EffectGlow.qml" } - ListElement { name: "Isolate"; source: "EffectIsolate.qml" } - ListElement { name: "Magnify"; source: "EffectMagnify.qml" } - ListElement { name: "Page curl"; source: "EffectPageCurl.qml" } - ListElement { name: "Pixelate"; source: "EffectPixelate.qml" } - ListElement { name: "Posterize"; source: "EffectPosterize.qml" } - ListElement { name: "Ripple"; source: "EffectRipple.qml" } - ListElement { name: "Sepia"; source: "EffectSepia.qml" } - ListElement { name: "Sharpen"; source: "EffectSharpen.qml" } - ListElement { name: "Shockwave"; source: "EffectShockwave.qml" } - ListElement { name: "Tilt shift"; source: "EffectTiltShift.qml" } - ListElement { name: "Toon"; source: "EffectToon.qml" } - ListElement { name: "Warhol"; source: "EffectWarhol.qml" } - ListElement { name: "Wobble"; source: "EffectWobble.qml" } - ListElement { name: "Vignette"; source: "EffectVignette.qml" } - } - - Component { - id: sourceDelegate - Item { - id: sourceDelegateItem - width: root.width - height: itemHeight - - Button { - id: sourceSelectorItem - anchors.centerIn: parent - width: 0.9 * parent.width - height: 0.8 * itemHeight - text: name - onClicked: { - if (d.selectedItem) - d.selectedItem.state = "baseState" - d.selectedItem = sourceDelegateItem - d.selectedItem.state = "selected" - effectSource = source - root.clicked() - } - } - - states: [ - State { - name: "selected" - PropertyChanges { - target: sourceSelectorItem - bgColor: "#20ffffff" - } - } - ] - - Component.onCompleted: { - if (name == "No effect") { - state = "selected" - d.selectedItem = sourceDelegateItem - } - } - - transitions: [ - Transition { - from: "*" - to: "*" - ColorAnimation { - properties: "color" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - } - } - - Flickable { - anchors.fill: parent - contentHeight: (itemHeight * sources.count) + layout.anchors.topMargin + layout.spacing - clip: true - - Column { - id: layout - - anchors { - fill: parent - topMargin: 10 - } - - Repeater { - model: sources - delegate: sourceDelegate - } - } - } -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectSepia.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectSepia.qml deleted file mode 100644 index 81ddf7c10..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectSepia.qml +++ /dev/null @@ -1,46 +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 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: "sepia.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml deleted file mode 100644 index 25215980d..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml +++ /dev/null @@ -1,56 +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 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: "sharpen.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml deleted file mode 100644 index 0e1b1785f..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectShockwave.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 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: "shockwave.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml deleted file mode 100644 index 6724a8449..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.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 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: "sobeledgedetection1.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection2.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection2.qml deleted file mode 100644 index 33336537f..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection2.qml +++ /dev/null @@ -1,56 +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 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 - - fragmentShaderFilename: "sobeledgedetection2.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectTiltShift.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectTiltShift.qml deleted file mode 100644 index c5dfd5848..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectTiltShift.qml +++ /dev/null @@ -1,46 +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 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: "tiltshift.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectToon.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectToon.qml deleted file mode 100644 index ff985e563..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectToon.qml +++ /dev/null @@ -1,63 +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 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: "toon.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectVignette.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectVignette.qml deleted file mode 100644 index 2bd421ac5..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectVignette.qml +++ /dev/null @@ -1,46 +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 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: "vignette.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectWarhol.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectWarhol.qml deleted file mode 100644 index 215e8ca96..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectWarhol.qml +++ /dev/null @@ -1,46 +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 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: "warhol.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/EffectWobble.qml b/examples/qmlvideofx/qml/qmlvideofx/EffectWobble.qml deleted file mode 100644 index 97e7c061c..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/EffectWobble.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 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: "wobble.fsh" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/FileBrowser.qml b/examples/qmlvideofx/qml/qmlvideofx/FileBrowser.qml deleted file mode 100644 index 7c8610361..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/FileBrowser.qml +++ /dev/null @@ -1,391 +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 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 - property bool shown: loader.sourceComponent - - signal fileSelected(string file) - - function selectFile(file) { - if (file !== "") { - folder = loader.item.folders.folder - fileBrowser.fileSelected(file) - } - loader.sourceComponent = undefined - } - - 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 - color: "white" - property bool showFocusHighlight: false - property variant folders: folders1 - property variant view: view1 - property alias folder: folders1.folder - property color textColor: "black" - - FolderListModel { - id: folders1 - folder: folder - } - - FolderListModel { - id: folders2 - folder: folder - } - - SystemPalette { - id: palette - } - - Component { - id: folderDelegate - - Rectangle { - id: wrapper - function launch() { - var path = "file://"; - if (filePath.length > 2 && filePath[1] === ':') // Windows drive logic, see QUrl::fromLocalFile() - path += '/'; - path += filePath; - if (folders.isFolder(index)) - down(path); - else - fileBrowser.selectFile(path) - } - width: root.width - height: 52 - 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: 48; height: 48 - Image { - source: "qrc:/images/folder.png" - anchors.centerIn: parent - visible: folders.isFolder(index) - } - } - - Text { - id: nameText - anchors.fill: parent; verticalAlignment: Text.AlignVCenter - text: fileName - anchors.leftMargin: 54 - font.pixelSize: 32 - 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.bottom: cancelButton.top - 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.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) - } - - Rectangle { - id: cancelButton - width: 100 - height: titleBar.height - 7 - color: "black" - anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter } - - Text { - anchors { fill: parent; margins: 4 } - text: "Cancel" - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 20 - } - - MouseArea { - anchors.fill: parent - onClicked: fileBrowser.selectFile("") - } - } - - 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(); - } - } - - BorderImage { - source: "qrc:/images/titlebar.sci"; - width: parent.width; - height: 52 - y: -7 - id: titleBar - - Rectangle { - id: upButton - width: 48 - height: titleBar.height - 7 - color: "transparent" - Image { anchors.centerIn: parent; source: "qrc:/images/up.png" } - MouseArea { id: upRegion; anchors.centerIn: parent - width: 56 - height: 56 - onClicked: up() - } - states: [ - State { - name: "pressed" - when: upRegion.pressed - PropertyChanges { target: upButton; color: palette.highlight } - } - ] - } - - Rectangle { - color: "gray" - x: 48 - width: 1 - height: 44 - } - - Text { - anchors.left: upButton.right; anchors.right: parent.right; height: parent.height - anchors.leftMargin: 4; anchors.rightMargin: 4 - text: folders.folder - color: "white" - elide: Text.ElideLeft; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignVCenter - font.pixelSize: 32 - } - } - - 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 = path; - } - - function up() { - var path = folders.parentFolder; - if (path.toString().length === 0 || path.toString() === 'file:') - return; - 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/examples/qmlvideofx/qml/qmlvideofx/FileOpen.qml b/examples/qmlvideofx/qml/qmlvideofx/FileOpen.qml deleted file mode 100644 index a1e13f2d1..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/FileOpen.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 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: "#80101010" - property int buttonHeight: 35 - property int topMargin: 0 - - signal openImage - signal openVideo - signal openCamera - signal close - - Rectangle { - anchors { - top: parent.top; - topMargin: root.topMargin - bottom: parent.bottom; - horizontalCenter: parent.horizontalCenter - } - width: 0.9 * parent.width - color: "transparent" - - Column { - anchors.fill: parent - spacing: 5 - Button { - text: "Open image" - height: buttonHeight - width: parent.width - onClicked: root.openImage() - } - Button { - text: "Open video" - height: buttonHeight - width: parent.width - onClicked: root.openVideo() - } - Button { - text: "Start camera" - height: buttonHeight - width: parent.width - onClicked: root.openCamera() - } - Button { - text: "Reset" - height: buttonHeight - width: parent.width - onClicked: root.close() - } - } - } -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/HintedMouseArea.qml b/examples/qmlvideofx/qml/qmlvideofx/HintedMouseArea.qml deleted file mode 100644 index 7684154e4..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/HintedMouseArea.qml +++ /dev/null @@ -1,113 +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 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$ -** -****************************************************************************/ - -// Mouse area which flashes to indicate its location on the screen - -import QtQuick 2.0 - -MouseArea { - property alias hintColor: hintRect.color - property bool hintEnabled: true - - Rectangle { - id: hintRect - anchors.fill: parent - color: "yellow" - opacity: 0 - - states: [ - State { - name: "high" - PropertyChanges { - target: hintRect - opacity: 0.8 - } - }, - State { - name: "low" - PropertyChanges { - target: hintRect - opacity: 0.4 - } - } - ] - - transitions: [ - Transition { - from: "low" - to: "high" - SequentialAnimation { - NumberAnimation { - properties: "opacity" - easing.type: Easing.InOutSine - duration: 500 - } - ScriptAction { script: hintRect.state = "low" } - } - }, - Transition { - from: "*" - to: "low" - SequentialAnimation { - NumberAnimation { - properties: "opacity" - easing.type: Easing.InOutSine - duration: 500 - } - ScriptAction { script: hintRect.state = "high" } - } - }, - Transition { - from: "*" - to: "baseState" - NumberAnimation { - properties: "opacity" - easing.type: Easing.InOutSine - duration: 500 - } - } - ] - } - - onHintEnabledChanged: hintRect.state = hintEnabled ? "low" : "baseState" - - Component.onCompleted: hintRect.state = "low" -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml b/examples/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml deleted file mode 100644 index 83c0d4c8d..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml +++ /dev/null @@ -1,109 +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 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: "transparent" - height: view.model.count * sliderHeight - property color lineColor: "black" - property real gripSize: 25 - property real spacing: 10 - property real sliderHeight: 40 - - property ListModel model: ListModel { } - - Rectangle { - anchors.fill: parent - color: "black" - opacity: 0.5 - radius: 10 - } - - 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 - left: parent.left - } - font.pixelSize: 0.5 * parent.height - horizontalAlignment: Text.AlignRight - verticalAlignment: Text.AlignVCenter - width: 150 - } - - Slider { - anchors { - top: parent.top - bottom: parent.bottom - left: text.right - leftMargin: 20 - right: parent.right - rightMargin: 20 - } - gripSize: root.gripSize - 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/examples/qmlvideofx/qml/qmlvideofx/Slider.qml b/examples/qmlvideofx/qml/qmlvideofx/Slider.qml deleted file mode 100644 index c12537022..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/Slider.qml +++ /dev/null @@ -1,129 +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 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: "transparent" - radius: 5 - property alias value: grip.value - property color fillColor: "white" - property color lineColor: "black" - property color gripColor: "white" - property real gripSize: 20 - property real gripTolerance: 3.0 - property real increment: 0.1 - property bool enabled: true - - Rectangle { - anchors { left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter } - height: 3 - color: displayedColor(root.lineColor) - - Rectangle { - anchors { fill: parent; margins: 1 } - color: root.fillColor - } - } - - MouseArea { - anchors.fill: parent - enabled: root.enabled - onClicked: { - if (parent.width) { - var newValue = mouse.x / parent.width - if (Math.abs(newValue - parent.value) > parent.increment) { - if (newValue > parent.value) - parent.value = Math.min(1.0, parent.value + parent.increment) - else - parent.value = Math.max(0.0, parent.value - parent.increment) - } - } - } - } - - Rectangle { - id: grip - property real value: 0.5 - x: (value * parent.width) - width/2 - anchors.verticalCenter: parent.verticalCenter - width: root.gripTolerance * root.gripSize - height: width - radius: width/2 - color: "transparent" - - MouseArea { - id: mouseArea - enabled: root.enabled - anchors.fill: parent - drag { - target: grip - axis: Drag.XAxis - minimumX: -parent.width/2 - maximumX: root.width - parent.width/2 - } - onPositionChanged: { - if (drag.active) - updatePosition() - } - onReleased: { - updatePosition() - } - function updatePosition() { - value = (grip.x + grip.width/2) / grip.parent.width - } - } - - Rectangle { - anchors.centerIn: parent - width: root.gripSize - height: width - radius: width/2 - color: root.gripColor - } - } - - function displayedColor(c) { - var tint = Qt.rgba(c.r, c.g, c.b, 0.25) - return enabled ? c : Qt.tint(c, tint) - } -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/main-largescreen.qml b/examples/qmlvideofx/qml/qmlvideofx/main-largescreen.qml deleted file mode 100644 index 0c0c003d9..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/main-largescreen.qml +++ /dev/null @@ -1,173 +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 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 - width: 800 - height: 480 - color: "black" - - property string fileName - property alias volume: content.volume - property bool perfMonitorsLogging: false - property bool perfMonitorsVisible: false - - QtObject { - id: d - property real gripSize: 20 - } - - Content { - id: content - anchors.fill: parent - gripSize: d.gripSize - } - - Loader { - id: performanceLoader - function init() { - console.log("[qmlvideofx] performanceLoader.init logging " + root.perfMonitorsLogging + " visible " + root.perfMonitorsVisible) - var enabled = root.perfMonitorsLogging || root.perfMonitorsVisible - source = enabled ? "../performancemonitor/PerformanceItem.qml" : "" - } - onLoaded: { - item.parent = content - item.anchors.top = content.top - item.anchors.left = content.left - item.anchors.right = content.right - item.logging = root.perfMonitorsLogging - item.displayed = root.perfMonitorsVisible - item.init() - } - } - - ParameterPanel { - id: parameterPanel - anchors { - left: parent.left - bottom: parent.bottom - right: effectSelectionPanel.left - margins: 20 - } - gripSize: d.gripSize - } - - EffectSelectionPanel { - id: effectSelectionPanel - anchors { - top: parent.top - bottom: fileOpen.top - right: parent.right - margins: 5 - } - width: 200 - itemHeight: 40 - onEffectSourceChanged: { - content.effectSource = effectSource - parameterPanel.model = content.effect.parameters - } - } - - FileOpen { - id: fileOpen - anchors { - right: parent.right - bottom: parent.bottom - margins: 5 - } - width: effectSelectionPanel.width - height: 165 - buttonHeight: 32 - topMargin: 10 - } - - FileBrowser { - id: imageFileBrowser - anchors.fill: root - Component.onCompleted: fileSelected.connect(content.openImage) - } - - FileBrowser { - id: videoFileBrowser - anchors.fill: root - Component.onCompleted: fileSelected.connect(content.openVideo) - } - - Component.onCompleted: { - fileOpen.openImage.connect(openImage) - fileOpen.openVideo.connect(openVideo) - fileOpen.openCamera.connect(openCamera) - fileOpen.close.connect(close) - } - - function init() { - console.log("[qmlvideofx] main.init") - imageFileBrowser.folder = imagePath - videoFileBrowser.folder = videoPath - content.init() - performanceLoader.init() - if (fileName != "") - content.openVideo(fileName) - } - - function qmlFramePainted() { - if (performanceLoader.item) - performanceLoader.item.qmlFramePainted() - } - - function openImage() { - imageFileBrowser.show() - } - - function openVideo() { - videoFileBrowser.show() - } - - function openCamera() { - content.openCamera() - } - - function close() { - content.openImage("qrc:/images/qt-logo.png") - } -} diff --git a/examples/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml b/examples/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml deleted file mode 100644 index f715dc8c1..000000000 --- a/examples/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml +++ /dev/null @@ -1,408 +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 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 - width: 640 - height: 360 - color: "grey" - property string fileName - property alias volume: content.volume - property bool perfMonitorsLogging: false - property bool perfMonitorsVisible: false - - QtObject { - id: d - property bool dialogShown: (fileOpenContainer.state == "shown" || - effectSelectionPanel.state == "shown" || - videoFileBrowser.shown || - imageFileBrowser.shown) - property real gripSize: 40 - } - - // Create ScreenSaver element via Loader, so this app will still run if the - // SystemInfo module is not available - Loader { - source: "DisableScreenSaver.qml" - } - - Loader { - id: performanceLoader - - Connections { - target: d - onDialogShownChanged: - if (performanceLoader.item) - performanceLoader.item.enabled = !d.dialogShown - ignoreUnknownSignals: true - } - - function init() { - console.log("[qmlvideofx] performanceLoader.init logging " + root.perfMonitorsLogging + " visible " + root.perfMonitorsVisible) - var enabled = root.perfMonitorsLogging || root.perfMonitorsVisible - source = enabled ? "../performancemonitor/PerformanceItem.qml" : "" - } - - onLoaded: { - item.parent = root - item.anchors.top = root.top - item.anchors.left = root.left - item.logging = root.perfMonitorsLogging - item.displayed = root.perfMonitorsVisible - item.init() - } - } - - Rectangle { - id: inner - anchors.fill: parent - color: "grey" - - Content { - id: content - anchors.fill: parent - gripSize: d.gripSize - onVideoFramePainted: performanceLoader.item.videoFramePainted() - } - - ParameterPanel { - id: parameterPanel - anchors { - left: parent.left; - right: parent.right; - margins: 10 - } - y: parent.height - gripSize: d.gripSize - - states: [ - State { - name: "shown" - PropertyChanges { - target: parameterPanel - y: parent.height - (parameterPanel.height + 10) - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - NumberAnimation { - properties: "y" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - - state: (enabled && !d.dialogShown) ? "shown" : "baseState" - } - - EffectSelectionPanel { - id: effectSelectionPanel - anchors { - top: parent.top; - bottom: parameterPanel.top; - margins: 10 - } - x: parent.width - width: parent.width - 40 - opacity: 0.75 - radius: 20 - itemHeight: 50 - - states: [ - State { - name: "shown" - PropertyChanges { - target: effectSelectionPanel - x: 20 - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - NumberAnimation { - properties: "x" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - - onEffectSourceChanged: { - content.effectSource = effectSource - if (content.effect.parameters.count) { - parameterPanel.model = content.effect.parameters - parameterPanel.enabled = true - } else { - parameterPanel.enabled = false - } - } - - onClicked: state = "baseState" - } - - Rectangle { - id: fileOpenContainer - anchors { - top: parent.top - bottom: parameterPanel.top - margins: 10 - } - x: -width - width: parent.width - 40 - color: "transparent" - - Column { - anchors.fill: parent - - FileOpen { - id: fileOpen - color: "transparent" - width: parent.width - height: 200 - opacity: 0.75 - radius: 20 - buttonHeight: 40 - } - - MouseArea { - width: parent.width - height: 250 - onClicked: fileOpenContainer.state = "baseState" - } - } - - states: [ - State { - name: "shown" - PropertyChanges { - target: fileOpenContainer - x: 20 - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - NumberAnimation { - properties: "x" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - } - - Rectangle { - id: splashScreen - anchors { - horizontalCenter: parent.horizontalCenter - verticalCenter: parent.verticalCenter - } - width: 300 - height: 200 - radius: 0.1 * height - color: "white" - opacity: 0.9 - border { color: "black"; width: 2 } - - Text { - anchors { - fill: parent - margins: 5 - } - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 24 - text: "Tap on left side to switch between sources.\n\nTap on right side to switch between effects." - wrapMode: Text.WordWrap - } - - MouseArea { - anchors.fill: parent - onClicked: parent.state = "hidden" - } - - states: [ - State { - name: "hidden" - PropertyChanges { - target: splashScreen - opacity: 0.0 - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - NumberAnimation { - properties: "opacity" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - } - - HintedMouseArea { - id: fileOpenMouseArea - anchors { - left: parent.left; - top: parent.top; - bottom: parameterPanel.top; - topMargin: 75 - } - width: 100 - onClicked: { - fileOpenMouseArea.hintEnabled = false - effectSelectionPanelMouseArea.hintEnabled = false - splashScreen.state = "hidden" - fileOpenContainer.state = "shown" - } - enabled: !d.dialogShown - } - - HintedMouseArea { - id: effectSelectionPanelMouseArea - anchors { - right: parent.right; - top: parent.top; - bottom: parameterPanel.top; - topMargin: 75 - } - width: 100 - onClicked: { - fileOpenMouseArea.hintEnabled = false - effectSelectionPanelMouseArea.hintEnabled = false - splashScreen.state = "hidden" - effectSelectionPanel.state = "shown" - } - enabled: !d.dialogShown - } - - Image { - source: "qrc:/images/close.png" - - anchors { - top: parent.top - right: parent.right - margins: 5 - } - - MouseArea { - anchors.fill: parent - onClicked: Qt.quit() - } - } - } - - Component.onCompleted: { - fileOpen.openImage.connect(openImage) - fileOpen.openVideo.connect(openVideo) - fileOpen.openCamera.connect(openCamera) - fileOpen.close.connect(close) - } - - FileBrowser { - id: imageFileBrowser - anchors.fill: root - Component.onCompleted: fileSelected.connect(content.openImage) - } - - FileBrowser { - id: videoFileBrowser - anchors.fill: root - Component.onCompleted: fileSelected.connect(content.openVideo) - } - - // Called from main() once root properties have been set - function init() { - console.log("[qmlvideofx] main.init") - imageFileBrowser.folder = imagePath - videoFileBrowser.folder = videoPath - content.init() - performanceLoader.init() - if (fileName != "") { - fileOpenMouseArea.hintEnabled = false - effectSelectionPanelMouseArea.hintEnabled = false - splashScreen.state = "hidden" - content.openVideo(fileName) - } - } - - function qmlFramePainted() { - if (performanceLoader.item) - performanceLoader.item.qmlFramePainted() - } - - function openImage() { - fileOpenContainer.state = "baseState" - imageFileBrowser.show() - } - - function openVideo() { - fileOpenContainer.state = "baseState" - videoFileBrowser.show() - } - - function openCamera() { - fileOpenContainer.state = "baseState" - content.openCamera() - } - - function close() { - fileOpenContainer.state = "baseState" - content.openImage("qrc:/images/qt-logo.png") - } -} diff --git a/examples/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 0a350be99..000000000 --- a/examples/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,129 +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 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$ -** -****************************************************************************/ - -#include "qmlapplicationviewer.h" - -#include -#include -#include -#include -#include -#include - -class QmlApplicationViewerPrivate -{ - QmlApplicationViewerPrivate(QQuickView *view_) : view(view_) {} - - QString mainQmlFile; - QQuickView *view; - friend class QmlApplicationViewer; - QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - QString pathInInstallDir; - const QString applicationDirPath = QCoreApplication::applicationDirPath(); - pathInInstallDir = QString::fromLatin1("%1/../%2").arg(applicationDirPath, path); - - if (QFileInfo(pathInInstallDir).exists()) - return pathInInstallDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWindow *parent) - : QQuickView(parent) - , d(new QmlApplicationViewerPrivate(this)) -{ - connect(engine(), SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit())); - setResizeMode(QQuickView::SizeRootObjectToView); -} - -QmlApplicationViewer::QmlApplicationViewer(QQuickView *view, QWindow *parent) - : QQuickView(parent) - , d(new QmlApplicationViewerPrivate(view)) -{ - connect(view->engine(), SIGNAL(quit()), QCoreApplication::instance(), SLOT(quit())); - view->setResizeMode(QQuickView::SizeRootObjectToView); -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete d; -} - -QmlApplicationViewer *QmlApplicationViewer::create() -{ - return new QmlApplicationViewer(); -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - d->mainQmlFile = d->adjustPath(file); - d->view->setSource(QUrl::fromLocalFile(d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - d->view->engine()->addImportPath(d->adjustPath(path)); -} - -void QmlApplicationViewer::showExpanded() -{ -#if defined(Q_WS_SIMULATOR) - d->view->showFullScreen(); -#else - d->view->show(); -#endif -} - -QGuiApplication *createApplication(int &argc, char **argv) -{ - return new QGuiApplication(argc, argv); -} diff --git a/examples/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.h b/examples/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index 728cc9236..000000000 --- a/examples/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.h +++ /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 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$ -** -****************************************************************************/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include -#include - -class QmlApplicationViewer : public QQuickView -{ - Q_OBJECT - -public: - explicit QmlApplicationViewer(QWindow *parent = 0); - virtual ~QmlApplicationViewer(); - - static QmlApplicationViewer *create(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - - void showExpanded(); - -private: - explicit QmlApplicationViewer(QQuickView *view, QWindow *parent); - class QmlApplicationViewerPrivate *d; -}; - -QGuiApplication *createApplication(int &argc, char **argv); - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index d9807943e..000000000 --- a/examples/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,7 +0,0 @@ -QT += quick - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - - diff --git a/examples/qmlvideofx/qmlvideofx.png b/examples/qmlvideofx/qmlvideofx.png deleted file mode 100644 index 707d5c4e8..000000000 Binary files a/examples/qmlvideofx/qmlvideofx.png and /dev/null differ diff --git a/examples/qmlvideofx/qmlvideofx.pro b/examples/qmlvideofx/qmlvideofx.pro deleted file mode 100644 index d966b3903..000000000 --- a/examples/qmlvideofx/qmlvideofx.pro +++ /dev/null @@ -1,22 +0,0 @@ -TEMPLATE = app -TARGET = qmlvideofx - -isEmpty(PROJECTROOT): PROJECTROOT = $$PWD/../.. -include($${PROJECTROOT}/common.pri) -preparePaths($$OUT_PWD/../../out) - -QT += quick #multimedia - -SOURCES += filereader.cpp main.cpp -HEADERS += filereader.h trace.h - -RESOURCES += qmlvideofx.qrc - - -maemo6: { - DEFINES += SMALL_SCREEN_LAYOUT - DEFINES += SMALL_SCREEN_PHYSICAL -} - -target.path = $$[QT_INSTALL_EXAMPLES]/multimedia/video/qmlvideofx -INSTALLS += target diff --git a/examples/qmlvideofx/qmlvideofx.qrc b/examples/qmlvideofx/qmlvideofx.qrc deleted file mode 100644 index 93cb4f1f5..000000000 --- a/examples/qmlvideofx/qmlvideofx.qrc +++ /dev/null @@ -1,71 +0,0 @@ - - - images/close.png - images/folder.png - images/titlebar.png - images/titlebar.sci - images/up.png - images/qt-logo.png - qml/qmlvideofx/Button.qml - qml/qmlvideofx/Content.qml - qml/qmlvideofx/ContentCamera.qml - qml/qmlvideofx/ContentImage.qml - qml/qmlvideofx/ContentVideo.qml - qml/qmlvideofx/DisableScreenSaver.qml - qml/qmlvideofx/Divider.qml - qml/qmlvideofx/Effect.qml - qml/qmlvideofx/EffectBillboard.qml - qml/qmlvideofx/EffectBlackAndWhite.qml - qml/qmlvideofx/EffectEmboss.qml - qml/qmlvideofx/EffectGaussianBlur.qml - qml/qmlvideofx/EffectGlow.qml - qml/qmlvideofx/EffectIsolate.qml - qml/qmlvideofx/EffectMagnify.qml - qml/qmlvideofx/EffectPageCurl.qml - qml/qmlvideofx/EffectPassThrough.qml - qml/qmlvideofx/EffectPixelate.qml - qml/qmlvideofx/EffectPosterize.qml - qml/qmlvideofx/EffectRipple.qml - qml/qmlvideofx/EffectSelectionPanel.qml - qml/qmlvideofx/EffectSepia.qml - qml/qmlvideofx/EffectSharpen.qml - qml/qmlvideofx/EffectShockwave.qml - qml/qmlvideofx/EffectSobelEdgeDetection1.qml - qml/qmlvideofx/EffectSobelEdgeDetection2.qml - qml/qmlvideofx/EffectTiltShift.qml - qml/qmlvideofx/EffectToon.qml - qml/qmlvideofx/EffectVignette.qml - qml/qmlvideofx/EffectWarhol.qml - qml/qmlvideofx/EffectWobble.qml - qml/qmlvideofx/FileBrowser.qml - qml/qmlvideofx/FileOpen.qml - qml/qmlvideofx/HintedMouseArea.qml - qml/qmlvideofx/main-largescreen.qml - qml/qmlvideofx/main-smallscreen.qml - qml/qmlvideofx/ParameterPanel.qml - qml/qmlvideofx/Slider.qml - shaders/billboard.fsh - shaders/blackandwhite.fsh - shaders/emboss.fsh - shaders/gaussianblur_h.fsh - shaders/gaussianblur_v.fsh - shaders/glow.fsh - shaders/isolate.fsh - shaders/magnify.fsh - shaders/pagecurl.fsh - shaders/pixelate.fsh - shaders/posterize.fsh - shaders/ripple.fsh - shaders/selectionpanel.fsh - shaders/sepia.fsh - shaders/sharpen.fsh - shaders/shockwave.fsh - shaders/sobeledgedetection1.fsh - shaders/sobeledgedetection2.fsh - shaders/tiltshift.fsh - shaders/toon.fsh - shaders/vignette.fsh - shaders/warhol.fsh - shaders/wobble.fsh - - diff --git a/examples/qmlvideofx/qmlvideofx.svg b/examples/qmlvideofx/qmlvideofx.svg deleted file mode 100644 index 566acfada..000000000 --- a/examples/qmlvideofx/qmlvideofx.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/examples/qmlvideofx/shaders/billboard.fsh b/examples/qmlvideofx/shaders/billboard.fsh deleted file mode 100644 index fd5f088be..000000000 --- a/examples/qmlvideofx/shaders/billboard.fsh +++ /dev/null @@ -1,74 +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 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/examples/qmlvideofx/shaders/blackandwhite.fsh b/examples/qmlvideofx/shaders/blackandwhite.fsh deleted file mode 100644 index 94a7662cb..000000000 --- a/examples/qmlvideofx/shaders/blackandwhite.fsh +++ /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 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/examples/qmlvideofx/shaders/emboss.fsh b/examples/qmlvideofx/shaders/emboss.fsh deleted file mode 100644 index e74f65764..000000000 --- a/examples/qmlvideofx/shaders/emboss.fsh +++ /dev/null @@ -1,71 +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 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/examples/qmlvideofx/shaders/gaussianblur_h.fsh b/examples/qmlvideofx/shaders/gaussianblur_h.fsh deleted file mode 100644 index 64b835267..000000000 --- a/examples/qmlvideofx/shaders/gaussianblur_h.fsh +++ /dev/null @@ -1,67 +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 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/examples/qmlvideofx/shaders/gaussianblur_v.fsh b/examples/qmlvideofx/shaders/gaussianblur_v.fsh deleted file mode 100644 index 7da6c5606..000000000 --- a/examples/qmlvideofx/shaders/gaussianblur_v.fsh +++ /dev/null @@ -1,68 +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 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/examples/qmlvideofx/shaders/glow.fsh b/examples/qmlvideofx/shaders/glow.fsh deleted file mode 100644 index aa4325b0f..000000000 --- a/examples/qmlvideofx/shaders/glow.fsh +++ /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 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/examples/qmlvideofx/shaders/isolate.fsh b/examples/qmlvideofx/shaders/isolate.fsh deleted file mode 100644 index a8bbe8073..000000000 --- a/examples/qmlvideofx/shaders/isolate.fsh +++ /dev/null @@ -1,88 +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 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/examples/qmlvideofx/shaders/magnify.fsh b/examples/qmlvideofx/shaders/magnify.fsh deleted file mode 100644 index 0387d25d6..000000000 --- a/examples/qmlvideofx/shaders/magnify.fsh +++ /dev/null @@ -1,68 +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 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.reddit.com/r/programming/comments/losip/shader_toy/c2upn1e - -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); -} diff --git a/examples/qmlvideofx/shaders/pagecurl.fsh b/examples/qmlvideofx/shaders/pagecurl.fsh deleted file mode 100644 index 0f7c12cbe..000000000 --- a/examples/qmlvideofx/shaders/pagecurl.fsh +++ /dev/null @@ -1,183 +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 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://rectalogic.github.com/webvfx/examples_2transition-shader-pagecurl_8html-example.html - -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/examples/qmlvideofx/shaders/pixelate.fsh b/examples/qmlvideofx/shaders/pixelate.fsh deleted file mode 100644 index e60b0cb34..000000000 --- a/examples/qmlvideofx/shaders/pixelate.fsh +++ /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 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/examples/qmlvideofx/shaders/posterize.fsh b/examples/qmlvideofx/shaders/posterize.fsh deleted file mode 100644 index 43f5146f1..000000000 --- a/examples/qmlvideofx/shaders/posterize.fsh +++ /dev/null @@ -1,68 +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 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/examples/qmlvideofx/shaders/ripple.fsh b/examples/qmlvideofx/shaders/ripple.fsh deleted file mode 100644 index b70f36d92..000000000 --- a/examples/qmlvideofx/shaders/ripple.fsh +++ /dev/null @@ -1,78 +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 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://blog.qt.digia.com/blog/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/examples/qmlvideofx/shaders/sobeledgedetection1.fsh b/examples/qmlvideofx/shaders/sobeledgedetection1.fsh deleted file mode 100644 index 5fdbd0842..000000000 --- a/examples/qmlvideofx/shaders/sobeledgedetection1.fsh +++ /dev/null @@ -1,83 +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 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/examples/qmlvideofx/shaders/sobeledgedetection2.fsh b/examples/qmlvideofx/shaders/sobeledgedetection2.fsh deleted file mode 100644 index 039a567d2..000000000 --- a/examples/qmlvideofx/shaders/sobeledgedetection2.fsh +++ /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 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://rastergrid.com/blog/downloads/frei-chen-edge-detector/ - -#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/examples/qmlvideofx/shaders/tiltshift.fsh b/examples/qmlvideofx/shaders/tiltshift.fsh deleted file mode 100644 index d747320b5..000000000 --- a/examples/qmlvideofx/shaders/tiltshift.fsh +++ /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 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; - -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/examples/qmlvideofx/shaders/toon.fsh b/examples/qmlvideofx/shaders/toon.fsh deleted file mode 100644 index d9ad5d95d..000000000 --- a/examples/qmlvideofx/shaders/toon.fsh +++ /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 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/examples/qmlvideofx/shaders/vignette.fsh b/examples/qmlvideofx/shaders/vignette.fsh deleted file mode 100644 index e4b9609af..000000000 --- a/examples/qmlvideofx/shaders/vignette.fsh +++ /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 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/examples/qmlvideofx/shaders/warhol.fsh b/examples/qmlvideofx/shaders/warhol.fsh deleted file mode 100644 index daf68b3f8..000000000 --- a/examples/qmlvideofx/shaders/warhol.fsh +++ /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 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/examples/qmlvideofx/shaders/wobble.fsh b/examples/qmlvideofx/shaders/wobble.fsh deleted file mode 100644 index dea8810f6..000000000 --- a/examples/qmlvideofx/shaders/wobble.fsh +++ /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 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://blog.qt.digia.com/blog/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/examples/qmlvideofx/trace.h b/examples/qmlvideofx/trace.h deleted file mode 100644 index 8a9f963b6..000000000 --- a/examples/qmlvideofx/trace.h +++ /dev/null @@ -1,90 +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 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$ -** -****************************************************************************/ - -#ifndef TRACE_H -#define TRACE_H - -#include - -#define ENABLE_TRACE -//#define VERBOSE_TRACE - -namespace Trace { - -class NullDebug -{ -public: - template - NullDebug &operator<<(const T &) { return *this; } -}; - -inline NullDebug nullDebug() { return NullDebug(); } - -template -struct PtrWrapper -{ - PtrWrapper(const T *ptr) : m_ptr(ptr) { } - const T *const m_ptr; -}; - -} // namespace Trace - -template -inline QDebug &operator<<(QDebug &debug, const Trace::PtrWrapper &wrapper) -{ - debug.nospace() << "[" << (void*)wrapper.m_ptr << "]"; - return debug.space(); -} - -#ifdef ENABLE_TRACE - inline QDebug qtTrace() { return qDebug() << "[qmlvideofx]"; } -# ifdef VERBOSE_TRACE - inline QDebug qtVerboseTrace() { return qtTrace(); } -# else - inline Trace::NullDebug qtVerboseTrace() { return Trace::nullDebug(); } -# endif -#else - inline Trace::NullDebug qtTrace() { return Trace::nullDebug(); } - inline Trace::NullDebug qtVerboseTrace() { return Trace::nullDebug(); } -#endif - -#endif // TRACE_H -