You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.5 KiB

6 months ago
/******************************************************************
Copyright © Deng Zhimao Co., Ltd. 1990-2030. All rights reserved.
* @projectName photoview
* @brief Photoview.qml
* @author Deng Zhimao
* @email 1252699831@qq.com
* @date 2020-07-16
*******************************************************************/
import QtQuick 2.0
import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 2.5
import "../helpbutton"
Item {
property string currtenPhotoPath
visible: false
id: photoview
z: 20
HelpMessages {
anchors.fill: parent
z: 105
appIcon: WINStyle ? "" : "qrc:/desktop/androidstyleicons/album.png"
appName: "相册"
appVersion: "Version 1.0.0"
subtoolText: "1.
2.使"
versionText: "1.【Version 1.0.0 2020-10-15】。\n初始版本"
}
onVisibleChanged: {
formState.state == 'right' ? formState.state = '' : formState.state = 'right'
}
Component.onCompleted: {
photoview.x = parent.width
}
Item {
id: formState
states: State {
name: "right"
PropertyChanges {
target: photoview
x: 0
}
}
transitions: Transition {
NumberAnimation {
property: "x"
easing.type: Easing.InOutQuart
duration: 500
}
}
}
Rectangle {
id: bg
anchors.fill: parent
color: "#1f1e58"
}
Rectangle {
anchors.fill: parent
color: "transparent"
SwipeView {
id: photoSwipeView
anchors.fill: parent
interactive: false
orientation: ListView.Horizontal
Component.onCompleted: {
contentItem.highlightMoveDuration = 500
}
PhotoListView{}
DisplayPhoto{}
onCurrentIndexChanged : {
photoSwipeView.currentItem.visible = true
for (var i = 0; i < photoSwipeView.count; i++){
if (i !== photoSwipeView.currentIndex)
photoSwipeView.itemAt(i).visible = false
}
}
}
}
}