Warning, /maui/mauikit-filebrowsing/examples/FileBrowser.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 0002 import QtQuick.Controls 0003 import QtQuick.Layouts 0004 import org.mauikit.controls as Maui 0005 import org.mauikit.filebrowsing as FB 0006 0007 Maui.ApplicationWindow 0008 { 0009 id: root 0010 0011 Maui.Page 0012 { 0013 Maui.Controls.showCSD: true 0014 anchors.fill: parent 0015 floatingFooter: true 0016 0017 headBar.leftContent: Maui.ToolActions 0018 { 0019 autoExclusive: true 0020 0021 Action 0022 { 0023 icon.name: "view-list-icons" 0024 checked: _browser.settings.viewType === FB.FMList.ICON_VIEW 0025 onTriggered: _browser.settings.viewType = FB.FMList.ICON_VIEW 0026 } 0027 0028 Action 0029 { 0030 icon.name: "view-list-details" 0031 checked: _browser.settings.viewType === FB.FMList.LIST_VIEW 0032 onTriggered: _browser.settings.viewType = FB.FMList.LIST_VIEW 0033 } 0034 } 0035 0036 FB.FileBrowser 0037 { 0038 id: _browser 0039 Maui.Controls.showCSD: true 0040 0041 anchors.fill: parent 0042 currentPath: FB.FM.homePath() 0043 settings.viewType: FB.FMList.GRID_VIEW 0044 selectionBar: _selectionBar 0045 0046 onItemDoubleClicked:(index) => openItem(index) 0047 } 0048 0049 footer: Maui.SelectionBar 0050 { 0051 id: _selectionBar 0052 anchors.horizontalCenter: parent.horizontalCenter 0053 width: Math.min(parent.width-(Maui.Style.space.medium*2), implicitWidth) 0054 maxListHeight: root.height - (Maui.Style.contentMargins*2) 0055 0056 Action 0057 { 0058 icon.name: "love" 0059 onTriggered: console.log(_selectionBar.getSelectedUrisString()) 0060 } 0061 0062 Action 0063 { 0064 icon.name: "folder" 0065 onTriggered: console.log(_selectionBar.contains("0")) 0066 } 0067 0068 Action 0069 { 0070 icon.name: "list-add" 0071 } 0072 0073 onExitClicked: clear() 0074 } 0075 } 0076 } 0077