2023-08-24 15:50:37 +08:00
pragma Singleton
import QtQuick
import FluentUI
FluObject {
property var navigationView
2023-10-19 22:52:36 +08:00
property var paneItemMenu
2023-08-24 15:50:37 +08:00
function rename ( item , newName ) {
if ( newName && newName . trim ( ) . length > 0 ) {
item . title = newName ;
}
}
FluPaneItem {
id:item_home
count: 9
2024-03-09 15:35:48 +08:00
title: qsTr ( "Home" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
infoBadge: FluBadge {
2023-08-24 15:50:37 +08:00
count: item_home . count
}
2024-03-09 15:35:48 +08:00
icon: FluentIcons . Home
url: "qrc:/example/qml/page/T_Home.qml"
onTap: {
2023-08-24 15:50:37 +08:00
if ( navigationView . getCurrentUrl ( ) ) {
item_home . count = 0
}
2023-08-26 17:20:30 +08:00
navigationView . push ( url )
2023-08-24 15:50:37 +08:00
}
}
2023-10-11 22:37:07 +08:00
FluPaneItemExpander {
2024-03-09 15:35:48 +08:00
title: qsTr ( "PaneItemExpander Disabled" )
2023-10-11 22:37:07 +08:00
iconVisible: false
disabled: true
}
2023-08-24 15:50:37 +08:00
FluPaneItemExpander {
2024-03-09 15:35:48 +08:00
id: item_expander_basic_input
title: qsTr ( "Basic Input" )
icon: FluentIcons . CheckboxComposite
2023-08-24 15:50:37 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
id: item_buttons
2023-08-24 15:50:37 +08:00
count: 99
2024-03-09 15:35:48 +08:00
infoBadge: FluBadge {
2023-08-24 15:50:37 +08:00
count: item_buttons . count
}
2024-03-09 15:35:48 +08:00
title: qsTr ( "Buttons" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
extra: ( { image: "qrc:/example/res/image/control/Button.png" , recentlyUpdated: true , desc: qsTr ( "A control that responds to user input and raisesa Click event." ) } )
url: "qrc:/example/qml/page/T_Buttons.qml"
onTap: {
2023-08-24 15:50:37 +08:00
item_buttons . count = 0
2023-08-26 17:20:30 +08:00
navigationView . push ( url )
2023-08-24 15:50:37 +08:00
}
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
id: item_text
title: qsTr ( "Text" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2023-08-24 15:50:37 +08:00
count: 5
2024-03-09 15:35:48 +08:00
infoBadge: FluBadge {
2023-08-24 15:50:37 +08:00
count: item_text . count
color: Qt . rgba ( 82 / 255 , 196 / 255 , 26 / 255 , 1 )
}
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Text.qml"
onTap: {
2023-09-07 18:07:23 +08:00
item_text . count = 0
navigationView . push ( url )
}
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Image" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Image.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Slider" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
extra: ( { image: "qrc:/example/res/image/control/Slider.png" , recentlyUpdated: true , desc: qsTr ( "A control that lets the user select from a rangeof values by moving a Thumb control along atrack." ) } )
url: "qrc:/example/qml/page/T_Slider.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "CheckBox" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
extra: ( { image: "qrc:/example/res/image/control/Checkbox.png" , recentlyUpdated: true , desc: qsTr ( "A control that a user can select or clear." ) } )
url: "qrc:/example/qml/page/T_CheckBox.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "RadioButton" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_RadioButton.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "ToggleSwitch" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_ToggleSwitch.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
2023-09-25 18:10:24 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "PaneItem Disabled" )
2023-09-25 18:10:24 +08:00
disabled: true
icon: FluentIcons . Error
}
2023-08-24 15:50:37 +08:00
}
FluPaneItemExpander {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Form" )
icon: FluentIcons . GridView
FluPaneItem {
title: qsTr ( "TextBox" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_TextBox.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "TimePicker" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_TimePicker.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "DatePicker" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_DatePicker.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "CalendarPicker" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_CalendarPicker.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "ColorPicker" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_ColorPicker.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
2023-12-01 18:14:10 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "ShortcutPicker" )
2023-12-01 18:14:10 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_ShortcutPicker.qml"
onTap: { navigationView . push ( url ) }
2023-12-01 18:14:10 +08:00
}
2023-08-24 15:50:37 +08:00
}
FluPaneItemExpander {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Surface" )
icon: FluentIcons . SurfaceHub
2023-08-24 15:50:37 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "InfoBar" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
extra: ( { image: "qrc:/example/res/image/control/InfoBar.png" , recentlyUpdated: true , desc: qsTr ( "An inline message to display app-wide statuschange information." ) } )
url: "qrc:/example/qml/page/T_InfoBar.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Progress" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Progress.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "RatingControl" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_RatingControl.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Badge" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Badge.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Rectangle" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Rectangle.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
2023-09-27 15:18:10 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Clip" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Clip.qml"
onTap: { navigationView . push ( url ) }
2023-09-27 15:18:10 +08:00
}
2023-08-24 15:50:37 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Carousel" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Carousel.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Expander" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Expander.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
2023-08-30 17:18:49 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Watermark" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Watermark.qml"
onTap: { navigationView . push ( url ) }
2023-08-30 17:18:49 +08:00
}
2024-01-29 16:36:30 +08:00
}
FluPaneItemExpander {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Layout" )
icon: FluentIcons . DockLeft
FluPaneItem {
title: qsTr ( "StaggeredLayout" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_StaggeredLayout.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
2024-01-29 18:03:44 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "SplitLayout" )
2024-01-29 18:03:44 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_SplitLayout.qml"
onTap: { navigationView . push ( url ) }
2024-01-29 18:03:44 +08:00
}
2024-02-23 12:26:10 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "StatusLayout" )
2024-02-23 12:26:10 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_StatusLayout.qml"
onTap: { navigationView . push ( url ) }
2024-02-23 12:26:10 +08:00
}
2023-08-24 15:50:37 +08:00
}
FluPaneItemExpander {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Popus" )
icon: FluentIcons . ButtonMenu
2023-08-24 15:50:37 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Dialog" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Dialog.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
id: item_combobox
title: qsTr ( "ComboBox" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2023-08-24 15:50:37 +08:00
count: 9
infoBadge: FluBadge {
count: item_combobox . count
color: Qt . rgba ( 250 / 255 , 173 / 255 , 20 / 255 , 1 )
}
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_ComboBox.qml"
onTap: {
2023-08-24 15:50:37 +08:00
item_combobox . count = 0
navigationView . push ( "qrc:/example/qml/page/T_ComboBox.qml" )
}
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Tooltip" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Tooltip.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Menu" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Menu.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
}
FluPaneItemExpander {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Navigation" )
icon: FluentIcons . AllApps
2023-08-24 15:50:37 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Pivot" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
extra: ( { image: "qrc:/example/res/image/control/Pivot.png" , order: 3 , recentlyAdded: true , desc: qsTr ( "Presents information from different sources in a tabbed view." ) } )
url: "qrc:/example/qml/page/T_Pivot.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "BreadcrumbBar" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_BreadcrumbBar.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "TabView" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
extra: ( { image: "qrc:/example/res/image/control/TabView.png" , order: 1 , recentlyAdded: true , desc: qsTr ( "A control that displays a collection of tabs thatcan be used to display several documents." ) } )
url: "qrc:/example/qml/page/T_TabView.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "TreeView" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_TreeView.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "TableView" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
extra: ( { image: "qrc:/example/res/image/control/DataGrid.png" , order: 4 , recentlyAdded: true , desc: qsTr ( "The TableView control provides a flexible way to display a collection of data in rows and columns" ) } )
url: "qrc:/example/qml/page/T_TableView.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Pagination" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Pagination.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "MultiWindow" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_MultiWindow.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "FlipView" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
extra: ( { image: "qrc:/example/res/image/control/FlipView.png" , order: 2 , recentlyAdded: true , desc: qsTr ( "Presents a collection of items that the user canflip through, one item at a time." ) } )
url: "qrc:/example/qml/page/T_FlipView.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
}
FluPaneItemExpander {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Theming" )
2023-08-24 15:50:37 +08:00
icon: FluentIcons . Brightness
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Acrylic" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Acrylic.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Theme" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Theme.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Typography" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Typography.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Awesome" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Awesome.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
}
2023-12-05 15:49:02 +08:00
FluPaneItemExpander {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Chart" )
icon: FluentIcons . AreaChart
2023-12-05 15:49:02 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Bar Chart" )
2023-12-05 15:49:02 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/chart/T_BarChart.qml"
onTap: { navigationView . push ( url ) }
2023-12-05 15:49:02 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Line Chart" )
2023-12-05 15:49:02 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/chart/T_LineChart.qml"
onTap: { navigationView . push ( url ) }
2023-12-05 15:49:02 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Pie Chart" )
2023-12-05 15:49:02 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/chart/T_PieChart.qml"
onTap: { navigationView . push ( url ) }
2023-12-05 15:49:02 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Polar Area Chart" )
2023-12-05 15:49:02 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/chart/T_PolarAreaChart.qml"
onTap: { navigationView . push ( url ) }
2023-12-05 15:49:02 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Bubble Chart" )
2023-12-05 15:49:02 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/chart/T_BubbleChart.qml"
onTap: { navigationView . push ( url ) }
2023-12-05 15:49:02 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Scatter Chart" )
2023-12-05 15:49:02 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/chart/T_ScatterChart.qml"
onTap: { navigationView . push ( url ) }
2023-12-05 15:49:02 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Radar Chart" )
2023-12-05 15:49:02 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/chart/T_RadarChart.qml"
onTap: { navigationView . push ( url ) }
2023-12-05 15:49:02 +08:00
}
}
2023-08-24 15:50:37 +08:00
FluPaneItemSeparator {
spacing: 10
size: 1
}
FluPaneItemExpander {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Other" )
icon: FluentIcons . Shop
2023-08-24 15:50:37 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "QRCode" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_QRCode.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Tour" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Tour.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Timeline" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Timeline.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Captcha" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Captcha.qml"
onTap: { navigationView . push ( url ) }
2023-08-24 15:50:37 +08:00
}
2023-11-23 18:18:28 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Network" )
2023-11-23 18:18:28 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_Network.qml"
onTap: { navigationView . push ( url ) }
2023-11-23 18:18:28 +08:00
}
2023-08-24 15:50:37 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
id: item_other
title: qsTr ( "Remote Loader" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2023-08-24 15:50:37 +08:00
count: 99
infoBadge: FluBadge {
count: item_other . count
color: Qt . rgba ( 82 / 255 , 196 / 255 , 26 / 255 , 1 )
}
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_RemoteLoader.qml"
onTap: {
2023-08-24 15:50:37 +08:00
item_other . count = 0
navigationView . push ( "qrc:/example/qml/page/T_RemoteLoader.qml" )
}
}
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Hot Loader" )
onTapListener: function ( ) {
2023-08-24 15:50:37 +08:00
FluApp . navigate ( "/hotload" )
}
}
2023-10-03 16:18:53 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "3D" )
2023-10-19 22:52:36 +08:00
menuDelegate: paneItemMenu
2024-03-09 15:35:48 +08:00
url: "qrc:/example/qml/page/T_3D.qml"
onTap: { navigationView . push ( url ) }
2023-10-03 16:18:53 +08:00
}
2024-01-04 18:00:44 +08:00
FluPaneItem {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Test Crash" )
2024-01-04 18:00:44 +08:00
visible: FluTools . isWin ( )
onTapListener: function ( ) {
AppInfo . testCrash ( )
}
}
2023-08-24 15:50:37 +08:00
}
function getRecentlyAddedData ( ) {
var arr = [ ]
2023-12-20 17:17:41 +08:00
var items = navigationView . getItems ( ) ;
for ( var i = 0 ; i < items . length ; i ++ ) {
var item = items [ i ]
if ( item instanceof FluPaneItem && item . extra && item . extra . recentlyAdded ) {
2023-08-24 15:50:37 +08:00
arr . push ( item )
}
}
2023-12-20 17:17:41 +08:00
arr . sort ( function ( o1 , o2 ) { return o2 . extra . order - o1 . extra . order } )
2023-08-24 15:50:37 +08:00
return arr
}
function getRecentlyUpdatedData ( ) {
var arr = [ ]
var items = navigationView . getItems ( ) ;
for ( var i = 0 ; i < items . length ; i ++ ) {
var item = items [ i ]
2023-12-20 17:17:41 +08:00
if ( item instanceof FluPaneItem && item . extra && item . extra . recentlyUpdated ) {
2023-08-24 15:50:37 +08:00
arr . push ( item )
}
}
return arr
}
function getSearchData ( ) {
2023-09-17 20:36:33 +08:00
if ( ! navigationView ) {
return
}
2023-08-24 15:50:37 +08:00
var arr = [ ]
var items = navigationView . getItems ( ) ;
for ( var i = 0 ; i < items . length ; i ++ ) {
var item = items [ i ]
if ( item instanceof FluPaneItem ) {
if ( item . parent instanceof FluPaneItemExpander )
{
arr . push ( { title: ` $ { item . parent . title } - > $ { item . title } ` , key: item . key } )
}
else
arr . push ( { title: item . title , key: item . key } )
}
}
return arr
}
function startPageByItem ( data ) {
navigationView . startPageByItem ( data )
}
}