TG-PlatformPlus/qml/debug/gviewer/Explorer.qml

79 lines
2.1 KiB
QML
Raw Permalink Normal View History

2026-03-02 14:29:58 +08:00
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Dialogs
// import QtQuick.Controls.
import "./app.js" as App
import "./common"
import Qt.labs.folderlistmodel
Rectangle {
id: root
radius: 9
clip: true
Timer{
id: timerLogfilePath
interval: 1000
repeat: true
running: true
onTriggered: {
listModel.clear()
_G = common.getAllG()
var keys = Object.keys(_G);
for (var i = 0; i < keys.length; i++) {
listModel.append({"baseName": keys[i]})
}
}
}
ListModel {
id: listModel
}
GridView {
anchors.fill: parent
anchors.margins: 5 /* 增加边距 */
model: listModel
cellWidth: 588 /* 调整单元格宽度 */
cellHeight: 355 /* 调整单元格高度 */
delegate:
Rectangle {
width: 580
height: 345
color: "#f8f9fa" /* 柔和背景色 */
border.color: "#e9ecef" /* 浅灰色边框 */
border.width: 1
clip: true
Rectangle {
id: rectLine
width: parent.width
height: 1
color: "#dee2e6" /* 更浅的分隔线 */
anchors.top: parent.top
anchors.topMargin: 45
}
Text {
id: txtTitle
anchors.top: parent.top
anchors.topMargin: 12 /* 调整标题上边距 */
anchors.left: parent.left
anchors.leftMargin: 15 /* 增加左侧边距 */
text: baseName
font.family: "微软雅黑"
font.pointSize: 14 /* 增大字体 */
color: "#2d3436" /* 更深的文本色 */
}
ListPanels{
id: loaderData
anchors.top: rectLine.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
lsBaseName: baseName
}
}
}
}