qtubuntu-0.54+14.04.20140402/ 0000755 0000153 0177776 00000000000 12317074332 015725 5 ustar pbuser nogroup 0000000 0000000 qtubuntu-0.54+14.04.20140402/tests/ 0000755 0000153 0177776 00000000000 12317074332 017067 5 ustar pbuser nogroup 0000000 0000000 qtubuntu-0.54+14.04.20140402/tests/clipboard/ 0000755 0000153 0177776 00000000000 12317074332 021026 5 ustar pbuser nogroup 0000000 0000000 qtubuntu-0.54+14.04.20140402/tests/clipboard/clipboard.pro 0000644 0000153 0177776 00000000130 12317074055 023503 0 ustar pbuser nogroup 0000000 0000000 QT += core gui
TARGET = clipboard
TEMPLATE = app
SOURCES += clipboard.cc
LIBS += -lrt
qtubuntu-0.54+14.04.20140402/tests/clipboard/clipboard.cc 0000644 0000153 0177776 00000004056 12317074055 023303 0 ustar pbuser nogroup 0000000 0000000 // This file is part of QtUbuntu, a set of Qt components for Ubuntu.
// Copyright © 2013 Canonical Ltd.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License version 3, as published by
// the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
// SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
#include
#include
#include
enum Operation { kNone, kCopy, kPaste };
static void usage() {
fprintf(stdout,
"Usage: clipboard [options]\n\n"
" Options:\n"
" -c or --copy \"text\" ... Copy text to clipboard\n"
" -p or --paste ... Paste text from clipboard\n"
" -h or --help ... Show that help\n");
}
int main(int argc, char* argv[]) {
Operation operation = kNone;
QString text;
for (int i = 1; i < argc; ++i) {
const QString kArg = QString::fromLatin1(argv[i]).toLower();
if ((kArg == QLatin1String("-c") || kArg == QLatin1String("--copy")) && i + 1 < argc) {
operation = kCopy;
text = QString::fromLatin1(argv[++i]);
} else if (kArg == QLatin1String("-p") || kArg == QLatin1String("--paste")) {
operation = kPaste;
} else if (kArg == QLatin1String("-h") || kArg == QLatin1String("--help")) {
usage();
return 1;
}
}
if (operation == kNone) {
usage();
return 1;
}
QGuiApplication app(argc, argv);
if (operation == kCopy) {
QGuiApplication::clipboard()->setText(text);
fprintf(stdout, "Copied: \"%s\"\n", text.toLatin1().data());
} else {
fprintf(stdout, "Pasted: \"%s\"\n", QGuiApplication::clipboard()->text().toLatin1().data());
}
return 0;
}
qtubuntu-0.54+14.04.20140402/tests/MovingLogo.qml 0000644 0000153 0177776 00000004553 12317074055 021673 0 ustar pbuser nogroup 0000000 0000000 // This file is part of QtUbuntu, a set of Qt components for Ubuntu.
// Copyright © 2013 Canonical Ltd.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License version 3, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
// SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see .
import QtQuick 2.0
Item {
id: surface
// Hard-coded Samsung Galaxy Nexus screen size.
width: 720
height: 1280
property real seed
function lerp(x, a, b) {
return ((1.0 - x) * a) + (x * b);
}
Item {
id: scene
anchors.fill: parent
Image {
id: logo
source: "logo.png"
SequentialAnimation on y {
loops: Animation.Infinite
NumberAnimation {
from: 0.0; to: surface.height - logo.height
duration: Math.floor(lerp(Math.random(surface.seed), 2250.0, 2750.0))
easing.type: Easing.InOutSine;
}
NumberAnimation {
to: 0.0; from: surface.height - logo.height
duration: Math.floor(lerp(Math.random(surface.seed), 2250.0, 2750.0))
easing.type: Easing.InOutSine;
}
}
SequentialAnimation on x {
loops: Animation.Infinite
NumberAnimation {
from: 0.0; to: surface.width - logo.width
duration: Math.floor(lerp(Math.random(surface.seed), 1750.0, 2250.0))
easing.type: Easing.InOutSine;
}
NumberAnimation {
to: 0.0; from: surface.width - logo.width
duration: Math.floor(lerp(Math.random(surface.seed), 1750.0, 2250.0))
easing.type: Easing.InOutSine;
}
}
}
}
Component.onCompleted: {
var d = new Date();
surface.seed = d.getSeconds();
}
}
qtubuntu-0.54+14.04.20140402/tests/Input.qml 0000644 0000153 0177776 00000005435 12317074055 020712 0 ustar pbuser nogroup 0000000 0000000 // This file is part of QtUbuntu, a set of Qt components for Ubuntu.
// Copyright © 2013 Canonical Ltd.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License version 3, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
// SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see .
import QtQuick 2.0
Item {
id: surface
// Hard-coded Samsung Galaxy Nexus screen size.
width: 720
height: 1280
// Needed for the key events to be emitted.
focus: true
MultiPointTouchArea {
anchors.fill: parent
touchPoints: [
TouchPoint { id: point1 }, TouchPoint { id: point2 }, TouchPoint { id: point3 },
TouchPoint { id: point4 }, TouchPoint { id: point5 }
]
}
// Touch elements.
Text {
font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 100; color: "#9F9F00"
x: point5.x + 50; y: point5.y - 200
visible: point5.pressed
text: "5"
}
Text {
font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 100; color: "#AF00AF"
x: point4.x + 50; y: point4.y - 200
visible: point4.pressed
text: "4"
}
Text {
font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 100; color: "#0000EF"
x: point3.x + 50; y: point3.y - 200
visible: point3.pressed
text: "3"
}
Text {
font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 100; color: "#00FF00"
x: point2.x + 50; y: point2.y - 200
visible: point2.pressed
text: "2"
}
Text {
font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 100; color: "#FF0000"
x: point1.x + 50; y: point1.y - 200
visible: point1.pressed
text: "1"
}
// Key elements.
Text {
id: keyText
font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 75; color: "#DFDFDF"
anchors.centerIn: surface
visible: false
text: ""
}
Keys.onPressed: {
if (event.key == Qt.Key_PowerOff)
keyText.text = "Power Off";
else if (event.key == Qt.Key_VolumeUp)
keyText.text = "Volume Up";
else if (event.key == Qt.Key_VolumeDown)
keyText.text = "Volume Down";
keyText.visible = true;
}
Keys.onReleased: {
keyText.visible = false;
}
}
qtubuntu-0.54+14.04.20140402/tests/WarpingLogo.qml 0000644 0000153 0177776 00000005523 12317074055 022041 0 ustar pbuser nogroup 0000000 0000000 // This file is part of QtUbuntu, a set of Qt components for Ubuntu.
// Copyright © 2013 Canonical Ltd.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License version 3, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
// SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see .
import QtQuick 2.0
Item {
id: surface
// Hard-coded Samsung Galaxy Nexus screen size.
width: 720
height: 1280
property real displace
SequentialAnimation on displace {
loops: Animation.Infinite
NumberAnimation { from: 0.0; to: 1.0; duration: 30000 }
}
Item {
id: scene
anchors.fill: parent
Image {
id: logo
x: (scene.width - sourceSize.width) / 2
y: (scene.height - sourceSize.height) / 2
width: sourceSize.width
height: sourceSize.height
source: "logo.png"
sourceSize: Qt.size(400, 400)
}
}
ShaderEffect {
property variant tex: ShaderEffectSource {
sourceItem: scene; hideSource: true; live: false; smooth: true
}
property variant noise: ShaderEffectSource {
sourceItem: Image { source: "noise.png"; smooth: true }
wrapMode: ShaderEffectSource.Repeat
}
property variant size: Qt.size(scene.width, scene.height)
property variant displace: surface.displace
anchors.fill: parent
blending: false
vertexShader: "
uniform mediump float displace;
uniform mediump vec2 size;
uniform mediump mat4 qt_Matrix;
attribute mediump vec4 qt_Vertex;
attribute mediump vec2 qt_MultiTexCoord0;
varying mediump vec2 texCoord;
varying mediump vec2 noiseCoord;
void main() {
texCoord = qt_MultiTexCoord0.xy;
noiseCoord = vec2(qt_MultiTexCoord0.x * 0.25,
qt_MultiTexCoord0.y * 0.25 + displace);
gl_Position = qt_Matrix * qt_Vertex;
}"
fragmentShader: "
uniform sampler2D noise;
uniform sampler2D tex;
varying mediump vec2 texCoord;
varying mediump vec2 noiseCoord;
void main() {
mediump vec2 noiseVec = texture2D(noise, noiseCoord).xy;
gl_FragColor = texture2D(tex, texCoord + ((noiseVec - 0.5) * 0.05));
}"
}
}
qtubuntu-0.54+14.04.20140402/tests/Fullscreen.qml 0000644 0000153 0177776 00000003153 12317074055 021710 0 ustar pbuser nogroup 0000000 0000000 // This file is part of QtUbuntu, a set of Qt components for Ubuntu.
// Copyright © 2013 Canonical Ltd.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License version 3, as published by the
// Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
// SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see .
// Non graphical test watching fullscreen states of main and side stages.
import QtQuick 2.0
import Unity.Application 0.1
Item {
Timer {
id: time
interval: 1000
repeat: true
onTriggered: {
if (ApplicationManager.mainStageFocusedApplication) {
print(ApplicationManager.sideStageFocusedApplication.name,
"in main stage is fullscreen: ",
ApplicationManager.sideStageFocusedApplication.fullscreen)
}
if (ApplicationManager.sideStageFocusedApplication) {
print(ApplicationManager.sideStageFocusedApplication.name,
"in side stage is fullscreen: ",
ApplicationManager.sideStageFocusedApplication.fullscreen)
}
}
Component.onCompleted: time.start()
}
Component.onCompleted: {
time.start()
}
}
qtubuntu-0.54+14.04.20140402/tests/tests.pro 0000644 0000153 0177776 00000000375 12317074055 020762 0 ustar pbuser nogroup 0000000 0000000 TEMPLATE = subdirs
SUBDIRS += qmlscene_ubuntu clipboard
OTHER_FILES += *.qml logo.png noise.png
target.path = $$[QT_INSTALL_EXAMPLES]/qtubuntu
sources.path = $$[QT_INSTALL_EXAMPLES]/qtubuntu
sources.files = $$OTHER_FILES tests.pro
INSTALLS += target
qtubuntu-0.54+14.04.20140402/tests/noise.png 0000644 0000153 0177776 00000277203 12317074055 020727 0 ustar pbuser nogroup 0000000 0000000 PNG
IHDR ?1 sRGB pHYs tIME &e