File: main.qml

package info (click to toggle)
purpose 5.116.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,880 kB
  • sloc: cpp: 4,575; sh: 32; makefile: 17
file content (44 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>

 SPDX-License-Identifier: LGPL-2.1-or-later
*/

import QtQuick 2.2
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.2
import QtQuick.Dialogs 1.2
import org.kde.purpose 1.0 as Purpose

ApplicationWindow
{
    id: window
    property alias inputData: view.inputData

    Purpose.AlternativesView {
        id: view
        anchors.fill: parent

        Layout.minimumWidth: 200
        Layout.minimumHeight: 200

        header: Label {
            text: {
                var ret = "Sharing "
                const urls = window.inputData.urls
                for (var u in urls)
                    ret += urls[u] + " ";
                return ret;
            }
        }

        pluginType: "Export"
        onFinished: {
            if (error != 0) {
                console.log("job finished with error", error, message)
            } else {
                console.log("Job finished:", output.url)
            }
        }
    }
}