Warning, /network/kdeconnect-kde/plasmoid/package/contents/ui/Clipboard.qml is written in an unsupported language. File is not indexed.

0001 /**
0002  * SPDX-FileCopyrightText: 2021 Yaman Qalieh <ybq987@gmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 import QtQuick
0008 import org.kde.plasma.core as PlasmaCore
0009 import org.kde.kdeconnect
0010 
0011 QtObject {
0012 
0013     id: root
0014 
0015     property alias device: checker.device
0016     readonly property alias available: checker.available
0017 
0018     readonly property PluginChecker pluginChecker: PluginChecker {
0019         id: checker
0020         pluginName: "clipboard"
0021     }
0022 
0023     property variant clipboard: null
0024 
0025     function sendClipboard() {
0026         if (clipboard) {
0027             clipboard.sendClipboard();
0028         }
0029     }
0030 
0031     onAvailableChanged: {
0032         if (available) {
0033             clipboard = ClipboardDbusInterfaceFactory.create(device.id())
0034         } else {
0035             clipboard = null
0036         }
0037     }
0038 }