diff --git a/examples/TaoEffectPlugin/Img/Dissolve_1.jpg b/examples/TaoEffectPlugin/Img/Dissolve_1.jpg new file mode 100644 index 0000000..dacfeff --- /dev/null +++ b/examples/TaoEffectPlugin/Img/Dissolve_1.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13be8efa0a8c466b9f0c3a60f14eb1c850f3633f453074209af03a5f2727e686 +size 31054 diff --git a/examples/TaoEffectPlugin/Img/Dissolve_2.png b/examples/TaoEffectPlugin/Img/Dissolve_2.png new file mode 100644 index 0000000..dccdf40 --- /dev/null +++ b/examples/TaoEffectPlugin/Img/Dissolve_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f605f889e1611fa39d55be45d5505aff552dd811c13d56000b7ffecdead1f8ac +size 57831 diff --git a/examples/TaoEffectPlugin/Img/Girls/girl1.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl1.jpeg new file mode 100644 index 0000000..ae06a29 Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl1.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl10.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl10.jpeg new file mode 100644 index 0000000..85d7b12 Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl10.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl11.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl11.jpeg new file mode 100644 index 0000000..c3bc496 Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl11.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl12.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl12.jpeg new file mode 100644 index 0000000..db0bb25 Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl12.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl14.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl14.jpeg new file mode 100644 index 0000000..b458526 Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl14.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl15.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl15.jpeg new file mode 100644 index 0000000..acb33ee Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl15.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl2.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl2.jpeg new file mode 100644 index 0000000..b06049b Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl2.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl3.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl3.jpeg new file mode 100644 index 0000000..bae3947 Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl3.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl4.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl4.jpeg new file mode 100644 index 0000000..bc3d580 Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl4.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl5.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl5.jpeg new file mode 100644 index 0000000..b8d01c2 Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl5.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl6.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl6.jpeg new file mode 100644 index 0000000..d7bd4ae Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl6.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl7.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl7.jpeg new file mode 100644 index 0000000..0c081bc Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl7.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl8.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl8.jpeg new file mode 100644 index 0000000..98adcdb Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl8.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/Girls/girl9.jpeg b/examples/TaoEffectPlugin/Img/Girls/girl9.jpeg new file mode 100644 index 0000000..faa74e0 Binary files /dev/null and b/examples/TaoEffectPlugin/Img/Girls/girl9.jpeg differ diff --git a/examples/TaoEffectPlugin/Img/arrow.png b/examples/TaoEffectPlugin/Img/arrow.png new file mode 100644 index 0000000..44be9f7 --- /dev/null +++ b/examples/TaoEffectPlugin/Img/arrow.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4c46665247c79640fd325b162a65e04407caec3312460952faf2195bbdea7ac +size 582 diff --git a/examples/TaoEffectPlugin/Img/astronomy.jpg b/examples/TaoEffectPlugin/Img/astronomy.jpg new file mode 100644 index 0000000..dcaa886 --- /dev/null +++ b/examples/TaoEffectPlugin/Img/astronomy.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44b97c9d11d4c7b31c6b5172ae2b62a473c9aa649a5400ae1c70801f2871d6f7 +size 541467 diff --git a/examples/TaoEffectPlugin/Img/baby.jpg b/examples/TaoEffectPlugin/Img/baby.jpg new file mode 100644 index 0000000..29ab9a9 --- /dev/null +++ b/examples/TaoEffectPlugin/Img/baby.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6669211c957d02f34a9af39f29e481a0f2f1608e1816b36e28d81710318e1657 +size 10459 diff --git a/examples/TaoEffectPlugin/Img/girl.jpg b/examples/TaoEffectPlugin/Img/girl.jpg new file mode 100644 index 0000000..a29673f --- /dev/null +++ b/examples/TaoEffectPlugin/Img/girl.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6c6cda23c0221e6629ec59dd927fa6e380e05d9863f490d2061b6a06abc2e15 +size 14017 diff --git a/examples/TaoEffectPlugin/Img/soundRect.png b/examples/TaoEffectPlugin/Img/soundRect.png new file mode 100644 index 0000000..95e8b48 --- /dev/null +++ b/examples/TaoEffectPlugin/Img/soundRect.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2f2fb5a8db1fc66d6f68f029b1d558004c6b724ff70fb9bb35f9b9c18694b4a +size 282 diff --git a/examples/TaoEffectPlugin/Qml.qrc b/examples/TaoEffectPlugin/Qml.qrc new file mode 100644 index 0000000..f0a33b7 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml.qrc @@ -0,0 +1,65 @@ + + + Img/astronomy.jpg + Img/soundRect.png + Img/girl.jpg + Img/baby.jpg + Img/Dissolve_1.jpg + Img/Dissolve_2.png + Img/arrow.png + Img/Girls/girl1.jpeg + Img/Girls/girl2.jpeg + Img/Girls/girl3.jpeg + Img/Girls/girl4.jpeg + Img/Girls/girl5.jpeg + Img/Girls/girl6.jpeg + Img/Girls/girl7.jpeg + Img/Girls/girl8.jpeg + Img/Girls/girl9.jpeg + Img/Girls/girl10.jpeg + Img/Girls/girl11.jpeg + Img/Girls/girl12.jpeg + Img/Girls/girl14.jpeg + Img/Girls/girl15.jpeg + + + Qml/ContentPage/Animation/Board.qml + Qml/ContentPage/Animation/Circle.qml + Qml/ContentPage/Animation/Cleavage.qml + Qml/ContentPage/Animation/Cross.qml + Qml/ContentPage/Animation/Diagonal.qml + Qml/ContentPage/Animation/Dissolve.qml + Qml/ContentPage/Animation/Enter.qml + Qml/ContentPage/Animation/Grad.qml + Qml/ContentPage/Animation/Louver.qml + Qml/ContentPage/Animation/Rhombus.qml + Qml/ContentPage/Animation/Square.qml + Qml/ContentPage/Animation/Wheel.qml + Qml/ContentPage/Effect/Arrow.qml + Qml/ContentPage/Effect/RingPage.qml + Qml/ContentPage/Effect/SoundByte.qml + Qml/ContentPage/Effect/Swapper.qml + Qml/ContentPage/Shape/KLine.qml + Qml/ContentPage/Shape/RoundRect.qml + Qml/ContentPage/PageSwitch/FadeInOut.qml + Qml/ContentPage/PageSwitch/Dissolve.qml + Qml/ContentPage/PageSwitch/Louver.qml + Qml/ContentPage/PageSwitch/PageSwitchBase.qml + Qml/ContentPage/PageSwitch/Board.qml + Qml/ContentPage/PageSwitch/Circle.qml + Qml/ContentPage/PageSwitch/Cleavage.qml + Qml/ContentPage/PageSwitch/Cross.qml + Qml/ContentPage/PageSwitch/Grad.qml + Qml/ContentPage/PageSwitch/Rhombus.qml + Qml/ContentPage/PageSwitch/Sector.qml + Qml/ContentPage/PageSwitch/Square.qml + Qml/ContentPage/PageSwitch/Wheel.qml + Qml/ContentPage/PageSwitch/Diagonal.qml + Qml/ContentPage/Effect/ARound.qml + Qml/ContentPage/Effect/Effects/TAround.qml + Qml/ContentPage/Effect/Effects/TArrow.qml + Qml/ContentPage/Effect/Effects/TRingPage.qml + Qml/ContentPage/Effect/Effects/TSoundByte.qml + Qml/ContentPage/Effect/Effects/TSwapper.qml + + diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Board.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Board.qml new file mode 100644 index 0000000..753b437 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Board.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Circle.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Circle.qml new file mode 100644 index 0000000..c570610 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Circle.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Cleavage.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Cleavage.qml new file mode 100644 index 0000000..2736919 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Cleavage.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Cross.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Cross.qml new file mode 100644 index 0000000..5f96b35 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Cross.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Diagonal.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Diagonal.qml new file mode 100644 index 0000000..cb4949b --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Diagonal.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Dissolve.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Dissolve.qml new file mode 100644 index 0000000..4c17e64 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Dissolve.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Enter.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Enter.qml new file mode 100644 index 0000000..737e2e9 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Enter.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Grad.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Grad.qml new file mode 100644 index 0000000..783abbf --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Grad.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Louver.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Louver.qml new file mode 100644 index 0000000..cf965cf --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Louver.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Rhombus.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Rhombus.qml new file mode 100644 index 0000000..0432eab --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Rhombus.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Square.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Square.qml new file mode 100644 index 0000000..ed5ec29 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Square.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Wheel.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Wheel.qml new file mode 100644 index 0000000..418acd1 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Animation/Wheel.qml @@ -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() + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Effect/ARound.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/ARound.qml new file mode 100644 index 0000000..a800c50 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/ARound.qml @@ -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 + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Arrow.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Arrow.qml new file mode 100644 index 0000000..1cb404c --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Arrow.qml @@ -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 } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TAround.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TAround.qml new file mode 100644 index 0000000..c673ef8 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TAround.qml @@ -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); +} +" + + +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TArrow.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TArrow.qml new file mode 100644 index 0000000..5e4facc --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TArrow.qml @@ -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} + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TRingPage.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TRingPage.qml new file mode 100644 index 0000000..040bbf7 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TRingPage.qml @@ -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() + } + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TSoundByte.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TSoundByte.qml new file mode 100644 index 0000000..b6a6ad6 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TSoundByte.qml @@ -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; //不含最大值,含最小值 + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TSwapper.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TSwapper.qml new file mode 100644 index 0000000..48c233b --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Effects/TSwapper.qml @@ -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 } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Effect/RingPage.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/RingPage.qml new file mode 100644 index 0000000..1f994f1 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/RingPage.qml @@ -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 + } + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Effect/SoundByte.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/SoundByte.qml new file mode 100644 index 0000000..a54ae85 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/SoundByte.qml @@ -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 + + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Swapper.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Swapper.qml new file mode 100644 index 0000000..f6df67b --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Effect/Swapper.qml @@ -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 +} + diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Board.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Board.qml new file mode 100644 index 0000000..67b2c2c --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Board.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Circle.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Circle.qml new file mode 100644 index 0000000..74f2640 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Circle.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Cleavage.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Cleavage.qml new file mode 100644 index 0000000..32fb4d5 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Cleavage.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Cross.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Cross.qml new file mode 100644 index 0000000..b419dc4 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Cross.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Diagonal.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Diagonal.qml new file mode 100644 index 0000000..046ec3c --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Diagonal.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Dissolve.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Dissolve.qml new file mode 100644 index 0000000..5d12cf1 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Dissolve.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/FadeInOut.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/FadeInOut.qml new file mode 100644 index 0000000..0ecfa6c --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/FadeInOut.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Grad.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Grad.qml new file mode 100644 index 0000000..06c0d59 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Grad.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Louver.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Louver.qml new file mode 100644 index 0000000..9763152 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Louver.qml @@ -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++; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/PageSwitchBase.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/PageSwitchBase.qml new file mode 100644 index 0000000..eebae5c --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/PageSwitchBase.qml @@ -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 + } +} + diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Rhombus.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Rhombus.qml new file mode 100644 index 0000000..9eb743c --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Rhombus.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Sector.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Sector.qml new file mode 100644 index 0000000..35d8f87 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Sector.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Square.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Square.qml new file mode 100644 index 0000000..ce03675 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Square.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Wheel.qml b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Wheel.qml new file mode 100644 index 0000000..0f46308 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/PageSwitch/Wheel.qml @@ -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; + } + } + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Shape/KLine.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Shape/KLine.qml new file mode 100644 index 0000000..89cbf87 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Shape/KLine.qml @@ -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" + } +} diff --git a/examples/TaoEffectPlugin/Qml/ContentPage/Shape/RoundRect.qml b/examples/TaoEffectPlugin/Qml/ContentPage/Shape/RoundRect.qml new file mode 100644 index 0000000..76c8094 --- /dev/null +++ b/examples/TaoEffectPlugin/Qml/ContentPage/Shape/RoundRect.qml @@ -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 + } + } +} diff --git a/examples/TaoEffectPlugin/Src/EffectsPlugin.cpp b/examples/TaoEffectPlugin/Src/EffectsPlugin.cpp new file mode 100644 index 0000000..c75a977 --- /dev/null +++ b/examples/TaoEffectPlugin/Src/EffectsPlugin.cpp @@ -0,0 +1,212 @@ +#include "EffectsPlugin.h" +#include +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; +} diff --git a/examples/TaoEffectPlugin/Src/EffectsPlugin.h b/examples/TaoEffectPlugin/Src/EffectsPlugin.h new file mode 100644 index 0000000..0ea0d64 --- /dev/null +++ b/examples/TaoEffectPlugin/Src/EffectsPlugin.h @@ -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; +}; diff --git a/examples/TaoEffectPlugin/TaoEffectPlugin.pro b/examples/TaoEffectPlugin/TaoEffectPlugin.pro new file mode 100644 index 0000000..a64ae55 --- /dev/null +++ b/examples/TaoEffectPlugin/TaoEffectPlugin.pro @@ -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 diff --git a/examples/TaoQuickDemo/App.rc b/examples/TaoQuickApp/App.rc similarity index 100% rename from examples/TaoQuickDemo/App.rc rename to examples/TaoQuickApp/App.rc diff --git a/examples/TaoQuickDemo/Image.qrc b/examples/TaoQuickApp/Image.qrc similarity index 85% rename from examples/TaoQuickDemo/Image.qrc rename to examples/TaoQuickApp/Image.qrc index 7bb678b..5787f32 100644 --- a/examples/TaoQuickDemo/Image.qrc +++ b/examples/TaoQuickApp/Image.qrc @@ -15,9 +15,6 @@ Image/Window/skin_gray.png Image/Window/skin_white.png Image/logo/splash.gif - Image/Button/cry-fill.png - Image/Button/smile-fill.png - Image/Button/smile-fill-hover.png Image/Window/about_gray.png Image/Window/about_white.png Image/Window/flower.jpg diff --git a/examples/TaoQuickDemo/Image/Window/about_gray.png b/examples/TaoQuickApp/Image/Window/about_gray.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/about_gray.png rename to examples/TaoQuickApp/Image/Window/about_gray.png diff --git a/examples/TaoQuickDemo/Image/Window/about_white.png b/examples/TaoQuickApp/Image/Window/about_white.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/about_white.png rename to examples/TaoQuickApp/Image/Window/about_white.png diff --git a/examples/TaoQuickDemo/Image/Window/close_gray.png b/examples/TaoQuickApp/Image/Window/close_gray.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/close_gray.png rename to examples/TaoQuickApp/Image/Window/close_gray.png diff --git a/examples/TaoQuickDemo/Image/Window/close_white.png b/examples/TaoQuickApp/Image/Window/close_white.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/close_white.png rename to examples/TaoQuickApp/Image/Window/close_white.png diff --git a/examples/TaoQuickDemo/Image/Window/flower.jpg b/examples/TaoQuickApp/Image/Window/flower.jpg similarity index 100% rename from examples/TaoQuickDemo/Image/Window/flower.jpg rename to examples/TaoQuickApp/Image/Window/flower.jpg diff --git a/examples/TaoQuickDemo/Image/Window/lang_gray.png b/examples/TaoQuickApp/Image/Window/lang_gray.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/lang_gray.png rename to examples/TaoQuickApp/Image/Window/lang_gray.png diff --git a/examples/TaoQuickDemo/Image/Window/lang_white.png b/examples/TaoQuickApp/Image/Window/lang_white.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/lang_white.png rename to examples/TaoQuickApp/Image/Window/lang_white.png diff --git a/examples/TaoQuickDemo/Image/Window/max_gray.png b/examples/TaoQuickApp/Image/Window/max_gray.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/max_gray.png rename to examples/TaoQuickApp/Image/Window/max_gray.png diff --git a/examples/TaoQuickDemo/Image/Window/max_white.png b/examples/TaoQuickApp/Image/Window/max_white.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/max_white.png rename to examples/TaoQuickApp/Image/Window/max_white.png diff --git a/examples/TaoQuickDemo/Image/Window/minimal_gray.png b/examples/TaoQuickApp/Image/Window/minimal_gray.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/minimal_gray.png rename to examples/TaoQuickApp/Image/Window/minimal_gray.png diff --git a/examples/TaoQuickDemo/Image/Window/minimal_white.png b/examples/TaoQuickApp/Image/Window/minimal_white.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/minimal_white.png rename to examples/TaoQuickApp/Image/Window/minimal_white.png diff --git a/examples/TaoQuickDemo/Image/Window/normal_gray.png b/examples/TaoQuickApp/Image/Window/normal_gray.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/normal_gray.png rename to examples/TaoQuickApp/Image/Window/normal_gray.png diff --git a/examples/TaoQuickDemo/Image/Window/normal_white.png b/examples/TaoQuickApp/Image/Window/normal_white.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/normal_white.png rename to examples/TaoQuickApp/Image/Window/normal_white.png diff --git a/examples/TaoQuickDemo/Image/Window/skin_gray.png b/examples/TaoQuickApp/Image/Window/skin_gray.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/skin_gray.png rename to examples/TaoQuickApp/Image/Window/skin_gray.png diff --git a/examples/TaoQuickDemo/Image/Window/skin_white.png b/examples/TaoQuickApp/Image/Window/skin_white.png similarity index 100% rename from examples/TaoQuickDemo/Image/Window/skin_white.png rename to examples/TaoQuickApp/Image/Window/skin_white.png diff --git a/examples/TaoQuickDemo/Image/logo/milk.ico b/examples/TaoQuickApp/Image/logo/milk.ico similarity index 100% rename from examples/TaoQuickDemo/Image/logo/milk.ico rename to examples/TaoQuickApp/Image/logo/milk.ico diff --git a/examples/TaoQuickDemo/Image/logo/milk.png b/examples/TaoQuickApp/Image/logo/milk.png similarity index 100% rename from examples/TaoQuickDemo/Image/logo/milk.png rename to examples/TaoQuickApp/Image/logo/milk.png diff --git a/examples/TaoQuickDemo/Image/logo/splash.gif b/examples/TaoQuickApp/Image/logo/splash.gif similarity index 100% rename from examples/TaoQuickDemo/Image/logo/splash.gif rename to examples/TaoQuickApp/Image/logo/splash.gif diff --git a/examples/TaoQuickApp/PluginCommon.pri b/examples/TaoQuickApp/PluginCommon.pri new file mode 100644 index 0000000..dc29d34 --- /dev/null +++ b/examples/TaoQuickApp/PluginCommon.pri @@ -0,0 +1,3 @@ +HEADERS += $$PWD/Src/ITaoQuickPlugin.h +INCLUDEPATH +=$$PWD/Src +include($$PWD/../../common/TaoVersion.pri) \ No newline at end of file diff --git a/examples/TaoQuickApp/Qml.qrc b/examples/TaoQuickApp/Qml.qrc new file mode 100644 index 0000000..124a6de --- /dev/null +++ b/examples/TaoQuickApp/Qml.qrc @@ -0,0 +1,14 @@ + + + Qml/main.qml + Qml/Page/MenuPage.qml + Qml/Page/ContentPage.qml + Qml/Page/TitlePage.qml + Qml/Page/NotifyBox.qml + Qml/Splash.qml + Qml/MainPage.qml + Qml/Page/ContentData.qml + Qml/Page/AboutDialog.qml + Qml/Welcome/Welcome.qml + + diff --git a/examples/TaoQuickDemo/Qml/MainPage.qml b/examples/TaoQuickApp/Qml/MainPage.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/MainPage.qml rename to examples/TaoQuickApp/Qml/MainPage.qml diff --git a/examples/TaoQuickDemo/Qml/Page/AboutDialog.qml b/examples/TaoQuickApp/Qml/Page/AboutDialog.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Page/AboutDialog.qml rename to examples/TaoQuickApp/Qml/Page/AboutDialog.qml diff --git a/examples/TaoQuickDemo/Qml/Page/ContentData.qml b/examples/TaoQuickApp/Qml/Page/ContentData.qml similarity index 51% rename from examples/TaoQuickDemo/Qml/Page/ContentData.qml rename to examples/TaoQuickApp/Qml/Page/ContentData.qml index 40423fe..c4a78b7 100644 --- a/examples/TaoQuickDemo/Qml/Page/ContentData.qml +++ b/examples/TaoQuickApp/Qml/Page/ContentData.qml @@ -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: []} } } diff --git a/examples/TaoQuickDemo/Qml/Page/ContentPage.qml b/examples/TaoQuickApp/Qml/Page/ContentPage.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Page/ContentPage.qml rename to examples/TaoQuickApp/Qml/Page/ContentPage.qml diff --git a/examples/TaoQuickDemo/Qml/Page/MenuPage.qml b/examples/TaoQuickApp/Qml/Page/MenuPage.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Page/MenuPage.qml rename to examples/TaoQuickApp/Qml/Page/MenuPage.qml diff --git a/examples/TaoQuickDemo/Qml/Page/NotifyBox.qml b/examples/TaoQuickApp/Qml/Page/NotifyBox.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Page/NotifyBox.qml rename to examples/TaoQuickApp/Qml/Page/NotifyBox.qml diff --git a/examples/TaoQuickDemo/Qml/Page/TitlePage.qml b/examples/TaoQuickApp/Qml/Page/TitlePage.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Page/TitlePage.qml rename to examples/TaoQuickApp/Qml/Page/TitlePage.qml diff --git a/examples/TaoQuickDemo/Qml/Splash.qml b/examples/TaoQuickApp/Qml/Splash.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Splash.qml rename to examples/TaoQuickApp/Qml/Splash.qml diff --git a/examples/TaoQuickDemo/Qml/Contents/Welcome/Welcome.qml b/examples/TaoQuickApp/Qml/Welcome/Welcome.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/Welcome/Welcome.qml rename to examples/TaoQuickApp/Qml/Welcome/Welcome.qml diff --git a/examples/TaoQuickDemo/Qml/main.qml b/examples/TaoQuickApp/Qml/main.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/main.qml rename to examples/TaoQuickApp/Qml/main.qml diff --git a/examples/TaoQuickDemo/Src/ITaoQuickPlugin.h b/examples/TaoQuickApp/Src/ITaoQuickPlugin.h similarity index 100% rename from examples/TaoQuickDemo/Src/ITaoQuickPlugin.h rename to examples/TaoQuickApp/Src/ITaoQuickPlugin.h diff --git a/examples/TaoQuickDemo/Src/Logger/Logger.cpp b/examples/TaoQuickApp/Src/Logger/Logger.cpp similarity index 100% rename from examples/TaoQuickDemo/Src/Logger/Logger.cpp rename to examples/TaoQuickApp/Src/Logger/Logger.cpp diff --git a/examples/TaoQuickDemo/Src/Logger/Logger.h b/examples/TaoQuickApp/Src/Logger/Logger.h similarity index 100% rename from examples/TaoQuickDemo/Src/Logger/Logger.h rename to examples/TaoQuickApp/Src/Logger/Logger.h diff --git a/examples/TaoQuickDemo/Src/Logger/LoggerTemplate.h b/examples/TaoQuickApp/Src/Logger/LoggerTemplate.h similarity index 100% rename from examples/TaoQuickDemo/Src/Logger/LoggerTemplate.h rename to examples/TaoQuickApp/Src/Logger/LoggerTemplate.h diff --git a/examples/TaoQuickDemo/Src/TaoView.cpp b/examples/TaoQuickApp/Src/TaoView.cpp similarity index 100% rename from examples/TaoQuickDemo/Src/TaoView.cpp rename to examples/TaoQuickApp/Src/TaoView.cpp diff --git a/examples/TaoQuickDemo/Src/TaoView.h b/examples/TaoQuickApp/Src/TaoView.h similarity index 100% rename from examples/TaoQuickDemo/Src/TaoView.h rename to examples/TaoQuickApp/Src/TaoView.h diff --git a/examples/TaoQuickDemo/Src/main.cpp b/examples/TaoQuickApp/Src/main.cpp similarity index 100% rename from examples/TaoQuickDemo/Src/main.cpp rename to examples/TaoQuickApp/Src/main.cpp diff --git a/examples/TaoQuickDemo/Src/stdafx.h b/examples/TaoQuickApp/Src/stdafx.h similarity index 100% rename from examples/TaoQuickDemo/Src/stdafx.h rename to examples/TaoQuickApp/Src/stdafx.h diff --git a/examples/TaoQuickDemo/TaoQuickDemo.pro b/examples/TaoQuickApp/TaoQuickApp.pro similarity index 100% rename from examples/TaoQuickDemo/TaoQuickDemo.pro rename to examples/TaoQuickApp/TaoQuickApp.pro diff --git a/examples/TaoQuickDemo/Trans/QtTranser.exe b/examples/TaoQuickApp/Trans/QtTranser.exe similarity index 100% rename from examples/TaoQuickDemo/Trans/QtTranser.exe rename to examples/TaoQuickApp/Trans/QtTranser.exe diff --git a/examples/TaoQuickDemo/Trans/Trans.bat b/examples/TaoQuickApp/Trans/Trans.bat similarity index 100% rename from examples/TaoQuickDemo/Trans/Trans.bat rename to examples/TaoQuickApp/Trans/Trans.bat diff --git a/examples/TaoQuickDemo/Trans/trans_ar.qm b/examples/TaoQuickApp/Trans/trans_ar.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_ar.qm rename to examples/TaoQuickApp/Trans/trans_ar.qm diff --git a/examples/TaoQuickDemo/Trans/trans_ar.qs b/examples/TaoQuickApp/Trans/trans_ar.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_ar.qs rename to examples/TaoQuickApp/Trans/trans_ar.qs diff --git a/examples/TaoQuickDemo/Trans/trans_de.qm b/examples/TaoQuickApp/Trans/trans_de.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_de.qm rename to examples/TaoQuickApp/Trans/trans_de.qm diff --git a/examples/TaoQuickDemo/Trans/trans_de.qs b/examples/TaoQuickApp/Trans/trans_de.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_de.qs rename to examples/TaoQuickApp/Trans/trans_de.qs diff --git a/examples/TaoQuickDemo/Trans/trans_en.qm b/examples/TaoQuickApp/Trans/trans_en.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_en.qm rename to examples/TaoQuickApp/Trans/trans_en.qm diff --git a/examples/TaoQuickDemo/Trans/trans_en.qs b/examples/TaoQuickApp/Trans/trans_en.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_en.qs rename to examples/TaoQuickApp/Trans/trans_en.qs diff --git a/examples/TaoQuickDemo/Trans/trans_es.qm b/examples/TaoQuickApp/Trans/trans_es.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_es.qm rename to examples/TaoQuickApp/Trans/trans_es.qm diff --git a/examples/TaoQuickDemo/Trans/trans_es.qs b/examples/TaoQuickApp/Trans/trans_es.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_es.qs rename to examples/TaoQuickApp/Trans/trans_es.qs diff --git a/examples/TaoQuickDemo/Trans/trans_fr.qm b/examples/TaoQuickApp/Trans/trans_fr.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_fr.qm rename to examples/TaoQuickApp/Trans/trans_fr.qm diff --git a/examples/TaoQuickDemo/Trans/trans_fr.qs b/examples/TaoQuickApp/Trans/trans_fr.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_fr.qs rename to examples/TaoQuickApp/Trans/trans_fr.qs diff --git a/examples/TaoQuickDemo/Trans/trans_it.qm b/examples/TaoQuickApp/Trans/trans_it.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_it.qm rename to examples/TaoQuickApp/Trans/trans_it.qm diff --git a/examples/TaoQuickDemo/Trans/trans_it.qs b/examples/TaoQuickApp/Trans/trans_it.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_it.qs rename to examples/TaoQuickApp/Trans/trans_it.qs diff --git a/examples/TaoQuickDemo/Trans/trans_ja.qm b/examples/TaoQuickApp/Trans/trans_ja.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_ja.qm rename to examples/TaoQuickApp/Trans/trans_ja.qm diff --git a/examples/TaoQuickDemo/Trans/trans_ja.qs b/examples/TaoQuickApp/Trans/trans_ja.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_ja.qs rename to examples/TaoQuickApp/Trans/trans_ja.qs diff --git a/examples/TaoQuickDemo/Trans/trans_ko.qm b/examples/TaoQuickApp/Trans/trans_ko.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_ko.qm rename to examples/TaoQuickApp/Trans/trans_ko.qm diff --git a/examples/TaoQuickDemo/Trans/trans_ko.qs b/examples/TaoQuickApp/Trans/trans_ko.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_ko.qs rename to examples/TaoQuickApp/Trans/trans_ko.qs diff --git a/examples/TaoQuickDemo/Trans/trans_pt.qm b/examples/TaoQuickApp/Trans/trans_pt.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_pt.qm rename to examples/TaoQuickApp/Trans/trans_pt.qm diff --git a/examples/TaoQuickDemo/Trans/trans_pt.qs b/examples/TaoQuickApp/Trans/trans_pt.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_pt.qs rename to examples/TaoQuickApp/Trans/trans_pt.qs diff --git a/examples/TaoQuickDemo/Trans/trans_release.bat b/examples/TaoQuickApp/Trans/trans_release.bat similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_release.bat rename to examples/TaoQuickApp/Trans/trans_release.bat diff --git a/examples/TaoQuickDemo/Trans/trans_ru.qm b/examples/TaoQuickApp/Trans/trans_ru.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_ru.qm rename to examples/TaoQuickApp/Trans/trans_ru.qm diff --git a/examples/TaoQuickDemo/Trans/trans_ru.qs b/examples/TaoQuickApp/Trans/trans_ru.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_ru.qs rename to examples/TaoQuickApp/Trans/trans_ru.qs diff --git a/examples/TaoQuickDemo/Trans/trans_update.bat b/examples/TaoQuickApp/Trans/trans_update.bat similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_update.bat rename to examples/TaoQuickApp/Trans/trans_update.bat diff --git a/examples/TaoQuickDemo/Trans/trans_vi.qm b/examples/TaoQuickApp/Trans/trans_vi.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_vi.qm rename to examples/TaoQuickApp/Trans/trans_vi.qm diff --git a/examples/TaoQuickDemo/Trans/trans_vi.qs b/examples/TaoQuickApp/Trans/trans_vi.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_vi.qs rename to examples/TaoQuickApp/Trans/trans_vi.qs diff --git a/examples/TaoQuickDemo/Trans/trans_zh.qm b/examples/TaoQuickApp/Trans/trans_zh.qm similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_zh.qm rename to examples/TaoQuickApp/Trans/trans_zh.qm diff --git a/examples/TaoQuickDemo/Trans/trans_zh.qs b/examples/TaoQuickApp/Trans/trans_zh.qs similarity index 100% rename from examples/TaoQuickDemo/Trans/trans_zh.qs rename to examples/TaoQuickApp/Trans/trans_zh.qs diff --git a/examples/TaoQuickDemo/Ver.h b/examples/TaoQuickApp/Ver.h similarity index 100% rename from examples/TaoQuickDemo/Ver.h rename to examples/TaoQuickApp/Ver.h diff --git a/examples/TaoQuickDemo/milk.icns b/examples/TaoQuickApp/milk.icns similarity index 100% rename from examples/TaoQuickDemo/milk.icns rename to examples/TaoQuickApp/milk.icns diff --git a/examples/TaoQuickDemo/milk.ico b/examples/TaoQuickApp/milk.ico similarity index 100% rename from examples/TaoQuickDemo/milk.ico rename to examples/TaoQuickApp/milk.ico diff --git a/examples/TaoQuickDemo/Image/Button/cry-fill.png b/examples/TaoQuickPlugin/Image/Button/cry-fill.png similarity index 100% rename from examples/TaoQuickDemo/Image/Button/cry-fill.png rename to examples/TaoQuickPlugin/Image/Button/cry-fill.png diff --git a/examples/TaoQuickDemo/Image/Button/smile-fill-hover.png b/examples/TaoQuickPlugin/Image/Button/smile-fill-hover.png similarity index 100% rename from examples/TaoQuickDemo/Image/Button/smile-fill-hover.png rename to examples/TaoQuickPlugin/Image/Button/smile-fill-hover.png diff --git a/examples/TaoQuickDemo/Image/Button/smile-fill.png b/examples/TaoQuickPlugin/Image/Button/smile-fill.png similarity index 100% rename from examples/TaoQuickDemo/Image/Button/smile-fill.png rename to examples/TaoQuickPlugin/Image/Button/smile-fill.png diff --git a/examples/TaoQuickDemo/Qml.qrc b/examples/TaoQuickPlugin/Qml.qrc similarity index 60% rename from examples/TaoQuickDemo/Qml.qrc rename to examples/TaoQuickPlugin/Qml.qrc index deb5143..14e0bd2 100644 --- a/examples/TaoQuickDemo/Qml.qrc +++ b/examples/TaoQuickPlugin/Qml.qrc @@ -1,24 +1,17 @@ - Qml/main.qml - Qml/Page/MenuPage.qml - Qml/Page/ContentPage.qml - Qml/Page/TitlePage.qml Qml/Contents/BaseComponent/Buttons.qml - Qml/Contents/BaseComponent/Progresses.qml - Qml/Page/NotifyBox.qml - Qml/Splash.qml - Qml/MainPage.qml - Qml/Contents/BaseComponent/Drags.qml - Qml/Page/ContentData.qml - Qml/Contents/BaseComponent/Gradiants.qml - Qml/Contents/Welcome/Welcome.qml - Qml/Page/AboutDialog.qml Qml/Contents/BaseComponent/Dialogs.qml + Qml/Contents/BaseComponent/Drags.qml + Qml/Contents/BaseComponent/Gradiants.qml + Qml/Contents/BaseComponent/Progresses.qml Qml/Contents/ShaderEffect/CloudHole.qml Qml/Contents/ShaderEffect/Planet.qml + Qml/Contents/ShaderEffect/Planet1.png Qml/Contents/ShaderEffect/Snail.qml Qml/Contents/ShaderEffect/SuperMario.qml - Qml/Contents/ShaderEffect/Planet1.png + Image/Button/cry-fill.png + Image/Button/smile-fill-hover.png + Image/Button/smile-fill.png diff --git a/examples/TaoQuickDemo/Qml/Contents/BaseComponent/Buttons.qml b/examples/TaoQuickPlugin/Qml/Contents/BaseComponent/Buttons.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/BaseComponent/Buttons.qml rename to examples/TaoQuickPlugin/Qml/Contents/BaseComponent/Buttons.qml diff --git a/examples/TaoQuickDemo/Qml/Contents/BaseComponent/Dialogs.qml b/examples/TaoQuickPlugin/Qml/Contents/BaseComponent/Dialogs.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/BaseComponent/Dialogs.qml rename to examples/TaoQuickPlugin/Qml/Contents/BaseComponent/Dialogs.qml diff --git a/examples/TaoQuickDemo/Qml/Contents/BaseComponent/Drags.qml b/examples/TaoQuickPlugin/Qml/Contents/BaseComponent/Drags.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/BaseComponent/Drags.qml rename to examples/TaoQuickPlugin/Qml/Contents/BaseComponent/Drags.qml diff --git a/examples/TaoQuickDemo/Qml/Contents/BaseComponent/Gradiants.qml b/examples/TaoQuickPlugin/Qml/Contents/BaseComponent/Gradiants.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/BaseComponent/Gradiants.qml rename to examples/TaoQuickPlugin/Qml/Contents/BaseComponent/Gradiants.qml diff --git a/examples/TaoQuickDemo/Qml/Contents/BaseComponent/Progresses.qml b/examples/TaoQuickPlugin/Qml/Contents/BaseComponent/Progresses.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/BaseComponent/Progresses.qml rename to examples/TaoQuickPlugin/Qml/Contents/BaseComponent/Progresses.qml diff --git a/examples/TaoQuickDemo/Qml/Contents/ShaderEffect/CloudHole.qml b/examples/TaoQuickPlugin/Qml/Contents/ShaderEffect/CloudHole.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/ShaderEffect/CloudHole.qml rename to examples/TaoQuickPlugin/Qml/Contents/ShaderEffect/CloudHole.qml diff --git a/examples/TaoQuickDemo/Qml/Contents/ShaderEffect/Planet.qml b/examples/TaoQuickPlugin/Qml/Contents/ShaderEffect/Planet.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/ShaderEffect/Planet.qml rename to examples/TaoQuickPlugin/Qml/Contents/ShaderEffect/Planet.qml diff --git a/examples/TaoQuickDemo/Qml/Contents/ShaderEffect/Planet1.png b/examples/TaoQuickPlugin/Qml/Contents/ShaderEffect/Planet1.png similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/ShaderEffect/Planet1.png rename to examples/TaoQuickPlugin/Qml/Contents/ShaderEffect/Planet1.png diff --git a/examples/TaoQuickDemo/Qml/Contents/ShaderEffect/Snail.qml b/examples/TaoQuickPlugin/Qml/Contents/ShaderEffect/Snail.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/ShaderEffect/Snail.qml rename to examples/TaoQuickPlugin/Qml/Contents/ShaderEffect/Snail.qml diff --git a/examples/TaoQuickDemo/Qml/Contents/ShaderEffect/SuperMario.qml b/examples/TaoQuickPlugin/Qml/Contents/ShaderEffect/SuperMario.qml similarity index 100% rename from examples/TaoQuickDemo/Qml/Contents/ShaderEffect/SuperMario.qml rename to examples/TaoQuickPlugin/Qml/Contents/ShaderEffect/SuperMario.qml diff --git a/examples/TaoQuickPlugin/Src/TaoQuickPlugin.cpp b/examples/TaoQuickPlugin/Src/TaoQuickPlugin.cpp new file mode 100644 index 0000000..3177a37 --- /dev/null +++ b/examples/TaoQuickPlugin/Src/TaoQuickPlugin.cpp @@ -0,0 +1,82 @@ +#include "TaoQuickPlugin.h" +#include +TaoQuickPlugin::TaoQuickPlugin(QObject *parent) : QObject (parent) +{ +} + +void TaoQuickPlugin::init() +{ + Q_INIT_RESOURCE(Qml); +} + + QJsonArray TaoQuickPlugin::infos() const +{ + static QJsonArray arr { + QJsonObject { + {"name", u8"基础组件"}, + {"title",u8"基础组件"}, + { "children", QJsonArray{ + QJsonObject { + {"name", u8"按钮组件"}, + {"title",u8"按钮组件"}, + {"url", "qrc:/Qml/Contents/BaseComponent/Buttons.qml"} + }, + QJsonObject { + {"name", u8"拖动组件"}, + {"title",u8"拖动组件"}, + {"url", "qrc:/Qml/Contents/BaseComponent/Drags.qml"}, + }, + QJsonObject { + {"name", u8"渐变"}, + {"title",u8"渐变"}, + {"url", "qrc:/Qml/Contents/BaseComponent/Gradiants.qml"}, + }, + QJsonObject { + {"name", u8"进度条组件"}, + {"title",u8"进度条组件"}, + {"url", "qrc:/Qml/Contents/BaseComponent/Progresses.qml"}, + }, + QJsonObject { + {"name", u8"对话框"}, + {"title",u8"对话框"}, + {"url", "qrc:/Qml/Contents/BaseComponent/Dialogs.qml"} + }, + } + } + }, + QJsonObject { + {"name", u8"ShaderEffect"}, + {"title",u8"ShaderEffect"}, + { "children", QJsonArray{ + QJsonObject { + {"name", u8"穿云洞"}, + {"title",u8"穿云洞"}, + {"url", "qrc:/Qml/Contents/ShaderEffect/CloudHole.qml"} + }, + QJsonObject { + {"name", u8"星球之光"}, + {"title",u8"星球之光"}, + {"url", "qrc:/Qml/Contents/ShaderEffect/Planet.qml"} + }, + QJsonObject { + {"name", u8"蜗牛"}, + {"title",u8"蜗牛"}, + {"url", "qrc:/Qml/Contents/ShaderEffect/Snail.qml"} + }, + QJsonObject { + {"name", u8"超级马里奥"}, + {"title",u8"超级马里奥"}, + {"url", "qrc:/Qml/Contents/ShaderEffect/SuperMario.qml"} + } + } + } + } + }; + return arr; +} + +void TaoQuickPlugin::replaceTranslater(const QString &oldLang, const QString &newLang) const +{ + (void)oldLang; + (void)newLang; +} diff --git a/examples/TaoQuickPlugin/Src/TaoQuickPlugin.h b/examples/TaoQuickPlugin/Src/TaoQuickPlugin.h new file mode 100644 index 0000000..7e51484 --- /dev/null +++ b/examples/TaoQuickPlugin/Src/TaoQuickPlugin.h @@ -0,0 +1,15 @@ +#pragma once + +#include "ITaoQuickPlugin.h" +class TaoQuickPlugin : public QObject, public ITaoQuickPlugin { + + Q_OBJECT + Q_PLUGIN_METADATA(IID TaoQuickInterface_iid) + Q_INTERFACES(ITaoQuickPlugin) +public: + explicit TaoQuickPlugin(QObject *parent = nullptr); + + void init() override; + QJsonArray infos() const override; + void replaceTranslater(const QString &oldLang, const QString &newLang) const override; +}; diff --git a/examples/TaoQuickPlugin/TaoQuickPlugin.pro b/examples/TaoQuickPlugin/TaoQuickPlugin.pro new file mode 100644 index 0000000..1841239 --- /dev/null +++ b/examples/TaoQuickPlugin/TaoQuickPlugin.pro @@ -0,0 +1,33 @@ +QT += core gui qml + +TARGET = $$qtLibraryTarget(TaoQuick) +TEMPLATE = lib +CONFIG += plugin +msvc { + QMAKE_CFLAGS += -source-charset:utf-8 + QMAKE_CXXFLAGS += -source-charset:utf-8 +} + +include(../TaoQuickApp/PluginCommon.pri) + +SOURCES += \ + Src/TaoQuickPlugin.cpp + +HEADERS += \ + Src/TaoQuickPlugin.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 diff --git a/examples/examples.pro b/examples/examples.pro index 1d51640..e83207e 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -1,3 +1,6 @@ TEMPLATE = subdirs SUBDIRS += \ - TaoQuickDemo \ No newline at end of file + TaoQuickApp \ + TaoQuickPlugin \ + TaoEffectPlugin +CONFIG += ordered \ No newline at end of file diff --git a/src/TaoQuick/Qml.qrc b/src/TaoQuick/Qml.qrc index f09d840..fe2f010 100644 --- a/src/TaoQuick/Qml.qrc +++ b/src/TaoQuick/Qml.qrc @@ -17,6 +17,35 @@ Qml/BasicComponent/Progress/TInOut.qml Qml/BasicComponent/Others/TFPS.qml Qml/qmldir - Qml/BasicComponent/Others/TShaderToy.qml + Qml/EffectComponent/Animation/ABoard.qml + Qml/EffectComponent/Animation/ACircle.qml + Qml/EffectComponent/Animation/ACleavage.qml + Qml/EffectComponent/Animation/ACross.qml + Qml/EffectComponent/Animation/ADiagonal.qml + Qml/EffectComponent/Animation/ADissolve.qml + Qml/EffectComponent/Animation/AGrad.qml + Qml/EffectComponent/Animation/ALouver.qml + Qml/EffectComponent/Animation/ARhombus.qml + Qml/EffectComponent/Animation/ASector.qml + Qml/EffectComponent/Animation/ASlowEnter.qml + Qml/EffectComponent/Animation/ASquare.qml + Qml/EffectComponent/Animation/AWheel.qml + Qml/EffectComponent/PageSwitch/SBoard.qml + Qml/EffectComponent/PageSwitch/SCircle.qml + Qml/EffectComponent/PageSwitch/SCleavage.qml + Qml/EffectComponent/PageSwitch/SCross.qml + Qml/EffectComponent/PageSwitch/SDiagonal.qml + Qml/EffectComponent/PageSwitch/SDissolve.qml + Qml/EffectComponent/PageSwitch/SFadeInOut.qml + Qml/EffectComponent/PageSwitch/SGrad.qml + Qml/EffectComponent/PageSwitch/SLouver.qml + Qml/EffectComponent/PageSwitch/SRhombus.qml + Qml/EffectComponent/PageSwitch/SSector.qml + Qml/EffectComponent/PageSwitch/SSquare.qml + Qml/EffectComponent/PageSwitch/SWheel.qml + Qml/EffectComponent/Shapes/TKLine.qml + Qml/EffectComponent/Shapes/TRoundRect.qml + Qml/EffectComponent/TCommon.qml + Qml/EffectComponent/TShaderToy.qml diff --git a/src/TaoQuick/Qml/BasicComponent/Others/TFPS.qml b/src/TaoQuick/Qml/BasicComponent/Others/TFPS.qml index ae4d0cc..89a42f1 100644 --- a/src/TaoQuick/Qml/BasicComponent/Others/TFPS.qml +++ b/src/TaoQuick/Qml/BasicComponent/Others/TFPS.qml @@ -1,6 +1,5 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 -import TaoQuick 1.0 Item { property int fps: 60 diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ABoard.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ABoard.qml new file mode 100644 index 0000000..bec5657 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ABoard.qml @@ -0,0 +1,93 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + enum Direct { + ToRight = 0, + ToBottom = 1 + } + property int dir : ABoard.Direct.ToRight + property int rowCount: 10 + property int columnCount: 10 + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent + opacity: percent > 0 ? 1 : 0 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + fragmentShader: TCommon.fragmentShaderCommon + (dir === ABoard.Direct.ToRight ? " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + uniform int rowCount; + uniform int columnCount; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + int xlen = 100 / columnCount; + int ylen = 100 / rowCount; + float p = float(percent) / 100.0; + int x = int(qt_TexCoord0.x * 100.0); + int y = int(qt_TexCoord0.y * 100.0); + float alpha = 0.0; + int sx = x / xlen; + int sy = y / ylen; + int xOffset = 0; + if (sy % 2 != 0) { + xOffset = xlen / 2; + } + if (sx * xlen <= x + xOffset && (x + xOffset) % xlen <= int(float(xlen) * p) ) { + alpha = 1.0; + } + alpha *= qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +" : " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + uniform int rowCount; + uniform int columnCount; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + int xlen = 100 / columnCount; + int ylen = 100 / rowCount; + float p = float(percent) / 100.0; + int x = int(qt_TexCoord0.x * 100.0); + int y = int(qt_TexCoord0.y * 100.0); + float alpha = 0.0; + int sx = x / xlen; + int sy = y / ylen; + int yOffset = 0; + if (sx % 2 != 0) { + yOffset = ylen / 2; + } + if (sy * ylen <= y + yOffset && (y + yOffset) % ylen <= int(float(ylen) * p) ) { + alpha = 1.0; + } + alpha *= qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +") + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ACircle.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ACircle.qml new file mode 100644 index 0000000..8ba84cf --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ACircle.qml @@ -0,0 +1,63 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + enum Direct { + FromInner = 0, + FromOuter = 1 + } + property int dir : ASquare.Direct.FromInner + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent + opacity: percent > 0 ? 1 : 0 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + fragmentShader: TCommon.fragmentShaderCommon + (dir === ASquare.Direct.FromInner ? " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = float(percent) / 100.0; + float dis = distance(qt_TexCoord0, vec2(0.5, 0.5)); + float alpha = 1.0 - step(p, dis); + alpha *= qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +" : " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = float(percent) / 100.0; + float dis = distance(qt_TexCoord0, vec2(0.5, 0.5)); + float alpha = step(1.0 - p, dis); + alpha *= qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +") + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ACleavage.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ACleavage.qml new file mode 100644 index 0000000..044eba4 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ACleavage.qml @@ -0,0 +1,52 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + enum Direct { + HorizonToInner = 0, + HorizonToOuter = 1, + VerticalToInner = 2, + VerticalToOuter = 3 + } + property int dir : ASquare.ACleavge.HorizonToInner + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent + opacity: percent > 0 ? 1 : 0 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + fragmentShader: TCommon.fragmentShaderCommon + " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = float(percent) / 200.0; + float alphas[] = float[]((1.0 - step(p, qt_TexCoord0.x)) + (step(1.0 - p, qt_TexCoord0.x)), + 1.0 - ((1.0 - step(0.5 - p, qt_TexCoord0.x)) + (step(0.5 + p, qt_TexCoord0.x))), + (1.0 - step(p, qt_TexCoord0.y)) + (step(1.0 - p, qt_TexCoord0.y)), + 1.0 - ((1.0 - step(0.5 - p, qt_TexCoord0.y)) + (step(0.5 + p, qt_TexCoord0.y)))); + float alpha = alphas[dir] * qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +" + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ACross.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ACross.qml new file mode 100644 index 0000000..249af11 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ACross.qml @@ -0,0 +1,68 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + enum Direct { + FromInner = 0, + FromOuter = 1 + } + property int dir : ASquare.Direct.FromInner + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent + opacity: percent > 0 ? 1 : 0 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + fragmentShader: TCommon.fragmentShaderCommon + (dir === ASquare.Direct.FromInner ? " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = float(percent) / 200.0; + float alpha = 0.0; + if ((0.5 - p <= qt_TexCoord0.x && qt_TexCoord0.x <= 0.5 + p) || + ((qt_TexCoord0.x< 0.5 - p || qt_TexCoord0.x > 0.5 + p) && (0.5 - p <= qt_TexCoord0.y && qt_TexCoord0.y < 0.5 + p)) + ) + { + alpha = 1.0; + } + alpha *= qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +" : " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = float(percent) / 200.0; + float alpha = ((1.0 - step(p, qt_TexCoord0.x)) + (step(1.0 - p, qt_TexCoord0.x))) * + ((1.0 - step(p, qt_TexCoord0.y)) + (step(1.0 - p, qt_TexCoord0.y))); + alpha = alpha * qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +") + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ADiagonal.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ADiagonal.qml new file mode 100644 index 0000000..a7dd493 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ADiagonal.qml @@ -0,0 +1,53 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + enum Direct { + FromLeftTop = 0, + FromRightTop = 1, + FromLeftBottom = 2, + FromRightBottom = 3 + } + property int dir: ADiagonal.Direct.FromLeftTop + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + fragmentShader: TCommon.fragmentShaderCommon + " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = float(percent) / 100.0; + float ps[] = float[](2.0 * p - qt_TexCoord0.x - qt_TexCoord0.y, + qt_TexCoord0.y - (1.0 - 2.0 *(1.0 - p)) - qt_TexCoord0.x, + qt_TexCoord0.x + (1.0 - 2.0 * p) - qt_TexCoord0.y, + qt_TexCoord0.y - 2.0 * (1.0 - p) + qt_TexCoord0.x); + float alpha = step(0, ps[dir]); + float alphas[] = float[](alpha, 1.0 - alpha, 1.0 - alpha, alpha); + alpha = alphas[dir]; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +" + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ADissolve.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ADissolve.qml new file mode 100644 index 0000000..e8bbf3e --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ADissolve.qml @@ -0,0 +1,46 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property ShaderEffectSource dissolveSource: ShaderEffectSource { + hideSource: true + } + property int percent + opacity: percent > 0 ? 1 : 0 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + + fragmentShader: TCommon.fragmentShaderCommon + " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform sampler2D dissolveSource; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + vec4 dcolor = texture2D(dissolveSource, qt_TexCoord0); + float alpha = 1.0 - step(float(percent) / 100.0, dcolor.r); + alpha *= qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +" + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/AGrad.qml b/src/TaoQuick/Qml/EffectComponent/Animation/AGrad.qml new file mode 100644 index 0000000..28cdfae --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/AGrad.qml @@ -0,0 +1,64 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + enum Direct { + FromLeft = 0, + FromRight = 1, + FromTop = 2, + FromBottom = 3 + } + property int dir: ASlowEnter.Direct.FromLeft + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent: 0 + opacity: percent > 0 ? 1 : 0 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + + fragmentShader: TCommon.fragmentShaderCommon + " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = float(percent) / 100.0f; + float alpha = 1.0f; + +// if (dir == 0 ) { +// alpha = 1.0 - step(p, qt_TexCoord0.x); +// } else if (dir == 1){ +// alpha = 1.0 - step(p, 1.0 - qt_TexCoord0.x); +// } else if (dir == 2) { +// alpha = 1.0f - step(p, qt_TexCoord0.y); +// } else if (dir == 3) { +// alpha = 1.0f - step(p, 1.0 - qt_TexCoord0.y); +// } + //optimize: array replace if else + float coords[] = float[](qt_TexCoord0.x, 1.0 - qt_TexCoord0.x, qt_TexCoord0.y, 1.0 - qt_TexCoord0.y); + alpha = 1.0f - step(p, coords[dir]); + alpha *= qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } + " + + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ALouver.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ALouver.qml new file mode 100644 index 0000000..4f2b4de --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ALouver.qml @@ -0,0 +1,60 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + enum Direct { + Horizon = 0, + Vertical = 1, + HorizonReverse = 2, + VerticalReverse = 3 + } + + property int dir: ALouver.Direct.Horizon + + property int count: 4 + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent + readonly property int perLen: 100 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + fragmentShader: TCommon.fragmentShaderCommon + " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + uniform int perLen; + uniform int count; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + int len = 0; + float coords[] = float[](qt_TexCoord0.x, qt_TexCoord0.y, qt_TexCoord0.x, qt_TexCoord0.y); + int percents[] = int[](percent, percent, perLen - percent, perLen - percent); + len = int(coords[dir]* float(perLen) * float(count)); + float alpha = float(step(percents[dir], mod(len, perLen))); + float alphas[] = float[](1.0 - alpha, 1.0 - alpha, alpha, alpha); + alpha = qt_Opacity * alphas[dir]; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } + " + + function restart() { + animation.restart() + } + +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ARhombus.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ARhombus.qml new file mode 100644 index 0000000..e7f3625 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ARhombus.qml @@ -0,0 +1,70 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + enum Direct { + FromInner = 0, + FromOuter = 1 + } + property int dir : ASquare.Direct.FromInner + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent + opacity: percent > 0 ? 1 : 0 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + fragmentShader: TCommon.fragmentShaderCommon + (dir === ASquare.Direct.FromInner ? " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = float(percent) / 100.0; + float alpha = 1.0; + if (qt_TexCoord0.x + p < qt_TexCoord0.y || + qt_TexCoord0.x - p > qt_TexCoord0.y || + 1.0 - qt_TexCoord0.x + p < qt_TexCoord0.y || + 1.0 - qt_TexCoord0.x - p > qt_TexCoord0.y + ) { + discard; + } + gl_FragColor = color; + } +" : " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = 1.0 - float(percent) / 100.0; + if (qt_TexCoord0.x + p > qt_TexCoord0.y && + qt_TexCoord0.x - p < qt_TexCoord0.y && + 1.0 - qt_TexCoord0.x + p > qt_TexCoord0.y && + 1.0 - qt_TexCoord0.x - p < qt_TexCoord0.y + ) { + discard; + } + gl_FragColor = color; + } +") + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ASector.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ASector.qml new file mode 100644 index 0000000..9e27869 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ASector.qml @@ -0,0 +1,48 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent + opacity: percent > 0 ? 1 : 0 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + fragmentShader: TCommon.fragmentShaderCommon + " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float per = float(percent) / 100.0 * 180; + const vec2 origin = vec2(0.5, 0.5); + const vec2 a = vec2(0.5, 0.0); + vec2 c = qt_TexCoord0 - origin; + float alpha = 0.0; + if (cos(radians(per))* length(c) * length(a) < dot(c, a)) { + alpha = 1.0; + } + alpha *= qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +" + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ASlowEnter.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ASlowEnter.qml new file mode 100644 index 0000000..4b5e65c --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ASlowEnter.qml @@ -0,0 +1,35 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: r + property int targetX: 0 + property int targetY: 0 + property alias animation: animation + enum Direct { + FromLeft = 0, + FromRight = 1, + FromTop = 2, + FromBottom = 3 + } + property int dir: ASlowEnter.Direct.FromBottom + property int duration: 2000 + property int extDistance: 10 + property var __propList: ["x", "x", "y", "y"] + property var __fromList: [ + -r.parent.width - r.width - extDistance, + r.parent.width + r.width + extDistance, + -r.parent.height - r.height - extDistance, + r.parent.height + r.height + extDistance] + property var __toList: [targetX, targetX, targetY, targetY] + NumberAnimation { + id: animation + target: r + property: __propList[dir] + from: __fromList[dir] + to: __toList[dir] + duration: r.duration + loops: 1 + alwaysRunToEnd: true + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/ASquare.qml b/src/TaoQuick/Qml/EffectComponent/Animation/ASquare.qml new file mode 100644 index 0000000..33bd2f9 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/ASquare.qml @@ -0,0 +1,65 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + enum Direct { + FromInner = 0, + FromOuter = 1 + } + property int dir : ASquare.Direct.FromInner + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent + opacity: percent > 0 ? 1 : 0 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + } + fragmentShader: TCommon.fragmentShaderCommon + (dir === ASquare.Direct.FromInner ? " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = float(percent) / 200.0; + float alpha = step(0.5 - p, qt_TexCoord0.x) * (1.0 - step(0.5 + p, qt_TexCoord0.x)) * step(0.5 - p, qt_TexCoord0.y) * (1.0 - step(0.5 + p, qt_TexCoord0.y)) * qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +" : " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float p = float(percent) / 200.0; + float alpha = 0.0; + if (qt_TexCoord0.x <= p || qt_TexCoord0.x >= 1.0 - p) { + alpha = 1.0; + } else if (qt_TexCoord0.y <= p || qt_TexCoord0.y >= 1.0 - p) { + alpha = 1.0; + } + alpha = alpha * qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +") + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Animation/AWheel.qml b/src/TaoQuick/Qml/EffectComponent/Animation/AWheel.qml new file mode 100644 index 0000000..0511866 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Animation/AWheel.qml @@ -0,0 +1,98 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 + +import "../.." + +ShaderEffect { + id: r + enum Direct { + Clockwise = 0, + CounterClockwise = 1 + } + property int dir : AWheel.Direct.Clockwise + property int duration: 1000 + property ShaderEffectSource effectSource: ShaderEffectSource { + hideSource: true + } + property int percent + opacity: percent > 0 ? 1 : 0 + NumberAnimation { + id: animation + target: r + property: "percent" + from: 0 + to: 100 + alwaysRunToEnd: true + loops: 1 + duration: r.duration + + } + fragmentShader: TCommon.fragmentShaderCommon + (dir === AWheel.Direct.CounterClockwise ? " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float per = float(percent) / 100.0 * -360.0; + const vec2 origin = vec2(0.5, 0.5); + const vec2 a = vec2(0.5, 0.0); + vec2 c = qt_TexCoord0 - origin; + float alpha = 0.0; + if (per >= -180.0) { + if (qt_TexCoord0.y > 0.5) { + if (cos(radians(per))* length(c) * length(a) < dot(c, a)) { + alpha = 1.0; + } + } + } else { + if (qt_TexCoord0.y < 0.5) { + if (cos(radians(per))* length(c) * length(a) > dot(c, a)) { + alpha = 1.0; + } + } else { + alpha = 1.0; + } + } + alpha *= qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +" : " + varying vec2 qt_TexCoord0; + uniform float qt_Opacity; + uniform sampler2D effectSource; + uniform int dir; + uniform int percent; + void main() + { + vec4 color = texture2D(effectSource, qt_TexCoord0); + float per = float(percent) / 100.0 * 360.0; + const vec2 origin = vec2(0.5, 0.5); + const vec2 a = vec2(0.5, 0.0); + vec2 c = qt_TexCoord0 - origin; + float alpha = 0.0; + if (per <= 180.0) { + if (qt_TexCoord0.y < 0.5) { + if (cos(radians(per))* length(c) * length(a) < dot(c, a)) { + alpha = 1.0; + } + } + } else { + if (qt_TexCoord0.y > 0.5) { + if (cos(radians(per))* length(c) * length(a) > dot(c, a)) { + alpha = 1.0; + } + } else { + alpha = 1.0; + } + } + alpha *= qt_Opacity; + gl_FragColor = vec4(color.rgb * alpha, alpha); + } +") + function restart() { + animation.restart() + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SBoard.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SBoard.qml new file mode 100644 index 0000000..5afc9d5 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SBoard.qml @@ -0,0 +1,67 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + visible: false + + property Item sourceItem + property alias dir: board.dir + ABoard { + id: board + anchors.fill: parent + duration: container.duration + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SCircle.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SCircle.qml new file mode 100644 index 0000000..0045c17 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SCircle.qml @@ -0,0 +1,67 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + visible: false + + property Item sourceItem + property alias dir: circle.dir + ACircle { + id: circle + anchors.fill: parent + duration: container.duration + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: circle + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: circle + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SCleavage.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SCleavage.qml new file mode 100644 index 0000000..68a1e6d --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SCleavage.qml @@ -0,0 +1,67 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + visible: false + + property Item sourceItem + property alias dir: board.dir + ACleavage { + id: board + anchors.fill: parent + duration: container.duration + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SCross.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SCross.qml new file mode 100644 index 0000000..ae52431 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SCross.qml @@ -0,0 +1,67 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + visible: false + + property Item sourceItem + property alias dir: board.dir + ACross { + id: board + anchors.fill: parent + duration: container.duration + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SDiagonal.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SDiagonal.qml new file mode 100644 index 0000000..049c2b9 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SDiagonal.qml @@ -0,0 +1,67 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + visible: false + + property Item sourceItem + property alias dir: board.dir + ADiagonal { + id: board + anchors.fill: parent + duration: container.duration + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SDissolve.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SDissolve.qml new file mode 100644 index 0000000..1879ffb --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SDissolve.qml @@ -0,0 +1,68 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 1400 + visible: false + + property Item sourceItem + property Image dissolveImage + ADissolve { + id: dissolve + anchors.fill: parent + duration: container.duration + dissolveSource.sourceItem: dissolveImage + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: dissolve + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: dissolve + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SFadeInOut.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SFadeInOut.qml new file mode 100644 index 0000000..352df75 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SFadeInOut.qml @@ -0,0 +1,68 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +Item { + id: container + + property int duration: 800 + visible: false + property Item sourceItem + ShaderEffectSource { + id: fade + anchors.fill: parent + sourceItem: container.sourceItem + hideSource: true + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: fade + property: "opacity" + duration: container.duration + easing.type: Easing.InOutQuad + from: 1 + to: 0 + alwaysRunToEnd: true + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + fade.opacity = 0 + container.visible = true + } + } + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: fade + property: "opacity" + duration: container.duration + easing.type: Easing.InOutQuad + from: 0 + to: 1 + alwaysRunToEnd: true + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SGrad.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SGrad.qml new file mode 100644 index 0000000..6710d85 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SGrad.qml @@ -0,0 +1,67 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + visible: false + + property Item sourceItem + property alias dir: board.dir + AGrad { + id: board + anchors.fill: parent + duration: container.duration + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SLouver.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SLouver.qml new file mode 100644 index 0000000..e9ba68b --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SLouver.qml @@ -0,0 +1,77 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + + enum Direct { + Horizon = 0, + Vertical = 1, + HorizonReverse = 2, + VerticalReverse = 3 + } + + property int dir: SLouver.Direct.Horizon + + property Item sourceItem + visible: false + ALouver { + id: louver + anchors.fill: parent + dir: container.dir + duration: container.duration + effectSource.sourceItem: container.sourceItem + } + + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: louver + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: louver + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SRhombus.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SRhombus.qml new file mode 100644 index 0000000..11a092e --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SRhombus.qml @@ -0,0 +1,67 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + visible: false + + property Item sourceItem + property alias dir: board.dir + ARhombus { + id: board + anchors.fill: parent + duration: container.duration + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SSector.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SSector.qml new file mode 100644 index 0000000..e284752 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SSector.qml @@ -0,0 +1,66 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + visible: false + + property Item sourceItem + ASector { + id: board + anchors.fill: parent + duration: container.duration + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SSquare.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SSquare.qml new file mode 100644 index 0000000..a0c9da0 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SSquare.qml @@ -0,0 +1,67 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + visible: false + + property Item sourceItem + property alias dir: board.dir + ASquare { + id: board + anchors.fill: parent + duration: container.duration + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/PageSwitch/SWheel.qml b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SWheel.qml new file mode 100644 index 0000000..b4292a7 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/PageSwitch/SWheel.qml @@ -0,0 +1,68 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "../.." +Item { + id: container + + property int duration: 800 + visible: false + + property Item sourceItem + property alias dir: board.dir + AWheel { + id: board + anchors.fill: parent + duration: container.duration + dir: container.dir + effectSource.sourceItem: container.sourceItem + } + states: [ + State { + name: "show" + }, + State { + name: "hide" + } + ] + state: "hide" + transitions: [ + Transition { + to: "hide" + SequentialAnimation { + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 0 + } + ScriptAction { + script: { + container.visible = false + } + } + } + }, + Transition { + to: "show" + SequentialAnimation { + ScriptAction { + script: { + container.visible = true + } + } + + PauseAnimation { + duration: container.duration + } + NumberAnimation { + target: board + property: "percent" + duration: container.duration + easing.type: Easing.InOutQuad + to: 100 + } + } + } + ] +} diff --git a/src/TaoQuick/Qml/EffectComponent/Shapes/TKLine.qml b/src/TaoQuick/Qml/EffectComponent/Shapes/TKLine.qml new file mode 100644 index 0000000..7429288 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Shapes/TKLine.qml @@ -0,0 +1,59 @@ +import QtQuick 2.12 +import QtQuick.Shapes 1.12 +Shape { + id: root + property int maxValue: 100 + property int upShadow: 90 + property int upValue: 80 + property int downValue: 40 + property int downShadow: 30 + property int minValue: 10 + + property color lineColor: "red" + readonly property color trans: "transparent" + property bool isFill: true + property int lineWidth: 4 + ShapePath { + startX: root.width / 2 + startY: root.height - maxValue + strokeColor: lineColor + strokeWidth: lineWidth + PathLine { + x: root.width / 2 + y: root.height - upValue + } + } + ShapePath { + startX: root.width / 2 + startY: root.height - minValue + strokeColor: lineColor + strokeWidth: lineWidth + PathLine { + x: root.width / 2 + y: root.height - downValue + } + } + ShapePath { + startX: 0 + startY: root.height - upValue + strokeColor: lineColor + strokeWidth: lineWidth + fillColor: isFill ? lineColor : trans + PathLine { + x: root.width + y: root.height - upValue + } + PathLine { + x: root.width + y: root.height - downValue + } + PathLine { + x: 0 + y: root.height - downValue + } + PathLine { + x: 0 + y: root.height - upValue + } + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/Shapes/TRoundRect.qml b/src/TaoQuick/Qml/EffectComponent/Shapes/TRoundRect.qml new file mode 100644 index 0000000..5595a38 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/Shapes/TRoundRect.qml @@ -0,0 +1,61 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.5 +import QtQuick.Shapes 1.12 +Shape { + id: root + property bool leftTopRound: true + property bool leftBottomRound: true + property bool rightTopRound: true + property bool rightBottomRound: true + property real radius + property color color: "red" + antialiasing: true + ShapePath { + fillColor: color + startX: leftTopRound ? radius : 0 + startY: 0 +// fillRule: ShapePath.WindingFill + PathLine { + x: rightTopRound ? root.width - radius : root.width + y: 0 + } + PathArc { + x: root.width + y: rightTopRound ? radius : 0 + radiusX: rightTopRound ? radius : 0 + radiusY: rightTopRound ? radius : 0 + } + + PathLine { + x: root.width + y: rightBottomRound ? root.height - radius : root.height + } + PathArc { + x: rightBottomRound ? root.width - radius : root.width + y: root.height + radiusX: rightBottomRound ? radius : 0 + radiusY: rightBottomRound ? radius : 0 + } + PathLine { + x: leftBottomRound ? radius : 0 + y: root.height + } + PathArc { + x: 0 + y: leftBottomRound ? root.height - radius : root.height + radiusX: leftBottomRound ? radius : 0 + radiusY: leftBottomRound ? radius : 0 + } + + PathLine { + x: 0 + y: leftTopRound ? radius : 0 + } + PathArc { + x: leftTopRound ? radius : 0 + y: 0 + radiusX: leftTopRound ? radius : 0 + radiusY: leftTopRound ? radius : 0 + } + } +} diff --git a/src/TaoQuick/Qml/EffectComponent/TCommon.qml b/src/TaoQuick/Qml/EffectComponent/TCommon.qml new file mode 100644 index 0000000..ace6943 --- /dev/null +++ b/src/TaoQuick/Qml/EffectComponent/TCommon.qml @@ -0,0 +1,16 @@ +pragma Singleton +import QtQuick 2.12 +QtObject { + property string versionString: GraphicsInfo.renderableType === GraphicsInfo.SurfaceFormatOpenGLES ? + "#version 100 es" : "#version 130" + property string fragmentShaderCommon: versionString + " +#ifdef GL_ES + precision mediump float; +#else +# define lowp +# define mediump +# define highp +#endif // GL_ES + " +} + diff --git a/src/TaoQuick/Qml/BasicComponent/Others/TShaderToy.qml b/src/TaoQuick/Qml/EffectComponent/TShaderToy.qml similarity index 83% rename from src/TaoQuick/Qml/BasicComponent/Others/TShaderToy.qml rename to src/TaoQuick/Qml/EffectComponent/TShaderToy.qml index bdad0ee..5953302 100644 --- a/src/TaoQuick/Qml/BasicComponent/Others/TShaderToy.qml +++ b/src/TaoQuick/Qml/EffectComponent/TShaderToy.qml @@ -84,10 +84,18 @@ ShaderEffect { shader.iMouse.w = mouseY } } + // 如果环境是OpenGL ES2,默认的version是 version 110, 不需要写出来。 + // 比ES2更老的版本是ES 1.0 和 ES 1.1, 这种古董设备,还是不要玩Shader了吧。 + // ES2没有texture函数,要用旧的texture2D代替 + // 精度限定要写成float readonly property string gles2Ver: " #define texture texture2D precision mediump float; " + // 如果环境是OpenGL ES3,version是 version 300 es + // ES 3.1 ES 3.2也可以。 + // ES3可以用in out 关键字,gl_FragColor也可以用out fragColor取代 + // 精度限定要写成float readonly property string gles3Ver: "#version 300 es #define varying in #define gl_FragColor fragColor @@ -95,7 +103,10 @@ precision mediump float; out vec4 fragColor; " - + // 如果环境是OpenGL Desktop 3.x,version这里参考Qt默认的version 150。大部分Desktop设备应该都是150 + // 150 即3.2版本,第一个区分Core和Compatibility的版本。Core是核心模式,只有核心api以减轻负担。相应的Compatibility是兼容模式,保留全部API以兼容低版本。 + // 可以用in out 关键字,gl_FragColor也可以用out fragColor取代 + // 精度限定抹掉,用默认的。不抹掉有些情况下会报错,不能通用。 readonly property string gl3Ver: "#version 150 #define varying in #define gl_FragColor fragColor @@ -105,9 +116,12 @@ out vec4 fragColor; out vec4 fragColor; " + // 如果环境是OpenGL Desktop 2.x,version这里就用2.0的version 110,即2.0版本 + // 2.x 没有texture函数,要用旧的texture2D代替 readonly property string gl2Ver: "#version 110 #define texture texture2D " + property string versionString: { if (Qt.platform.os === "android") { if (GraphicsInfo.majorVersion === 3) { diff --git a/src/TaoQuick/Qml/Updateqmldir.ps1 b/src/TaoQuick/Qml/Updateqmldir.ps1 index 9257b66..46b4c0d 100644 --- a/src/TaoQuick/Qml/Updateqmldir.ps1 +++ b/src/TaoQuick/Qml/Updateqmldir.ps1 @@ -1,5 +1,6 @@ $cur= Get-Location $ver="1.0" +$single="singleton" if (Test-Path qmldir) { Clear-Content qmldir } @@ -12,4 +13,17 @@ Get-ChildItem -Recurse BasicComponent | ForEach-Object -Process { $line = ($_.BaseName, $ver, $filePath) -join " " $line | Out-File -Append -Encoding "utf8" qmldir } +} +Get-ChildItem -Recurse EffectComponent | ForEach-Object -Process { + if ($_ -is [System.IO.FileInfo]) { + $filePath = Resolve-Path -Relative $_.Directory + $filePath = $filePath.Remove(0, 2) + $filePath = $filePath + "\" + $_.Name + $filePath=$filePath.Replace('\', '/') + $line = ($_.BaseName, $ver, $filePath) -join " " + if ($_.BaseName -eq "TCommon") { + $line = ($single, $line) -join " " + } + $line | Out-File -Append -Encoding "utf8" qmldir + } } \ No newline at end of file diff --git a/src/TaoQuick/Qml/qmldir b/src/TaoQuick/Qml/qmldir index 3d58f88..fad06cb 100644 --- a/src/TaoQuick/Qml/qmldir +++ b/src/TaoQuick/Qml/qmldir @@ -10,8 +10,37 @@ TDragItem 1.0 BasicComponent/Others/TDragItem.qml TFPS 1.0 BasicComponent/Others/TFPS.qml TPopup 1.0 BasicComponent/Others/TPopup.qml TResizeBorder 1.0 BasicComponent/Others/TResizeBorder.qml -TShaderToy 1.0 BasicComponent/Others/TShaderToy.qml TToolTip 1.0 BasicComponent/Others/TToolTip.qml TCircleProgress 1.0 BasicComponent/Progress/TCircleProgress.qml TInOut 1.0 BasicComponent/Progress/TInOut.qml TNormalProgress 1.0 BasicComponent/Progress/TNormalProgress.qml +singleton TCommon 1.0 EffectComponent/TCommon.qml +TShaderToy 1.0 EffectComponent/TShaderToy.qml +ABoard 1.0 EffectComponent/Animation/ABoard.qml +ACircle 1.0 EffectComponent/Animation/ACircle.qml +ACleavage 1.0 EffectComponent/Animation/ACleavage.qml +ACross 1.0 EffectComponent/Animation/ACross.qml +ADiagonal 1.0 EffectComponent/Animation/ADiagonal.qml +ADissolve 1.0 EffectComponent/Animation/ADissolve.qml +AGrad 1.0 EffectComponent/Animation/AGrad.qml +ALouver 1.0 EffectComponent/Animation/ALouver.qml +ARhombus 1.0 EffectComponent/Animation/ARhombus.qml +ASector 1.0 EffectComponent/Animation/ASector.qml +ASlowEnter 1.0 EffectComponent/Animation/ASlowEnter.qml +ASquare 1.0 EffectComponent/Animation/ASquare.qml +AWheel 1.0 EffectComponent/Animation/AWheel.qml +SBoard 1.0 EffectComponent/PageSwitch/SBoard.qml +SCircle 1.0 EffectComponent/PageSwitch/SCircle.qml +SCleavage 1.0 EffectComponent/PageSwitch/SCleavage.qml +SCross 1.0 EffectComponent/PageSwitch/SCross.qml +SDiagonal 1.0 EffectComponent/PageSwitch/SDiagonal.qml +SDissolve 1.0 EffectComponent/PageSwitch/SDissolve.qml +SFadeInOut 1.0 EffectComponent/PageSwitch/SFadeInOut.qml +SGrad 1.0 EffectComponent/PageSwitch/SGrad.qml +SLouver 1.0 EffectComponent/PageSwitch/SLouver.qml +SRhombus 1.0 EffectComponent/PageSwitch/SRhombus.qml +SSector 1.0 EffectComponent/PageSwitch/SSector.qml +SSquare 1.0 EffectComponent/PageSwitch/SSquare.qml +SWheel 1.0 EffectComponent/PageSwitch/SWheel.qml +TKLine 1.0 EffectComponent/Shapes/TKLine.qml +TRoundRect 1.0 EffectComponent/Shapes/TRoundRect.qml diff --git a/src/TaoQuick/qmldir b/src/TaoQuick/qmldir index dac6bcc..ee51bf4 100644 --- a/src/TaoQuick/qmldir +++ b/src/TaoQuick/qmldir @@ -8,19 +8,47 @@ TGradientBtn 1.0 BasicComponent/Button/TGradientBtn.qml TImageBtn 1.0 BasicComponent/Button/TImageBtn.qml TImgTextBtn 1.0 BasicComponent/Button/TImgTextBtn.qml TTextBtn 1.0 BasicComponent/Button/TTextBtn.qml - TMoveArea 1.0 BasicComponent/Mouse/TMoveArea.qml TTransArea 1.0 BasicComponent/Mouse/TTransArea.qml - -TNormalProgress 1.0 BasicComponent/Progress/TNormalProgress.qml -TCircleProgress 1.0 BasicComponent/Progress/TCircleProgress.qml - TBusyIndicator 1.0 BasicComponent/Others/TBusyIndicator.qml +TDialog 1.0 BasicComponent/Others/TDialog.qml TDragItem 1.0 BasicComponent/Others/TDragItem.qml +TFPS 1.0 BasicComponent/Others/TFPS.qml +TPopup 1.0 BasicComponent/Others/TPopup.qml TResizeBorder 1.0 BasicComponent/Others/TResizeBorder.qml TToolTip 1.0 BasicComponent/Others/TToolTip.qml -TDialog 1.0 BasicComponent/Others/TDialog.qml -TPopup 1.0 BasicComponent/Others/TPopup.qml -TFPS 1.0 BasicComponent/Others/TFPS.qml +TCircleProgress 1.0 BasicComponent/Progress/TCircleProgress.qml +TInOut 1.0 BasicComponent/Progress/TInOut.qml +TNormalProgress 1.0 BasicComponent/Progress/TNormalProgress.qml +singleton TCommon 1.0 EffectComponent/TCommon.qml +TShaderToy 1.0 EffectComponent/TShaderToy.qml +ABoard 1.0 EffectComponent/Animation/ABoard.qml +ACircle 1.0 EffectComponent/Animation/ACircle.qml +ACleavage 1.0 EffectComponent/Animation/ACleavage.qml +ACross 1.0 EffectComponent/Animation/ACross.qml +ADiagonal 1.0 EffectComponent/Animation/ADiagonal.qml +ADissolve 1.0 EffectComponent/Animation/ADissolve.qml +AGrad 1.0 EffectComponent/Animation/AGrad.qml +ALouver 1.0 EffectComponent/Animation/ALouver.qml +ARhombus 1.0 EffectComponent/Animation/ARhombus.qml +ASector 1.0 EffectComponent/Animation/ASector.qml +ASlowEnter 1.0 EffectComponent/Animation/ASlowEnter.qml +ASquare 1.0 EffectComponent/Animation/ASquare.qml +AWheel 1.0 EffectComponent/Animation/AWheel.qml +SBoard 1.0 EffectComponent/PageSwitch/SBoard.qml +SCircle 1.0 EffectComponent/PageSwitch/SCircle.qml +SCleavage 1.0 EffectComponent/PageSwitch/SCleavage.qml +SCross 1.0 EffectComponent/PageSwitch/SCross.qml +SDiagonal 1.0 EffectComponent/PageSwitch/SDiagonal.qml +SDissolve 1.0 EffectComponent/PageSwitch/SDissolve.qml +SFadeInOut 1.0 EffectComponent/PageSwitch/SFadeInOut.qml +SGrad 1.0 EffectComponent/PageSwitch/SGrad.qml +SLouver 1.0 EffectComponent/PageSwitch/SLouver.qml +SRhombus 1.0 EffectComponent/PageSwitch/SRhombus.qml +SSector 1.0 EffectComponent/PageSwitch/SSector.qml +SSquare 1.0 EffectComponent/PageSwitch/SSquare.qml +SWheel 1.0 EffectComponent/PageSwitch/SWheel.qml +TKLine 1.0 EffectComponent/Shapes/TKLine.qml +TRoundRect 1.0 EffectComponent/Shapes/TRoundRect.qml designersupported