2023-03-25 13:35:21 +08:00
|
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Window 2.15
|
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
import QtGraphicalEffects 1.15
|
2023-03-02 18:21:43 +08:00
|
|
|
|
|
2023-03-25 13:35:21 +08:00
|
|
|
|
import FluentUI 1.0
|
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-06 14:22:13 +08:00
|
|
|
|
minimumHeight: 400
|
2023-02-27 18:46:39 +08:00
|
|
|
|
|
|
|
|
|
FluAppBar{
|
|
|
|
|
id:appbar
|
2023-03-28 17:53:46 +08:00
|
|
|
|
z:10
|
2023-03-29 15:43:23 +08:00
|
|
|
|
showDark: true
|
2023-02-27 18:46:39 +08:00
|
|
|
|
}
|
2023-02-26 23:47:07 +08:00
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluObject{
|
|
|
|
|
id:original_items
|
|
|
|
|
|
2023-03-29 15:43:23 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Home"
|
|
|
|
|
icon:FluentIcons.Home
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Home.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluPaneItemHeader{
|
|
|
|
|
title:"Inputs"
|
2023-03-06 18:08:01 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Buttons"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Buttons.qml")
|
|
|
|
|
}
|
2023-03-06 18:08:01 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Slider"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Slider.qml")
|
|
|
|
|
}
|
2023-03-06 18:08:01 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
2023-03-29 18:10:34 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"CheckBox"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_CheckBox.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"ToggleSwitch"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_ToggleSwitch.qml")
|
|
|
|
|
}
|
2023-03-06 18:08:01 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItemHeader{
|
|
|
|
|
title:"Form"
|
2023-03-06 18:08:01 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"TextBox"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_TextBox.qml")
|
|
|
|
|
}
|
2023-03-06 18:08:01 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
2023-03-11 14:41:31 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"TimePicker"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_TimePicker.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-12 14:26:03 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"DatePicker"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_DatePicker.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-22 11:54:19 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"CalendarPicker"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_CalendarPicker.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-23 17:40:10 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"ColorPicker"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_ColorPicker.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluPaneItemHeader{
|
|
|
|
|
title:"Surface"
|
2023-03-06 18:08:01 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"InfoBar"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_InfoBar.qml")
|
|
|
|
|
}
|
2023-03-06 18:08:01 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Progress"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Progress.qml")
|
|
|
|
|
}
|
2023-03-08 18:14:21 +08:00
|
|
|
|
}
|
2023-03-14 18:23:12 +08:00
|
|
|
|
|
2023-03-20 21:28:12 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Badge"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Badge.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Rectangle"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Rectangle.qml")
|
|
|
|
|
}
|
2023-03-07 00:05:27 +08:00
|
|
|
|
}
|
2023-03-14 18:23:12 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Carousel"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Carousel.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Expander"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Expander.qml")
|
|
|
|
|
}
|
2023-03-06 18:08:01 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItemHeader{
|
|
|
|
|
title:"Popus"
|
2023-03-06 18:08:01 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Dialog"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Dialog.qml")
|
|
|
|
|
}
|
2023-02-28 23:57:55 +08:00
|
|
|
|
}
|
2023-03-02 18:21:43 +08:00
|
|
|
|
|
2023-03-20 18:22:32 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Tooltip"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Tooltip.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-15 18:45:14 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Menu"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Menu.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluPaneItemHeader{
|
|
|
|
|
title:"Navigation"
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-27 18:24:35 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"TabView"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_TabView.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"TreeView"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_TreeView.qml")
|
2023-03-02 23:58:50 +08:00
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-13 18:23:46 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"MultiWindow"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_MultiWindow.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluPaneItemHeader{
|
|
|
|
|
title:"Theming"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Theme"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Theme.qml")
|
2023-03-02 23:58:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Awesome"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Awesome.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"Typography"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_Typography.qml")
|
|
|
|
|
}
|
2023-02-26 23:47:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-24 15:21:47 +08:00
|
|
|
|
FluPaneItemHeader{
|
|
|
|
|
title:"Media"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"MediaPlayer"
|
|
|
|
|
onTap:{
|
|
|
|
|
nav_view.push("qrc:/T_MediaPlayer.qml")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
}
|
2023-02-26 23:47:07 +08:00
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluObject{
|
|
|
|
|
id:footer_items
|
|
|
|
|
FluPaneItemSeparator{}
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"意见反馈"
|
|
|
|
|
onTap:{
|
|
|
|
|
Qt.openUrlExternally("https://github.com/zhuzichu520/FluentUI/issues/new")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
FluPaneItem{
|
|
|
|
|
title:"关于"
|
|
|
|
|
onTap:{
|
2023-03-13 18:23:46 +08:00
|
|
|
|
FluApp.navigate("/about")
|
2023-02-26 23:47:07 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 18:08:32 +08:00
|
|
|
|
FluNavigationView{
|
|
|
|
|
id:nav_view
|
2023-03-28 17:53:46 +08:00
|
|
|
|
anchors.fill: parent
|
|
|
|
|
items: original_items
|
2023-03-10 18:08:32 +08:00
|
|
|
|
footerItems:footer_items
|
2023-03-28 17:53:46 +08:00
|
|
|
|
logo: "qrc:/res/image/favicon.ico"
|
|
|
|
|
z: 11
|
2023-03-10 18:08:32 +08:00
|
|
|
|
Component.onCompleted: {
|
2023-03-29 15:43:23 +08:00
|
|
|
|
nav_view.setCurrentIndex(0)
|
|
|
|
|
nav_view.push("qrc:/T_Home.qml")
|
2023-02-26 23:47:07 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-29 18:10:34 +08:00
|
|
|
|
function startPageByTitle(title){
|
|
|
|
|
console.debug(title)
|
|
|
|
|
nav_view.startPageByTitle(title)
|
|
|
|
|
}
|
2023-03-10 18:08:32 +08:00
|
|
|
|
|
2023-02-26 23:47:07 +08:00
|
|
|
|
}
|