1
0
mirror of https://github.com/jaredtao/TaoQuick.git synced 2025-01-31 21:22:58 +08:00

update folder

This commit is contained in:
jared 2020-10-14 13:47:57 +08:00
parent 133fdbf0c3
commit df7fa7b768
21 changed files with 45 additions and 176 deletions

View File

@ -5,20 +5,16 @@
<file>Qml/Page/ContentPage.qml</file> <file>Qml/Page/ContentPage.qml</file>
<file>Qml/Page/TitlePage.qml</file> <file>Qml/Page/TitlePage.qml</file>
<file>Qml/Page/NotifyBox.qml</file> <file>Qml/Page/NotifyBox.qml</file>
<file>Qml/Splash.qml</file>
<file>Qml/MainPage.qml</file>
<file>Qml/Page/ContentData.qml</file> <file>Qml/Page/ContentData.qml</file>
<file>Qml/Page/AboutDialog.qml</file> <file>Qml/Page/AboutDialog.qml</file>
<file>Qml/Page/Biz/Background.qml</file> <file>Qml/Biz/BackBtn.qml</file>
<file>Qml/Page/Biz/LangBtn.qml</file> <file>Qml/Biz/CircleText.qml</file>
<file>Qml/Page/Biz/SkinBtn.qml</file> <file>Qml/Biz/CloseBtn.qml</file>
<file>Qml/TBusyIndicator.qml</file> <file>Qml/Biz/CompBtn.qml</file>
<file>Qml/Page/Biz/CompDetail.qml</file> <file>Qml/Biz/CompCard.qml</file>
<file>Qml/Page/Biz/CompCard.qml</file> <file>Qml/Biz/CompDetail.qml</file>
<file>Qml/Page/Biz/TText.qml</file> <file>Qml/Biz/LangBtn.qml</file>
<file>Qml/Page/Biz/CircleText.qml</file> <file>Qml/Biz/SkinBtn.qml</file>
<file>Qml/Page/Biz/CloseBtn.qml</file> <file>Qml/Biz/TText.qml</file>
<file>Qml/Page/Biz/CompBtn.qml</file>
<file>Qml/Page/Biz/BackBtn.qml</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -0,0 +1,10 @@
import QtQuick 2.9
import TaoQuick 1.0
CusButton_Image {
width: 48
height: 48
btnImgUrl: imgPath + (containsMouse ? "Common/left_hovered.png" : "Common/left.png")
}

View File

@ -3,11 +3,9 @@ import QtQuick 2.9
import TaoQuick 1.0 import TaoQuick 1.0
TTextBtn { CusButton {
id: root id: root
textColor: gConfig.textColor textColor: gConfig.textColor
textItem.font.pixelSize: gConfig.fontPixel
textItem.font.family: gConfig.fontFamily
Image { Image {
anchors { anchors {

View File

@ -26,6 +26,7 @@ CusButton_Image {
text: qsTr(modelData) text: qsTr(modelData)
backgroundColor: trans.currentLang === modelData ? gConfig.themeColor :( containsMouse ? "lightgray" : pop.barColor) backgroundColor: trans.currentLang === modelData ? gConfig.themeColor :( containsMouse ? "lightgray" : pop.barColor)
textColor: gConfig.textColor textColor: gConfig.textColor
borderWidth: 0
radius: 4 radius: 4
onClicked: { onClicked: {
// pop.hide() // pop.hide()

View File

@ -1,6 +1,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
Text { import TaoQuick 1.0
BasicText {
font { font {
pixelSize: gConfig.fontPixel pixelSize: gConfig.fontPixel
family: gConfig.fontFamily family: gConfig.fontFamily

View File

@ -1,35 +0,0 @@
import QtQuick 2.9
import "./Page"
import TaoQuick 1.0
Item {
anchors.fill: parent
ContentData {
id: gConfig
objectName: "gConfig"
}
AboutDialog {
id: aboutDialog
}
TitlePage {
id: titlePage
width: rootView.width
height: 60
color: gConfig.themeColor
}
ContentPage {
id: contentPage
color: gConfig.background
anchors {
top: titlePage.bottom
bottom: parent.bottom
left: titlePage.left
right: titlePage.right
}
}
NotifyBox {
id: notifyBox
}
}

View File

@ -17,9 +17,13 @@ Popup {
color: gConfig.themeColor color: gConfig.themeColor
border.width: 1 border.width: 1
border.color: gConfig.reserverColor border.color: gConfig.reserverColor
TMoveArea { MoveArea {
anchors.fill: parent anchors.fill: parent
control: root control: root
onMove: {
root.x += xOffset
root.y += yOffset
}
} }
Image { Image {
id: img id: img
@ -28,13 +32,13 @@ Popup {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
source: imgPath + "logo/milk.png" source: imgPath + "logo/milk.png"
} }
TTextBtn { CusButton {
id: closeBtn id: closeBtn
text: qsTr("Close") text: qsTr("Close")
width: 80 width: 80
height: 38 height: 38
radius: 8 radius: 8
color: containsPress ? Qt.darker(gConfig.background, 1.2) : (containsMouse ? Qt.lighter(gConfig.background, 1.2) : gConfig.background) backgroundColor: containsPress ? Qt.darker(gConfig.background, 1.2) : (containsMouse ? Qt.lighter(gConfig.background, 1.2) : gConfig.background)
textColor: gConfig.textColor textColor: gConfig.textColor
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom anchors.bottom: parent.bottom

View File

@ -1,10 +0,0 @@
import QtQuick 2.9
import TaoQuick 1.0
TImageBtn {
width: 48
height: 48
imageUrl: imgPath + (containsMouse ? "Common/left_hovered.png" : "Common/left.png")
}

View File

@ -1,8 +0,0 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
import TaoQuick 1.0
Rectangle {
id: root
}

View File

@ -2,7 +2,7 @@ import QtQuick 2.9
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import TaoQuick 1.0 import TaoQuick 1.0
import "Biz" import "../Biz"
Background { Background {
id: background id: background
readonly property string defaultTitle: "Component List" readonly property string defaultTitle: "Component List"

View File

@ -1,7 +1,7 @@
import QtQuick 2.9 import QtQuick 2.9
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import TaoQuick 1.0 import TaoQuick 1.0
import "./Biz" import "../Biz"
Rectangle { Rectangle {
Row { Row {
anchors.left: parent.left anchors.left: parent.left

View File

@ -1,18 +0,0 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
Item {
width: 1024
height: 768
opacity: 1.0
Behavior on opacity {
NumberAnimation { duration: 500 }
}
TBusyIndicator {
id: control
running: true
anchors.centerIn: parent
width: 160
height: 160
durationPerCycle: 2000
}
}

View File

@ -1,62 +0,0 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
BusyIndicator {
id: control
width: 64
height: 64
property color busyColor: "#008b8b"
property int busyRadius: 5
property int busyCount: 6
property int durationPerCycle: 1500
contentItem: Item {
width: control.width
height: control.height
Item {
id: item
width: parent.width
height: parent.height
opacity: control.running ? 1 : 0
Behavior on opacity {
OpacityAnimator {
duration: 250
}
}
RotationAnimator {
target: item
running: control.visible && control.running
from: 0
to: 360
loops: Animation.Infinite
duration: durationPerCycle
}
Repeater {
id: repeater
model: busyCount
Rectangle {
x: item.width / 2 - width / 2
y: item.height / 2 - height / 2
implicitWidth: busyRadius * 2
implicitHeight: busyRadius * 2
radius: busyRadius
color: busyColor
transform: [
Translate {
y: -Math.min(item.width, item.height) * 0.5 + busyRadius
},
Rotation {
angle: index / repeater.count * 360
origin.x: busyRadius
origin.y: busyRadius
}
]
}
}
}
}
}

View File

@ -1,6 +1,5 @@
import QtQuick 2.9 import QtQuick 2.9
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
import TaoQuick 1.0 import TaoQuick 1.0
import "./Page" import "./Page"
@ -8,16 +7,24 @@ Item {
id: rootItem id: rootItem
width: 1440 width: 1440
height: 900 height: 900
ContentData { ContentData {
id: gConfig id: gConfig
objectName: "gConfig"
}
AboutDialog {
id: aboutDialog
} }
TitlePage { TitlePage {
id: title id: title
width: parent.width width: parent.width
height: 60 height: 60
color: gConfig.themeColor color: gConfig.themeColor
} }
NotifyBox {
id: notifyBox
}
Rectangle { Rectangle {
id: content id: content
width: parent.width width: parent.width
@ -32,22 +39,5 @@ Item {
top: parent.top 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"
} }
} }

View File

@ -7,12 +7,14 @@ MouseArea {
property int lastX: 0 property int lastX: 0
property int lastY: 0 property int lastY: 0
property var control: parent //control parentxy property var control: parent //control parentxy
hoverEnabled: true
signal move(real xOffset, real yOffset) signal move(real xOffset, real yOffset)
onContainsPressChanged: { onContainsPressChanged: {
if (containsPress) { if (containsPress) {
cursorShape = Qt.SizeAllCursor
lastX = mouseX lastX = mouseX
lastY = mouseY lastY = mouseY
} else {
cursorShape = Qt.ArrowCursor
} }
} }
onPositionChanged: { onPositionChanged: {

View File

@ -13,7 +13,7 @@ Button {
property alias tipTimeout: toolTip.timeout property alias tipTimeout: toolTip.timeout
property bool containsMouse: hovered property bool containsMouse: hovered
property bool containsPressed: pressed property bool containsPress: pressed
property color backgroundColorNormal property color backgroundColorNormal
property color backgroundColorHovered property color backgroundColorHovered
property color backgroundColorPressed property color backgroundColorPressed