Warning, /maui/shelf/src/views/library/LibraryMenu.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.14 0002 import QtQuick.Controls 2.14 0003 import QtQuick.Layouts 1.3 0004 0005 import org.mauikit.controls 1.3 as Maui 0006 import org.mauikit.filebrowsing 1.3 as FB 0007 0008 import org.maui.shelf 1.0 as Shelf 0009 0010 0011 Maui.ContextualMenu 0012 { 0013 id: control 0014 property bool isFav : false 0015 property int index : -1 0016 property Maui.BaseModel model : null 0017 readonly property var item : control.model.get(index) 0018 0019 onOpened: isFav = FB.Tagging.isFav(item.url) 0020 0021 title: control.item.title 0022 subtitle: Maui.Handy.formatSize(control.item.size) 0023 titleImageSource: control.item.url 0024 titleIconSource: control.item.icon 0025 0026 0027 Maui.MenuItemActionRow 0028 { 0029 Action 0030 { 0031 text: i18n(isFav ? "UnFav it": "Fav it") 0032 checked: isFav 0033 checkable: true 0034 icon.name: "love" 0035 onTriggered: FB.Tagging.toggleFav(item.url) 0036 } 0037 0038 Action 0039 { 0040 text: i18n("Tags") 0041 icon.name: "tag" 0042 onTriggered: 0043 { 0044 _dialogLoader.sourceComponent = tagsDialogComponent 0045 dialog.composerList.urls = filterSelection(item.url) 0046 dialog.open() 0047 } 0048 } 0049 0050 Action 0051 { 0052 text: i18n("Info") 0053 icon.name: "documentinfo" 0054 onTriggered: 0055 { 0056 getFileInfo(item.url) 0057 } 0058 } 0059 0060 Action 0061 { 0062 text: i18n("Share") 0063 icon.name: "document-share" 0064 onTriggered: 0065 { 0066 Maui.Platform.shareFiles(filterSelection(item.url)) 0067 } 0068 } 0069 0070 } 0071 0072 MenuSeparator{} 0073 0074 MenuItem 0075 { 0076 text: i18n("Select") 0077 icon.name: "item-select" 0078 onTriggered: 0079 { 0080 if(Maui.Handy.isTouch) 0081 root.selectionMode = true 0082 0083 _selectionbar.append(item.path, item) 0084 } 0085 } 0086 0087 MenuSeparator{} 0088 0089 0090 MenuItem 0091 { 0092 text: i18n("Export") 0093 icon.name: "document-save-as" 0094 onTriggered: 0095 { 0096 var pic = item.url 0097 dialogLoader.sourceComponent= fmDialogComponent 0098 dialog.mode = dialog.modes.SAVE 0099 dialog.suggestedFileName= FB.FM.getFileInfo(item.url).label 0100 dialog.show(function(paths) 0101 { 0102 for(var i in paths) 0103 FB.FM.copy(pic, paths[i]) 0104 }); 0105 } 0106 } 0107 0108 MenuItem 0109 { 0110 text: i18n("Open with") 0111 icon.name: "document-open" 0112 onTriggered: 0113 { 0114 _openWithDialog.urls = filterSelection(item.url) 0115 _openWithDialog.open() 0116 } 0117 } 0118 0119 MenuItem 0120 { 0121 text: i18n("Go to Folder") 0122 icon.name: "folder-open" 0123 onTriggered: 0124 { 0125 var url = FB.FM.fileDir(item.url) 0126 openFolders([url]) 0127 } 0128 } 0129 0130 MenuItem 0131 { 0132 visible: !Maui.Handy.isAndroid 0133 text: i18n("Open Location") 0134 icon.name: "folder-open" 0135 onTriggered: 0136 { 0137 Qt.openUrlExternally(filterSelection(item.url)) 0138 } 0139 } 0140 0141 MenuSeparator{} 0142 0143 MenuItem 0144 { 0145 text: i18n("Remove") 0146 icon.name: "edit-delete" 0147 Maui.Theme.textColor: Maui.Theme.negativeTextColor 0148 onTriggered: 0149 { 0150 removeDialog.open() 0151 } 0152 } 0153 } 0154