Warning, /maui/mauikit/src/controls.5/private/ShareDialogLinux.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 * Copyright 2018 Camilo Higuita <milo.h@aol.com>
0003 *
0004 * This program is free software; you can redistribute it and/or modify
0005 * it under the terms of the GNU Library General Public License as
0006 * published by the Free Software Foundation; either version 2, or
0007 * (at your option) any later version.
0008 *
0009 * This program is distributed in the hope that it will be useful,
0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0012 * GNU General Public License for more details
0013 *
0014 * You should have received a copy of the GNU Library General Public
0015 * License along with this program; if not, write to the
0016 * Free Software Foundation, Inc.,
0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0018 */
0019
0020 import QtQuick 2.10
0021 import QtQuick.Controls 2.10
0022 import QtQuick.Layouts 1.3
0023
0024 import org.mauikit.controls 1.3 as Maui
0025 import org.kde.purpose 1.0 as Purpose
0026
0027 /*!
0028 * \since org.mauikit.controls.labs 1.0
0029 * \inqmlmodule org.mauikit.controls.labs
0030 */
0031 Maui.PopupPage
0032 {
0033 id: control
0034
0035 /**
0036 *
0037 */
0038 property var urls : []
0039
0040 /**
0041 *
0042 */
0043 property string mimeType
0044
0045 widthHint: 0.9
0046
0047 maxHeight: 400
0048 maxWidth: 350
0049
0050
0051 persistent: false
0052
0053 page.title: i18nd("mauikit", "Share with")
0054 headBar.visible: true
0055
0056 headBar.leftContent: ToolButton
0057 {
0058 visible: _purpose.depth>1;
0059 icon.name: "go-previous"
0060 onClicked: _purpose.pop()
0061 }
0062
0063 //Maui.OpenWithDialog
0064 //{
0065 //id: _openWithDialog
0066 //urls: control.urls
0067 //}
0068
0069 stack: Purpose.AlternativesView
0070 {
0071 id: _purpose
0072 Layout.fillWidth: true
0073 Layout.fillHeight: true
0074 Layout.margins: Maui.Style.space.medium
0075 pluginType: 'Export'
0076 clip: true
0077 spacing: Maui.Style.defaultSpacing
0078
0079 inputData :
0080 {
0081 'urls': [control.urls[0]],
0082 'mimeType':control.mimeType
0083 }
0084
0085 delegate: Maui.ListBrowserDelegate
0086 {
0087 width: ListView.view.width
0088 // height: Maui.Style.rowHeight * 2
0089
0090 label1.text: model.display
0091 iconSource: model.iconName
0092 iconSizeHint: Maui.Style.iconSizes.big
0093 onClicked: _purpose.createJob(index)
0094 }
0095 }
0096
0097 /**
0098 *
0099 */
0100 function openWith()
0101 {
0102 _openWithDialog.open()
0103 control.close()
0104 }
0105 }
0106