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