Warning, /frameworks/purpose/tests/tool/main.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
0003 
0004  SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 import QtQuick 2.2
0008 import QtQuick.Layouts 1.1
0009 import QtQuick.Controls 2.2
0010 import QtQuick.Dialogs 1.2
0011 import org.kde.purpose 1.0 as Purpose
0012 
0013 ApplicationWindow
0014 {
0015     id: window
0016     property alias inputData: view.inputData
0017 
0018     Purpose.AlternativesView {
0019         id: view
0020         anchors.fill: parent
0021 
0022         Layout.minimumWidth: 200
0023         Layout.minimumHeight: 200
0024 
0025         header: Label {
0026             text: {
0027                 var ret = "Sharing "
0028                 const urls = window.inputData.urls
0029                 for (var u in urls)
0030                     ret += urls[u] + " ";
0031                 return ret;
0032             }
0033         }
0034 
0035         pluginType: "Export"
0036         onFinished: {
0037             if (error != 0) {
0038                 console.log("job finished with error", error, message)
0039             } else {
0040                 console.log("Job finished:", output.url)
0041             }
0042         }
0043     }
0044 }