aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/embeddedinwidgets/reflect.frag3
-rw-r--r--examples/quick/rendercontrol/rendercontrol_d3d11/quad.frag3
-rw-r--r--examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag3
-rw-r--r--examples/quick/scenegraph/d3d11underqml/squircle.frag3
-rw-r--r--examples/quick/scenegraph/graph/shaders/line.frag3
-rw-r--r--examples/quick/scenegraph/graph/shaders/noisy.frag3
-rw-r--r--examples/quick/scenegraph/metaltextureimport/squircle.frag3
-rw-r--r--examples/quick/scenegraph/metalunderqml/squircle.frag3
-rw-r--r--examples/quick/scenegraph/shared/squircle_rhi.frag3
-rw-r--r--examples/quick/scenegraph/twotextureproviders/shaders/checker.frag3
-rw-r--r--examples/quick/scenegraph/twotextureproviders/shaders/xorblender.frag3
-rw-r--r--examples/quick/shadereffects/content/shaders/blur.frag3
-rw-r--r--examples/quick/shadereffects/content/shaders/colorize.frag3
-rw-r--r--examples/quick/shadereffects/content/shaders/outline.frag3
-rw-r--r--examples/quick/shadereffects/content/shaders/shadow.frag3
-rw-r--r--examples/quick/shadereffects/content/shaders/wobble.frag3
-rw-r--r--examples/quick/shapes/dashPattern.qml62
-rw-r--r--examples/quick/shapes/linearGradient.qml51
-rw-r--r--examples/quick/shapes/radialGradient.qml41
-rw-r--r--examples/quick/shapes/shapegallery.qml6
20 files changed, 128 insertions, 80 deletions
diff --git a/examples/quick/embeddedinwidgets/reflect.frag b/examples/quick/embeddedinwidgets/reflect.frag
index 04a81f86e5..e1d5dbf450 100644
--- a/examples/quick/embeddedinwidgets/reflect.frag
+++ b/examples/quick/embeddedinwidgets/reflect.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/quad.frag b/examples/quick/rendercontrol/rendercontrol_d3d11/quad.frag
index 09914ccdbe..a72c43db0f 100644
--- a/examples/quick/rendercontrol/rendercontrol_d3d11/quad.frag
+++ b/examples/quick/rendercontrol/rendercontrol_d3d11/quad.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
struct PSIn
{
float2 coord : TEXCOORD0;
diff --git a/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag b/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag
index 0e5f63e7a8..77cc67e4b5 100644
--- a/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag
+++ b/examples/quick/scenegraph/custommaterial/shaders/mandelbrot.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
//! [1]
#version 440
diff --git a/examples/quick/scenegraph/d3d11underqml/squircle.frag b/examples/quick/scenegraph/d3d11underqml/squircle.frag
index a907c84e58..713b2d89f2 100644
--- a/examples/quick/scenegraph/d3d11underqml/squircle.frag
+++ b/examples/quick/scenegraph/d3d11underqml/squircle.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
cbuffer buf : register(b0)
{
float ubuf_t : packoffset(c0);
diff --git a/examples/quick/scenegraph/graph/shaders/line.frag b/examples/quick/scenegraph/graph/shaders/line.frag
index 44b5b24c94..b9531cede6 100644
--- a/examples/quick/scenegraph/graph/shaders/line.frag
+++ b/examples/quick/scenegraph/graph/shaders/line.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in float vT;
diff --git a/examples/quick/scenegraph/graph/shaders/noisy.frag b/examples/quick/scenegraph/graph/shaders/noisy.frag
index 8cea9de02b..0b7cb1306b 100644
--- a/examples/quick/scenegraph/graph/shaders/noisy.frag
+++ b/examples/quick/scenegraph/graph/shaders/noisy.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 vTexCoord;
diff --git a/examples/quick/scenegraph/metaltextureimport/squircle.frag b/examples/quick/scenegraph/metaltextureimport/squircle.frag
index 15f34624fe..8303e97006 100644
--- a/examples/quick/scenegraph/metaltextureimport/squircle.frag
+++ b/examples/quick/scenegraph/metaltextureimport/squircle.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#include <metal_stdlib>
#include <simd/simd.h>
diff --git a/examples/quick/scenegraph/metalunderqml/squircle.frag b/examples/quick/scenegraph/metalunderqml/squircle.frag
index 15f34624fe..8303e97006 100644
--- a/examples/quick/scenegraph/metalunderqml/squircle.frag
+++ b/examples/quick/scenegraph/metalunderqml/squircle.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#include <metal_stdlib>
#include <simd/simd.h>
diff --git a/examples/quick/scenegraph/shared/squircle_rhi.frag b/examples/quick/scenegraph/shared/squircle_rhi.frag
index 8da62b93e6..835a6b2823 100644
--- a/examples/quick/scenegraph/shared/squircle_rhi.frag
+++ b/examples/quick/scenegraph/shared/squircle_rhi.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 coords;
diff --git a/examples/quick/scenegraph/twotextureproviders/shaders/checker.frag b/examples/quick/scenegraph/twotextureproviders/shaders/checker.frag
index 0932bc8c37..c684a2cedd 100644
--- a/examples/quick/scenegraph/twotextureproviders/shaders/checker.frag
+++ b/examples/quick/scenegraph/twotextureproviders/shaders/checker.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/scenegraph/twotextureproviders/shaders/xorblender.frag b/examples/quick/scenegraph/twotextureproviders/shaders/xorblender.frag
index bc68160c1f..8587ae5316 100644
--- a/examples/quick/scenegraph/twotextureproviders/shaders/xorblender.frag
+++ b/examples/quick/scenegraph/twotextureproviders/shaders/xorblender.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 vTexCoord;
diff --git a/examples/quick/shadereffects/content/shaders/blur.frag b/examples/quick/shadereffects/content/shaders/blur.frag
index 0c914d4244..b73a213348 100644
--- a/examples/quick/shadereffects/content/shaders/blur.frag
+++ b/examples/quick/shadereffects/content/shaders/blur.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/shadereffects/content/shaders/colorize.frag b/examples/quick/shadereffects/content/shaders/colorize.frag
index bc8067cc8c..eb50da9344 100644
--- a/examples/quick/shadereffects/content/shaders/colorize.frag
+++ b/examples/quick/shadereffects/content/shaders/colorize.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/shadereffects/content/shaders/outline.frag b/examples/quick/shadereffects/content/shaders/outline.frag
index 26df69c5fe..11e9b74af6 100644
--- a/examples/quick/shadereffects/content/shaders/outline.frag
+++ b/examples/quick/shadereffects/content/shaders/outline.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/shadereffects/content/shaders/shadow.frag b/examples/quick/shadereffects/content/shaders/shadow.frag
index 8247517b6d..f42fa6c0b0 100644
--- a/examples/quick/shadereffects/content/shaders/shadow.frag
+++ b/examples/quick/shadereffects/content/shaders/shadow.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/shadereffects/content/shaders/wobble.frag b/examples/quick/shadereffects/content/shaders/wobble.frag
index a34481c2f2..a97f9d17f5 100644
--- a/examples/quick/shadereffects/content/shaders/wobble.frag
+++ b/examples/quick/shadereffects/content/shaders/wobble.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#version 440
layout(location = 0) in vec2 qt_TexCoord0;
diff --git a/examples/quick/shapes/dashPattern.qml b/examples/quick/shapes/dashPattern.qml
index f64f02c5d9..c427e35c38 100644
--- a/examples/quick/shapes/dashPattern.qml
+++ b/examples/quick/shapes/dashPattern.qml
@@ -56,45 +56,33 @@ Rectangle {
width: 256
height: 256
Shape {
- width: 200
- height: 150
- anchors.centerIn: parent
+ id: shape
+ anchors.fill: parent
+
ShapePath {
- strokeWidth: 4
- strokeColor: "red"
- fillGradient: RadialGradient {
- centerX: 100; centerY: 100; centerRadius: 100
- SequentialAnimation on focalRadius {
- loops: Animation.Infinite
- NumberAnimation { from: 1; to: 20; duration: 2000 }
- NumberAnimation { from: 20; to: 1; duration: 2000 }
- }
- SequentialAnimation on focalX {
- loops: Animation.Infinite
- NumberAnimation { from: 50; to: 150; duration: 3000 }
- NumberAnimation { from: 150; to: 50; duration: 3000 }
- }
- SequentialAnimation on focalY {
- loops: Animation.Infinite
- NumberAnimation { from: 50; to: 150; duration: 1000 }
- NumberAnimation { from: 150; to: 50; duration: 1000 }
- }
- GradientStop { position: 0; color: "#ffffff" }
- GradientStop { position: 0.11; color: "#f9ffa0" }
- GradientStop { position: 0.13; color: "#f9ff99" }
- GradientStop { position: 0.14; color: "#f3ff86" }
- GradientStop { position: 0.49; color: "#93b353" }
- GradientStop { position: 0.87; color: "#264619" }
- GradientStop { position: 0.96; color: "#0c1306" }
- GradientStop { position: 1; color: "#000000" }
- }
- fillColor: "blue" // ignored with the gradient set
+ id: p
+ strokeWidth: 5
+ strokeColor: "blue"
strokeStyle: ShapePath.DashLine
- dashPattern: [ 1, 4 ]
- startX: 20; startY: 20
- PathLine { x: 180; y: 130 }
- PathLine { x: 20; y: 130 }
- PathLine { x: 20; y: 20 }
+ dashPattern: [ 1, 4, 4, 4 ]
+ fillColor: "lightBlue"
+
+ property real xr: 70
+ property real yr: 30
+ startX: shape.width / 2 - xr
+ startY: shape.height / 2 - yr
+ PathArc {
+ x: shape.width / 2 + p.xr
+ y: shape.height / 2 + p.yr
+ radiusX: p.xr; radiusY: p.yr
+ useLargeArc: true
+ }
+ PathArc {
+ x: shape.width / 2 - p.xr
+ y: shape.height / 2 - p.yr
+ radiusX: p.xr; radiusY: p.yr
+ useLargeArc: true
+ }
}
}
}
diff --git a/examples/quick/shapes/linearGradient.qml b/examples/quick/shapes/linearGradient.qml
index c427e35c38..9ac48187ff 100644
--- a/examples/quick/shapes/linearGradient.qml
+++ b/examples/quick/shapes/linearGradient.qml
@@ -56,32 +56,35 @@ Rectangle {
width: 256
height: 256
Shape {
- id: shape
- anchors.fill: parent
-
+ width: 200
+ height: 150
+ anchors.centerIn: parent
ShapePath {
- id: p
- strokeWidth: 5
- strokeColor: "blue"
- strokeStyle: ShapePath.DashLine
- dashPattern: [ 1, 4, 4, 4 ]
- fillColor: "lightBlue"
-
- property real xr: 70
- property real yr: 30
- startX: shape.width / 2 - xr
- startY: shape.height / 2 - yr
- PathArc {
- x: shape.width / 2 + p.xr
- y: shape.height / 2 + p.yr
- radiusX: p.xr; radiusY: p.yr
- useLargeArc: true
+ strokeWidth: 4
+ strokeColor: "red"
+ fillGradient: LinearGradient {
+ x1: 20; y1: 20
+ x2: 180; y2: 130
+ GradientStop { position: 0; color: "blue" }
+ GradientStop { position: 0.2; color: "green" }
+ GradientStop { position: 0.4; color: "red" }
+ GradientStop { position: 0.6; color: "yellow" }
+ GradientStop { position: 1; color: "cyan" }
}
- PathArc {
- x: shape.width / 2 - p.xr
- y: shape.height / 2 - p.yr
- radiusX: p.xr; radiusY: p.yr
- useLargeArc: true
+ fillColor: "blue" // ignored with the gradient set
+ strokeStyle: ShapePath.DashLine
+ dashPattern: [ 1, 4 ]
+ startX: 20; startY: 20
+ PathLine { x: 180; y: 130 }
+ PathLine { x: 20; y: 130 }
+ PathLine { x: 20; y: 20 }
+ }
+ transform: Rotation { origin.x: 100; origin.y: 50; axis { x: 0; y: 1; z: 0 }
+ SequentialAnimation on angle {
+ NumberAnimation { from: 0; to: 75; duration: 2000 }
+ NumberAnimation { from: 75; to: -75; duration: 4000 }
+ NumberAnimation { from: -75; to: 0; duration: 2000 }
+ loops: Animation.Infinite
}
}
}
diff --git a/examples/quick/shapes/radialGradient.qml b/examples/quick/shapes/radialGradient.qml
index 9ac48187ff..f64f02c5d9 100644
--- a/examples/quick/shapes/radialGradient.qml
+++ b/examples/quick/shapes/radialGradient.qml
@@ -62,14 +62,31 @@ Rectangle {
ShapePath {
strokeWidth: 4
strokeColor: "red"
- fillGradient: LinearGradient {
- x1: 20; y1: 20
- x2: 180; y2: 130
- GradientStop { position: 0; color: "blue" }
- GradientStop { position: 0.2; color: "green" }
- GradientStop { position: 0.4; color: "red" }
- GradientStop { position: 0.6; color: "yellow" }
- GradientStop { position: 1; color: "cyan" }
+ fillGradient: RadialGradient {
+ centerX: 100; centerY: 100; centerRadius: 100
+ SequentialAnimation on focalRadius {
+ loops: Animation.Infinite
+ NumberAnimation { from: 1; to: 20; duration: 2000 }
+ NumberAnimation { from: 20; to: 1; duration: 2000 }
+ }
+ SequentialAnimation on focalX {
+ loops: Animation.Infinite
+ NumberAnimation { from: 50; to: 150; duration: 3000 }
+ NumberAnimation { from: 150; to: 50; duration: 3000 }
+ }
+ SequentialAnimation on focalY {
+ loops: Animation.Infinite
+ NumberAnimation { from: 50; to: 150; duration: 1000 }
+ NumberAnimation { from: 150; to: 50; duration: 1000 }
+ }
+ GradientStop { position: 0; color: "#ffffff" }
+ GradientStop { position: 0.11; color: "#f9ffa0" }
+ GradientStop { position: 0.13; color: "#f9ff99" }
+ GradientStop { position: 0.14; color: "#f3ff86" }
+ GradientStop { position: 0.49; color: "#93b353" }
+ GradientStop { position: 0.87; color: "#264619" }
+ GradientStop { position: 0.96; color: "#0c1306" }
+ GradientStop { position: 1; color: "#000000" }
}
fillColor: "blue" // ignored with the gradient set
strokeStyle: ShapePath.DashLine
@@ -79,13 +96,5 @@ Rectangle {
PathLine { x: 20; y: 130 }
PathLine { x: 20; y: 20 }
}
- transform: Rotation { origin.x: 100; origin.y: 50; axis { x: 0; y: 1; z: 0 }
- SequentialAnimation on angle {
- NumberAnimation { from: 0; to: 75; duration: 2000 }
- NumberAnimation { from: 75; to: -75; duration: 4000 }
- NumberAnimation { from: -75; to: 0; duration: 2000 }
- loops: Animation.Infinite
- }
- }
}
}
diff --git a/examples/quick/shapes/shapegallery.qml b/examples/quick/shapes/shapegallery.qml
index 79d438d492..3683f0a822 100644
--- a/examples/quick/shapes/shapegallery.qml
+++ b/examples/quick/shapes/shapegallery.qml
@@ -76,15 +76,15 @@ Rectangle {
}
ListElement {
name: "Dash pattern"
- shapeUrl: "linearGradient.qml"
+ shapeUrl: "dashPattern.qml"
}
ListElement {
name: "Linear gradient"
- shapeUrl: "radialGradient.qml"
+ shapeUrl: "linearGradient.qml"
}
ListElement {
name: "Radial gradient"
- shapeUrl: "dashPattern.qml"
+ shapeUrl: "radialGradient.qml"
}
ListElement {
name: "Fill rules"