From 133fdbf0c3b5620a9e71fdba7219deebe7656916 Mon Sep 17 00:00:00 2001 From: jared Date: Wed, 14 Oct 2020 13:33:27 +0800 Subject: [PATCH] update main --- Install-en.md | 2 +- Install.md | 2 +- .../TaoQuickShow/Contents/Animation/Board.qml | 2 +- .../Contents/Animation/Circle.qml | 2 +- .../Contents/Animation/Cleavage.qml | 2 +- .../TaoQuickShow/Contents/Animation/Cross.qml | 2 +- .../Contents/Animation/Diagonal.qml | 2 +- .../Contents/Animation/Dissolve.qml | 2 +- .../TaoQuickShow/Contents/Animation/Enter.qml | 2 +- .../TaoQuickShow/Contents/Animation/Grad.qml | 2 +- .../Contents/Animation/Louver.qml | 2 +- .../Contents/Animation/Rhombus.qml | 2 +- .../Contents/Animation/Square.qml | 2 +- .../TaoQuickShow/Contents/Animation/Wheel.qml | 2 +- .../Contents/BaseComponent/Dialogs.qml | 2 +- .../Contents/BaseComponent/Drags.qml | 2 +- .../Contents/BaseComponent/Gradiants.qml | 2 +- .../Contents/BaseComponent/Progresses.qml | 2 +- .../TaoQuickShow/Contents/Buttons/Buttons.qml | 2 +- .../Contents/Effect/Effects/TAround.qml | 2 +- .../Contents/PageSwitch/Board.qml | 2 +- .../Contents/PageSwitch/Circle.qml | 2 +- .../Contents/PageSwitch/Cleavage.qml | 2 +- .../Contents/PageSwitch/Cross.qml | 2 +- .../Contents/PageSwitch/Diagonal.qml | 2 +- .../Contents/PageSwitch/Dissolve.qml | 2 +- .../Contents/PageSwitch/FadeInOut.qml | 2 +- .../TaoQuickShow/Contents/PageSwitch/Grad.qml | 2 +- .../Contents/PageSwitch/Louver.qml | 2 +- .../Contents/PageSwitch/PageSwitchBase.qml | 2 +- .../Contents/PageSwitch/Rhombus.qml | 2 +- .../Contents/PageSwitch/Sector.qml | 2 +- .../Contents/PageSwitch/Square.qml | 2 +- .../Contents/PageSwitch/Wheel.qml | 2 +- .../Contents/ShaderEffect/CloudHole.qml | 2 +- .../Contents/ShaderEffect/Planet.qml | 2 +- .../Contents/ShaderEffect/Snail.qml | 2 +- .../Contents/ShaderEffect/SuperMario.qml | 2 +- .../TaoQuickShow/Contents/Shape/KLine.qml | 2 +- .../TaoQuickShow/Contents/Shape/RoundRect.qml | 2 +- examples/TaoQuickShow/Qml/MainPage.qml | 2 +- .../TaoQuickShow/Qml/Page/AboutDialog.qml | 2 +- .../TaoQuickShow/Qml/Page/Biz/BackBtn.qml | 2 +- .../TaoQuickShow/Qml/Page/Biz/Background.qml | 2 +- .../TaoQuickShow/Qml/Page/Biz/CloseBtn.qml | 6 +- .../TaoQuickShow/Qml/Page/Biz/CompBtn.qml | 2 +- .../TaoQuickShow/Qml/Page/Biz/CompCard.qml | 2 +- .../TaoQuickShow/Qml/Page/Biz/CompDetail.qml | 2 +- .../TaoQuickShow/Qml/Page/Biz/LangBtn.qml | 12 +-- .../TaoQuickShow/Qml/Page/Biz/SkinBtn.qml | 6 +- .../TaoQuickShow/Qml/Page/ContentPage.qml | 2 +- examples/TaoQuickShow/Qml/Page/MenuPage.qml | 2 +- examples/TaoQuickShow/Qml/Page/TitlePage.qml | 59 ++++++------ examples/TaoQuickShow/Qml/main.qml | 90 +++++++++---------- .../TaoQuickShow/Src/ComponentsManager.cpp | 2 +- .../Src/{TaoView.cpp => TaoFrameLessView.cpp} | 59 +++++++----- .../Src/{TaoView.h => TaoFrameLessView.h} | 14 +-- examples/TaoQuickShow/Src/main.cpp | 10 ++- examples/TaoQuickShow/TaoQuickShow.pri | 6 +- examples/TaoQuickShow/TaoQuickShow.pro | 6 +- .../TaoQuick/Qml/CusButton/CusButton.qml | 2 + .../Qml/CusButton/CusButton_Image.qml | 7 +- 62 files changed, 198 insertions(+), 179 deletions(-) rename examples/TaoQuickShow/Src/{TaoView.cpp => TaoFrameLessView.cpp} (74%) rename examples/TaoQuickShow/Src/{TaoView.h => TaoFrameLessView.h} (71%) diff --git a/Install-en.md b/Install-en.md index 90882fb..d299fbd 100644 --- a/Install-en.md +++ b/Install-en.md @@ -57,7 +57,7 @@ or you can install TaoQuick to QTDIR. 2. import in you qml ``` import TaoQuick 1.0 -import "qrc:/TaoQuick" + ``` ![](https://github.com/jaredtao/TaoQuickPreview/blob/master/Preview/TaoQuick-use.png) diff --git a/Install.md b/Install.md index 1181b77..4de003c 100644 --- a/Install.md +++ b/Install.md @@ -68,7 +68,7 @@ TaoQuick库将被安装到{QTDIR}/qml/TaoQuick/ 路径下。 2. 在你的Qml中写上这两句,就完成了TaoQuick的导入 ``` import TaoQuick 1.0 -import "qrc:/TaoQuick" + ``` ![](https://github.com/jaredtao/TaoQuickPreview/blob/master/Preview/TaoQuick-use.png) diff --git a/examples/TaoQuickShow/Contents/Animation/Board.qml b/examples/TaoQuickShow/Contents/Animation/Board.qml index 94c2200..aba91d5 100644 --- a/examples/TaoQuickShow/Contents/Animation/Board.qml +++ b/examples/TaoQuickShow/Contents/Animation/Board.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/Animation/Circle.qml b/examples/TaoQuickShow/Contents/Animation/Circle.qml index cf1d1cd..7d4cb3c 100644 --- a/examples/TaoQuickShow/Contents/Animation/Circle.qml +++ b/examples/TaoQuickShow/Contents/Animation/Circle.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Image { diff --git a/examples/TaoQuickShow/Contents/Animation/Cleavage.qml b/examples/TaoQuickShow/Contents/Animation/Cleavage.qml index a0d9751..b487fdc 100644 --- a/examples/TaoQuickShow/Contents/Animation/Cleavage.qml +++ b/examples/TaoQuickShow/Contents/Animation/Cleavage.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Image { diff --git a/examples/TaoQuickShow/Contents/Animation/Cross.qml b/examples/TaoQuickShow/Contents/Animation/Cross.qml index 55a7d27..2a0f267 100644 --- a/examples/TaoQuickShow/Contents/Animation/Cross.qml +++ b/examples/TaoQuickShow/Contents/Animation/Cross.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Image { diff --git a/examples/TaoQuickShow/Contents/Animation/Diagonal.qml b/examples/TaoQuickShow/Contents/Animation/Diagonal.qml index 4715ce5..ba34a7f 100644 --- a/examples/TaoQuickShow/Contents/Animation/Diagonal.qml +++ b/examples/TaoQuickShow/Contents/Animation/Diagonal.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Image { diff --git a/examples/TaoQuickShow/Contents/Animation/Dissolve.qml b/examples/TaoQuickShow/Contents/Animation/Dissolve.qml index f6a64b7..d6c8dbd 100644 --- a/examples/TaoQuickShow/Contents/Animation/Dissolve.qml +++ b/examples/TaoQuickShow/Contents/Animation/Dissolve.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Image { diff --git a/examples/TaoQuickShow/Contents/Animation/Enter.qml b/examples/TaoQuickShow/Contents/Animation/Enter.qml index 084ba99..07a50b1 100644 --- a/examples/TaoQuickShow/Contents/Animation/Enter.qml +++ b/examples/TaoQuickShow/Contents/Animation/Enter.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent ASlowEnter { diff --git a/examples/TaoQuickShow/Contents/Animation/Grad.qml b/examples/TaoQuickShow/Contents/Animation/Grad.qml index 598ffa8..6db8780 100644 --- a/examples/TaoQuickShow/Contents/Animation/Grad.qml +++ b/examples/TaoQuickShow/Contents/Animation/Grad.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Image { diff --git a/examples/TaoQuickShow/Contents/Animation/Louver.qml b/examples/TaoQuickShow/Contents/Animation/Louver.qml index 1c5f50a..dfaaeb8 100644 --- a/examples/TaoQuickShow/Contents/Animation/Louver.qml +++ b/examples/TaoQuickShow/Contents/Animation/Louver.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Image { diff --git a/examples/TaoQuickShow/Contents/Animation/Rhombus.qml b/examples/TaoQuickShow/Contents/Animation/Rhombus.qml index 7b80f6b..7a951eb 100644 --- a/examples/TaoQuickShow/Contents/Animation/Rhombus.qml +++ b/examples/TaoQuickShow/Contents/Animation/Rhombus.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Image { diff --git a/examples/TaoQuickShow/Contents/Animation/Square.qml b/examples/TaoQuickShow/Contents/Animation/Square.qml index 40d15aa..76a384c 100644 --- a/examples/TaoQuickShow/Contents/Animation/Square.qml +++ b/examples/TaoQuickShow/Contents/Animation/Square.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Image { diff --git a/examples/TaoQuickShow/Contents/Animation/Wheel.qml b/examples/TaoQuickShow/Contents/Animation/Wheel.qml index d0da549..d7b2079 100644 --- a/examples/TaoQuickShow/Contents/Animation/Wheel.qml +++ b/examples/TaoQuickShow/Contents/Animation/Wheel.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Image { diff --git a/examples/TaoQuickShow/Contents/BaseComponent/Dialogs.qml b/examples/TaoQuickShow/Contents/BaseComponent/Dialogs.qml index 23b16d9..56e3dd6 100644 --- a/examples/TaoQuickShow/Contents/BaseComponent/Dialogs.qml +++ b/examples/TaoQuickShow/Contents/BaseComponent/Dialogs.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent TDialog { diff --git a/examples/TaoQuickShow/Contents/BaseComponent/Drags.qml b/examples/TaoQuickShow/Contents/BaseComponent/Drags.qml index b980d83..d5960cb 100644 --- a/examples/TaoQuickShow/Contents/BaseComponent/Drags.qml +++ b/examples/TaoQuickShow/Contents/BaseComponent/Drags.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/BaseComponent/Gradiants.qml b/examples/TaoQuickShow/Contents/BaseComponent/Gradiants.qml index 293eab7..c99a934 100644 --- a/examples/TaoQuickShow/Contents/BaseComponent/Gradiants.qml +++ b/examples/TaoQuickShow/Contents/BaseComponent/Gradiants.qml @@ -2,7 +2,7 @@ import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/BaseComponent/Progresses.qml b/examples/TaoQuickShow/Contents/BaseComponent/Progresses.qml index e2c4cf0..c9f6838 100644 --- a/examples/TaoQuickShow/Contents/BaseComponent/Progresses.qml +++ b/examples/TaoQuickShow/Contents/BaseComponent/Progresses.qml @@ -2,7 +2,7 @@ import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { id: r diff --git a/examples/TaoQuickShow/Contents/Buttons/Buttons.qml b/examples/TaoQuickShow/Contents/Buttons/Buttons.qml index afef343..cfae645 100644 --- a/examples/TaoQuickShow/Contents/Buttons/Buttons.qml +++ b/examples/TaoQuickShow/Contents/Buttons/Buttons.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent property color btnColor: "#06b7ed" diff --git a/examples/TaoQuickShow/Contents/Effect/Effects/TAround.qml b/examples/TaoQuickShow/Contents/Effect/Effects/TAround.qml index 631e55a..13f72b2 100644 --- a/examples/TaoQuickShow/Contents/Effect/Effects/TAround.qml +++ b/examples/TaoQuickShow/Contents/Effect/Effects/TAround.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + TShaderToy { id: r diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Board.qml b/examples/TaoQuickShow/Contents/PageSwitch/Board.qml index 7ebfafa..b31c274 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Board.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Board.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Circle.qml b/examples/TaoQuickShow/Contents/PageSwitch/Circle.qml index 6b81733..987977d 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Circle.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Circle.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Cleavage.qml b/examples/TaoQuickShow/Contents/PageSwitch/Cleavage.qml index 45bfca5..bd77204 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Cleavage.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Cleavage.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Cross.qml b/examples/TaoQuickShow/Contents/PageSwitch/Cross.qml index 02f3a38..a6d6fcb 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Cross.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Cross.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Diagonal.qml b/examples/TaoQuickShow/Contents/PageSwitch/Diagonal.qml index 69ac176..46e51a9 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Diagonal.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Diagonal.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Dissolve.qml b/examples/TaoQuickShow/Contents/PageSwitch/Dissolve.qml index 3ae296b..92ce32f 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Dissolve.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Dissolve.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/FadeInOut.qml b/examples/TaoQuickShow/Contents/PageSwitch/FadeInOut.qml index 6ae9c99..9f4de7a 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/FadeInOut.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/FadeInOut.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { id: r diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Grad.qml b/examples/TaoQuickShow/Contents/PageSwitch/Grad.qml index 1a7981d..b6f2a98 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Grad.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Grad.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Louver.qml b/examples/TaoQuickShow/Contents/PageSwitch/Louver.qml index 14ee8f2..d5871f6 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Louver.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Louver.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { id: r anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/PageSwitchBase.qml b/examples/TaoQuickShow/Contents/PageSwitch/PageSwitchBase.qml index 2ff4d31..a0fe3e2 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/PageSwitchBase.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/PageSwitchBase.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { id: base diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Rhombus.qml b/examples/TaoQuickShow/Contents/PageSwitch/Rhombus.qml index 503bfd9..3784043 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Rhombus.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Rhombus.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Sector.qml b/examples/TaoQuickShow/Contents/PageSwitch/Sector.qml index dbcbc7b..eafc475 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Sector.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Sector.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Square.qml b/examples/TaoQuickShow/Contents/PageSwitch/Square.qml index 26d8b1b..6c685ef 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Square.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Square.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/PageSwitch/Wheel.qml b/examples/TaoQuickShow/Contents/PageSwitch/Wheel.qml index 6e28770..8a39626 100644 --- a/examples/TaoQuickShow/Contents/PageSwitch/Wheel.qml +++ b/examples/TaoQuickShow/Contents/PageSwitch/Wheel.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/ShaderEffect/CloudHole.qml b/examples/TaoQuickShow/Contents/ShaderEffect/CloudHole.qml index 7684b53..ef2d462 100644 --- a/examples/TaoQuickShow/Contents/ShaderEffect/CloudHole.qml +++ b/examples/TaoQuickShow/Contents/ShaderEffect/CloudHole.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + TShaderToy { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/ShaderEffect/Planet.qml b/examples/TaoQuickShow/Contents/ShaderEffect/Planet.qml index ba29007..d9a7b73 100644 --- a/examples/TaoQuickShow/Contents/ShaderEffect/Planet.qml +++ b/examples/TaoQuickShow/Contents/ShaderEffect/Planet.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + TShaderToy { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/ShaderEffect/Snail.qml b/examples/TaoQuickShow/Contents/ShaderEffect/Snail.qml index cc540e1..4dd1a03 100644 --- a/examples/TaoQuickShow/Contents/ShaderEffect/Snail.qml +++ b/examples/TaoQuickShow/Contents/ShaderEffect/Snail.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + TShaderToy { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/ShaderEffect/SuperMario.qml b/examples/TaoQuickShow/Contents/ShaderEffect/SuperMario.qml index 2a32c6d..f908fa8 100644 --- a/examples/TaoQuickShow/Contents/ShaderEffect/SuperMario.qml +++ b/examples/TaoQuickShow/Contents/ShaderEffect/SuperMario.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + TShaderToy { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/Shape/KLine.qml b/examples/TaoQuickShow/Contents/Shape/KLine.qml index 405a111..08dda3f 100644 --- a/examples/TaoQuickShow/Contents/Shape/KLine.qml +++ b/examples/TaoQuickShow/Contents/Shape/KLine.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Contents/Shape/RoundRect.qml b/examples/TaoQuickShow/Contents/Shape/RoundRect.qml index e4c51b6..a2bc031 100644 --- a/examples/TaoQuickShow/Contents/Shape/RoundRect.qml +++ b/examples/TaoQuickShow/Contents/Shape/RoundRect.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent Rectangle { diff --git a/examples/TaoQuickShow/Qml/MainPage.qml b/examples/TaoQuickShow/Qml/MainPage.qml index 6749aaa..b482302 100644 --- a/examples/TaoQuickShow/Qml/MainPage.qml +++ b/examples/TaoQuickShow/Qml/MainPage.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import "./Page" import TaoQuick 1.0 -import "qrc:/TaoQuick" + Item { anchors.fill: parent diff --git a/examples/TaoQuickShow/Qml/Page/AboutDialog.qml b/examples/TaoQuickShow/Qml/Page/AboutDialog.qml index d6da3e5..07fd7dc 100644 --- a/examples/TaoQuickShow/Qml/Page/AboutDialog.qml +++ b/examples/TaoQuickShow/Qml/Page/AboutDialog.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Popup { id: root diff --git a/examples/TaoQuickShow/Qml/Page/Biz/BackBtn.qml b/examples/TaoQuickShow/Qml/Page/Biz/BackBtn.qml index ae62f82..5ef8074 100644 --- a/examples/TaoQuickShow/Qml/Page/Biz/BackBtn.qml +++ b/examples/TaoQuickShow/Qml/Page/Biz/BackBtn.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import TaoQuick 1.0 -import "qrc:/TaoQuick" + TImageBtn { width: 48 height: 48 diff --git a/examples/TaoQuickShow/Qml/Page/Biz/Background.qml b/examples/TaoQuickShow/Qml/Page/Biz/Background.qml index 054d14b..4fb526b 100644 --- a/examples/TaoQuickShow/Qml/Page/Biz/Background.qml +++ b/examples/TaoQuickShow/Qml/Page/Biz/Background.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Rectangle { id: root diff --git a/examples/TaoQuickShow/Qml/Page/Biz/CloseBtn.qml b/examples/TaoQuickShow/Qml/Page/Biz/CloseBtn.qml index 1b82fcf..6b1ab74 100644 --- a/examples/TaoQuickShow/Qml/Page/Biz/CloseBtn.qml +++ b/examples/TaoQuickShow/Qml/Page/Biz/CloseBtn.qml @@ -1,10 +1,10 @@ import QtQuick 2.9 import TaoQuick 1.0 -import "qrc:/TaoQuick" -TImageBtn { + +CusButton_Image { width: 20 height: 20 - imageUrl: imgPath + (containsMouse ? "Window/close_white.png" : "Window/close_gray.png") + btnImgUrl: imgPath + (containsMouse ? "Window/close_white.png" : "Window/close_gray.png") } diff --git a/examples/TaoQuickShow/Qml/Page/Biz/CompBtn.qml b/examples/TaoQuickShow/Qml/Page/Biz/CompBtn.qml index fc659d2..2d2305b 100644 --- a/examples/TaoQuickShow/Qml/Page/Biz/CompBtn.qml +++ b/examples/TaoQuickShow/Qml/Page/Biz/CompBtn.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import TaoQuick 1.0 -import "qrc:/TaoQuick" + TTextBtn { id: root diff --git a/examples/TaoQuickShow/Qml/Page/Biz/CompCard.qml b/examples/TaoQuickShow/Qml/Page/Biz/CompCard.qml index cebb1e8..c8534df 100644 --- a/examples/TaoQuickShow/Qml/Page/Biz/CompCard.qml +++ b/examples/TaoQuickShow/Qml/Page/Biz/CompCard.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Rectangle { id: root width: 200 diff --git a/examples/TaoQuickShow/Qml/Page/Biz/CompDetail.qml b/examples/TaoQuickShow/Qml/Page/Biz/CompDetail.qml index 2fa2268..2cd7236 100644 --- a/examples/TaoQuickShow/Qml/Page/Biz/CompDetail.qml +++ b/examples/TaoQuickShow/Qml/Page/Biz/CompDetail.qml @@ -2,7 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + Rectangle { id: root radius: 4 diff --git a/examples/TaoQuickShow/Qml/Page/Biz/LangBtn.qml b/examples/TaoQuickShow/Qml/Page/Biz/LangBtn.qml index 790da3f..2f6e1ba 100644 --- a/examples/TaoQuickShow/Qml/Page/Biz/LangBtn.qml +++ b/examples/TaoQuickShow/Qml/Page/Biz/LangBtn.qml @@ -1,12 +1,11 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" -TImageBtn { - imageUrl: imgPath + (containsMouse ? "Window/lang_white.png" : "Window/lang_gray.png") + +CusButton_Image { + btnImgUrl: imgPath + (containsMouse ? "Window/lang_white.png" : "Window/lang_gray.png") onClicked: { - // notifyBox.notify("change language") pop.show() } TPopup { @@ -20,11 +19,12 @@ TImageBtn { anchors.margins: 2 model: trans.languages clip: true - delegate: TTextBtn { + delegate: CusButton { + id: dBtn width: langListView.width height: 36 text: qsTr(modelData) - color: trans.currentLang === modelData ? gConfig.themeColor :( containsMouse ? "lightgray" : pop.barColor) + backgroundColor: trans.currentLang === modelData ? gConfig.themeColor :( containsMouse ? "lightgray" : pop.barColor) textColor: gConfig.textColor radius: 4 onClicked: { diff --git a/examples/TaoQuickShow/Qml/Page/Biz/SkinBtn.qml b/examples/TaoQuickShow/Qml/Page/Biz/SkinBtn.qml index e24e924..bcd7ba1 100644 --- a/examples/TaoQuickShow/Qml/Page/Biz/SkinBtn.qml +++ b/examples/TaoQuickShow/Qml/Page/Biz/SkinBtn.qml @@ -1,10 +1,10 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" -TImageBtn { - imageUrl: imgPath + (containsMouse ? "Window/skin_white.png" : "Window/skin_gray.png") +CusButton_Image { + + btnImgUrl: imgPath + (containsMouse ? "Window/skin_white.png" : "Window/skin_gray.png") onClicked: { skinBox.show() } diff --git a/examples/TaoQuickShow/Qml/Page/ContentPage.qml b/examples/TaoQuickShow/Qml/Page/ContentPage.qml index 4cff92e..338b39c 100644 --- a/examples/TaoQuickShow/Qml/Page/ContentPage.qml +++ b/examples/TaoQuickShow/Qml/Page/ContentPage.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + import "Biz" Background { id: background diff --git a/examples/TaoQuickShow/Qml/Page/MenuPage.qml b/examples/TaoQuickShow/Qml/Page/MenuPage.qml index 204b65b..c9e77ee 100644 --- a/examples/TaoQuickShow/Qml/Page/MenuPage.qml +++ b/examples/TaoQuickShow/Qml/Page/MenuPage.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" + ListView { id: root anchors.fill: parent diff --git a/examples/TaoQuickShow/Qml/Page/TitlePage.qml b/examples/TaoQuickShow/Qml/Page/TitlePage.qml index 791fa3b..a47d2c2 100644 --- a/examples/TaoQuickShow/Qml/Page/TitlePage.qml +++ b/examples/TaoQuickShow/Qml/Page/TitlePage.qml @@ -1,8 +1,7 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 -import "qrc:/TaoQuick" -import "Biz" +import "./Biz" Rectangle { Row { anchors.left: parent.left @@ -22,33 +21,27 @@ Rectangle { property bool isMaxed: view.isMax Row { id: controlButtons - height: 20 + height: 32 anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: 12 - spacing: 10 - TImageBtn { - width: 20 - height: 20 - imageUrl: imgPath + (containsMouse ? "Window/minimal_white.png" : "Window/minimal_gray.png") + anchors.rightMargin: 20 + spacing: 20 + CusButton_Image { + btnImgUrl: imgPath + (containsMouse ? "Window/minimal_white.png" : "Window/minimal_gray.png") onClicked: { view.showMinimized() } } - TImageBtn { - width: 20 - height: 20 + CusButton_Image { visible: !isMaxed - imageUrl: imgPath + (containsMouse ? "Window/max_white.png" : "Window/max_gray.png") + btnImgUrl: imgPath + (containsMouse ? "Window/max_white.png" : "Window/max_gray.png") onClicked: { view.showMaximized() } } - TImageBtn { - width: 20 - height: 20 + CusButton_Image { visible: isMaxed - imageUrl: imgPath + (containsMouse ? "Window/normal_white.png" : "Window/normal_gray.png") + btnImgUrl: imgPath + (containsMouse ? "Window/normal_white.png" : "Window/normal_gray.png") onClicked: { view.showNormal() } @@ -61,37 +54,45 @@ Rectangle { } Rectangle { id: splitLine - height: 16 + height: parent.height * 0.6 width: 1 anchors.verticalCenter: parent.verticalCenter anchors.right: controlButtons.left anchors.rightMargin: 10 } Row { - height: 20 + id: toolRow + height: 32 anchors.verticalCenter: parent.verticalCenter anchors.right: splitLine.left - anchors.rightMargin: 10 - spacing: 10 + anchors.rightMargin: 20 + spacing: 20 SkinBtn { - width: 20 - height: 20 anchors.verticalCenter: parent.verticalCenter } LangBtn { - width: 20 - height: 20 anchors.verticalCenter: parent.verticalCenter } - TImageBtn { - width: 20 - height: 20 + CusButton_Image { anchors.verticalCenter: parent.verticalCenter - imageUrl: imgPath + (containsMouse ? "Window/about_white.png" : "Window/about_gray.png") + btnImgUrl: imgPath + (containsMouse ? "Window/about_white.png" : "Window/about_gray.png") onClicked: { aboutDialog.show() } } } + property alias blankItem: blankItem + Item { + id: blankItem + anchors { + left: parent.left + right: toolRow.left + top: parent.top + bottom: parent.bottom + } + Component.onCompleted: { + view.setTitleItem(blankItem) + } + } } diff --git a/examples/TaoQuickShow/Qml/main.qml b/examples/TaoQuickShow/Qml/main.qml index d8a5f5b..2d6c753 100644 --- a/examples/TaoQuickShow/Qml/main.qml +++ b/examples/TaoQuickShow/Qml/main.qml @@ -2,58 +2,52 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 import QtGraphicalEffects 1.0 import TaoQuick 1.0 +import "./Page" -Rectangle { - id: rootView +Item { + id: rootItem width: 1440 height: 900 - color: "lightblue" -// Component.onCompleted: { -// appInfo.splashShow = false; -// } -// Splash { -// id: splash -// anchors.centerIn: parent -// } -// Loader { -// id: loader -// source: "MainPage.qml" -// asynchronous: true -// opacity: 0 -// anchors{ -// fill: parent -// margins: 2 -// } -// Behavior on opacity { -// NumberAnimation { duration: 800 } -// } -// onLoaded: { -// timer.start() -// } -// } -// Timer { -// id: timer -// interval: 800 -// repeat: false -// triggeredOnStart: false -// onTriggered: { -// loader.opacity = 1 -// splash.visible = false -// } -// } - CusButton_Blue { - text: "hello" - x: 80 - y: 200 - width: 120 - height: 30 + ContentData { + id: gConfig } - TFPS { - y: 10 - x: 10 + + TitlePage { + id: title + width: parent.width + height: 60 + color: gConfig.themeColor } - CusButton_Blue { - anchors.centerIn: parent - text: qsTr("Chinese") + Rectangle { + id: content + width: parent.width + anchors { + top: title.bottom + bottom: parent.bottom + } + color: gConfig.background + TFPS { + anchors { + right: parent.right + top: parent.top + } + } + CusButton_Blue { + text: qsTr("hello") + x: 80 + y: 200 + width: 120 + height: 30 + } + CusButton_Blue { + anchors.centerIn: parent + text: qsTr("Chinese") + } + } + + DropShadow { + source: rootItem + radius: 8 + color: "#007acc" } } diff --git a/examples/TaoQuickShow/Src/ComponentsManager.cpp b/examples/TaoQuickShow/Src/ComponentsManager.cpp index 928ced6..7d017a0 100644 --- a/examples/TaoQuickShow/Src/ComponentsManager.cpp +++ b/examples/TaoQuickShow/Src/ComponentsManager.cpp @@ -35,7 +35,7 @@ void ComponentsMgr::loadFolder(const QString& folder) #else comps.push_back("qrc" + subInfo.absoluteFilePath()); #endif - qWarning() << "comp" << comps.back(); +// qWarning() << "comp" << comps.back(); compNames.push_back(subInfo.fileName()); } module["comps"] = QJsonArray::fromStringList(comps); diff --git a/examples/TaoQuickShow/Src/TaoView.cpp b/examples/TaoQuickShow/Src/TaoFrameLessView.cpp similarity index 74% rename from examples/TaoQuickShow/Src/TaoView.cpp rename to examples/TaoQuickShow/Src/TaoFrameLessView.cpp index 2cc7ab5..164c2c8 100644 --- a/examples/TaoQuickShow/Src/TaoView.cpp +++ b/examples/TaoQuickShow/Src/TaoFrameLessView.cpp @@ -1,4 +1,4 @@ -#include "TaoView.h" +#include "TaoFrameLessView.h" #include #include @@ -54,26 +54,32 @@ static bool isFullWin(QQuickView *win) return win->windowState() == Qt::WindowFullScreen; } -TaoView::TaoView(QWindow *parent) +TaoFrameLessView::TaoFrameLessView(QWindow *parent) : QQuickView(parent) { - setFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinMaxButtonsHint); + setFlags(Qt::CustomizeWindowHint | Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinMaxButtonsHint | Qt::WindowTitleHint); setResizeMode(SizeRootObjectToView); setColor(QColor(Qt::transparent)); - setMinimumSize({1440, 960}); + setMinimumSize({1024, 700}); resize(1440, 960); + + //WS_THICKFRAME 带回Areo效果 #if WIN32 DWORD style = ::GetWindowLong(HWND(winId()), GWL_STYLE); - style |= WS_MINIMIZEBOX | WS_THICKFRAME | WS_CAPTION; + style |= WS_THICKFRAME; ::SetWindowLong(HWND(winId()), GWL_STYLE, style); #endif + setIsMax(isMaxWin(this)); connect(this, &QWindow::windowStateChanged, this, [&](Qt::WindowState state) { setIsMax(state == Qt::WindowMaximized); }); } -TaoView::~TaoView() {} - -void TaoView::moveToScreenCenter() +TaoFrameLessView::~TaoFrameLessView() {} +void TaoFrameLessView::setTitleItem(QQuickItem *item) +{ + m_titleItem = item; +} +void TaoFrameLessView::moveToScreenCenter() { auto geo = screen()->availableGeometry(); int w = width(); @@ -83,7 +89,7 @@ void TaoView::moveToScreenCenter() update(); } -void TaoView::setIsMax(bool isMax) +void TaoFrameLessView::setIsMax(bool isMax) { if (m_isMax == isMax) return; @@ -97,7 +103,7 @@ const long border_width = 6; #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) bool TaoView::nativeEvent(const QByteArray &eventType, void *message, qintptr *result) #else -bool TaoView::nativeEvent(const QByteArray &eventType, void *message, long *result) +bool TaoFrameLessView::nativeEvent(const QByteArray &eventType, void *message, long *result) #endif { if (!result) { @@ -113,16 +119,17 @@ bool TaoView::nativeEvent(const QByteArray &eventType, void *message, long *resu *result = mode ? WVR_REDRAW : 0; const auto clientRect = mode ? &(reinterpret_cast(msg->lParam)->rgrc[0]) : reinterpret_cast(msg->lParam); + //规避 拖动border进行resize时界面闪烁 if (!isMaxWin(this) && !isFullWin(this)) { if (clientRect->top != 0) + { clientRect->top -= 1; - } else if (IsMaximized(HWND(winId()))) { - const int bw = ::GetSystemMetrics(SM_CXSIZEFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER); - const int bh = ::GetSystemMetrics(SM_CYSIZEFRAME) + ::GetSystemMetrics(SM_CXPADDEDBORDER); - clientRect->top += bh; - clientRect->bottom -= bh; - clientRect->left += bw; - clientRect->right -= bw; + } + } else { + if (clientRect->top != 0) + { + clientRect->top += 1; + } } return true; } @@ -142,12 +149,18 @@ bool TaoView::nativeEvent(const QByteArray &eventType, void *message, long *resu return true; } } - double dpr = qApp->devicePixelRatio(); - QPoint pos = mapFromGlobal(QPoint(x / dpr, y / dpr)); - QRect titleRect(border_width, border_width, width() * 0.8, 50); - if (titleRect.contains(pos)) { - *result = HTCAPTION; - return true; + + if (m_titleItem) + { + auto titlePos = m_titleItem->mapToGlobal(m_titleItem->position()); + titlePos = mapFromGlobal(titlePos.toPoint()); + auto titleRect = QRect(titlePos.x(), titlePos.y(), m_titleItem->width(), m_titleItem->height()); + double dpr = qApp->devicePixelRatio(); + QPoint pos = mapFromGlobal(QPoint(x / dpr, y / dpr)); + if (titleRect.contains(pos)) { + *result = HTCAPTION; + return true; + } } return false; } //end case WM_NCHITTEST diff --git a/examples/TaoQuickShow/Src/TaoView.h b/examples/TaoQuickShow/Src/TaoFrameLessView.h similarity index 71% rename from examples/TaoQuickShow/Src/TaoView.h rename to examples/TaoQuickShow/Src/TaoFrameLessView.h index 5081629..7d4ffc6 100644 --- a/examples/TaoQuickShow/Src/TaoView.h +++ b/examples/TaoQuickShow/Src/TaoFrameLessView.h @@ -2,23 +2,26 @@ #include //无边框窗口,支持拖动和改变大小,支持Windows平台Aero效果 -class TaoView : public QQuickView +class TaoFrameLessView : public QQuickView { Q_OBJECT using Super = QQuickView; Q_PROPERTY(bool isMax READ isMax NOTIFY isMaxChanged) public: - explicit TaoView(QWindow *parent = nullptr); - ~TaoView(); + explicit TaoFrameLessView(QWindow *parent = nullptr); + ~TaoFrameLessView(); void moveToScreenCenter(); bool isMax() const { return m_isMax; } - + QQuickItem *titleItem() const + { + return m_titleItem; + } public slots: void setIsMax(bool isMax); - + void setTitleItem(QQuickItem *item); signals: void isMaxChanged(bool isMax); @@ -33,5 +36,6 @@ protected: #endif private: bool m_isMax; + QQuickItem *m_titleItem = nullptr; }; diff --git a/examples/TaoQuickShow/Src/main.cpp b/examples/TaoQuickShow/Src/main.cpp index 3a5a760..f3826b8 100644 --- a/examples/TaoQuickShow/Src/main.cpp +++ b/examples/TaoQuickShow/Src/main.cpp @@ -1,4 +1,4 @@ -#include "TaoView.h" +#include "TaoFrameLessView.h" #include "AppInfo.h" #include "ComponentsManager.h" @@ -22,11 +22,15 @@ int main(int argc, char** argv) { prepareApp(); QGuiApplication app(argc, argv); +#ifdef TAODEBUG + qSetMessagePattern("[%{time h:mm:ss.zzz} %{file} row(%{line}) %{function}] %{message}"); +#else Logger::initLog(); +#endif const auto appPath = QDir::cleanPath(app.applicationDirPath()); qWarning() << "appPath" << appPath; - TaoView view; + TaoFrameLessView view; TaoFramework::instance()->setMainView(&view); TaoFramework::instance()->createObject(); @@ -39,7 +43,7 @@ int main(int argc, char** argv) view.engine()->addImportPath(qmlPath); #ifdef TaoQuickImportPath view.engine()->addImportPath(TaoQuickImportPath); - qWarning() << TaoQuickImportPath; + qWarning() << "TaoQuickImportPath " << TaoQuickImportPath; #endif #ifdef TaoQuickImagePath diff --git a/examples/TaoQuickShow/TaoQuickShow.pri b/examples/TaoQuickShow/TaoQuickShow.pri index dc5221a..f9921e6 100644 --- a/examples/TaoQuickShow/TaoQuickShow.pri +++ b/examples/TaoQuickShow/TaoQuickShow.pri @@ -7,16 +7,16 @@ msvc | gcc | xcode { } HEADERS += \ + $$PWD/Src/TaoFrameLessView.h \ $$PWD/Src/TaoObject.h \ $$PWD/Src/TaoFramework.h \ - $$PWD/Src/TaoView.h \ $$PWD/Src/Trans.h \ $$PWD/Src/AppInfo.h \ $$PWD/Src/ComponentsManager.h SOURCES += \ + $$PWD/Src/TaoFrameLessView.cpp \ $$PWD/Src/TaoFramework.cpp \ - $$PWD/Src/TaoView.cpp \ $$PWD/Src/Trans.cpp \ $$PWD/Src/AppInfo.cpp \ $$PWD/Src/ComponentsManager.cpp \ @@ -40,7 +40,7 @@ CONFIG(debug, debug|release) { } !android:!ios { - trans.files = $$files($$_PRO_FILE_PWD_/Trans/language_*.json) + trans.file = $$_PRO_FILE_PWD_/Trans trans.path = $$DESTDIR/Trans COPIES += trans } diff --git a/examples/TaoQuickShow/TaoQuickShow.pro b/examples/TaoQuickShow/TaoQuickShow.pro index 80c302a..cf2c4fa 100644 --- a/examples/TaoQuickShow/TaoQuickShow.pro +++ b/examples/TaoQuickShow/TaoQuickShow.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = TaoQuickApp -QT += qml quick +QT += core gui qml quick CONFIG += c++17 qtquickcompiler utf8_source @@ -11,8 +11,8 @@ setTaoVersion() load(taoBundle) BundlePath = $$getBundlePath("TaoQuickApp") -load(taoBuildPath) -setBuildPath($${TaoQuick_BUILD_TREE}/$${TARGET}) +#load(taoBuildPath) +#setBuildPath($${TaoQuick_BUILD_TREE}/$${TARGET}) CONFIG(debug,debug|release) { DESTDIR = $${TaoQuick_RUN_TREE}/debug diff --git a/src/TaoQuick/imports/TaoQuick/Qml/CusButton/CusButton.qml b/src/TaoQuick/imports/TaoQuick/Qml/CusButton/CusButton.qml index 315a6e5..fe0f1d4 100644 --- a/src/TaoQuick/imports/TaoQuick/Qml/CusButton/CusButton.qml +++ b/src/TaoQuick/imports/TaoQuick/Qml/CusButton/CusButton.qml @@ -12,6 +12,8 @@ Button { property alias tipDelay: toolTip.delay property alias tipTimeout: toolTip.timeout + property bool containsMouse: hovered + property bool containsPressed: pressed property color backgroundColorNormal property color backgroundColorHovered property color backgroundColorPressed diff --git a/src/TaoQuick/imports/TaoQuick/Qml/CusButton/CusButton_Image.qml b/src/TaoQuick/imports/TaoQuick/Qml/CusButton/CusButton_Image.qml index ae3a757..4cd53f0 100644 --- a/src/TaoQuick/imports/TaoQuick/Qml/CusButton/CusButton_Image.qml +++ b/src/TaoQuick/imports/TaoQuick/Qml/CusButton/CusButton_Image.qml @@ -12,14 +12,15 @@ Button { property alias tipVisible: toolTip.visible property alias tipDelay: toolTip.delay property alias tipTimeout: toolTip.timeout - + property bool containsMouse: hovered + property bool containsPressed: pressed property string btnImgNormal property string btnImgHovered property string btnImgPressed property string btnImgDisbaled - property string btnImgUr: { + property string btnImgUrl: { if (!cusButtonImage.enabled) { return btnImgDisbaled } else if (cusButtonImage.pressed) { @@ -38,7 +39,7 @@ Button { } background: Image { id: backImage - source: btnImgUr + source: btnImgUrl width: sourceSize.width height: sourceSize.height }