update for plugin structure
3
examples/TaoEffectPlugin/Img/Dissolve_1.jpg
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:13be8efa0a8c466b9f0c3a60f14eb1c850f3633f453074209af03a5f2727e686
|
||||
size 31054
|
3
examples/TaoEffectPlugin/Img/Dissolve_2.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f605f889e1611fa39d55be45d5505aff552dd811c13d56000b7ffecdead1f8ac
|
||||
size 57831
|
BIN
examples/TaoEffectPlugin/Img/Girls/girl1.jpeg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl10.jpeg
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl11.jpeg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl12.jpeg
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl14.jpeg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl15.jpeg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl2.jpeg
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl3.jpeg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl4.jpeg
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl5.jpeg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl6.jpeg
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl7.jpeg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl8.jpeg
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
examples/TaoEffectPlugin/Img/Girls/girl9.jpeg
Normal file
After Width: | Height: | Size: 40 KiB |
3
examples/TaoEffectPlugin/Img/arrow.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f4c46665247c79640fd325b162a65e04407caec3312460952faf2195bbdea7ac
|
||||
size 582
|
3
examples/TaoEffectPlugin/Img/astronomy.jpg
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:44b97c9d11d4c7b31c6b5172ae2b62a473c9aa649a5400ae1c70801f2871d6f7
|
||||
size 541467
|
3
examples/TaoEffectPlugin/Img/baby.jpg
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6669211c957d02f34a9af39f29e481a0f2f1608e1816b36e28d81710318e1657
|
||||
size 10459
|
3
examples/TaoEffectPlugin/Img/girl.jpg
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d6c6cda23c0221e6629ec59dd927fa6e380e05d9863f490d2061b6a06abc2e15
|
||||
size 14017
|
3
examples/TaoEffectPlugin/Img/soundRect.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d2f2fb5a8db1fc66d6f68f029b1d558004c6b724ff70fb9bb35f9b9c18694b4a
|
||||
size 282
|
65
examples/TaoEffectPlugin/Qml.qrc
Normal file
@ -0,0 +1,65 @@
|
||||
<RCC>
|
||||
<qresource prefix="/EffectImage">
|
||||
<file>Img/astronomy.jpg</file>
|
||||
<file>Img/soundRect.png</file>
|
||||
<file>Img/girl.jpg</file>
|
||||
<file>Img/baby.jpg</file>
|
||||
<file>Img/Dissolve_1.jpg</file>
|
||||
<file>Img/Dissolve_2.png</file>
|
||||
<file>Img/arrow.png</file>
|
||||
<file>Img/Girls/girl1.jpeg</file>
|
||||
<file>Img/Girls/girl2.jpeg</file>
|
||||
<file>Img/Girls/girl3.jpeg</file>
|
||||
<file>Img/Girls/girl4.jpeg</file>
|
||||
<file>Img/Girls/girl5.jpeg</file>
|
||||
<file>Img/Girls/girl6.jpeg</file>
|
||||
<file>Img/Girls/girl7.jpeg</file>
|
||||
<file>Img/Girls/girl8.jpeg</file>
|
||||
<file>Img/Girls/girl9.jpeg</file>
|
||||
<file>Img/Girls/girl10.jpeg</file>
|
||||
<file>Img/Girls/girl11.jpeg</file>
|
||||
<file>Img/Girls/girl12.jpeg</file>
|
||||
<file>Img/Girls/girl14.jpeg</file>
|
||||
<file>Img/Girls/girl15.jpeg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/Effect">
|
||||
<file>Qml/ContentPage/Animation/Board.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Circle.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Cleavage.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Cross.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Diagonal.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Dissolve.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Enter.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Grad.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Louver.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Rhombus.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Square.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Wheel.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Arrow.qml</file>
|
||||
<file>Qml/ContentPage/Effect/RingPage.qml</file>
|
||||
<file>Qml/ContentPage/Effect/SoundByte.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Swapper.qml</file>
|
||||
<file>Qml/ContentPage/Shape/KLine.qml</file>
|
||||
<file>Qml/ContentPage/Shape/RoundRect.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/FadeInOut.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Dissolve.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Louver.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/PageSwitchBase.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Board.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Circle.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Cleavage.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Cross.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Grad.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Rhombus.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Sector.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Square.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Wheel.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Diagonal.qml</file>
|
||||
<file>Qml/ContentPage/Effect/ARound.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Effects/TAround.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Effects/TArrow.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Effects/TRingPage.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Effects/TSoundByte.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Effects/TSwapper.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
48
examples/TaoEffectPlugin/Qml/ContentPage/Animation/Board.qml
Normal file
@ -0,0 +1,48 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Row {
|
||||
anchors.centerIn: parent
|
||||
spacing: 20
|
||||
ABoard {
|
||||
id: a1
|
||||
width: 460
|
||||
height: 280
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ABoard {
|
||||
id: a2
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ABoard.Direct.ToBottom
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {a1.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {a2.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Grid {
|
||||
anchors.centerIn: parent
|
||||
columns: 2
|
||||
spacing: 40
|
||||
ACircle {
|
||||
id: s1
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ASquare.Direct.FromInner
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ACircle {
|
||||
id: s2
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ASquare.Direct.FromOuter
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {s1.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {s2.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
width: 230
|
||||
height: 140
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Grid {
|
||||
anchors.centerIn: parent
|
||||
columns: 2
|
||||
spacing: 40
|
||||
ACleavage {
|
||||
id: s1
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ACleavage.Direct.HorizonToInner
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ACleavage {
|
||||
id: s2
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ACleavage.Direct.HorizonToOuter
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ACleavage {
|
||||
id: s3
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ACleavage.Direct.VerticalToInner
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ACleavage {
|
||||
id: s4
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ACleavage.Direct.VerticalToOuter
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {s1.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {s2.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {s3.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {s4.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
48
examples/TaoEffectPlugin/Qml/ContentPage/Animation/Cross.qml
Normal file
@ -0,0 +1,48 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Grid {
|
||||
anchors.centerIn: parent
|
||||
columns: 2
|
||||
spacing: 40
|
||||
ACross {
|
||||
id: s1
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ASquare.Direct.FromInner
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ACross {
|
||||
id: s2
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ASquare.Direct.FromOuter
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {s1.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {s2.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Grid {
|
||||
anchors.centerIn: parent
|
||||
columns: 2
|
||||
spacing: 40
|
||||
ADiagonal {
|
||||
id: d1
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ADiagonal.Direct.FromLeftTop
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ADiagonal {
|
||||
id: d2
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ADiagonal.Direct.FromRightBottom
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ADiagonal {
|
||||
id: d3
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ADiagonal.Direct.FromRightTop
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ADiagonal {
|
||||
id: d4
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ADiagonal.Direct.FromLeftBottom
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {d1.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {d2.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {d3.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {d4.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Image {
|
||||
id: dissolveSrc1
|
||||
source: "qrc:/EffectImage/Img/Dissolve_1.jpg"
|
||||
visible: false
|
||||
}
|
||||
Image {
|
||||
id: dissolveSrc2
|
||||
source: "qrc:/EffectImage/Img/Dissolve_2.png"
|
||||
visible: false
|
||||
}
|
||||
Row {
|
||||
anchors.centerIn: parent
|
||||
spacing: 40
|
||||
ADissolve {
|
||||
id: a1
|
||||
width: 460
|
||||
height: 280
|
||||
duration: 1800
|
||||
effectSource.sourceItem: src
|
||||
dissolveSource.sourceItem: dissolveSrc1
|
||||
}
|
||||
ADissolve {
|
||||
id: a2
|
||||
width: 460
|
||||
height: 280
|
||||
duration: 1800
|
||||
effectSource.sourceItem: src
|
||||
dissolveSource.sourceItem: dissolveSrc2
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {a1.restart() } }
|
||||
PauseAnimation {duration: 2000}
|
||||
ScriptAction {script: {a2.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
73
examples/TaoEffectPlugin/Qml/ContentPage/Animation/Enter.qml
Normal file
@ -0,0 +1,73 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
ASlowEnter {
|
||||
id: a1
|
||||
width: 320
|
||||
height: 216
|
||||
x: (parent.width - width) / 2
|
||||
targetY: parent.height / 2
|
||||
dir: ASlowEnter.Direct.FromBottom
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: "qrc:/EffectImage/Img/baby.jpg"
|
||||
}
|
||||
}
|
||||
ASlowEnter {
|
||||
id: a2
|
||||
width: 320
|
||||
height: 216
|
||||
x: (parent.width - width) / 2
|
||||
targetY: parent.height / 2 - height
|
||||
dir: ASlowEnter.Direct.FromTop
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: "qrc:/EffectImage/Img/baby.jpg"
|
||||
}
|
||||
}
|
||||
ASlowEnter {
|
||||
id: a3
|
||||
width: 320
|
||||
height: 216
|
||||
targetX: parent.width / 2 - width * 1.5
|
||||
y: (parent.height - height) / 2
|
||||
dir: ASlowEnter.Direct.FromLeft
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: "qrc:/EffectImage/Img/baby.jpg"
|
||||
}
|
||||
}
|
||||
ASlowEnter {
|
||||
id: a4
|
||||
width: 320
|
||||
height: 216
|
||||
targetX: parent.width / 2 + width / 2
|
||||
y: (parent.height - height) / 2
|
||||
dir: ASlowEnter.Direct.FromRight
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: "qrc:/EffectImage/Img/baby.jpg"
|
||||
}
|
||||
}
|
||||
ParallelAnimation {
|
||||
id: ani
|
||||
ScriptAction{ script: {a1.animation.restart()} }
|
||||
ScriptAction{ script: {a2.animation.restart()} }
|
||||
ScriptAction{ script: {a3.animation.restart()} }
|
||||
ScriptAction{ script: {a4.animation.restart()} }
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.restart()
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
69
examples/TaoEffectPlugin/Qml/ContentPage/Animation/Grad.qml
Normal file
@ -0,0 +1,69 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Grid {
|
||||
anchors.centerIn: parent
|
||||
columns: 2
|
||||
spacing: 40
|
||||
AGrad {
|
||||
id: g1
|
||||
width: 460
|
||||
height: 280
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
|
||||
AGrad {
|
||||
id: g2
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ASlowEnter.Direct.FromRight
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
|
||||
AGrad {
|
||||
id: g3
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ASlowEnter.Direct.FromTop
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
AGrad {
|
||||
id: g4
|
||||
dir: ASlowEnter.Direct.FromBottom
|
||||
width: 460
|
||||
height: 280
|
||||
effectSource.sourceItem: src
|
||||
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {g1.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {g2.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {g3.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {g4.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Grid {
|
||||
anchors.centerIn: parent
|
||||
spacing: 40
|
||||
columns: 2
|
||||
|
||||
ALouver {
|
||||
id: l1
|
||||
width: 460
|
||||
height: 280
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ALouver {
|
||||
id: l2
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ALouver.Direct.HorizonReverse
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ALouver {
|
||||
id: l3
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ALouver.Direct.Vertical
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ALouver {
|
||||
id: l4
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ALouver.Direct.VerticalReverse
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {l1.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {l2.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {l3.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {l4.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Grid {
|
||||
anchors.centerIn: parent
|
||||
spacing: 40
|
||||
columns: 2
|
||||
|
||||
ARhombus {
|
||||
id: l1
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ARhombus.Direct.FromInner
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ARhombus {
|
||||
id: l2
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ARhombus.Direct.FromOuter
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {l1.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {l2.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Grid {
|
||||
anchors.centerIn: parent
|
||||
columns: 2
|
||||
spacing: 40
|
||||
ASquare {
|
||||
id: s1
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ASquare.Direct.FromInner
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ASquare {
|
||||
id: s2
|
||||
width: 460
|
||||
height: 280
|
||||
dir: ASquare.Direct.FromOuter
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {s1.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {s2.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
56
examples/TaoEffectPlugin/Qml/ContentPage/Animation/Wheel.qml
Normal file
@ -0,0 +1,56 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: src
|
||||
source: "qrc:/EffectImage/Img/girl.jpg"
|
||||
visible: false
|
||||
}
|
||||
Grid {
|
||||
anchors.centerIn: parent
|
||||
columns: 2
|
||||
spacing: 40
|
||||
AWheel {
|
||||
id: s1
|
||||
width: 460
|
||||
height: 280
|
||||
dir: AWheel.Direct.Clockwise
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
AWheel {
|
||||
id: s2
|
||||
width: 460
|
||||
height: 280
|
||||
dir: AWheel.Direct.CounterClockwise
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
ASector {
|
||||
id: s3
|
||||
width: 460
|
||||
height: 280
|
||||
effectSource.sourceItem: src
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
ani.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
ScriptAction {script: {s1.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {s2.restart() } }
|
||||
PauseAnimation {duration: 1200}
|
||||
ScriptAction {script: {s3.restart() } }
|
||||
}
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text: "replay"
|
||||
onClicked: {
|
||||
ani.restart()
|
||||
}
|
||||
}
|
||||
}
|
127
examples/TaoEffectPlugin/Qml/ContentPage/Effect/ARound.qml
Normal file
@ -0,0 +1,127 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import "./Effects"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
TAround {
|
||||
id: around
|
||||
width: 400
|
||||
height: 400
|
||||
anchors.centerIn: parent
|
||||
wave: waveSlider.value
|
||||
speed: speedSlider.value
|
||||
ringWidth: ringWidthSlider.value / 100.0
|
||||
rotationSpeed: (rotationSpeedSlider.value - 50.0) / 5.0
|
||||
holeSmooth: holeSmoothSlider.value / 100
|
||||
holeSize: holeSizeSlider.value / 100
|
||||
colorSaturation: colorSaturationSlider.value / 100
|
||||
colorValue: colorValueSlider.value / 200
|
||||
}
|
||||
Column {
|
||||
Row {
|
||||
Text {
|
||||
text: "wave " + around.wave.toFixed(2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "black"
|
||||
}
|
||||
Slider {
|
||||
id: waveSlider
|
||||
from: 1
|
||||
to: 100
|
||||
value: 80
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Text {
|
||||
text: "speed " + around.speed.toFixed(2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "black"
|
||||
}
|
||||
Slider {
|
||||
id: speedSlider
|
||||
from: 1
|
||||
to: 32
|
||||
value: 6
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Text {
|
||||
text: "ringWidth " + around.ringWidth.toFixed(2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "black"
|
||||
}
|
||||
Slider {
|
||||
id: ringWidthSlider
|
||||
from: 0
|
||||
to: 100
|
||||
value: 80
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Text {
|
||||
text: "rotationSpeed" + around.rotationSpeed.toFixed(2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "black"
|
||||
}
|
||||
Slider {
|
||||
id: rotationSpeedSlider
|
||||
from: 0
|
||||
to: 100
|
||||
value: 55
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Text {
|
||||
text: "holeSize" + around.holeSize.toFixed(2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "black"
|
||||
}
|
||||
Slider {
|
||||
id: holeSizeSlider
|
||||
from: 0
|
||||
to: 100
|
||||
value: 15
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Text {
|
||||
text: "holeSmooth" + around.holeSmooth.toFixed(2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "black"
|
||||
}
|
||||
Slider {
|
||||
id: holeSmoothSlider
|
||||
from: 0
|
||||
to: 100
|
||||
value: 44
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Text {
|
||||
text: "colorValue" + around.colorValue.toFixed(2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "black"
|
||||
}
|
||||
Slider {
|
||||
id: colorValueSlider
|
||||
from: 0
|
||||
to: 200
|
||||
value: 100
|
||||
}
|
||||
}
|
||||
Row {
|
||||
Text {
|
||||
text: "colorSaturation" + around.colorSaturation.toFixed(2)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: "black"
|
||||
}
|
||||
Slider {
|
||||
id: colorSaturationSlider
|
||||
from: 0
|
||||
to: 100
|
||||
value: 100
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
90
examples/TaoEffectPlugin/Qml/ContentPage/Effect/Arrow.qml
Normal file
@ -0,0 +1,90 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import "./Effects"
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
Item {
|
||||
id: arrowItem
|
||||
x: 10
|
||||
y: 10
|
||||
width: 300
|
||||
height: 300
|
||||
TArrow {
|
||||
id: arrow1
|
||||
}
|
||||
TArrow {
|
||||
id: arrow2
|
||||
}
|
||||
TArrow {
|
||||
id: arrow3
|
||||
}
|
||||
TArrow {
|
||||
id: arrow4
|
||||
}
|
||||
TArrow {
|
||||
id: arrow5
|
||||
}
|
||||
TArrow {
|
||||
id: arrow6
|
||||
}
|
||||
TArrow {
|
||||
id: arrow7
|
||||
}
|
||||
TArrow {
|
||||
id: arrow8
|
||||
}
|
||||
TArrow {
|
||||
id: arrow9
|
||||
}
|
||||
}
|
||||
Item {
|
||||
id: mirrorItem
|
||||
x: arrowItem.x
|
||||
y: arrowItem.y + arrowItem.height
|
||||
width: arrowItem.width
|
||||
height: arrowItem.height
|
||||
opacity: 0.3
|
||||
layer.enabled: true
|
||||
layer.effect: Component {
|
||||
ShaderEffectSource {
|
||||
sourceItem: arrowItem
|
||||
textureMirroring: ShaderEffectSource.MirrorVertically
|
||||
}
|
||||
}
|
||||
transform: Rotation {
|
||||
origin.x: mirrorItem.width / 2
|
||||
origin.y: mirrorItem.height / 2
|
||||
axis {x: 1; y: 0; z: 0}
|
||||
angle: 180
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
seAnimation.start()
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: seAnimation
|
||||
ScriptAction {script: arrow1.run()}
|
||||
PauseAnimation {duration: 200 }
|
||||
ScriptAction {script: arrow2.run()}
|
||||
PauseAnimation {duration: 200 }
|
||||
ScriptAction {script: arrow3.run()}
|
||||
|
||||
PauseAnimation {duration: 500 }
|
||||
|
||||
ScriptAction {script: arrow4.run()}
|
||||
PauseAnimation {duration: 200 }
|
||||
ScriptAction {script: arrow5.run()}
|
||||
PauseAnimation {duration: 200 }
|
||||
ScriptAction {script: arrow6.run()}
|
||||
|
||||
PauseAnimation {duration: 500 }
|
||||
|
||||
ScriptAction {script: arrow7.run()}
|
||||
PauseAnimation {duration: 200 }
|
||||
ScriptAction {script: arrow8.run()}
|
||||
PauseAnimation {duration: 200 }
|
||||
ScriptAction {script: arrow9.run()}
|
||||
PauseAnimation {duration: 200 }
|
||||
}
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
|
||||
TShaderToy {
|
||||
id: r
|
||||
|
||||
//step 1: hsv color
|
||||
// pixelShader: "
|
||||
//vec3 hsv2rgb_smooth( vec3 c )
|
||||
//{
|
||||
// return c.z * (1. - c.y * smoothstep(2.,1., abs( mod( c.x*6.+vec3(0,4,2), 6.) -3.) ));
|
||||
//}
|
||||
//void mainImage( out vec4 fragColor, in vec2 fragCoord )
|
||||
//{
|
||||
// vec2 uv = fragCoord.xy / iResolution.xy;
|
||||
|
||||
// vec3 hsl = vec3( uv.x, 1.0, uv.y );
|
||||
|
||||
// vec3 rgb = hsv2rgb_smooth( hsl );
|
||||
// fragColor = vec4( rgb, 1.0 );
|
||||
//}
|
||||
//"
|
||||
|
||||
//step 2: radian
|
||||
// pixelShader: "
|
||||
////reference https://www.shadertoy.com/view/MsS3Wc
|
||||
//vec3 hsv2rgb_smooth( vec3 c )
|
||||
//{
|
||||
// return c.z * (1. - c.y * smoothstep(2.,1., abs( mod( c.x*6.+vec3(0,4,2), 6.) -3.) ));
|
||||
//}
|
||||
|
||||
//void mainImage( out vec4 fragColor, in vec2 fragCoord )
|
||||
//{
|
||||
// vec2 uv = fragCoord.xy / iResolution.xy;
|
||||
// vec2 gv = uv - 0.5;
|
||||
// float mask = (atan(gv.x, gv.y) / 3.14 + 1) / 2;
|
||||
// vec3 hsl = vec3( mask, 1.0, uv.y );
|
||||
|
||||
// vec3 rgb = hsv2rgb_smooth( hsl );
|
||||
// fragColor = vec4( rgb, 1.0 );
|
||||
//}
|
||||
//"
|
||||
|
||||
//3 ring
|
||||
// pixelShader: "
|
||||
////reference https://www.shadertoy.com/view/MsS3Wc
|
||||
//vec3 hsv2rgb_smooth( vec3 c )
|
||||
//{
|
||||
// return c.z * (1. - c.y * smoothstep(2.,1., abs( mod( c.x*6.+vec3(0,4,2), 6.) -3.) ));
|
||||
//}
|
||||
|
||||
//void mainImage( out vec4 fragColor, in vec2 fragCoord )
|
||||
//{
|
||||
// vec2 uv = fragCoord.xy / iResolution.xy;
|
||||
// float d = distance(uv, vec2(0.5,0.5));
|
||||
// float x = sin(15 * d + iTime);
|
||||
// x = clamp(x, 0.0, 1.0);
|
||||
// fragColor = vec4(x, x, x, 1.0);
|
||||
//}
|
||||
//"
|
||||
//step 4: ring round
|
||||
// property real wave: waveSlider.value
|
||||
// property real speed: speedSlider.value
|
||||
// property real ringWidth: ringWidthSlider.value / 100
|
||||
// pixelShader: "
|
||||
//uniform float wave;
|
||||
//uniform float speed;
|
||||
//uniform float ringWidth;
|
||||
////reference https://www.shadertoy.com/view/MsS3Wc
|
||||
//vec3 hsv2rgb_smooth( vec3 c )
|
||||
//{
|
||||
// return c.z * (1. - c.y * smoothstep(2.,1., abs( mod( c.x*6.+vec3(0,4,2), 6.) -3.) ));
|
||||
//}
|
||||
|
||||
//void mainImage( out vec4 fragColor, in vec2 fragCoord )
|
||||
//{
|
||||
// vec2 uv = fragCoord.xy / iResolution.xy;
|
||||
// float d = distance(uv, vec2(0.5,0.5));
|
||||
// float x = 1. - step(sin(wave * d - iTime * speed) - ringWidth, 0.);
|
||||
// x = clamp(x, 0.0, 1.0);
|
||||
// fragColor = vec4(x, x, x, 1.0);
|
||||
//}
|
||||
//"
|
||||
|
||||
// //step 5: rotation round
|
||||
// property real wave: waveSlider.value
|
||||
// property real speed: speedSlider.value
|
||||
// property real ringWidth: ringWidthSlider.value / 100.0
|
||||
// property real rotationSpeed: (rotationSpeedSlider.value - 50.0) / 5.0
|
||||
// pixelShader: "
|
||||
//uniform float wave;
|
||||
//uniform float speed;
|
||||
//uniform float ringWidth;
|
||||
//uniform float rotationSpeed;
|
||||
////reference https://www.shadertoy.com/view/MsS3Wc
|
||||
//vec3 hsv2rgb_smooth( vec3 c )
|
||||
//{
|
||||
// return c.z * (1. - c.y * smoothstep(2.,1., abs( mod( c.x*6.+vec3(0,4,2), 6.) -3.) ));
|
||||
//}
|
||||
|
||||
//void mainImage( out vec4 fragColor, in vec2 fragCoord )
|
||||
//{
|
||||
// vec2 uv = fragCoord.xy / iResolution.xy;
|
||||
|
||||
// vec2 gv = uv - 0.5;
|
||||
// gv = vec2(gv.x * cos(rotationSpeed * iTime) - gv.y * sin(rotationSpeed * iTime), gv.y * cos(rotationSpeed * iTime) + gv.x * sin(rotationSpeed * iTime));
|
||||
// float mask = (atan(gv.x, gv.y) / 3.14 + 1) / 2;
|
||||
// vec3 hsl = vec3( mask, 1.0, uv.y );
|
||||
// vec3 rgb = hsv2rgb_smooth( hsl );
|
||||
// fragColor = vec4( rgb, 1.0 );
|
||||
|
||||
//// float d = distance(uv, vec2(0.5,0.5));
|
||||
//// float x = 1. - step(sin(wave * d - iTime * speed) - ringWidth, 0.);
|
||||
//// x = clamp(x, 0.0, 1.0);
|
||||
//// fragColor = vec4(x, x, x, 1.0);
|
||||
//}
|
||||
//"
|
||||
|
||||
//step 6: around
|
||||
property real wave
|
||||
property real speed
|
||||
property real ringWidth
|
||||
property real rotationSpeed
|
||||
property real holeSmooth
|
||||
property real holeSize
|
||||
property real colorSaturation
|
||||
property real colorValue
|
||||
pixelShader: "
|
||||
uniform float wave;
|
||||
uniform float speed;
|
||||
uniform float ringWidth;
|
||||
uniform float rotationSpeed;
|
||||
uniform float holeSize;
|
||||
uniform float holeSmooth;
|
||||
uniform float colorSaturation;
|
||||
uniform float colorValue;
|
||||
//reference https://www.shadertoy.com/view/MsS3Wc
|
||||
vec3 hsv2rgb_smooth( vec3 c )
|
||||
{
|
||||
return c.z * (1. - c.y * smoothstep(2.,1., abs( mod( c.x*6.+vec3(0,4,2), 6.) -3.) ));
|
||||
}
|
||||
|
||||
void mainImage( out vec4 fragColor, in vec2 fragCoord )
|
||||
{
|
||||
vec2 uv = fragCoord.xy / iResolution.xy;
|
||||
|
||||
vec2 gv = uv - 0.5;
|
||||
gv = vec2(gv.x * cos(rotationSpeed * iTime) - gv.y * sin(rotationSpeed * iTime), gv.y * cos(rotationSpeed * iTime) + gv.x * sin(rotationSpeed * iTime));
|
||||
|
||||
float mask = (atan(gv.x, gv.y) / 3.14 + 1) / 2;
|
||||
|
||||
//circle
|
||||
float d = distance(uv, vec2(0.5,0.5));
|
||||
float x = 1. - step(sin(wave * d - iTime * speed) - ringWidth, 0.);
|
||||
x = clamp(x, 0.0, 1.0);
|
||||
vec3 circle = vec3(x,x,x);
|
||||
|
||||
//color
|
||||
vec3 hsl = vec3( mask, 1.0, uv.y );
|
||||
vec3 rgb = hsv2rgb_smooth( hsl );
|
||||
vec3 color = colorValue * 3 * d * mix(vec3(1., 1., 1.), rgb, colorSaturation * (1. - d));
|
||||
float holeCol = smoothstep(holeSize, holeSmooth, d);
|
||||
|
||||
fragColor = vec4(circle * rgb * holeCol, 1.0);
|
||||
}
|
||||
"
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
Image {
|
||||
id: root
|
||||
x: 10
|
||||
y: 10
|
||||
source: "qrc:/EffectImage/Img/arrow.png"
|
||||
visible: false
|
||||
function run() {
|
||||
visible = true;
|
||||
pathAnimation.start();
|
||||
}
|
||||
PathAnimation {
|
||||
id: pathAnimation
|
||||
target: root
|
||||
loops: -1
|
||||
duration: 2400
|
||||
orientation: PathAnimation.TopFirst
|
||||
path: Path{
|
||||
startX: 10
|
||||
startY: 10
|
||||
PathCurve { x: 60; y: 15}
|
||||
PathCurve { x: 110; y: 205}
|
||||
PathCurve { x: 210; y: 200}
|
||||
PathCurve { x: 260; y: 35}
|
||||
PathCurve { x: 310; y: 25}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
import QtQuick 2.12
|
||||
Item {
|
||||
id: root
|
||||
property int inRadius: 160
|
||||
property int radiusOffset: 60
|
||||
property var colors: [
|
||||
"#ffffff",
|
||||
"#32a0d6",
|
||||
"#43b0e7",
|
||||
"#51c2f8",
|
||||
"#4ef4c3",
|
||||
"#4bf49a",
|
||||
"#4ee366",
|
||||
"#ffde00",
|
||||
"#ffd103",
|
||||
"#ffc101",
|
||||
"#ff9b38",
|
||||
"#ff9329",
|
||||
"#f47032",
|
||||
"#f57241",
|
||||
"#f25650",
|
||||
"#e44e48",
|
||||
"#d64172",
|
||||
"#c13fa6",
|
||||
"#a93190",
|
||||
"#4ee366",
|
||||
"#ffde00",
|
||||
"#ffd103",
|
||||
"#ffc101",
|
||||
"#ff9b38",
|
||||
"#43b0e7",
|
||||
"#51c2f8",
|
||||
"#4ef4c3",
|
||||
"#4bf49a",
|
||||
"#4ee366",
|
||||
]
|
||||
property int currentIndex: 0
|
||||
property int count: 5
|
||||
|
||||
signal indexAdded()
|
||||
signal indexDeced()
|
||||
Repeater {
|
||||
model: colors
|
||||
Rectangle {
|
||||
width: radius * 2
|
||||
height: radius * 2
|
||||
radius: inRadius + radiusOffset * (index - currentIndex)
|
||||
color: currentIndex === index ? modelData : "transparent"
|
||||
anchors.centerIn: root
|
||||
border.width: radiusOffset
|
||||
border.color: modelData
|
||||
visible: index >= currentIndex && index <= currentIndex + count
|
||||
Behavior on radius { SmoothedAnimation {duration: 300 }}
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onWheel: {
|
||||
var t = 0
|
||||
if (wheel.angleDelta.y > 100) {
|
||||
t = currentIndex + 1
|
||||
if (t < colors.length - count) {
|
||||
currentIndex = t
|
||||
indexAdded()
|
||||
}
|
||||
} else if (wheel.angleDelta.y < -100) {
|
||||
t = currentIndex - 1
|
||||
if (t >= 0) {
|
||||
currentIndex = t
|
||||
indexDeced()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
import QtQuick 2.12
|
||||
|
||||
Item {
|
||||
id: r
|
||||
implicitWidth: (soundWidth + columnSpacing) * columnCount
|
||||
implicitHeight: (soundHeight + rowSpacing) * rowCount
|
||||
Component {
|
||||
id: soundComp
|
||||
Image {
|
||||
source: "qrc:/EffectImage/Img/soundRect.png"
|
||||
width: soundWidth
|
||||
height: soundHeight
|
||||
}
|
||||
}
|
||||
property bool running: true
|
||||
property int interval: 320
|
||||
property int soundWidth: 12
|
||||
property int soundHeight: 6
|
||||
|
||||
property int rowCount: 15
|
||||
property int columnCount: 30
|
||||
|
||||
property int rowSpacing: 4
|
||||
property int columnSpacing: 4
|
||||
|
||||
property var objPool: []
|
||||
property var map:[]
|
||||
property int __arrayRatio: 100
|
||||
Component.onCompleted: {
|
||||
let startX = 0
|
||||
let startY = r.height - 12
|
||||
for (let i = 0; i < columnCount; ++i) {
|
||||
map.push(getRandomInt(0, rowCount))
|
||||
|
||||
let px = startX + i * (soundWidth + columnSpacing)
|
||||
for (let j = 0; j < rowCount; ++j) {
|
||||
let py = startY - j * (soundHeight + rowSpacing)
|
||||
|
||||
var obj = soundComp.createObject(r, {"x": px, "y": py, "visible": false})
|
||||
objPool[i * __arrayRatio + j] = obj
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
interval: r.interval
|
||||
running: r.running
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
map.push(getRandomInt(0, rowCount))
|
||||
map.shift()
|
||||
for (let i = 0; i < columnCount; ++i) {
|
||||
for (let j = 0; j < rowCount; ++j) {
|
||||
objPool[i * __arrayRatio + j]["visible"] = j < map[i] ? true : false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function getRandomInt(min, max) {
|
||||
min = Math.ceil(min);
|
||||
max = Math.floor(max);
|
||||
return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
Item {
|
||||
id: r
|
||||
property url source
|
||||
|
||||
Image {
|
||||
id: img1
|
||||
anchors.fill: parent
|
||||
source: r.source
|
||||
opacity: 1
|
||||
}
|
||||
Image {
|
||||
id: img2
|
||||
anchors.fill: parent
|
||||
source: r.source
|
||||
opacity: 0.5
|
||||
rotation: 180
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
running: true
|
||||
loops: Animation.Infinite
|
||||
|
||||
PauseAnimation {
|
||||
duration: 5 * 1000
|
||||
}
|
||||
ParallelAnimation {
|
||||
NumberAnimation { target: img1; property:"opacity"; to: 0.5; duration: 1000 }
|
||||
NumberAnimation { target: img2; property:"opacity"; to: 1; duration: 1000 }
|
||||
}
|
||||
|
||||
PauseAnimation {
|
||||
duration: 5 * 1000
|
||||
}
|
||||
ParallelAnimation {
|
||||
NumberAnimation { target: img1; property:"opacity"; to: 1; duration: 1000 }
|
||||
NumberAnimation { target: img2; property:"opacity"; to: 0.5; duration: 1000 }
|
||||
}
|
||||
}
|
||||
}
|
71
examples/TaoEffectPlugin/Qml/ContentPage/Effect/RingPage.qml
Normal file
@ -0,0 +1,71 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import "./Effects"
|
||||
TRingPage {
|
||||
id: ringPage
|
||||
anchors.fill: parent
|
||||
|
||||
property var names: ["一", "二 ", "三", "四", "五", "六", "七", "八", "九", " 十", "百", "千", "万", "亿", "兆", "京", "垓 ", "杼", "穰", "沟", "涧", "正", "载", "极"]
|
||||
radiusOffset: 60
|
||||
inRadius: width / 2 - radiusOffset * 4
|
||||
property bool add: false
|
||||
onIndexAdded: {
|
||||
add = true;
|
||||
ani.restart()
|
||||
}
|
||||
onIndexDeced: {
|
||||
add = false
|
||||
ani.restart()
|
||||
}
|
||||
Text {
|
||||
id: t
|
||||
text: names[currentIndex]
|
||||
anchors.centerIn: parent
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: Qt.darker(ringPage.colors[currentIndex], 1.5)
|
||||
font.pixelSize: 60
|
||||
renderType: Text.NativeRendering
|
||||
scale: 1
|
||||
Behavior on opacity { NumberAnimation { duration: 300} }
|
||||
Behavior on scale { NumberAnimation{ duration: 300} }
|
||||
}
|
||||
SequentialAnimation {
|
||||
id: ani
|
||||
alwaysRunToEnd: true
|
||||
ParallelAnimation {
|
||||
ScriptAction {
|
||||
script: {
|
||||
t.opacity = 0
|
||||
}
|
||||
}
|
||||
ScriptAction {
|
||||
script: {
|
||||
t.scale = ringPage.add ? 0.1 : 4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PauseAnimation {
|
||||
duration: 200
|
||||
}
|
||||
ParallelAnimation {
|
||||
ScriptAction {
|
||||
script: {
|
||||
t.text = ringPage.names[ringPage.currentIndex]
|
||||
}
|
||||
}
|
||||
ScriptAction {
|
||||
script: {
|
||||
t.opacity = 1
|
||||
}
|
||||
}
|
||||
ScriptAction {
|
||||
script: {
|
||||
t.scale = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import "./Effects"
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
TSoundByte {
|
||||
id: src
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenterOffset: -100
|
||||
interval: 240
|
||||
}
|
||||
|
||||
ShaderEffectSource {
|
||||
id: mirror
|
||||
width: src.width
|
||||
height: src.height
|
||||
x: src.x
|
||||
y: src.y + src.height + 10
|
||||
opacity: 0.3
|
||||
sourceItem: src
|
||||
transform: Rotation {
|
||||
origin.x: mirror.width/2
|
||||
origin.y: mirror.height/2
|
||||
axis.x: 1; axis.y: 0; axis.z: 0
|
||||
angle: 180
|
||||
}
|
||||
//no effect
|
||||
//textureMirroring: ShaderEffectSource.MirrorHorizontally
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import "./Effects"
|
||||
TSwapper {
|
||||
source: "qrc:/EffectImage/Img/astronomy.jpg"
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
@ -0,0 +1,75 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
property int dir: 0
|
||||
Repeater {
|
||||
model: images
|
||||
SBoard {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
dir: c.dir
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
text: "Auto Play"
|
||||
}
|
||||
ComboBox {
|
||||
model: ["ToRight","ToBottom"]
|
||||
onCurrentIndexChanged: {
|
||||
c.dir = currentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
property int dir: 0
|
||||
Repeater {
|
||||
model: images
|
||||
SCircle {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
dir: c.dir
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
text: "Auto Play"
|
||||
}
|
||||
ComboBox {
|
||||
model: ["FromInner","FromOuter"]
|
||||
onCurrentIndexChanged: {
|
||||
c.dir = currentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
property int dir: 0
|
||||
Repeater {
|
||||
model: images
|
||||
SCleavage {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
dir: c.dir
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
|
||||
text: "Auto Play"
|
||||
}
|
||||
ComboBox {
|
||||
model: ["HorizonToInner",
|
||||
"HorizonToOuter" ,
|
||||
"VerticalToInner" ,
|
||||
"VerticalToOuter" ]
|
||||
onCurrentIndexChanged: {
|
||||
c.dir = currentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
property int dir: 0
|
||||
Repeater {
|
||||
model: images
|
||||
SCross {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
dir: c.dir
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
text: "Auto Play"
|
||||
}
|
||||
ComboBox {
|
||||
model: ["FromInner","FromOuter"]
|
||||
onCurrentIndexChanged: {
|
||||
c.dir = currentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
property int dir: 0
|
||||
Repeater {
|
||||
model: images
|
||||
SDiagonal {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
dir: c.dir
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
text: "Auto Play"
|
||||
}
|
||||
ComboBox {
|
||||
model: ["FromLeftTop",
|
||||
"FromRightTop",
|
||||
"FromLeftBottom",
|
||||
"FromRightBottom"]
|
||||
onCurrentIndexChanged: {
|
||||
c.dir = currentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
Image {
|
||||
id: dissolveSrc1
|
||||
source: "qrc:/EffectImage/Img/Dissolve_1.jpg"
|
||||
visible: false
|
||||
}
|
||||
Image {
|
||||
id: dissolveSrc2
|
||||
source: "qrc:/EffectImage/Img/Dissolve_2.png"
|
||||
visible: false
|
||||
}
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
Repeater {
|
||||
model: images
|
||||
SDissolve {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
dissolveImage: dissolveSrc1
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
text: "Auto Play"
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
id: r
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
Repeater {
|
||||
model: images
|
||||
SFadeInOut {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
text: "Auto Play"
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2400
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
76
examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Grad.qml
Normal file
@ -0,0 +1,76 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
property int dir: 0
|
||||
Repeater {
|
||||
model: images
|
||||
SGrad {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
dir: c.dir
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
|
||||
text: "Auto Play"
|
||||
}
|
||||
ComboBox {
|
||||
model: ["FromLeft", "FromRight", "FromTop", "FromBottom"]
|
||||
onCurrentIndexChanged: {
|
||||
c.dir = currentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
id: r
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
property int dir: SLouver.Direct.Horizon
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
Repeater {
|
||||
model: images
|
||||
SLouver {
|
||||
anchors.fill: parent
|
||||
dir: r.dir
|
||||
sourceItem: Image { source: images[index]}
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
text: "Auto Play"
|
||||
}
|
||||
ComboBox {
|
||||
model: ["Horizon", "Vertical", "HorizonReverse", "VerticalReverse"]
|
||||
onCurrentIndexChanged: {
|
||||
r.dir = currentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2400
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
|
||||
Item {
|
||||
id: base
|
||||
property int currentIndex: -1
|
||||
property int maxCount
|
||||
MouseArea {
|
||||
width: base.width / 2
|
||||
height: base.height
|
||||
onClicked: {
|
||||
if (currentIndex - 1 >= 0)
|
||||
{
|
||||
currentIndex--
|
||||
}
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
x: base.width / 2
|
||||
width: base.width / 2
|
||||
height: base.height
|
||||
onClicked: {
|
||||
if (currentIndex + 1 < base.maxCount)
|
||||
{
|
||||
currentIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
currentIndex = 0
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,75 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
property int dir: 0
|
||||
Repeater {
|
||||
model: images
|
||||
SRhombus {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
dir: c.dir
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
text: "Auto Play"
|
||||
}
|
||||
ComboBox {
|
||||
model: ["FromInner","FromOuter"]
|
||||
onCurrentIndexChanged: {
|
||||
c.dir = currentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
Repeater {
|
||||
model: images
|
||||
SSector {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
text: "Auto Play"
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
property int dir
|
||||
Repeater {
|
||||
model: images
|
||||
SSquare {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
dir: c.dir
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
text: "Auto Play"
|
||||
}
|
||||
ComboBox {
|
||||
model: ["FromInner","FromOuter"]
|
||||
onCurrentIndexChanged: {
|
||||
c.dir = currentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
property var images:[
|
||||
"qrc:/EffectImage/Img/Girls/girl1.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl2.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl3.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl4.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl5.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl6.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl7.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl8.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl9.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl10.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl11.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl12.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl14.jpeg",
|
||||
"qrc:/EffectImage/Img/Girls/girl15.jpeg"
|
||||
]
|
||||
PageSwitchBase {
|
||||
id: c
|
||||
width: 500
|
||||
height: 750
|
||||
anchors.centerIn: parent
|
||||
maxCount: images.length
|
||||
property int dir: 0
|
||||
Repeater {
|
||||
model: images
|
||||
SWheel {
|
||||
anchors.fill: parent
|
||||
sourceItem: Image { source: images[index] }
|
||||
dir: c.dir
|
||||
state: index === c.currentIndex ? "show" : "hide"
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
Switch {
|
||||
id: autoPlaySwitch
|
||||
text: "Auto Play"
|
||||
}
|
||||
ComboBox {
|
||||
model: ["Clockwise","CounterClockwise"]
|
||||
onCurrentIndexChanged: {
|
||||
c.dir = currentIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: autoPlayTimer
|
||||
interval: 2800
|
||||
running: autoPlaySwitch.checked
|
||||
repeat: true
|
||||
property bool reserve: false
|
||||
triggeredOnStart: true
|
||||
onTriggered: {
|
||||
if (reserve) {
|
||||
c.currentIndex--;
|
||||
} else {
|
||||
c.currentIndex++;
|
||||
}
|
||||
if (c.currentIndex >= images.length - 1) {
|
||||
reserve = true;
|
||||
} else if(c.currentIndex <= 0) {
|
||||
reserve = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
30
examples/TaoEffectPlugin/Qml/ContentPage/Shape/KLine.qml
Normal file
@ -0,0 +1,30 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
TKLine {
|
||||
x: 10
|
||||
y: 30
|
||||
width: 50
|
||||
height: 197
|
||||
upShadow: 110
|
||||
upValue: 150
|
||||
maxValue: 195
|
||||
downValue: 50
|
||||
minValue: 10
|
||||
}
|
||||
TKLine {
|
||||
x: 110
|
||||
y: 30
|
||||
width: 40
|
||||
height: 197
|
||||
lineWidth: 4
|
||||
isFill: false
|
||||
upValue: 120
|
||||
maxValue: 200
|
||||
lineColor: "green"
|
||||
}
|
||||
}
|
54
examples/TaoEffectPlugin/Qml/ContentPage/Shape/RoundRect.qml
Normal file
@ -0,0 +1,54 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import TaoQuick 1.0
|
||||
import "qrc:/Tao/Qml"
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
Rectangle {
|
||||
x: 10
|
||||
width: 100
|
||||
height: 160
|
||||
color: "red"
|
||||
}
|
||||
TRoundRect {
|
||||
id: roundRect
|
||||
x: 40
|
||||
y: 10
|
||||
width: 200
|
||||
height: 160
|
||||
radius: 40
|
||||
leftTopRound: lt.checked
|
||||
rightTopRound: rt.checked
|
||||
leftBottomRound: lb.checked
|
||||
rightBottomRound: rb.checked
|
||||
color: "#A0333666"
|
||||
}
|
||||
|
||||
Grid {
|
||||
x: 300
|
||||
y: 10
|
||||
columns: 2
|
||||
spacing: 10
|
||||
|
||||
CheckBox {
|
||||
id: lt
|
||||
text: "LeftTop"
|
||||
checked: true
|
||||
}
|
||||
CheckBox {
|
||||
id: rt
|
||||
text: "RightTop"
|
||||
checked: true
|
||||
}
|
||||
CheckBox {
|
||||
id: lb
|
||||
text: "LeftBottom"
|
||||
checked: true
|
||||
}
|
||||
CheckBox {
|
||||
id: rb
|
||||
text: "rightBottom"
|
||||
checked: true
|
||||
}
|
||||
}
|
||||
}
|
212
examples/TaoEffectPlugin/Src/EffectsPlugin.cpp
Normal file
@ -0,0 +1,212 @@
|
||||
#include "EffectsPlugin.h"
|
||||
#include <QQmlEngine>
|
||||
EffectsPlugin::EffectsPlugin(QObject *parent) : QObject (parent)
|
||||
{
|
||||
}
|
||||
|
||||
void EffectsPlugin::init()
|
||||
{
|
||||
Q_INIT_RESOURCE(Qml);
|
||||
}
|
||||
|
||||
QJsonArray EffectsPlugin::infos() const
|
||||
{
|
||||
static QJsonArray arr {
|
||||
QJsonObject {
|
||||
{"name", u8"特效"},
|
||||
{"title", u8"特效"},
|
||||
{"children", QJsonArray{
|
||||
QJsonObject {
|
||||
{"name", u8"环"},
|
||||
{"title", u8"环"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Effect/RingPage.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"璀璨星空"},
|
||||
{"title", u8"璀璨星空"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Effect/Swapper.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"跟上节奏"},
|
||||
{"title", u8"跟上节奏"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Effect/SoundByte.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"暗流涌动"},
|
||||
{"title", u8"暗流涌动"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Effect/Arrow.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"魔力圈圈"},
|
||||
{"title", u8"魔力圈圈"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Effect/ARound.qml"}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
QJsonObject {
|
||||
{"name", u8"自绘"},
|
||||
{"title", u8"自绘"},
|
||||
{"children", QJsonArray{
|
||||
QJsonObject {
|
||||
{"name", u8"圆角矩形"},
|
||||
{"title", u8"圆角矩形"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Shape/RoundRect.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"K线"},
|
||||
{"title", u8"K线"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Shape/KLine.qml"}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"动画"},
|
||||
{"title", u8"动画"},
|
||||
{"children", QJsonArray{
|
||||
QJsonObject {
|
||||
{"name", u8"缓慢进入"},
|
||||
{"title", u8"缓慢进入"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Enter.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"梯度"},
|
||||
{"title", u8"梯度"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Grad.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"劈裂"},
|
||||
{"title", u8"劈裂"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Cleavage.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"对角线"},
|
||||
{"title", u8"对角线"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Diagonal.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"百叶窗"},
|
||||
{"title", u8"百叶窗"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Louver.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"方盒"},
|
||||
{"title", u8"方盒"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Square.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"圆盒"},
|
||||
{"title", u8"圆盒"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Circle.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"十字"},
|
||||
{"title", u8"十字"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Cross.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"菱形"},
|
||||
{"title", u8"菱形"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Rhombus.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"轮子"},
|
||||
{"title", u8"轮子"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Wheel.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"棋盘"},
|
||||
{"title", u8"棋盘"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Board.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"溶解"},
|
||||
{"title", u8"溶解"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/Animation/Dissolve.qml"}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"页面切换"},
|
||||
{"title", u8"页面切换"},
|
||||
{"children", QJsonArray{
|
||||
QJsonObject {
|
||||
{"name", u8"淡入淡出"},
|
||||
{"title", u8"淡入淡出"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/FadeInOut.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"梯度"},
|
||||
{"title", u8"梯度"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Grad.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"劈裂"},
|
||||
{"title", u8"劈裂"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Cleavage.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"对角线"},
|
||||
{"title", u8"对角线"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Diagonal.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"百叶窗"},
|
||||
{"title", u8"百叶窗"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Louver.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"方盒"},
|
||||
{"title", u8"方盒"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Square.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"圆盒"},
|
||||
{"title", u8"圆盒"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Circle.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"十字"},
|
||||
{"title", u8"十字"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Cross.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"菱形"},
|
||||
{"title", u8"菱形"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Rhombus.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"轮子"},
|
||||
{"title", u8"轮子"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Wheel.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"扇形"},
|
||||
{"title", u8"扇形"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Sector.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"棋盘"},
|
||||
{"title", u8"棋盘"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Board.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"溶解"},
|
||||
{"title", u8"溶解"},
|
||||
{"url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Dissolve.qml"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return arr;
|
||||
}
|
||||
|
||||
void EffectsPlugin::replaceTranslater(const QString &oldLang, const QString &newLang) const
|
||||
{
|
||||
(void)oldLang;
|
||||
(void)newLang;
|
||||
}
|
15
examples/TaoEffectPlugin/Src/EffectsPlugin.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "ITaoQuickPlugin.h"
|
||||
class EffectsPlugin : public QObject, public ITaoQuickPlugin {
|
||||
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID TaoQuickInterface_iid)
|
||||
Q_INTERFACES(ITaoQuickPlugin)
|
||||
public:
|
||||
explicit EffectsPlugin(QObject *parent = nullptr);
|
||||
|
||||
void init() override;
|
||||
QJsonArray infos() const override;
|
||||
void replaceTranslater(const QString &oldLang, const QString &newLang) const override;
|
||||
};
|
33
examples/TaoEffectPlugin/TaoEffectPlugin.pro
Normal file
@ -0,0 +1,33 @@
|
||||
QT += core gui qml
|
||||
|
||||
TARGET = $$qtLibraryTarget(TaoEffect)
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin
|
||||
msvc {
|
||||
QMAKE_CFLAGS += -source-charset:utf-8
|
||||
QMAKE_CXXFLAGS += -source-charset:utf-8
|
||||
}
|
||||
|
||||
include(../TaoQuickApp/PluginCommon.pri)
|
||||
|
||||
SOURCES += \
|
||||
Src/EffectsPlugin.cpp
|
||||
|
||||
HEADERS += \
|
||||
Src/EffectsPlugin.h
|
||||
|
||||
RESOURCES += \
|
||||
Qml.qrc
|
||||
CONFIG(debug, debug|release){
|
||||
tgt=$$absolute_path($${_PRO_FILE_PWD_}/../../bin/debug/TaoPlugin)
|
||||
} else {
|
||||
tgt=$$absolute_path($${_PRO_FILE_PWD_}/../../bin/release/TaoPlugin)
|
||||
}
|
||||
win32 {
|
||||
tgt ~= s,/,\\\\,g
|
||||
}
|
||||
DESTDIR = $${tgt}
|
||||
|
||||
OTHER_FILES += README.md \
|
||||
.clang-format \
|
||||
LICENSE
|
@ -15,9 +15,6 @@
|
||||
<file>Image/Window/skin_gray.png</file>
|
||||
<file>Image/Window/skin_white.png</file>
|
||||
<file>Image/logo/splash.gif</file>
|
||||
<file>Image/Button/cry-fill.png</file>
|
||||
<file>Image/Button/smile-fill.png</file>
|
||||
<file>Image/Button/smile-fill-hover.png</file>
|
||||
<file>Image/Window/about_gray.png</file>
|
||||
<file>Image/Window/about_white.png</file>
|
||||
<file>Image/Window/flower.jpg</file>
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
3
examples/TaoQuickApp/PluginCommon.pri
Normal file
@ -0,0 +1,3 @@
|
||||
HEADERS += $$PWD/Src/ITaoQuickPlugin.h
|
||||
INCLUDEPATH +=$$PWD/Src
|
||||
include($$PWD/../../common/TaoVersion.pri)
|
14
examples/TaoQuickApp/Qml.qrc
Normal file
@ -0,0 +1,14 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>Qml/main.qml</file>
|
||||
<file>Qml/Page/MenuPage.qml</file>
|
||||
<file>Qml/Page/ContentPage.qml</file>
|
||||
<file>Qml/Page/TitlePage.qml</file>
|
||||
<file>Qml/Page/NotifyBox.qml</file>
|
||||
<file>Qml/Splash.qml</file>
|
||||
<file>Qml/MainPage.qml</file>
|
||||
<file>Qml/Page/ContentData.qml</file>
|
||||
<file>Qml/Page/AboutDialog.qml</file>
|
||||
<file>Qml/Welcome/Welcome.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -54,23 +54,6 @@ QtObject {
|
||||
}
|
||||
|
||||
property ListModel contentData: ListModel {
|
||||
ListElement { name: qsTr("首页"); title: qsTr("欢迎"); url: "qrc:/Qml/Contents/Welcome/Welcome.qml"; children: []}
|
||||
ListElement {
|
||||
name: qsTr("基础组件"); title: qsTr("基础组件"); children: [
|
||||
ListElement { name: qsTr("按钮组件"); title: qsTr("按钮组件"); url: "qrc:/Qml/Contents/BaseComponent/Buttons.qml"},
|
||||
ListElement { name: qsTr("拖动组件"); title: qsTr("拖动组件"); url: "qrc:/Qml/Contents/BaseComponent/Drags.qml"},
|
||||
ListElement { name: qsTr("渐变"); title: qsTr("渐变"); url: "qrc:/Qml/Contents/BaseComponent/Gradiants.qml"},
|
||||
ListElement { name: qsTr("进度条组件"); title: qsTr("进度条组件"); url: "qrc:/Qml/Contents/BaseComponent/Progresses.qml"},
|
||||
ListElement { name: qsTr("对话框"); title: qsTr("对话框"); url: "qrc:/Qml/Contents/BaseComponent/Dialogs.qml"}
|
||||
]
|
||||
}
|
||||
ListElement {
|
||||
name: qsTr("ShaderEffect"); title: qsTr("ShaderEffect"); children: [
|
||||
ListElement { name: qsTr("穿云洞"); title: qsTr("穿云洞"); url: "qrc:/Qml/Contents/ShaderEffect/CloudHole.qml"},
|
||||
ListElement { name: qsTr("星球之光"); title: qsTr("星球之光"); url: "qrc:/Qml/Contents/ShaderEffect/Planet.qml"},
|
||||
ListElement { name: qsTr("蜗牛"); title: qsTr("蜗牛"); url: "qrc:/Qml/Contents/ShaderEffect/Snail.qml"},
|
||||
ListElement { name: qsTr("超级马里奥"); title: qsTr("超级马里奥"); url: "qrc:/Qml/Contents/ShaderEffect/SuperMario.qml"}
|
||||
]
|
||||
}
|
||||
ListElement { name: qsTr("首页"); title: qsTr("欢迎"); url: "qrc:/Qml/Welcome/Welcome.qml"; children: []}
|
||||
}
|
||||
}
|