Warning, /maui/clip/src/views/collection/CollectionView.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick.Controls 2.13
0002 import org.maui.clip 1.0 as Clip
0003 
0004 import org.mauikit.controls 1.3 as Maui
0005 import org.mauikit.filebrowsing 1.2 as FB
0006 
0007 import ".."
0008 
0009 Maui.SideBarView
0010 {
0011     id: control
0012     property alias urls : _browser.urls
0013 
0014     sideBar.preferredWidth: 200
0015 
0016     sideBar.minimumWidth: 200
0017     sideBar.resizeable: false
0018     sideBar.content: PlacesSidebar
0019     {
0020         anchors.fill: parent
0021     }
0022 
0023     BrowserLayout
0024     {
0025         id: _browser
0026         anchors.fill: parent
0027         floatingFooter: true
0028         showCSDControls: true
0029 
0030         altHeader: Maui.Handy.isMobile
0031 
0032         headBar.leftContent: [Maui.ToolButtonMenu
0033         {
0034             icon.name: "application-menu"
0035 
0036             MenuItem
0037             {
0038                 enabled: Clip.Clip.mpvAvailable
0039                 text: i18n("Open URL")
0040                 icon.name: "filename-space-amarok"
0041 
0042                 onTriggered:
0043                 {
0044                     _openUrlDialog.open()
0045                 }
0046             }
0047 
0048             MenuItem
0049             {
0050                 text: i18n("Settings")
0051                 icon.name: "settings-configure"
0052 
0053                 onTriggered: openSettingsDialog()
0054             }
0055 
0056             MenuItem
0057             {
0058                 text: i18n("About")
0059                 icon.name: "documentinfo"
0060                 onTriggered: root.about()
0061             }
0062         },
0063 
0064         ToolButton
0065             {
0066                 icon.name: control.sideBar.visible ? "sidebar-collapse" : "sidebar-expand"
0067                 visible: control.sideBar.collapsed
0068 
0069                 onClicked: control.sideBar.toggle()
0070 
0071                 checked: control.sideBar.visible
0072 
0073                 ToolTip.delay: 1000
0074                 ToolTip.timeout: 5000
0075                 ToolTip.visible: hovered
0076                 ToolTip.text: i18n("Toggle sidebar")
0077             }
0078 
0079         ]
0080 
0081         holder.emoji: "qrc:/img/assets/view-media-video.svg"
0082         holder.title: i18n("No Videos!")
0083         holder.body: i18n("Add a new video source or open a file.")
0084         holder.actions:[
0085 
0086             Action
0087             {
0088                 text: i18n("Open file")
0089                 onTriggered: openFileDialog()
0090             },
0091 
0092             Action
0093             {
0094                 text: i18n("Add sources")
0095                 onTriggered: openSettingsDialog()
0096             }
0097         ]
0098 
0099         onItemClicked:
0100         {
0101             play(item)
0102         }
0103 
0104 
0105         footer: SelectionBar
0106         {
0107             id: selectionBar
0108             anchors.horizontalCenter: parent.horizontalCenter
0109             width: Math.min(parent.width-(Maui.Style.space.medium*2), implicitWidth)
0110             maxListHeight: control.height - Maui.Style.space.medium
0111         }
0112     }
0113 
0114     function openFolders(urls)
0115     {
0116         control.urls = urls
0117     }
0118 }
0119