From 0316cac88c5dcb60f34980c48669443eb72a590f Mon Sep 17 00:00:00 2001 From: jared Date: Thu, 31 Mar 2022 22:51:15 +0800 Subject: [PATCH] update path --- .../TaoQuickShow/Contents/General/Shapes.qml | 34 +++++++++---------- .../Contents/ShapeGallery/ShapeCapStyles.qml | 2 ++ .../Contents/ShapeGallery/ShapeCircle.qml | 3 +- .../ShapeGallery/ShapeCubicBezier.qml | 2 ++ .../Contents/ShapeGallery/ShapeEllipse.qml | 3 +- .../Contents/ShapeGallery/ShapeJoinStyles.qml | 2 ++ .../ShapeGallery/ShapeQuadraticBezier.qml | 2 ++ .../Contents/ShapeGallery/ShapeRectrangle.qml | 2 ++ .../Contents/ShapeGallery/ShapeTriangle.qml | 2 ++ examples/TaoQuickShow/Qml/Pane/LeftPane.qml | 1 + examples/TaoQuickShow/Qml/Pane/RightPane.qml | 2 ++ examples/TaoQuickShow/Qml/main.qml | 1 + examples/TaoQuickShow/Src/main.cpp | 7 ++++ examples/TaoQuickShow/taoMacro.h | 12 +++---- src/TaoQuick/TaoQuick.qrc | 20 +++++------ src/TaoQuick/qmldir | 14 ++++---- 16 files changed, 67 insertions(+), 42 deletions(-) diff --git a/examples/TaoQuickShow/Contents/General/Shapes.qml b/examples/TaoQuickShow/Contents/General/Shapes.qml index 9f78fe1..2a84e76 100644 --- a/examples/TaoQuickShow/Contents/General/Shapes.qml +++ b/examples/TaoQuickShow/Contents/General/Shapes.qml @@ -1,3 +1,4 @@ +import QtQml 2.0 import QtQuick 2.9 import QtQuick.Shapes 1.0 @@ -47,6 +48,22 @@ Rectangle { property int gridSpacing: 10 + Rectangle { + anchors.fill: parent + anchors.margins: 10 + color: "transparent" + clip: true + + GridView { + id: grid + anchors.fill: parent + anchors.margins: root.gridSpacing + cellWidth: 300 + cellHeight: 300 + delegate: pathGalleryDelegate + model: pathGalleryModel + } + } Component { id: pathGalleryDelegate Rectangle { @@ -73,21 +90,4 @@ Rectangle { } } } - - Rectangle { - anchors.fill: parent - anchors.margins: 10 - color: "transparent" - clip: true - - GridView { - id: grid - anchors.fill: parent - anchors.margins: root.gridSpacing - cellWidth: 300 - cellHeight: 300 - delegate: pathGalleryDelegate - model: pathGalleryModel - } - } } diff --git a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCapStyles.qml b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCapStyles.qml index e402566..a8dbe04 100644 --- a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCapStyles.qml +++ b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCapStyles.qml @@ -1,4 +1,6 @@ +import QtQml 2.0 import QtQuick 2.12 +import QtQuick.Controls 2.12 import QtQuick.Shapes 1.12 Rectangle { diff --git a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCircle.qml b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCircle.qml index b92d8ab..1bdded6 100644 --- a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCircle.qml +++ b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCircle.qml @@ -1,4 +1,6 @@ +import QtQml 2.0 import QtQuick 2.12 +import QtQuick.Controls 2.12 import QtQuick.Shapes 1.12 @@ -6,7 +8,6 @@ Rectangle { width: 120 height: 120 color: th.pressed ? "steelBlue" : "lightGray" - containmentMask: ctr TapHandler { id: th } diff --git a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCubicBezier.qml b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCubicBezier.qml index 10a50a5..95cc97b 100644 --- a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCubicBezier.qml +++ b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeCubicBezier.qml @@ -1,4 +1,6 @@ +import QtQml 2.12 import QtQuick 2.12 +import QtQuick.Controls 2.12 import QtQuick.Shapes 1.12 diff --git a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeEllipse.qml b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeEllipse.qml index c8ea3f3..706231c 100644 --- a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeEllipse.qml +++ b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeEllipse.qml @@ -1,4 +1,6 @@ +import QtQml 2.12 import QtQuick 2.12 +import QtQuick.Controls 2.12 import QtQuick.Shapes 1.12 @@ -6,7 +8,6 @@ Rectangle { width: 120 height: 120 color: th.pressed ? "steelBlue" : "lightGray" - containmentMask: ctr TapHandler { id: th } diff --git a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeJoinStyles.qml b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeJoinStyles.qml index 45e1c43..b70d838 100644 --- a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeJoinStyles.qml +++ b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeJoinStyles.qml @@ -1,4 +1,6 @@ +import QtQml 2.12 import QtQuick 2.12 +import QtQuick.Controls 2.12 import QtQuick.Shapes 1.12 diff --git a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeQuadraticBezier.qml b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeQuadraticBezier.qml index 0412f6a..33141d2 100644 --- a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeQuadraticBezier.qml +++ b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeQuadraticBezier.qml @@ -1,4 +1,6 @@ +import QtQml 2.12 import QtQuick 2.12 +import QtQuick.Controls 2.12 import QtQuick.Shapes 1.12 diff --git a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeRectrangle.qml b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeRectrangle.qml index 56ad8d1..22d4370 100644 --- a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeRectrangle.qml +++ b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeRectrangle.qml @@ -1,4 +1,6 @@ +import QtQml 2.12 import QtQuick 2.12 +import QtQuick.Controls 2.12 import QtQuick.Shapes 1.12 diff --git a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeTriangle.qml b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeTriangle.qml index f548ffa..2b1687b 100644 --- a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeTriangle.qml +++ b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeTriangle.qml @@ -1,4 +1,6 @@ +import QtQml 2.12 import QtQuick 2.12 +import QtQuick.Controls 2.12 import QtQuick.Shapes 1.12 diff --git a/examples/TaoQuickShow/Qml/Pane/LeftPane.qml b/examples/TaoQuickShow/Qml/Pane/LeftPane.qml index c8663ff..0be326a 100644 --- a/examples/TaoQuickShow/Qml/Pane/LeftPane.qml +++ b/examples/TaoQuickShow/Qml/Pane/LeftPane.qml @@ -1,3 +1,4 @@ +import QtQml 2.0 import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 diff --git a/examples/TaoQuickShow/Qml/Pane/RightPane.qml b/examples/TaoQuickShow/Qml/Pane/RightPane.qml index 600c8ef..8ffad74 100644 --- a/examples/TaoQuickShow/Qml/Pane/RightPane.qml +++ b/examples/TaoQuickShow/Qml/Pane/RightPane.qml @@ -1,3 +1,4 @@ +import QtQml 2.0 import QtQuick 2.9 import QtQuick.Controls 2.2 import TaoQuick 1.0 @@ -35,6 +36,7 @@ Loader { btnImgNormal: imgPath + "Common/view.png" tipText: qsTr("View Source Code") + trans.transString onClicked: { + console.log("source", source) Qt.openUrlExternally(source) } } diff --git a/examples/TaoQuickShow/Qml/main.qml b/examples/TaoQuickShow/Qml/main.qml index c4bfcdb..2e081d1 100644 --- a/examples/TaoQuickShow/Qml/main.qml +++ b/examples/TaoQuickShow/Qml/main.qml @@ -1,4 +1,5 @@ import QtQuick 2.9 +import QtQml 2.0 import QtQuick.Controls 2.2 import TaoQuick 1.0 import "./Page" diff --git a/examples/TaoQuickShow/Src/main.cpp b/examples/TaoQuickShow/Src/main.cpp index cb59bc3..870e7a6 100644 --- a/examples/TaoQuickShow/Src/main.cpp +++ b/examples/TaoQuickShow/Src/main.cpp @@ -68,6 +68,13 @@ int main(int argc, char **argv) view.rootContext()->setContextProperty("isDebug", QVariant(false)); #endif + +#if QT_VERSION > QT_VERSION_CHECK(5, 10, 0) + view.rootContext()->setContextProperty("hasShape", true); +#else + view.rootContext()->setContextProperty("hasShape", false); +#endif + view.rootContext()->setContextProperty("qmlPath", qmlPath); view.rootContext()->setContextProperty("imgPath", imgPath); view.rootContext()->setContextProperty("contentsPath", contentsPath); diff --git a/examples/TaoQuickShow/taoMacro.h b/examples/TaoQuickShow/taoMacro.h index 12e94f0..b75c2f1 100644 --- a/examples/TaoQuickShow/taoMacro.h +++ b/examples/TaoQuickShow/taoMacro.h @@ -1,7 +1,7 @@ #pragma once -#define TaoQuickImport "file:///E:/00github/TaoQuick/src" -#define TaoQuickImage "file:///E:/00github/TaoQuick/src/TaoQuick/Images/" -#define qmlPath "file:///E:/00github/TaoQuick/examples/TaoQuickShow/Qml/" -#define contentsPath "file:///E:/00github/TaoQuick/examples/TaoQuickShow/Contents/" -#define imgPath "file:///E:/00github/TaoQuick/examples/TaoQuickShow/Image/" -#define transDir "E:/00github/TaoQuick/examples/TaoQuickShow/Trans/" +#define TaoQuickImport "file:///E:/Dev/Tao/TaoQuick/src" +#define TaoQuickImage "file:///E:/Dev/Tao/TaoQuick/src/TaoQuick/Images/" +#define qmlPath "file:///E:/Dev/Tao/TaoQuick/examples/TaoQuickShow/Qml/" +#define contentsPath "file:///E:/Dev/Tao/TaoQuick/examples/TaoQuickShow/Contents/" +#define imgPath "file:///E:/Dev/Tao/TaoQuick/examples/TaoQuickShow/Image/" +#define transDir "E:/Dev/Tao/TaoQuick/examples/TaoQuickShow/Trans/" diff --git a/src/TaoQuick/TaoQuick.qrc b/src/TaoQuick/TaoQuick.qrc index 9bca328..b742e86 100644 --- a/src/TaoQuick/TaoQuick.qrc +++ b/src/TaoQuick/TaoQuick.qrc @@ -1,4 +1,4 @@ - + qmldir Qml/CusConfig.qml @@ -10,6 +10,7 @@ Qml/Basic/RoundRectangleShape.qml Qml/Basic/TransArea.qml Qml/CusBackground/CusBackground.qml + Qml/CusButton/CusButton.qml Qml/CusButton/CusButton_Blue.qml Qml/CusButton/CusButton_Gradient.qml Qml/CusButton/CusButton_Image.qml @@ -17,33 +18,32 @@ Qml/CusButton/CusButton_ImageColorOverlay.qml Qml/CusButton/CusButton_Red.qml Qml/CusButton/CusButton_White.qml - Qml/CusButton/CusButton.qml Qml/CusButton/CusRadioButton.qml Qml/CusButton/CusTextButton.qml Qml/CusCheckBox/CusCheckBox.qml Qml/CusCheckBox/CusSwitch.qml Qml/CusComboBox/CusComboBox.qml - Qml/CusImage/CusImage_Tip.qml Qml/CusImage/CusImage.qml Qml/CusImage/CusImageOverlay.qml + Qml/CusImage/CusImage_Tip.qml Qml/CusInput/CusIPAddress.qml + Qml/CusInput/CusTextField.qml Qml/CusInput/CusTextField_Btn.qml Qml/CusInput/CusTextField_Search.qml Qml/CusInput/CusTextField_Valid.qml - Qml/CusInput/CusTextField.qml Qml/CusInput/CusTextInput.qml + Qml/CusLabel/CusLabel.qml Qml/CusLabel/CusLabel_Center.qml Qml/CusLabel/CusLabel_Left.qml - Qml/CusLabel/CusLabel.qml Qml/CusListView/CusListView.qml Qml/CusPopup/CusPopup.qml Qml/CusPopup/CusToolTip_Triangle.qml Qml/CusPopup/CusTriangleTipBorder.qml Qml/CusScroll/CusScrollBar.qml - Qml/CusSlider/CusSlider_Spin.qml Qml/CusSlider/CusSlider.qml - Qml/CusSpinBox/CusSpinBox_HourMinute.qml + Qml/CusSlider/CusSlider_Spin.qml Qml/CusSpinBox/CusSpinBox.qml + Qml/CusSpinBox/CusSpinBox_HourMinute.qml Qml/CusTable/CusTableConstant.qml Qml/CusTable/CusTableHeader.qml Qml/CusTable/CusTableRow.qml @@ -106,12 +106,12 @@ Images/particle.png Images/right.png Images/rotate.png - Images/Search_Clear.png Images/Search.png + Images/Search_Clear.png Images/spinner.png - Images/Table_Asc_Hovered.png Images/Table_Asc.png - Images/Table_Desc_Hovered.png + Images/Table_Asc_Hovered.png Images/Table_Desc.png + Images/Table_Desc_Hovered.png diff --git a/src/TaoQuick/qmldir b/src/TaoQuick/qmldir index ccf09b9..80a166c 100644 --- a/src/TaoQuick/qmldir +++ b/src/TaoQuick/qmldir @@ -1,4 +1,4 @@ -module TaoQuick +module TaoQuick BasicText 1.0 Qml/Basic/BasicText.qml BasicTooltip 1.0 Qml/Basic/BasicTooltip.qml CusCallLater 1.0 Qml/Basic/CusCallLater.qml @@ -7,6 +7,7 @@ RoundRectangle 1.0 Qml/Basic/RoundRectangle.qml RoundRectangleShape 1.0 Qml/Basic/RoundRectangleShape.qml TransArea 1.0 Qml/Basic/TransArea.qml CusBackground 1.0 Qml/CusBackground/CusBackground.qml +CusButton 1.0 Qml/CusButton/CusButton.qml CusButton_Blue 1.0 Qml/CusButton/CusButton_Blue.qml CusButton_Gradient 1.0 Qml/CusButton/CusButton_Gradient.qml CusButton_Image 1.0 Qml/CusButton/CusButton_Image.qml @@ -14,33 +15,32 @@ CusButton_ImageBackground 1.0 Qml/CusButton/CusButton_ImageBackground.qml CusButton_ImageColorOverlay 1.0 Qml/CusButton/CusButton_ImageColorOverlay.qml CusButton_Red 1.0 Qml/CusButton/CusButton_Red.qml CusButton_White 1.0 Qml/CusButton/CusButton_White.qml -CusButton 1.0 Qml/CusButton/CusButton.qml CusRadioButton 1.0 Qml/CusButton/CusRadioButton.qml CusTextButton 1.0 Qml/CusButton/CusTextButton.qml CusCheckBox 1.0 Qml/CusCheckBox/CusCheckBox.qml CusSwitch 1.0 Qml/CusCheckBox/CusSwitch.qml CusComboBox 1.0 Qml/CusComboBox/CusComboBox.qml -CusImage_Tip 1.0 Qml/CusImage/CusImage_Tip.qml CusImage 1.0 Qml/CusImage/CusImage.qml CusImageOverlay 1.0 Qml/CusImage/CusImageOverlay.qml +CusImage_Tip 1.0 Qml/CusImage/CusImage_Tip.qml CusIPAddress 1.0 Qml/CusInput/CusIPAddress.qml +CusTextField 1.0 Qml/CusInput/CusTextField.qml CusTextField_Btn 1.0 Qml/CusInput/CusTextField_Btn.qml CusTextField_Search 1.0 Qml/CusInput/CusTextField_Search.qml CusTextField_Valid 1.0 Qml/CusInput/CusTextField_Valid.qml -CusTextField 1.0 Qml/CusInput/CusTextField.qml CusTextInput 1.0 Qml/CusInput/CusTextInput.qml +CusLabel 1.0 Qml/CusLabel/CusLabel.qml CusLabel_Center 1.0 Qml/CusLabel/CusLabel_Center.qml CusLabel_Left 1.0 Qml/CusLabel/CusLabel_Left.qml -CusLabel 1.0 Qml/CusLabel/CusLabel.qml CusListView 1.0 Qml/CusListView/CusListView.qml CusPopup 1.0 Qml/CusPopup/CusPopup.qml CusToolTip_Triangle 1.0 Qml/CusPopup/CusToolTip_Triangle.qml CusTriangleTipBorder 1.0 Qml/CusPopup/CusTriangleTipBorder.qml CusScrollBar 1.0 Qml/CusScroll/CusScrollBar.qml -CusSlider_Spin 1.0 Qml/CusSlider/CusSlider_Spin.qml CusSlider 1.0 Qml/CusSlider/CusSlider.qml -CusSpinBox_HourMinute 1.0 Qml/CusSpinBox/CusSpinBox_HourMinute.qml +CusSlider_Spin 1.0 Qml/CusSlider/CusSlider_Spin.qml CusSpinBox 1.0 Qml/CusSpinBox/CusSpinBox.qml +CusSpinBox_HourMinute 1.0 Qml/CusSpinBox/CusSpinBox_HourMinute.qml singleton CusTableConstant 1.0 Qml/CusTable/CusTableConstant.qml CusTableHeader 1.0 Qml/CusTable/CusTableHeader.qml CusTableRow 1.0 Qml/CusTable/CusTableRow.qml