Warning, /maui/clip/src/views/SelectionBar.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.15 0002 import QtQuick.Controls 2.15 0003 import QtQuick.Layouts 1.3 0004 0005 import org.mauikit.controls 1.3 as Maui 0006 import org.mauikit.filebrowsing 1.2 as FB 0007 0008 Maui.SelectionBar 0009 { 0010 id: control 0011 0012 onExitClicked: 0013 { 0014 selectionMode = false 0015 clear() 0016 } 0017 0018 listDelegate: Maui.ListBrowserDelegate 0019 { 0020 height: Maui.Style.toolBarHeight 0021 width: ListView.view.width 0022 0023 label1.text: model.label 0024 label2.text: model.path 0025 imageSource: model.thumbnail 0026 iconSizeHint: height * 0.9 0027 checkable: true 0028 checked: true 0029 onToggled: control.removeAtIndex(index) 0030 } 0031 0032 Action 0033 { 0034 text: i18n("Play") 0035 icon.name: "media-playback-start" 0036 onTriggered: 0037 { 0038 playItems(control.items, 0) 0039 control.clear() 0040 } 0041 } 0042 0043 Action 0044 { 0045 text: i18n("Queue") 0046 icon.name: "media-playlist-play" 0047 onTriggered: 0048 { 0049 queueItems(control.items, 0) 0050 control.clear() 0051 } 0052 } 0053 0054 Action 0055 { 0056 text: i18n("Un/Fav") 0057 icon.name: "love" 0058 onTriggered: VIEWER.fav(control.uris) 0059 } 0060 0061 Action 0062 { 0063 text: i18n("Tag") 0064 icon.name: "tag" 0065 onTriggered: 0066 { 0067 dialogLoader.sourceComponent = tagsDialogComponent 0068 dialog.composerList.urls = control.uris 0069 dialog.open() 0070 } 0071 } 0072 0073 Action 0074 { 0075 text: i18n("Share") 0076 icon.name: "document-share" 0077 onTriggered: 0078 { 0079 Maui.Platform.shareFiles(control.uris) 0080 } 0081 } 0082 0083 Action 0084 { 0085 text: i18n("Export") 0086 icon.name: "document-save" 0087 onTriggered: 0088 { 0089 const pics = control.uris 0090 dialogLoader.sourceComponent= fmDialogComponent 0091 dialog.show(function(paths) 0092 { 0093 for(var i in paths) 0094 FB.FM.copy(pics, paths[i]) 0095 }); 0096 } 0097 } 0098 0099 Action 0100 { 0101 text: i18n("Remove") 0102 icon.name: "edit-delete" 0103 Maui.Theme.textColor: Maui.Theme.negativeTextColor 0104 onTriggered: 0105 { 0106 dialogLoader.sourceComponent = removeDialogComponent 0107 dialog.open() 0108 } 0109 } 0110 0111 function insert(item) 0112 { 0113 if(control.contains(item.path)) 0114 { 0115 control.removeAtUri(item.path) 0116 return 0117 } 0118 0119 control.append(item.path, item) 0120 } 0121 } 0122