2023-03-30 21:52:55 +08:00
|
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Window
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import QtQuick.Layouts
|
2023-03-30 17:16:57 +08:00
|
|
|
|
import "qrc:///global/"
|
2023-03-30 21:52:55 +08:00
|
|
|
|
import FluentUI
|
2023-02-26 23:47:07 +08:00
|
|
|
|
|
2023-02-27 18:46:39 +08:00
|
|
|
|
FluWindow {
|
2023-02-26 23:47:07 +08:00
|
|
|
|
id:rootwindow
|
2023-03-29 15:43:23 +08:00
|
|
|
|
width: 1000
|
2023-03-28 17:53:46 +08:00
|
|
|
|
height: 640
|
2023-02-27 23:04:52 +08:00
|
|
|
|
title: "FluentUI"
|
2023-03-24 18:25:13 +08:00
|
|
|
|
minimumWidth: 520
|
2023-03-29 22:42:08 +08:00
|
|
|
|
minimumHeight: 460
|
2023-02-27 18:46:39 +08:00
|
|
|
|
|
|
|
|
|
FluAppBar{
|
|
|
|
|
id:appbar
|
2023-04-10 18:17:22 +08:00
|
|
|
|
z:9
|
2023-03-29 15:43:23 +08:00
|
|
|
|
showDark: true
|
2023-03-30 21:52:55 +08:00
|
|
|
|
width:parent.width
|
2023-04-10 18:17:22 +08:00
|
|
|
|
darkText: "Dark Mode"
|
2023-02-27 18:46:39 +08:00
|
|
|
|
}
|
2023-02-26 23:47:07 +08:00
|
|
|
|
|
2023-04-10 22:05:20 +08:00
|
|
|
|
FluNavigationView{
|
2023-03-10 18:08:32 +08:00
|
|
|
|
id:nav_view
|
2023-03-28 17:53:46 +08:00
|
|
|
|
anchors.fill: parent
|
2023-03-30 17:16:57 +08:00
|
|
|
|
items: ItemsOriginal
|
|
|
|
|
footerItems:ItemsFooter
|
2023-04-10 18:17:22 +08:00
|
|
|
|
z:11
|
|
|
|
|
displayMode:MainEvent.displayMode
|
2023-03-28 17:53:46 +08:00
|
|
|
|
logo: "qrc:/res/image/favicon.ico"
|
2023-03-30 17:16:57 +08:00
|
|
|
|
title:"FluentUI"
|
|
|
|
|
autoSuggestBox:FluAutoSuggestBox{
|
|
|
|
|
width: 280
|
|
|
|
|
anchors.centerIn: parent
|
2023-04-10 22:05:20 +08:00
|
|
|
|
iconSource: FluentIcons.Search
|
2023-03-30 17:16:57 +08:00
|
|
|
|
items: ItemsOriginal.getSearchData()
|
2023-04-10 18:17:22 +08:00
|
|
|
|
placeholderText: "Search"
|
2023-03-30 17:16:57 +08:00
|
|
|
|
onItemClicked:
|
|
|
|
|
(data)=>{
|
|
|
|
|
ItemsOriginal.startPageByItem(data)
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
Component.onCompleted: {
|
2023-03-30 17:16:57 +08:00
|
|
|
|
ItemsOriginal.navigationView = nav_view
|
2023-04-10 18:17:22 +08:00
|
|
|
|
ItemsFooter.navigationView = nav_view
|
2023-03-29 15:43:23 +08:00
|
|
|
|
nav_view.setCurrentIndex(0)
|
2023-02-26 23:47:07 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|