diff --git a/CMakeLists.txt b/CMakeLists.txt index 359835a86..525baf55b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,11 +150,7 @@ add_subdirectory(settings) if(NOT WIN32 AND NOT APPLE) add_subdirectory(kio) - if(QT_MAJOR_VERSION STREQUAL "6") - add_subdirectory(plasmoid-kf6) - else() - add_subdirectory(plasmoid-kf5) - endif() + add_subdirectory(plasmoid) endif() add_subdirectory(doc) diff --git a/plasmoid-kf5/package/contents/ui/Battery.qml b/plasmoid-kf5/package/contents/ui/Battery.qml deleted file mode 100644 index 4cc9aea73..000000000 --- a/plasmoid-kf5/package/contents/ui/Battery.qml +++ /dev/null @@ -1,63 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2014 Samoilenko Yuri - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.kdeconnect 1.0 - -QtObject { - - id: root - - property alias device: checker.device - readonly property alias available: checker.available - - readonly property PluginChecker pluginChecker: PluginChecker { - id: checker - pluginName: "battery" - } - - property bool charging: battery ? battery.isCharging : false - property int charge: battery ? battery.charge : -1 - property string displayString: (available && charge > -1) ? ((charging) ? (i18n("%1% charging", charge)) : (i18n("%1%", charge))) : i18n("No info") - property variant battery: null - - /** - * Suggests an icon name to use for the current battery level - */ - readonly property string iconName: { - charge < 0 ? - "battery-missing-symbolic" : - charge < 10 ? - charging ? - "battery-empty-charging-symbolic" : - "battery-empty-symbolic" : - charge < 25 ? - charging ? - "battery-caution-charging-symbolic" : - "battery-caution-symbolic" : - charge < 50 ? - charging ? - "battery-low-charging-symbolic" : - "battery-low-symbolic" : - charge < 75 ? - charging ? - "battery-good-charging-symbolic" : - "battery-good-symbolic" : - charging ? - "battery-full-charging-symbolic": - "battery-full-symbolic" - } - - onAvailableChanged: { - if (available) { - battery = DeviceBatteryDbusInterfaceFactory.create(device.id()) - } else { - battery = null - } - } -} diff --git a/plasmoid-kf5/package/contents/ui/Clipboard.qml b/plasmoid-kf5/package/contents/ui/Clipboard.qml deleted file mode 100644 index 6f48a68c1..000000000 --- a/plasmoid-kf5/package/contents/ui/Clipboard.qml +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2021 Yaman Qalieh - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.kdeconnect 1.0 - -QtObject { - - id: root - - property alias device: checker.device - readonly property alias available: checker.available - - readonly property PluginChecker pluginChecker: PluginChecker { - id: checker - pluginName: "clipboard" - } - - property variant clipboard: null - - function sendClipboard() { - if (clipboard) { - clipboard.sendClipboard(); - } - } - - onAvailableChanged: { - if (available) { - clipboard = ClipboardDbusInterfaceFactory.create(device.id()) - } else { - clipboard = null - } - } -} diff --git a/plasmoid-kf5/package/contents/ui/CompactRepresentation.qml b/plasmoid-kf5/package/contents/ui/CompactRepresentation.qml deleted file mode 100644 index 91863a3f8..000000000 --- a/plasmoid-kf5/package/contents/ui/CompactRepresentation.qml +++ /dev/null @@ -1,38 +0,0 @@ -/* - SPDX-FileCopyrightText: 2014-2015 Frederic St-Pierre - - SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL -*/ - -import QtQuick 2.1 -import QtQuick.Layouts 1.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 3.0 as PlasmaComponents3 - -DropArea { - readonly property bool inPanel: (plasmoid.location == PlasmaCore.Types.TopEdge - || plasmoid.location == PlasmaCore.Types.RightEdge - || plasmoid.location == PlasmaCore.Types.BottomEdge - || plasmoid.location == PlasmaCore.Types.LeftEdge) - - onEntered: { - if (drag.hasUrls) { - plasmoid.expanded = true; - } - } - - MouseArea { - id: kdeConnectMouseArea - anchors.fill: parent - - onClicked: { - plasmoid.expanded = !plasmoid.expanded; - } - } - - PlasmaCore.IconItem { - id: kdeConnectIcon - anchors.fill: parent - source: plasmoid.icon - } -} diff --git a/plasmoid-kf5/package/contents/ui/Connectivity.qml b/plasmoid-kf5/package/contents/ui/Connectivity.qml deleted file mode 100644 index 2ca2bd645..000000000 --- a/plasmoid-kf5/package/contents/ui/Connectivity.qml +++ /dev/null @@ -1,125 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2021 David Shlemayev - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.kdeconnect 1.0 - -QtObject { - - id: root - - property alias device: checker.device - readonly property alias available: checker.available - readonly property bool ready: connectivity - - readonly property PluginChecker pluginChecker: PluginChecker { - id: checker - pluginName: "connectivity_report" - } - - /** - * Reports a string indicating the network type. Possible values: - * 5G - * LTE - * HSPA - * UMTS - * CDMA2000 - * EDGE - * GPRS - * GSM - * CDMA - * iDEN - * - * The parsing from Android values into these strings is handled in the - * [ConnectivityReportPlugin.networkTypeToString method](https://invent.kde.org/network/kdeconnect-android/-/blob/master/src/org/kde/kdeconnect/Plugins/ConnectivityReportPlugin/ConnectivityReportPlugin.java#L82) - */ - readonly property string networkType: connectivity ? connectivity.cellularNetworkType : i18n("Unknown") - - /** - * Reports a value between 0 and 4 (inclusive) which represents the strength of the cellular connection - */ - readonly property int signalStrength: connectivity ? connectivity.cellularNetworkStrength : -1 - property string displayString: { - if (ready) { - return `${networkType} ${signalStrength}/4`; - } else { - return i18n("No signal"); - } - } - property variant connectivity: null - - /** - * Suggests an icon name to use for the current signal level - * - * Returns names which correspond to Plasma Framework's network.svg: - * https://invent.kde.org/frameworks/plasma-framework/-/blob/master/src/desktoptheme/breeze/icons/network.svg - */ - readonly property string iconName: { - // Firstly, get the name prefix which represents the signal strength - var signalStrengthIconName = - (signalStrength < 0 || !ready) ? - // As long as the signal strength is nonsense or the plugin reports as non-ready, - // show us as disconnected - "network-mobile-off" : - (signalStrength == 0) ? - "network-mobile-0" : - (signalStrength == 1) ? - "network-mobile-20" : - (signalStrength == 2) ? - "network-mobile-60" : - (signalStrength == 3) ? - "network-mobile-80" : - (signalStrength == 4) ? - "network-mobile-100" : - // Since all possible values are enumerated above, this default case should never be hit. - // However, I need it in order for my ternary syntax to be valid! - "network-mobile-available" - - // If we understand the network type, append to the icon name to show the type - var networkTypeSuffix = - (networkType === "5G") ? - // No icon for this case! - "" : - (networkType === "LTE") ? - "-lte" : - (networkType === "HSPA") ? - "-hspa" : - (networkType === "UMTS") ? - "-umts" : - (networkType === "CDMA2000") ? - // GSconnect just uses the 3g icon - // No icon for this case! - "" : - (networkType === "EDGE") ? - "-edge" : - (networkType === "GPRS") ? - "-gprs" : - (networkType === "GSM") ? - // GSconnect just uses the 2g icon - // No icon for this case! - "" : - (networkType === "CDMA") ? - // GSconnect just uses the 2g icon - // No icon for this case! - "" : - (networkType === "iDEN") ? - // GSconnect just uses the 2g icon - // No icon for this case! - "" : - "" // We didn't recognize the network type. Don't append anything. - return signalStrengthIconName + networkTypeSuffix - } - - onAvailableChanged: { - if (available) { - connectivity = DeviceConnectivityReportDbusInterfaceFactory.create(device.id()) - } else { - connectivity = null - } - } -} diff --git a/plasmoid-kf5/package/contents/ui/DeviceDelegate.qml b/plasmoid-kf5/package/contents/ui/DeviceDelegate.qml deleted file mode 100644 index 8cef30206..000000000 --- a/plasmoid-kf5/package/contents/ui/DeviceDelegate.qml +++ /dev/null @@ -1,431 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2013 Albert Vaca - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import QtQuick.Layouts 1.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.plasma.components 3.0 as PlasmaComponents3 -import org.kde.kdeconnect 1.0 -import QtQuick.Dialogs 1.0 -import QtQuick.Controls 2.4 - -PlasmaComponents.ListItem -{ - id: root - readonly property QtObject device: DeviceDbusInterfaceFactory.create(model.deviceId) - - DropArea { - id: fileDropArea - anchors.fill: parent - - onDropped: { - if (drop.hasUrls) { - - var urls = []; - - for (var v in drop.urls) { - if (drop.urls[v] != null) { - if (urls.indexOf(drop.urls[v].toString()) == -1) { - urls.push(drop.urls[v].toString()); - } - } - } - - var i; - for (i = 0; i < urls.length; i++) { - share.plugin.shareUrl(urls[i]); - } - } - drop.accepted = true; - } - - PlasmaCore.ToolTipArea { - id: dropAreaToolTip - anchors.fill: parent - location: plasmoid.location - active: true - mainText: i18n("File Transfer") - subText: i18n("Drop a file to transfer it onto your phone.") - } - } - - Column { - width: parent.width - - RowLayout - { - - width: parent.width - Battery { - id: battery - device: root.device - } - - Connectivity { - id: connectivity - device: root.device - } - - PlasmaComponents.Label { - id: deviceName - elide: Text.ElideRight - text: model.name - Layout.fillWidth: true - textFormat: Text.PlainText - } - - PlasmaComponents3.ToolButton { - VirtualMonitor { - id: vd - device: root.device - } - icon.name: "video-monitor" - text: i18n("Virtual Display") - visible: vd.available - onClicked: { - if (!vd.plugin.requestVirtualMonitor()) { - console.warn("Failed to create the virtual monitor") - } - } - } - RowLayout - { - id: connectionInformation - visible: connectivity.available - - // TODO: In the future, when the Connectivity Report plugin supports more than one - // subscription, add more signal strength icons to represent all the available - // connections. - - PlasmaCore.IconItem { - id: celluarConnectionStrengthIcon - source: connectivity.iconName - Layout.preferredHeight: connectivityText.height - Layout.preferredWidth: Layout.preferredHeight - Layout.alignment: Qt.AlignCenter - visible: valid - } - - PlasmaComponents.Label { - // Fallback plain-text label. Only show this if the icon doesn't work. - id: connectivityText - text: connectivity.displayString - textFormat: Text.PlainText - visible: !celluarConnectionStrengthIcon.visible - } - } - - RowLayout - { - id: batteryInformation - visible: (battery.available && battery.charge > -1) - - PlasmaCore.IconItem { - id: batteryIcon - source: battery.iconName - // Make the icon the same size as the text so that it doesn't dominate - Layout.preferredHeight: batteryPercent.height - Layout.preferredWidth: Layout.preferredHeight - Layout.alignment: Qt.AlignCenter - } - - PlasmaComponents.Label { - id: batteryPercent - text: i18nc("Battery charge percentage", "%1%", battery.charge) - textFormat: Text.PlainText - } - } - - PlasmaComponents3.ToolButton { - id: overflowMenu - icon.name: "application-menu" - checked: menu.status === PlasmaComponents.DialogStatus.Open - - onPressed: menu.openRelative() - - PlasmaComponents.ContextMenu { - id: menu - visualParent: overflowMenu - placement: PlasmaCore.Types.BottomPosedLeftAlignedPopup - - //Share - PlasmaComponents.MenuItem - { - FileDialog { - id: fileDialog - title: i18n("Please choose a file") - folder: shortcuts.home - selectMultiple: true - onAccepted: fileDialog.fileUrls.forEach(url => share.plugin.shareUrl(url)) - } - - id: shareFile - icon: "document-share" - visible: share.available - text: i18n("Share file") - onClicked: fileDialog.open() - } - - //Clipboard - PlasmaComponents.MenuItem - { - Clipboard { - id: clipboard - device: root.device - } - - id: sendclipboard - icon: "klipper" - visible: clipboard.available && clipboard.clipboard.isAutoShareDisabled - text: i18n("Send Clipboard") - - onClicked: { - clipboard.sendClipboard() - } - } - - - //Find my phone - PlasmaComponents.MenuItem - { - FindMyPhone { - id: findmyphone - device: root.device - } - - id: ring - icon: "irc-voice" - visible: findmyphone.available - text: i18n("Ring my phone") - - onClicked: { - findmyphone.ring() - } - } - - //SFTP - PlasmaComponents.MenuItem - { - Sftp { - id: sftp - device: root.device - } - - id: browse - icon: "document-open-folder" - visible: sftp.available - text: i18n("Browse this device") - - onClicked: { - sftp.browse() - } - } - - //SMS - PlasmaComponents.MenuItem - { - SMS { - id: sms - device: root.device - } - - icon: "message-new" - visible: sms.available - text: i18n("SMS Messages") - - onClicked: { - sms.plugin.launchApp() - } - } - } - } - } - - //RemoteKeyboard - PlasmaComponents.ListItem { - visible: remoteKeyboard.remoteState - width: parent.width - - RowLayout { - width: parent.width - spacing: 5 - - PlasmaComponents.Label { - id: remoteKeyboardLabel - text: i18n("Remote Keyboard") - } - - RemoteKeyboard { - id: remoteKeyboard - device: root.device - Layout.fillWidth: true - } - } - } - - //Notifications - PlasmaComponents.ListItem { - visible: notificationsModel.count>0 - enabled: true - PlasmaComponents.Label { - text: i18n("Notifications:") - } - PlasmaComponents.ToolButton { - enabled: true - visible: notificationsModel.isAnyDimissable; - anchors.right: parent.right - iconSource: "edit-clear-history" - tooltip: i18n("Dismiss all notifications") - onClicked: notificationsModel.dismissAll(); - } - } - Repeater { - id: notificationsView - model: NotificationsModel { - id: notificationsModel - deviceId: root.device.id() - } - delegate: PlasmaComponents.ListItem { - id: listitem - enabled: true - onClicked: checked = !checked - - property bool replying: false - - PlasmaCore.IconItem { - id: notificationIcon - source: appIcon - width: (valid && appIcon.length) ? dismissButton.width : 0 - height: width - anchors.left: parent.left - } - PlasmaComponents.Label { - id: notificationLabel - text: appName + ": " + (title.length>0 ? (appName==title?notitext:title+": "+notitext) : model.name) - anchors.right: replyButton.left - anchors.left: notificationIcon.right - elide: listitem.checked ? Text.ElideNone : Text.ElideRight - maximumLineCount: listitem.checked ? 0 : 1 - wrapMode: Text.WordWrap - } - PlasmaComponents.ToolButton { - id: replyButton - visible: repliable - enabled: repliable && !replying - anchors.right: dismissButton.left - iconSource: "mail-reply-sender" - tooltip: i18n("Reply") - onClicked: { replying = true; replyTextField.forceActiveFocus(); } - } - PlasmaComponents.ToolButton { - id: dismissButton - visible: notificationsModel.isAnyDimissable; - enabled: dismissable - anchors.right: parent.right - iconSource: "window-close" - tooltip: i18n("Dismiss") - onClicked: dbusInterface.dismiss(); - } - RowLayout { - visible: replying - anchors.top: notificationLabel.bottom - anchors.left: notificationIcon.right - width: notificationLabel.width + replyButton.width + dismissButton.width - PlasmaComponents3.Button { - Layout.alignment: Qt.AlignBottom - id: replyCancelButton - text: i18n("Cancel") - display: PlasmaComponents3.AbstractButton.IconOnly - PlasmaComponents3.ToolTip { - text: parent.text - } - icon.name: "dialog-cancel" - onClicked: { - replyTextField.text = ""; - replying = false; - } - } - PlasmaComponents3.TextArea { - id: replyTextField - placeholderText: i18nc("@info:placeholder", "Reply to %1…", appName) - wrapMode: TextEdit.Wrap - Layout.fillWidth: true - Keys.onPressed: { - if ((event.key == Qt.Key_Return || event.key == Qt.Key_Enter) && !(event.modifiers & Qt.ShiftModifier)) { - replySendButton.clicked(); - event.accepted = true; - } - if (event.key == Qt.Key_Escape) { - replyCancelButton.clicked(); - event.accepted = true; - } - } - } - PlasmaComponents3.Button { - Layout.alignment: Qt.AlignBottom - id: replySendButton - text: i18n("Send") - icon.name: "document-send" - enabled: replyTextField.text - onClicked: { - dbusInterface.sendReply(replyTextField.text); - replyTextField.text = ""; - replying = false; - } - } - } - } - } - - RemoteCommands { - id: rc - device: root.device - } - - // Commands - RowLayout { - visible: rc.available - width: parent.width - - PlasmaComponents.Label { - text: i18n("Run command") - Layout.fillWidth: true - } - - PlasmaComponents.Button - { - id: addCommandButton - iconSource: "list-add" - tooltip: i18n("Add command") - onClicked: rc.plugin.editCommands() - visible: rc.plugin && rc.plugin.canAddCommand - } - } - Repeater { - id: commandsView - visible: rc.available - model: RemoteCommandsModel { - id: commandsModel - deviceId: rc.device.id() - } - delegate: PlasmaComponents.ListItem { - enabled: true - onClicked: rc.plugin.triggerCommand(key) - - PlasmaComponents.Label { - text: name + "\n" + command - } - } - } - - // Share - Share { - id: share - device: root.device - } - } -} diff --git a/plasmoid-kf5/package/contents/ui/FindMyPhone.qml b/plasmoid-kf5/package/contents/ui/FindMyPhone.qml deleted file mode 100644 index a0be80643..000000000 --- a/plasmoid-kf5/package/contents/ui/FindMyPhone.qml +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2014 Samoilenko Yuri - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.kdeconnect 1.0 - -QtObject { - - id: root - - property alias device: checker.device - readonly property alias available: checker.available - - readonly property PluginChecker pluginChecker: PluginChecker { - id: checker - pluginName: "findmyphone" - } - - property variant findMyPhone: null - - function ring() { - if (findMyPhone) { - findMyPhone.ring(); - } - } - - onAvailableChanged: { - if (available) { - findMyPhone = FindMyPhoneDbusInterfaceFactory.create(device.id()) - } else { - findMyPhone = null - } - } -} diff --git a/plasmoid-kf5/package/contents/ui/FullRepresentation.qml b/plasmoid-kf5/package/contents/ui/FullRepresentation.qml deleted file mode 100644 index cc4848df6..000000000 --- a/plasmoid-kf5/package/contents/ui/FullRepresentation.qml +++ /dev/null @@ -1,87 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2013 Albert Vaca - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.4 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 3.0 as PlasmaComponents3 -import org.kde.plasma.extras 2.0 as PlasmaExtras -import org.kde.kdeconnect 1.0 as KdeConnect -import QtQuick.Layouts 1.9 -import org.kde.kquickcontrolsaddons 2.0 - -PlasmaExtras.Representation { - id: kdeconnect - property alias devicesModel: devicesView.model - collapseMarginsHint: true - - KdeConnect.DevicesModel { - id: allDevicesModel - } - KdeConnect.DevicesModel { - id: pairedDevicesModel - displayFilter: KdeConnect.DevicesModel.Paired - } - - PlasmaComponents3.ScrollView { - id: dialogItem - anchors.fill: parent - - contentItem: ListView { - id: devicesView - spacing: PlasmaCore.Units.smallSpacing - - delegate: DeviceDelegate { } - - PlasmaExtras.PlaceholderMessage { - width: parent.width - PlasmaCore.Units.gridUnit * 2 - anchors.centerIn: parent - visible: devicesView.count === 0 - - iconName: { - if (pairedDevicesModel.count >= 0) { - return pairedDevicesModel.count === 0 ? "edit-none" : "network-disconnect"; - } - return "kdeconnect"; - } - - text: { - if (pairedDevicesModel.count >= 0) { - return pairedDevicesModel.count == 0 ? i18n("No paired devices") : i18np("Paired device is unavailable", "All paired devices are unavailable", pairedDevicesModel.count) - } else if (allDevicesModel.count == 0) { - return i18n("Install KDE Connect on your Android device to integrate it with Plasma!") - } - } - helpfulAction: Action { - text: i18n("Pair a Device...") - icon.name: "list-add" - onTriggered: KCMShell.openSystemSettings("kcm_kdeconnect") - enabled: pairedDevicesModel.count == 0 && KCMShell.authorize("kcm_kdeconnect.desktop").length > 0 - } - - PlasmaComponents3.Button { - Layout.leftMargin: units.largeSpacing * 3 - Layout.rightMargin: units.largeSpacing * 3 - Layout.alignment: Qt.AlignHCenter - Layout.fillWidth: true - visible: allDevicesModel.count === 0 - text: i18n("Install from Google Play") - onClicked: Qt.openUrlExternally("https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp") - } - - PlasmaComponents3.Button { - Layout.leftMargin: units.largeSpacing * 3 - Layout.rightMargin: units.largeSpacing * 3 - Layout.alignment: Qt.AlignHCenter - Layout.fillWidth: true - visible: allDevicesModel.count === 0 - text: i18n("Install from F-Droid") - onClicked: Qt.openUrlExternally("https://f-droid.org/en/packages/org.kde.kdeconnect_tp/") - } - } - } - } -} diff --git a/plasmoid-kf5/package/contents/ui/RemoteCommands.qml b/plasmoid-kf5/package/contents/ui/RemoteCommands.qml deleted file mode 100644 index 51582db40..000000000 --- a/plasmoid-kf5/package/contents/ui/RemoteCommands.qml +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2018 Nicolas Fella - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.kdeconnect 1.0 - -QtObject { - - id: root - - property alias device: checker.device - readonly property alias available: checker.available - - readonly property PluginChecker pluginChecker: PluginChecker { - id: checker - pluginName: "remotecommands" - } - - property variant plugin: available ? RemoteCommandsDbusInterfaceFactory.create(device.id()) : null -} diff --git a/plasmoid-kf5/package/contents/ui/SMS.qml b/plasmoid-kf5/package/contents/ui/SMS.qml deleted file mode 100644 index 0d49828b5..000000000 --- a/plasmoid-kf5/package/contents/ui/SMS.qml +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.kdeconnect 1.0 - -QtObject { - - id: root - - property alias device: checker.device - readonly property alias available: checker.available - - readonly property PluginChecker pluginChecker: PluginChecker { - id: checker - pluginName: "sms" - } - - readonly property variant plugin: available ? SmsDbusInterfaceFactory.create(device.id()) : null -} - diff --git a/plasmoid-kf5/package/contents/ui/Sftp.qml b/plasmoid-kf5/package/contents/ui/Sftp.qml deleted file mode 100644 index 39c618f6d..000000000 --- a/plasmoid-kf5/package/contents/ui/Sftp.qml +++ /dev/null @@ -1,38 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2014 Samoilenko Yuri - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.kdeconnect 1.0 - -QtObject { - - id: root - - property alias device: checker.device - readonly property alias available: checker.available - - readonly property PluginChecker pluginChecker: PluginChecker { - id: checker - pluginName: "sftp" - } - - property variant sftp: null - - function browse() { - if (sftp) - sftp.startBrowsing(); - } - - onAvailableChanged: { - if (available) { - sftp = SftpDbusInterfaceFactory.create(device.id()) - } else { - sftp = null - } - } -} diff --git a/plasmoid-kf5/package/contents/ui/Share.qml b/plasmoid-kf5/package/contents/ui/Share.qml deleted file mode 100644 index 682c6b19f..000000000 --- a/plasmoid-kf5/package/contents/ui/Share.qml +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2018 Nicolas Fella - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.kdeconnect 1.0 - -QtObject { - - id: root - - property alias device: checker.device - readonly property alias available: checker.available - - readonly property PluginChecker pluginChecker: PluginChecker { - id: checker - pluginName: "share" - } - - property variant plugin: available ? ShareDbusInterfaceFactory.create(device.id()) : null -} - diff --git a/plasmoid-kf5/package/contents/ui/VirtualMonitor.qml b/plasmoid-kf5/package/contents/ui/VirtualMonitor.qml deleted file mode 100644 index 12a21eb3f..000000000 --- a/plasmoid-kf5/package/contents/ui/VirtualMonitor.qml +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2021 Aleix Pol i Gonzalez - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.kdeconnect 1.0 - -QtObject -{ - property alias device: checker.device - readonly property alias available: checker.available - - readonly property PluginChecker pluginChecker: PluginChecker { - id: checker - pluginName: "virtualmonitor" - } - - readonly property QtObject plugin: available ? VirtualmonitorDbusInterfaceFactory.create(device.id()) : null -} - diff --git a/plasmoid-kf5/package/contents/ui/main.qml b/plasmoid-kf5/package/contents/ui/main.qml deleted file mode 100644 index 5a7d53d1f..000000000 --- a/plasmoid-kf5/package/contents/ui/main.qml +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez - * - * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL - */ - -import QtQuick 2.1 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.plasmoid 2.0 -import org.kde.kquickcontrolsaddons 2.0 -import org.kde.kdeconnect 1.0 - -Item -{ - DevicesModel { - id: connectDeviceModel - displayFilter: DevicesModel.Paired | DevicesModel.Reachable - } - - DevicesModel { - id: pairedDeviceModel - displayFilter: DevicesModel.Paired - } - - Binding { - target: plasmoid - property: "status" - value: (connectDeviceModel.count > 0) ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.PassiveStatus - } - - Plasmoid.fullRepresentation: FullRepresentation { - devicesModel: connectDeviceModel - } - - Plasmoid.compactRepresentation: CompactRepresentation { - } - - readonly property bool isConstrained: (plasmoid.formFactor == PlasmaCore.Types.Vertical || plasmoid.formFactor == PlasmaCore.Types.Horizontal) - - Plasmoid.preferredRepresentation: isConstrained ? Plasmoid.compactRepresentation : Plasmoid.fullRepresentation - - function action_launchkcm() { - KCMShell.openSystemSettings("kcm_kdeconnect"); - } - - Component.onCompleted: { - plasmoid.removeAction("configure"); - if (KCMShell.authorize("kcm_kdeconnect.desktop").length > 0) { - plasmoid.setAction("launchkcm", i18n("KDE Connect Settings..."), "configure"); - } - } -} diff --git a/plasmoid-kf5/package/metadata.json b/plasmoid-kf5/package/metadata.json deleted file mode 100644 index e50a98192..000000000 --- a/plasmoid-kf5/package/metadata.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "KPlugin": { - "Authors": [ - { - "Email": "albertvaka@gmail.com", - "Name": "Albert Vaca Cintora", - "Name[ar]": "ألبرت فاكا سينتورا", - "Name[az]": "Albert Vaca Cintora", - "Name[bg]": "Albert Vaca Cintora", - "Name[ca@valencia]": "Albert Vaca Cintora", - "Name[ca]": "Albert Vaca Cintora", - "Name[cs]": "Albert Vaca Cintora", - "Name[de]": "Albert Vaca Cintora", - "Name[en_GB]": "Albert Vaca Cintora", - "Name[eo]": "Albert Vaca Cintora", - "Name[es]": "Albert Vaca Cintora", - "Name[eu]": "Albert Vaca Cintora", - "Name[fi]": "Albert Vaca Cintora", - "Name[fr]": "Albert Vaca Cintora", - "Name[gl]": "Albert Vaca Cintora", - "Name[he]": "אלברט ואקה סינטורה", - "Name[ia]": "Albert Vaca Cintora", - "Name[it]": "Albert Vaca Cintora", - "Name[ja]": "Albert Vaca Cintora", - "Name[ka]": "Albert Vaca Cintora", - "Name[ko]": "Albert Vaca Cintora", - "Name[nl]": "Albert Vaca Cintora", - "Name[nn]": "Albert Vaca Cintora", - "Name[pl]": "Albert Vaca Cintora", - "Name[pt]": "Albert Vaca Cintora", - "Name[pt_BR]": "Albert Vaca Cintora", - "Name[ru]": "Albert Vaca Cintora", - "Name[sl]": "Albert Vaca Cintora", - "Name[sv]": "Albert Vaca Cintora", - "Name[tr]": "Albert Vaca Cintora", - "Name[uk]": "Albert Vaca Cintora", - "Name[x-test]": "xxAlbert Vaca Cintoraxx", - "Name[zh_CN]": "Albert Vaca Cintora", - "Name[zh_TW]": "Albert Vaca Cintora" - } - ], - "Category": "System Information", - "Description": "Show notifications from your devices using KDE Connect", - "Description[ar]": "أظهر الإخطارات من أجهزتك باستخدام «كِيدِي المتّصل»", - "Description[az]": "KDE Connect istifadə edərək digər cihazlardakı bildirişləri göstərmək", - "Description[bg]": "Показване на известия от вашите устройства чрез KDE Connect", - "Description[ca@valencia]": "Mostra les notificacions dels vostres dispositius emprant KDE Connect", - "Description[ca]": "Mostra les notificacions dels vostres dispositius emprant el KDE Connect", - "Description[cs]": "Zobrazit oznámení z vašich zařízení pomocí KDE Connect", - "Description[eo]": "Montri sciigojn de viaj aparatoj per KDE Connect", - "Description[es]": "Mustra notificaciones de sus otros dispositivos usando KDE Connect", - "Description[eu]": "Erakutsi zure gailuetako jakinarazpenak KDE Connect erabiliz", - "Description[fi]": "Näytä laitteittesi ilmoitukset KDE Connectilla", - "Description[fr]": "Afficher des notifications provenant de vos périphériques en utilisant KDE Connect", - "Description[gl]": "Amosar as notificacións dos dispositivos con KDE Connect.", - "Description[he]": "הצגת התראות מהמכשירים שלך בעזרת KDE Connect", - "Description[ia]": "Monstra notificationes ex tu dispositivos usante KDE Connect", - "Description[it]": "Mostra le notifiche dei tuoi dispositivi tramite KDE Connect", - "Description[ja]": "KDE Connect を使用してデバイスの通知を表示", - "Description[ka]": "KDE Connect-ის გამოყენებით თქვენი მოწყობილობებიდან გაფრთხილებების ჩვენება", - "Description[ko]": "KDE Connect로 장치에 표시된 알림 보기", - "Description[nl]": "Meldingen van uw apparaten met KDE Connect tonen", - "Description[nn]": "Vis varslingar frå einingane dine med KDE Connect", - "Description[pl]": "Pokazuje powiadomienia z urządzeń z KDE Connect", - "Description[pt_BR]": "Mostrar notificações dos seus dispositivos usando o KDE Connect", - "Description[sl]": "Pošljite obvestila iz drugih naprav s pomočjo KDE Connect", - "Description[sv]": "Visa underrättelser från apparater med KDE anslut", - "Description[tr]": "KDE Bağlan'ı kullanarak aygıttan gelen bildirimleri göster", - "Description[uk]": "Показ сповіщень з ваших пристроїв за допомогою програми «З’єднання KDE»", - "Description[x-test]": "xxShow notifications from your devices using KDE Connectxx", - "Description[zh_CN]": "通过 KDE Connect 显示来自其他设备的通知", - "Description[zh_TW]": "使用 KDE 連線顯示來自您的裝置的通知", - "EnabledByDefault": true, - "Icon": "kdeconnect", - "Id": "org.kde.kdeconnect", - "License": "GPL", - "Name": "KDE Connect", - "Name[ar]": "كِيدِي المتّصل", - "Name[az]": "KDE Connect", - "Name[bg]": "KDE Connect", - "Name[ca@valencia]": "KDE Connect", - "Name[ca]": "KDE Connect", - "Name[cs]": "KDE Connect", - "Name[de]": "KDE Connect", - "Name[en_GB]": "KDE Connect", - "Name[eo]": "KDE Konekti", - "Name[es]": "KDE Connect", - "Name[eu]": "KDE Connect", - "Name[fi]": "KDE Connect", - "Name[fr]": "KDE Connect", - "Name[gl]": "KDE Connect", - "Name[he]": "KDE Connect", - "Name[ia]": "KDE Connect", - "Name[is]": "KDE Connect", - "Name[it]": "KDE Connect", - "Name[ja]": "KDE Connect", - "Name[ka]": "KDE Connect", - "Name[ko]": "KDE Connect", - "Name[lt]": "KDE Connect", - "Name[nl]": "KDE Connect", - "Name[nn]": "KDE Connect", - "Name[pl]": "KDE Connect", - "Name[pt]": "KDE Connect", - "Name[pt_BR]": "KDE Connect", - "Name[ru]": "KDE Connect", - "Name[sl]": "KDE Connect", - "Name[sv]": "KDE-anslut", - "Name[tr]": "KDE Bağlan", - "Name[uk]": "KDE Connect", - "Name[x-test]": "xxKDE Connectxx", - "Name[zh_CN]": "KDE Connect", - "Name[zh_TW]": "KDE 連線", - "ServiceTypes": [ - "Plasma/Applet" - ], - "Version": "0.1", - "Website": "https://albertvaka.wordpress.com" - }, - "X-Plasma-API": "declarativeappletscript", - "X-Plasma-ConfigPlugins": [ - "kcm_kdeconnect" - ], - "X-Plasma-MainScript": "ui/main.qml", - "X-Plasma-NotificationArea": "true", - "X-Plasma-NotificationAreaCategory": "Hardware" -} diff --git a/plasmoid-kf6/CMakeLists.txt b/plasmoid-kf6/CMakeLists.txt deleted file mode 100644 index dabc247b7..000000000 --- a/plasmoid-kf6/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -kpackage_install_package(package org.kde.kdeconnect plasmoids plasma) diff --git a/plasmoid-kf6/Messages.sh b/plasmoid-kf6/Messages.sh deleted file mode 100644 index eebe409ed..000000000 --- a/plasmoid-kf6/Messages.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -#.qml -$XGETTEXT `find package -name '*.qml'` -o $podir/plasma_applet_org.kde.kdeconnect.pot diff --git a/plasmoid-kf5/CMakeLists.txt b/plasmoid/CMakeLists.txt similarity index 100% rename from plasmoid-kf5/CMakeLists.txt rename to plasmoid/CMakeLists.txt diff --git a/plasmoid-kf5/Messages.sh b/plasmoid/Messages.sh similarity index 100% rename from plasmoid-kf5/Messages.sh rename to plasmoid/Messages.sh diff --git a/plasmoid-kf6/package/contents/ui/Battery.qml b/plasmoid/package/contents/ui/Battery.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/Battery.qml rename to plasmoid/package/contents/ui/Battery.qml diff --git a/plasmoid-kf6/package/contents/ui/Clipboard.qml b/plasmoid/package/contents/ui/Clipboard.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/Clipboard.qml rename to plasmoid/package/contents/ui/Clipboard.qml diff --git a/plasmoid-kf6/package/contents/ui/CompactRepresentation.qml b/plasmoid/package/contents/ui/CompactRepresentation.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/CompactRepresentation.qml rename to plasmoid/package/contents/ui/CompactRepresentation.qml diff --git a/plasmoid-kf6/package/contents/ui/Connectivity.qml b/plasmoid/package/contents/ui/Connectivity.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/Connectivity.qml rename to plasmoid/package/contents/ui/Connectivity.qml diff --git a/plasmoid-kf6/package/contents/ui/DeviceDelegate.qml b/plasmoid/package/contents/ui/DeviceDelegate.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/DeviceDelegate.qml rename to plasmoid/package/contents/ui/DeviceDelegate.qml diff --git a/plasmoid-kf6/package/contents/ui/FindMyPhone.qml b/plasmoid/package/contents/ui/FindMyPhone.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/FindMyPhone.qml rename to plasmoid/package/contents/ui/FindMyPhone.qml diff --git a/plasmoid-kf6/package/contents/ui/FullRepresentation.qml b/plasmoid/package/contents/ui/FullRepresentation.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/FullRepresentation.qml rename to plasmoid/package/contents/ui/FullRepresentation.qml diff --git a/plasmoid-kf6/package/contents/ui/RemoteCommands.qml b/plasmoid/package/contents/ui/RemoteCommands.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/RemoteCommands.qml rename to plasmoid/package/contents/ui/RemoteCommands.qml diff --git a/plasmoid-kf6/package/contents/ui/SMS.qml b/plasmoid/package/contents/ui/SMS.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/SMS.qml rename to plasmoid/package/contents/ui/SMS.qml diff --git a/plasmoid-kf6/package/contents/ui/Sftp.qml b/plasmoid/package/contents/ui/Sftp.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/Sftp.qml rename to plasmoid/package/contents/ui/Sftp.qml diff --git a/plasmoid-kf6/package/contents/ui/Share.qml b/plasmoid/package/contents/ui/Share.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/Share.qml rename to plasmoid/package/contents/ui/Share.qml diff --git a/plasmoid-kf6/package/contents/ui/VirtualMonitor.qml b/plasmoid/package/contents/ui/VirtualMonitor.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/VirtualMonitor.qml rename to plasmoid/package/contents/ui/VirtualMonitor.qml diff --git a/plasmoid-kf6/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml similarity index 100% rename from plasmoid-kf6/package/contents/ui/main.qml rename to plasmoid/package/contents/ui/main.qml diff --git a/plasmoid-kf6/package/metadata.json b/plasmoid/package/metadata.json similarity index 100% rename from plasmoid-kf6/package/metadata.json rename to plasmoid/package/metadata.json