修改search界面布局,filelist添加隐藏head参数

main
shmily744 2023-07-04 13:38:01 +08:00
parent 8379c965b5
commit 78865cd93c
2 changed files with 16 additions and 12 deletions

View File

@ -8,17 +8,19 @@ Item {
signal search(string tag)
signal open(string file)
property bool disableHeader: false
ListView {
id: listView
anchors.fill: parent
spacing: 10
header: fileListItemHeader
header: disableHeader ? null :fileListItemHeader
model: fileListModel
delegate: fileListItemDelegate
Component.onCompleted: {
update()
}
}
Component {
id: fileListItemHeader
Item {

View File

@ -78,20 +78,20 @@ FluArea {
clicked()
}
onClicked:{
selectPDFAndWord.checked=true
selectVideo.checked=true
selectPPT.checked=true
selectDoc.checked=true
selectAudio.checked=true
}
}
FluCheckBox{
id:selectPDFAndWord
id:selectVideo
text:"Video"
onClicked:{
selectFormat.setAllStatus()
}
}
FluCheckBox{
id:selectPPT
id:selectDoc
text:"Doc"
onClicked:{
selectFormat.setAllStatus()
@ -99,7 +99,7 @@ FluArea {
}
FluCheckBox{
id:selectVideo
id:selectAudio
text:"Audio"
onClicked:{
selectFormat.setAllStatus()
@ -107,18 +107,20 @@ FluArea {
}
function setAllStatus() {
selectAllFormat.checked = selectPDFAndWord.checked && selectPPT.checked && selectVideo.checked
selectAllFormat.checked = selectVideo.checked && selectDoc.checked && selectAudio.checked
}
}
Rectangle{
FluArea{
backgroundColor: "#f9f9f9"
border.width: 0
width: parent.width
height: 500
FileList{
disableHeader: true
}
}
}
}