summaryrefslogtreecommitdiffstats
path: root/basicsuite/Graphical Effects
diff options
context:
space:
mode:
Diffstat (limited to 'basicsuite/Graphical Effects')
-rw-r--r--basicsuite/Graphical Effects/Checkers.qml28
-rw-r--r--basicsuite/Graphical Effects/description.txt2
-rw-r--r--basicsuite/Graphical Effects/effect_BrightnessContrast.qml35
-rw-r--r--basicsuite/Graphical Effects/effect_Colorize.qml34
-rw-r--r--basicsuite/Graphical Effects/effect_CustomDissolve.qml125
-rw-r--r--basicsuite/Graphical Effects/effect_CustomWave.qml118
-rw-r--r--basicsuite/Graphical Effects/effect_Displacement.qml40
-rw-r--r--basicsuite/Graphical Effects/effect_DropShadow.qml43
-rw-r--r--basicsuite/Graphical Effects/effect_GaussianBlur.qml39
-rw-r--r--basicsuite/Graphical Effects/effect_Glow.qml39
-rw-r--r--basicsuite/Graphical Effects/effect_HueSaturation.qml34
-rw-r--r--basicsuite/Graphical Effects/effect_OpacityMask.qml30
-rw-r--r--basicsuite/Graphical Effects/effect_ThresholdMask.qml43
-rwxr-xr-xbasicsuite/Graphical Effects/images/bug.jpgbin376684 -> 0 bytes
-rw-r--r--basicsuite/Graphical Effects/images/butterfly.pngbin36912 -> 0 bytes
-rw-r--r--basicsuite/Graphical Effects/images/fog.pngbin225653 -> 0 bytes
-rwxr-xr-xbasicsuite/Graphical Effects/images/glass_normal.pngbin13489 -> 0 bytes
-rw-r--r--basicsuite/Graphical Effects/main.qml191
-rw-r--r--basicsuite/Graphical Effects/preview_l.jpgbin33841 -> 0 bytes
19 files changed, 0 insertions, 801 deletions
diff --git a/basicsuite/Graphical Effects/Checkers.qml b/basicsuite/Graphical Effects/Checkers.qml
deleted file mode 100644
index 9ebdcff..0000000
--- a/basicsuite/Graphical Effects/Checkers.qml
+++ /dev/null
@@ -1,28 +0,0 @@
-import QtQuick 2.0
-
-
-// The checkers background
-ShaderEffect {
-
- property real tileSize: 16
- property color color1: Qt.rgba(0.7, 0.7, 0.7, 1);
- property color color2: Qt.rgba(0.6, 0.6, 0.6, 1);
-
- property size _pixelSize: Qt.size(Math.PI * width / tileSize, Math.PI * height / tileSize);
-
- fragmentShader:
- "
- uniform lowp vec4 color1;
- uniform lowp vec4 color2;
- uniform lowp float qt_Opacity;
- uniform highp vec2 _pixelSize;
- varying highp vec2 qt_TexCoord0;
- void main() {
- highp vec2 tc = sign(sin(qt_TexCoord0 * _pixelSize));
- if (tc.x != tc.y)
- gl_FragColor = color1 * qt_Opacity;
- else
- gl_FragColor = color2 * qt_Opacity;
- }
- "
-}
diff --git a/basicsuite/Graphical Effects/description.txt b/basicsuite/Graphical Effects/description.txt
deleted file mode 100644
index 8623c2c..0000000
--- a/basicsuite/Graphical Effects/description.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-This example shows the Qt Quick 2.0 ShaderEffect type and the QtGraphicalEffect module. Qt Quick 2.0 provides the ability to use inline GLSL in your Qt Quick applications to create stunning visual effects. However, as UIs typically reuse many of the same effects, the QtGraphicalEffects module provides a set of predefined, commonly used effects. This includes blur, drop-shadows, glow, blending, opacity maskes and more.
-
diff --git a/basicsuite/Graphical Effects/effect_BrightnessContrast.qml b/basicsuite/Graphical Effects/effect_BrightnessContrast.qml
deleted file mode 100644
index 97ccb48..0000000
--- a/basicsuite/Graphical Effects/effect_BrightnessContrast.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-
-Item {
-
- id: root
-
- property real inputX: 0.7;
- property real feedbackX: effect.brightness
- property string nameX: "Brightness"
-
- property real inputY: 0.8;
- property real feedbackY: effect.contrast
- property string nameY: "Contrast"
-
- Image {
- id: image
- source: "images/bug.jpg"
- anchors.centerIn: parent
- visible: false
- }
-
- BrightnessContrast {
- id: effect;
-
- source: image
- anchors.fill: source
-
- scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
-
- brightness: inputX * 2 - 1;
- contrast: inputY * 2 - 1;
- }
-
-}
diff --git a/basicsuite/Graphical Effects/effect_Colorize.qml b/basicsuite/Graphical Effects/effect_Colorize.qml
deleted file mode 100644
index 06c977e..0000000
--- a/basicsuite/Graphical Effects/effect_Colorize.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-
-Item {
- id: root
-
- property real inputX: 0.6;
- property real feedbackX: effect.hue
- property string nameX: "Hue"
-
- property real inputY: 0.7
- property real feedbackY: effect.saturation
- property string nameY: "Saturation"
-
- Image {
- id: image
- source: "images/bug.jpg"
- width: Math.min(root.width, root.height) * 0.8;
- height: width
- sourceSize: Qt.size(width, height);
- anchors.centerIn: parent
- }
-
- Colorize {
- id: effect;
-
- source: image
- anchors.fill: source
- scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
-
- hue: root.inputX * 2 - 1;
- saturation: root.inputY
- }
-}
diff --git a/basicsuite/Graphical Effects/effect_CustomDissolve.qml b/basicsuite/Graphical Effects/effect_CustomDissolve.qml
deleted file mode 100644
index bd843bd..0000000
--- a/basicsuite/Graphical Effects/effect_CustomDissolve.qml
+++ /dev/null
@@ -1,125 +0,0 @@
-import QtQuick 2.0
-
-Item {
-
-
- width: 700
- height: 600
- id: root
-
- property real inputX: 0.5;
- property real feedbackX: inputX
- property string nameX: "Dissolution"
-
- property real inputY: 0.5;
- property real feedbackY: effect.amplitude
- property string nameY: "Amplitude"
-
- Rectangle {
- id: sourceItem
- anchors.centerIn: parent
- width: text.width + 50
- height: text.height + 20
- gradient: Gradient {
- GradientStop { position: 0; color: "steelblue" }
- GradientStop { position: 1; color: "black" }
- }
- border.color: "lightsteelblue"
- border.width: 2
-
-//? color: "transparent"
-
- radius: 10
-
- layer.enabled: true
- layer.smooth: true
- layer.sourceRect: Qt.rect(-1, -1, width + 2, height + 2);
-
- visible: false
-
- Text {
- id: text
- font.pixelSize: root.height * 0.08
- anchors.centerIn: parent;
- text: "Code Less, Create More!"
- color: "lightsteelblue"
- style: Text.Raised
-
- }
- }
-
- ShaderEffect {
-
- id: effect
-
- anchors.fill: sourceItem;
-
- property variant source: sourceItem;
-
- property real t: (1 + tlength) * (1 - root.inputX) - tlength;
- property real tlength: 1.0
- property real amplitude: 2.0 * height * root.inputY;
-
- mesh: "40x4"
-
- vertexShader:
- "
- uniform highp mat4 qt_Matrix;
- uniform lowp float t;
- uniform lowp float tlength;
- uniform highp float amplitude;
-
- attribute highp vec4 qt_Vertex;
- attribute highp vec2 qt_MultiTexCoord0;
-
- varying highp vec2 vTexCoord;
- varying lowp float vOpacity;
-
- void main() {
- vTexCoord = qt_MultiTexCoord0;
-
- vec4 pos = qt_Vertex;
-
- lowp float tt = smoothstep(t, t+tlength, qt_MultiTexCoord0.x);
-
- vOpacity = 1.0 - tt;
-
- pos.y += (amplitude * (qt_MultiTexCoord0.y * 2.0 - 1.0) * (-2.0 * tt)
- + 3.0 * amplitude * (qt_MultiTexCoord0.y * 2.0 - 1.0)
- + amplitude * sin(0.0 + tt * 2.14152 * qt_MultiTexCoord0.x)
- + amplitude * sin(0.0 + tt * 7.4567)
- ) * tt;
-
- pos.x += amplitude * sin(6.0 + tt * 4.4567) * tt;
-
- gl_Position = qt_Matrix * pos;
- }
- "
- fragmentShader:
- "
- uniform sampler2D source;
-
- uniform lowp float t;
- uniform lowp float tlength;
- uniform lowp float qt_Opacity;
-
- varying highp vec2 vTexCoord;
- varying lowp float vOpacity;
-
- // Noise function from: http://stackoverflow.com/questions/4200224/random-noise-functions-for-glsl
- highp float rand(vec2 n) {
- return fract(sin(dot(n.xy, vec2(12.9898, 78.233))) * 43758.5453);
- }
-
- void main() {
- lowp vec4 tex = texture2D(source, vTexCoord);
- lowp float opacity = 1.0 - smoothstep(0.9, 1.0, vOpacity);
- lowp float particlify = smoothstep(1.0 - vOpacity, 1.0, rand(vTexCoord)) * vOpacity;
- gl_FragColor = tex * mix(vOpacity, particlify, opacity) * qt_Opacity;
- }
-
- "
-
- }
-
-}
diff --git a/basicsuite/Graphical Effects/effect_CustomWave.qml b/basicsuite/Graphical Effects/effect_CustomWave.qml
deleted file mode 100644
index 66e91be..0000000
--- a/basicsuite/Graphical Effects/effect_CustomWave.qml
+++ /dev/null
@@ -1,118 +0,0 @@
-import QtQuick 2.0
-
-Item {
- id: root
-
- property real inputX: 0.9;
- property real feedbackX: shader.zrot
- property string nameX: "Rotation"
-
- property real inputY: 0.7
- property real feedbackY: shader.amp
- property string nameY: "Amplitude"
-
-
- ShaderEffect {
- id: shader
- width: height
- height: parent.height
- anchors.centerIn: parent;
- scale: height > root.height * 0.8 ? root.height * 0.8 / height : 1;
-
- blending: true
-
- mesh: "50x50"
-
- property variant size: Qt.size(width, height);
-
- property variant source: Image { source: "images/bug.jpg" }
-
- property real amp: root.inputY * 0.1;
-
- property real xrot: 2 / 8 * Math.PI;
-
- property real zrot: -root.inputX * Math.PI * 2
-
- property real time: 0
- NumberAnimation on time {
- id: timeAnimation
- from: 0;
- to: Math.PI * 2;
- duration: 3457;
- loops: Animation.Infinite
- running: true;
- }
-
- vertexShader: "
- attribute highp vec4 qt_Vertex;
- attribute highp vec2 qt_MultiTexCoord0;
- uniform highp mat4 qt_Matrix;
- uniform highp float xrot;
- uniform highp float zrot;
- uniform highp vec2 size;
- uniform highp float time;
- uniform highp float amp;
- varying lowp vec2 v_TexCoord;
- varying lowp float v_light;
- void main() {
- highp float xcosa = cos(xrot);
- highp float xsina = sin(xrot);
-
- highp mat4 xrot = mat4(1, 0, 0, 0,
- 0, xcosa, xsina, 0,
- 0, -xsina, xcosa, 0,
- 0, 0, 0, 1);
-
- highp float zcosa = cos(zrot);
- highp float zsina = sin(zrot);
-
- highp mat4 zrot = mat4(zcosa, zsina, 0, 0,
- -zsina, zcosa, 0, 0,
- 0, 0, 1, 0,
- 0, 0, 0, 1);
-
- highp float near = 2.;
- highp float far = 6.;
- highp float fmn = far - near;
-
- highp mat4 proj = mat4(near, 0, 0, 0,
- 0, near, 0, 0,
- 0, 0, -(far + near) / fmn, -1.,
- 0, 0, -2. * far * near / fmn, 1);
-
- highp mat4 model = mat4(2, 0, 0, 0,
- 0, 2, 0, 0,
- 0, 0, 2, 0,
- 0, -.5, -4, 1);
-
- vec4 nLocPos = vec4(qt_Vertex.xy * 2.0 / size - 1.0, 0, 1);
- nLocPos.z = cos(nLocPos.x * 5. + time) * amp;
-
- vec4 pos = proj * model * xrot * zrot * nLocPos;
- pos = vec4(pos.xyx/pos.w, 1);
-
- gl_Position = qt_Matrix * vec4((pos.xy + 1.0) / 2.0 * size , 0, 1);
-
- v_TexCoord = qt_MultiTexCoord0;
-
-
- v_light = dot(normalize(vec3(-sin(nLocPos.x * 5.0 + time) * 5.0 * amp, 0, -1)), vec3(0, 0, -1));
- }
- "
-
- fragmentShader: "
- uniform lowp sampler2D source;
- uniform lowp float qt_Opacity;
- varying highp vec2 v_TexCoord;
- varying lowp float v_light;
- void main() {
- highp vec4 c = texture2D(source, v_TexCoord);
- gl_FragColor = (vec4(pow(v_light, 16.0)) * 0.3 + c) * qt_Opacity;
- }
- "
-
- }
-
-}
-
-
diff --git a/basicsuite/Graphical Effects/effect_Displacement.qml b/basicsuite/Graphical Effects/effect_Displacement.qml
deleted file mode 100644
index c25827c..0000000
--- a/basicsuite/Graphical Effects/effect_Displacement.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-
-Item {
-
- id: root
-
- property real inputX: 0.1;
-
- property real feedbackX: effect.displacement
-
- property string nameX: "Displacement"
-
- Image {
- id: image
- source: "images/bug.jpg"
- anchors.centerIn: parent
- visible: false
- }
-
- Image {
- id: displacementMap
- source: "images/glass_normal.png"
- smooth: true
- visible: false
- }
-
- Displace {
- id: effect;
-
- source: image
- displacementSource: displacementMap
- anchors.fill: source
-
- scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
-
- displacement: inputX
- }
-
-}
diff --git a/basicsuite/Graphical Effects/effect_DropShadow.qml b/basicsuite/Graphical Effects/effect_DropShadow.qml
deleted file mode 100644
index 125fe64..0000000
--- a/basicsuite/Graphical Effects/effect_DropShadow.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-
-Item {
-
- id: root
-
- property real inputX: 0.5;
- property real inputY: 0.2;
-
- property real feedbackX: effect.radius
- property real feedbackY: effect.spread
-
- property string nameX: "Radius"
- property string nameY: "Spread"
-
- Image {
- id: image
- source: "images/butterfly.png"
- anchors.centerIn: parent
- visible: false
- }
-
- DropShadow {
- id: effect;
-
- source: image
- anchors.fill: source
-
- scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
-
- samples: 4
-
- radius: root.inputX * 7
- spread: root.inputY;
-
- color: Qt.rgba(0, 0, 0, 0.4);
-
- verticalOffset: 30.5
- horizontalOffset: 30.5
- }
-
-}
diff --git a/basicsuite/Graphical Effects/effect_GaussianBlur.qml b/basicsuite/Graphical Effects/effect_GaussianBlur.qml
deleted file mode 100644
index f9a029c..0000000
--- a/basicsuite/Graphical Effects/effect_GaussianBlur.qml
+++ /dev/null
@@ -1,39 +0,0 @@
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-
-Item {
-
- id: root
-
- property real inputX: 0.5;
- property real inputY: 1
-
- property real feedbackX: effect.radius
- property real feedbackY: effect.deviation
-
- property string nameX: "Radius"
- property string nameY: "Deviation"
-
- Image {
- id: image
- source: "images/bug.jpg"
- width: Math.min(root.width, root.height) * 0.8;
- height: width
- sourceSize: Qt.size(width, height);
- anchors.centerIn: parent
- }
-
- GaussianBlur {
- id: effect;
-
- source: image
- anchors.fill: source
-
- scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
- samples: 4
-
- deviation: root.inputY * 20;
- radius: root.inputX * 7
- }
-
-}
diff --git a/basicsuite/Graphical Effects/effect_Glow.qml b/basicsuite/Graphical Effects/effect_Glow.qml
deleted file mode 100644
index dd7a078..0000000
--- a/basicsuite/Graphical Effects/effect_Glow.qml
+++ /dev/null
@@ -1,39 +0,0 @@
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-
-Item {
-
- id: root
-
- property real inputX: 0.5;
- property real inputY: 0.2;
-
- property real feedbackX: effect.radius
- property real feedbackY: effect.spread
-
- property string nameX: "Radius"
- property string nameY: "Spread"
-
- Image {
- id: image
- source: "images/butterfly.png"
- anchors.centerIn: parent
- visible: false
- }
-
- Glow {
- id: effect;
-
- source: image
- anchors.fill: source
-
- scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
-
- samples: 4
-
- radius: root.inputX * 7
- spread: root.inputY;
-
- color: Qt.rgba(1, 0, 1, 1);
- }
-}
diff --git a/basicsuite/Graphical Effects/effect_HueSaturation.qml b/basicsuite/Graphical Effects/effect_HueSaturation.qml
deleted file mode 100644
index 4e3846a..0000000
--- a/basicsuite/Graphical Effects/effect_HueSaturation.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-
-Item {
- id: root
-
- property real inputX: 0.6;
- property real feedbackX: effect.hue
- property string nameX: "Hue"
-
- property real inputY: 0.2
- property real feedbackY: effect.saturation
- property string nameY: "Saturation"
-
- Image {
- id: image
- source: "images/bug.jpg"
- width: Math.min(root.width, root.height) * 0.8;
- height: width
- sourceSize: Qt.size(width, height);
- anchors.centerIn: parent
- }
-
- HueSaturation {
- id: effect;
-
- source: image
- anchors.fill: source
- scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
-
- hue: root.inputX * 2 - 1;
- saturation: root.inputY * 2 - 1
- }
-}
diff --git a/basicsuite/Graphical Effects/effect_OpacityMask.qml b/basicsuite/Graphical Effects/effect_OpacityMask.qml
deleted file mode 100644
index e292ba4..0000000
--- a/basicsuite/Graphical Effects/effect_OpacityMask.qml
+++ /dev/null
@@ -1,30 +0,0 @@
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-
-Item {
-
- id: root
-
- Image {
- id: image
- source: "images/bug.jpg"
- anchors.centerIn: parent
- visible: false
- }
-
- Image {
- id: mask
- source: "images/butterfly.png"
- visible: false
- }
-
- OpacityMask {
- id: effect;
-
- source: image
- maskSource: mask
- anchors.fill: source
-
- scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
- }
-}
diff --git a/basicsuite/Graphical Effects/effect_ThresholdMask.qml b/basicsuite/Graphical Effects/effect_ThresholdMask.qml
deleted file mode 100644
index 24b73fc..0000000
--- a/basicsuite/Graphical Effects/effect_ThresholdMask.qml
+++ /dev/null
@@ -1,43 +0,0 @@
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-
-Item {
-
- id: root
-
- property real inputX: 0.5;
- property real inputY: 0.2;
-
- property real feedbackX: effect.threshold
- property real feedbackY: effect.spread
-
- property string nameX: "Threshold"
- property string nameY: "Spread"
-
- Image {
- id: image
- source: "images/bug.jpg"
- anchors.centerIn: parent
- visible: false
- }
-
- Image {
- id: mask
- source: "images/fog.png"
- visible: false
- }
-
- ThresholdMask {
- id: effect;
-
- source: image
- maskSource: mask;
- anchors.fill: source
-
- scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
-
- threshold: root.inputX
- spread: root.inputY
- }
-
-}
diff --git a/basicsuite/Graphical Effects/images/bug.jpg b/basicsuite/Graphical Effects/images/bug.jpg
deleted file mode 100755
index 43e3676..0000000
--- a/basicsuite/Graphical Effects/images/bug.jpg
+++ /dev/null
Binary files differ
diff --git a/basicsuite/Graphical Effects/images/butterfly.png b/basicsuite/Graphical Effects/images/butterfly.png
deleted file mode 100644
index ce544f2..0000000
--- a/basicsuite/Graphical Effects/images/butterfly.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/Graphical Effects/images/fog.png b/basicsuite/Graphical Effects/images/fog.png
deleted file mode 100644
index f462222..0000000
--- a/basicsuite/Graphical Effects/images/fog.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/Graphical Effects/images/glass_normal.png b/basicsuite/Graphical Effects/images/glass_normal.png
deleted file mode 100755
index ba360ef..0000000
--- a/basicsuite/Graphical Effects/images/glass_normal.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/Graphical Effects/main.qml b/basicsuite/Graphical Effects/main.qml
deleted file mode 100644
index b4f148b..0000000
--- a/basicsuite/Graphical Effects/main.qml
+++ /dev/null
@@ -1,191 +0,0 @@
-import QtQuick 2.0
-
-Item {
- id: root
-
- width: 1280
- height: 720
-
- Checkers {
- id: checkers;
- anchors.fill: parent
- anchors.leftMargin: list.width
- tileSize: 32
- }
-
- Loader {
- id: loader
- anchors.fill: checkers;
- }
-
- Rectangle {
- id: listBackground
- anchors.left: parent.left
- anchors.right: checkers.left
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- color: "black"
- }
-
- ListModel {
- id: listModel
- ListElement { name: "Brignthness / Contrast"; file: "effect_BrightnessContrast.qml" }
- ListElement { name: "Colorize"; file: "effect_Colorize.qml" }
- ListElement { name: "Displacement"; file: "effect_Displacement.qml" }
- ListElement { name: "Drop Shadow"; file: "effect_DropShadow.qml" }
- ListElement { name: "Gaussian Blur"; file: "effect_GaussianBlur.qml" }
- ListElement { name: "Glow"; file: "effect_Glow.qml" }
- ListElement { name: "Hue / Saturation"; file: "effect_HueSaturation.qml" }
- ListElement { name: "Opacity Mask"; file: "effect_OpacityMask.qml" }
- ListElement { name: "Threshold Mask"; file: "effect_ThresholdMask.qml" }
- ListElement { name: "Wave (custom)"; file: "effect_CustomWave.qml" }
- ListElement { name: "Dissolve (custom)"; file: "effect_CustomDissolve.qml" }
- }
-
- ListView
- {
- id: list
- anchors.top: parent.top
- anchors.left: parent.left
- width: parent.width / 4
- height: parent.height - width
-
- clip: true
- focus: true
-
- highlightMoveDuration: 0
-
- onCurrentItemChanged: {
- var entry = listModel.get(currentIndex);
- loader.source = entry.file;
- }
-
- model: listModel
-
- highlight: Rectangle {
- color: "steelblue"
- }
-
- delegate: Item {
- id: delegateRoot
-
- width: list.width
- height: root.height * 0.05
-
- Rectangle {
- width: parent.width
- height: 3
- anchors.bottom: parent.bottom
- gradient: Gradient {
- GradientStop { position: 0; color: "transparent" }
- GradientStop { position: 0.5; color: "lightgray" }
- GradientStop { position: 1; color: "transparent" }
- }
- }
-
- Text {
- color: "white"
- font.pixelSize: parent.height * 0.5
- anchors.verticalCenter: parent.verticalCenter
- anchors.verticalCenterOffset: -2
- x: parent.width * 0.1
- text: name
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: list.currentIndex = index;
- }
- }
- }
-
- Canvas {
- id: canvas
- anchors.fill: controller
- anchors.margins: 10
-
- property real padding: 20
-
- onPaint: {
- var ctx = canvas.getContext("2d");
-
- var w = canvas.width
- var h = canvas.height;
-
-
- ctx.fillStyle = "rgb(50, 50, 50)"
- ctx.beginPath();
- ctx.roundedRect(0, 0, w, h, w * 0.1, w * 0.1);
- ctx.fill();
-
- var margin = canvas.padding;
- var segmentSize = 4
- ctx.strokeStyle = "gray"
- ctx.beginPath();
- ctx.moveTo(margin, margin);
- ctx.lineTo(margin, h-margin);
- ctx.moveTo(margin, h - margin);
- ctx.lineTo(w-margin, h - margin);
-
- var segmentCount = 11
- for (var i = 0; i<segmentCount; ++i) {
- var offset = margin + i * (w - margin * 2) / (segmentCount - 1);
- ctx.moveTo(margin - segmentSize, offset);
- ctx.lineTo(margin + segmentSize, offset);
- ctx.moveTo(offset, h - margin - segmentSize);
- ctx.lineTo(offset, h - margin + segmentSize);
- }
-
- ctx.stroke();
- }
- }
-
- Text {
- id: labelX
- anchors.bottom: canvas.bottom
- x: canvas.width * 0.4
- anchors.bottomMargin: 2
- text: (loader.item != undefined && typeof loader.item.nameX != 'undefined' ? loader.item.nameX : "")
- + (loader.item != undefined && typeof loader.item.feedbackX != 'undefined' ? ": " + loader.item.feedbackX.toFixed(2) : "");
-
- color: "white"
- font.pixelSize: canvas.padding * 0.5
- }
-
- Text {
- id: labelY
-
- anchors.verticalCenter: canvas.verticalCenter
- anchors.verticalCenterOffset: canvas.height * 0.15
- anchors.left: canvas.left
- transformOrigin: Item.TopLeft
- rotation: -90
- text: (loader.item != undefined && typeof loader.item.nameY != 'undefined' ? loader.item.nameY : "")
- + (loader.item != undefined && typeof loader.item.feedbackY != 'undefined' ? ": " + loader.item.feedbackY.toFixed(2) : "");
- color: "white"
- font.pixelSize: canvas.padding * 0.5
- }
-
- MouseArea {
- id: controller
-
- anchors.top: list.bottom;
- anchors.left: parent.left
- anchors.right: checkers.left
- anchors.bottom: parent.bottom;
-
- onPositionChanged: {
- var effect = loader.item;
- function bound(val) { return Math.max(0, Math.min(1, val)); }
- if (effect != undefined) {
- if (typeof effect.inputX != 'undefined')
- effect.inputX = bound(mouseX / controller.width);
- if (typeof effect.inputY != 'undefined')
- effect.inputY = bound(1 - mouseY / controller.height);
- }
- }
-
- }
-
-
-}
diff --git a/basicsuite/Graphical Effects/preview_l.jpg b/basicsuite/Graphical Effects/preview_l.jpg
deleted file mode 100644
index 80fbbd5..0000000
--- a/basicsuite/Graphical Effects/preview_l.jpg
+++ /dev/null
Binary files differ