some more branding

This commit is contained in:
tumillanino
2026-03-26 14:36:06 +11:00
parent 204c1638b9
commit e7d6daf595
317 changed files with 23146 additions and 1 deletions

View File

@@ -0,0 +1,80 @@
/**
* SPDX-FileCopyrightText: 2014 Samoilenko Yuri <kinnalru@gmail.com>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.kdeconnect as KDEConnect
QtObject {
id: root
required property KDEConnect.DeviceDbusInterface device
readonly property alias available: checker.available
readonly property KDEConnect.PluginChecker pluginChecker: KDEConnect.PluginChecker {
id: checker
pluginName: "battery"
device: root.device
}
readonly property bool charging: battery?.isCharging ?? false
readonly property int charge: battery?.charge ?? -1
readonly property string displayString: {
if (available && charge > -1) {
if (charging) {
return i18n("%1% charging", charge);
} else {
return i18n("%1%", charge);
}
} else {
return i18n("No info");
}
}
property KDEConnect.BatteryDbusInterface battery
/**
* Suggests an icon name to use for the current battery level
*/
readonly property string iconName: {
if (charge < 0) {
return "battery-missing-symbolic";
} else if (charge < 10) {
return charging
? "battery-empty-charging-symbolic"
: "battery-empty-symbolic";
} else if (charge < 25) {
return charging
? "battery-caution-charging-symbolic"
: "battery-caution-symbolic";
} else if (charge < 50) {
return charging
? "battery-low-charging-symbolic"
: "battery-low-symbolic";
} else if (charge < 75) {
return charging
? "battery-good-charging-symbolic"
: "battery-good-symbolic";
} else {
return charging
? "battery-full-charging-symbolic"
: "battery-full-symbolic";
}
}
onAvailableChanged: {
if (available) {
battery = KDEConnect.DeviceBatteryDbusInterfaceFactory.create(device.id());
} else {
battery = null;
}
}
}

View File

@@ -0,0 +1,42 @@
/**
* SPDX-FileCopyrightText: 2021 Yaman Qalieh <ybq987@gmail.com>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.kdeconnect as KDEConnect
QtObject {
id: root
required property KDEConnect.DeviceDbusInterface device
readonly property alias available: checker.available
readonly property KDEConnect.PluginChecker pluginChecker: KDEConnect.PluginChecker {
id: checker
pluginName: "clipboard"
device: root.device
}
property KDEConnect.ClipboardDbusInterface clipboard
function sendClipboard(): void {
if (clipboard) {
clipboard.sendClipboard();
}
}
onAvailableChanged: {
if (available) {
clipboard = KDEConnect.ClipboardDbusInterfaceFactory.create(device.id());
} else {
clipboard = null;
}
}
}

View File

@@ -0,0 +1,44 @@
/**
* SPDX-FileCopyrightText: 2014-2015 Frederic St-Pierre <me@fredericstpierre.com>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.kirigami as Kirigami
import org.kde.plasma.plasmoid
DropArea {
id: root
required property PlasmoidItem plasmoidItem
onEntered: drag => {
if (drag.hasUrls) {
root.plasmoidItem.expanded = true;
}
}
MouseArea {
anchors.fill: parent
property bool wasExpanded: false
onPressed: mouse => {
wasExpanded = root.plasmoidItem.expanded;
}
onClicked: mouse => {
root.plasmoidItem.expanded = !root.plasmoidItem.expanded;
}
}
Kirigami.Icon {
anchors.fill: parent
source: Plasmoid.icon
}
}

View File

@@ -0,0 +1,129 @@
/**
* SPDX-FileCopyrightText: 2021 David Shlemayev <david.shlemayev@gmail.com>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.kdeconnect as KDEConnect
QtObject {
id: root
required property KDEConnect.DeviceDbusInterface device
readonly property alias available: checker.available
readonly property KDEConnect.PluginChecker pluginChecker: KDEConnect.PluginChecker {
id: checker
pluginName: "connectivity_report"
device: root.device
}
/**
* 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?.cellularNetworkType ?? i18n("Unknown")
/**
* Reports a value between 0 and 4 (inclusive) which represents the strength of the cellular connection
*/
readonly property int signalStrength: connectivity?.cellularNetworkStrength ?? -1
readonly property string displayString: {
if (connectivity !== null) {
return `${networkType} ${signalStrength}/4`;
} else {
return i18n("No signal");
}
}
property KDEConnect.ConnectivityReportDbusInterface connectivity
/**
* 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
const signalStrengthIconName =
(signalStrength < 0 || connectivity === null) ?
// 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
const networkTypeSuffix =
(networkType === "5G") ?
"-5g" :
(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 = KDEConnect.DeviceConnectivityReportDbusInterfaceFactory.create(device.id());
} else {
connectivity = null;
}
}
}

View File

@@ -0,0 +1,490 @@
/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtCore
import QtQuick
import QtQuick.Dialogs as QtDialogs
import QtQuick.Layouts
import org.kde.kdeconnect as KDEConnect
import org.kde.kirigami as Kirigami
import org.kde.plasma.components as PlasmaComponents
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.extras as PlasmaExtras
PlasmaComponents.ItemDelegate {
id: root
required property int index
required property var model
readonly property KDEConnect.DeviceDbusInterface device: KDEConnect.DeviceDbusInterfaceFactory.create(model.deviceId)
hoverEnabled: false
down: false
Battery {
id: battery
device: root.device
}
Clipboard {
id: clipboard
device: root.device
}
Connectivity {
id: connectivity
device: root.device
}
FindMyPhone {
id: findmyphone
device: root.device
}
RemoteCommands {
id: remoteCommands
device: root.device
}
Sftp {
id: sftp
device: root.device
}
Share {
id: share
device: root.device
}
SMS {
id: sms
device: root.device
}
VirtualMonitor {
id: virtualmonitor
device: root.device
}
Kirigami.PromptDialog {
id: prompt
visible: false
showCloseButton: true
standardButtons: Kirigami.Dialog.NoButton
title: i18n("Virtual Monitor is not available")
}
QtDialogs.FileDialog {
id: fileDialog
title: i18n("Please choose a file")
currentFolder: StandardPaths.writableLocation(StandardPaths.HomeLocation)
modality: Qt.NonModal
fileMode: QtDialogs.FileDialog.OpenFiles
onAccepted: {
selectedFiles.forEach(url => share.plugin.shareUrl(url));
}
}
PlasmaExtras.Menu {
id: menu
visualParent: overflowMenu
placement: PlasmaExtras.Menu.BottomPosedLeftAlignedPopup
// Share
PlasmaExtras.MenuItem {
icon: "document-share"
visible: share.available
text: i18n("Share file")
onClicked: fileDialog.open()
}
// Clipboard
PlasmaExtras.MenuItem {
icon: "klipper"
visible: clipboard.clipboard?.isAutoShareDisabled ?? false
text: i18n("Send Clipboard")
onClicked: {
clipboard.sendClipboard()
}
}
// Find my phone
PlasmaExtras.MenuItem {
icon: "irc-voice"
visible: findmyphone.available
text: i18n("Ring my phone")
onClicked: {
findmyphone.ring()
}
}
// SFTP
PlasmaExtras.MenuItem {
icon: "document-open-folder"
visible: sftp.available
text: i18n("Browse this device")
onClicked: {
sftp.browse()
}
}
// SMS
PlasmaExtras.MenuItem {
icon: "message-new"
visible: sms.available
text: i18n("SMS Messages")
onClicked: {
sms.plugin.launchApp()
}
}
}
DropArea {
id: fileDropArea
anchors.fill: parent
onDropped: drop => {
if (drop.hasUrls) {
const urls = new Set(drop.urls.map(url => url.toString()));
urls.forEach(url => share.plugin.shareUrl(url));
}
drop.accepted = true;
}
PlasmaCore.ToolTipArea {
id: dropAreaToolTip
anchors.fill: parent
active: true
mainText: i18n("File Transfer")
subText: i18n("Drop a file to transfer it onto your phone.")
}
}
contentItem: ColumnLayout {
spacing: Kirigami.Units.smallSpacing
RowLayout {
width: parent.width
spacing: Kirigami.Units.smallSpacing
PlasmaComponents.Label {
id: deviceName
elide: Text.ElideRight
text: root.model.name
Layout.fillWidth: true
textFormat: Text.PlainText
}
PlasmaComponents.ToolButton {
icon.name: "krdc"
visible: virtualmonitor.available
text: i18n("Virtual Display")
checked: visible && virtualmonitor.plugin.active
checkable: true
onClicked: {
if (virtualmonitor.plugin.active) {
virtualmonitor.plugin.stop();
prompt.visible = false;
} else {
virtualmonitor.plugin.requestVirtualMonitor();
prompt.subtitle = virtualmonitor.plugin.lastError;
prompt.visible = prompt.subtitle.length > 0;
}
}
}
RowLayout {
id: connectionInformation
visible: connectivity.available
spacing: Kirigami.Units.smallSpacing
// 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.
Kirigami.Icon {
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
spacing: Kirigami.Units.smallSpacing
Kirigami.Icon {
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
}
}
PlasmaComponents.ToolButton {
id: overflowMenu
icon.name: "application-menu"
checked: menu.status === PlasmaExtras.Menu.Open
onPressed: menu.openRelative()
}
}
// RemoteKeyboard
PlasmaComponents.ItemDelegate {
visible: remoteKeyboard.remoteState
Layout.fillWidth: true
contentItem: RowLayout {
width: parent.width
spacing: 5
PlasmaComponents.Label {
id: remoteKeyboardLabel
text: i18n("Remote Keyboard")
}
KDEConnect.RemoteKeyboard {
id: remoteKeyboard
device: root.device
Layout.fillWidth: true
}
}
}
// Notifications
PlasmaComponents.ItemDelegate {
visible: notificationsModel.count > 0
enabled: true
Layout.fillWidth: true
contentItem: RowLayout {
spacing: Kirigami.Units.smallSpacing
PlasmaComponents.Label {
text: i18n("Notifications:")
}
PlasmaComponents.ToolButton {
enabled: true
visible: notificationsModel.isAnyDimissable;
Layout.alignment: Qt.AlignRight
icon.name: "edit-clear-history"
PlasmaComponents.ToolTip.text: i18n("Dismiss all notifications")
onClicked: notificationsModel.dismissAll();
}
}
}
Repeater {
id: notificationsView
model: KDEConnect.NotificationsModel {
id: notificationsModel
deviceId: root.model.deviceId
}
delegate: PlasmaComponents.ItemDelegate {
id: listitem
required property int index
required property var model
enabled: true
onClicked: checked = !checked
Layout.fillWidth: true
property bool replying: false
contentItem: ColumnLayout {
spacing: Kirigami.Units.smallSpacing
RowLayout {
spacing: Kirigami.Units.smallSpacing
Kirigami.Icon {
id: notificationIcon
source: listitem.model.appIcon
width: (valid && listitem.model.appIcon !== "") ? dismissButton.width : 0
height: width
Layout.alignment: Qt.AlignLeft
}
PlasmaComponents.Label {
id: notificationLabel
text: {
const { appName, notitext, title } = listitem.model;
const description = title !== "" ? (appName === title ? notitext : `${title}: ${notitext}`) : notitext;
return `${appName}: ${description}`;
}
elide: listitem.checked ? Text.ElideNone : Text.ElideRight
maximumLineCount: listitem.checked ? 0 : 1
wrapMode: Text.Wrap
Layout.fillWidth: true
}
PlasmaComponents.ToolButton {
id: replyButton
visible: listitem.model.repliable
enabled: listitem.model.repliable && !listitem.replying
icon.name: "mail-reply-sender"
PlasmaComponents.ToolTip.text: i18n("Reply")
onClicked: {
listitem.replying = true;
replyTextField.forceActiveFocus();
}
}
PlasmaComponents.ToolButton {
id: dismissButton
visible: notificationsModel.isAnyDimissable;
enabled: listitem.model.dismissable
Layout.alignment: Qt.AlignRight
icon.name: "window-close"
PlasmaComponents.ToolTip.text: i18n("Dismiss")
onClicked: listitem.model.dbusInterface.dismiss();
}
}
RowLayout {
visible: listitem.replying
width: notificationLabel.width + replyButton.width + dismissButton.width + Kirigami.Units.smallSpacing * 2
spacing: Kirigami.Units.smallSpacing
PlasmaComponents.Button {
id: replyCancelButton
Layout.alignment: Qt.AlignBottom
text: i18n("Cancel")
display: PlasmaComponents.AbstractButton.IconOnly
PlasmaComponents.ToolTip {
text: replyCancelButton.text
}
icon.name: "dialog-cancel"
onClicked: {
replyTextField.text = "";
listitem.replying = false;
}
}
PlasmaComponents.TextArea {
id: replyTextField
placeholderText: i18nc("@info:placeholder", "Reply to %1…", listitem.model.appName)
wrapMode: TextEdit.Wrap
Layout.fillWidth: true
Keys.onPressed: event => {
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;
}
}
}
PlasmaComponents.Button {
Layout.alignment: Qt.AlignBottom
id: replySendButton
text: i18n("Send")
icon.name: "document-send"
enabled: replyTextField.text !== ""
onClicked: {
listitem.model.dbusInterface.sendReply(replyTextField.text);
replyTextField.text = "";
listitem.replying = false;
}
}
}
}
}
}
// Commands
RowLayout {
visible: remoteCommands.available
width: parent.width
spacing: Kirigami.Units.smallSpacing
PlasmaComponents.Label {
text: i18n("Run command")
Layout.fillWidth: true
}
PlasmaComponents.Button {
id: addCommandButton
icon.name: "list-add"
PlasmaComponents.ToolTip.text: i18n("Add command")
onClicked: remoteCommands.plugin.editCommands()
visible: remoteCommands.plugin?.canAddCommand ?? false
}
}
Repeater {
id: commandsView
visible: remoteCommands.available
model: KDEConnect.RemoteCommandsModel {
id: commandsModel
deviceId: root.model.deviceId
}
delegate: PlasmaComponents.ItemDelegate {
id: commandDelegate
required property int index
required property var model
enabled: true
onClicked: {
remoteCommands.plugin?.triggerCommand(commandDelegate.model.key);
}
Layout.fillWidth: true
contentItem: PlasmaComponents.Label {
text: `${commandDelegate.model.name}\n${commandDelegate.model.command}`
}
}
}
}
}

View File

@@ -0,0 +1,42 @@
/**
* SPDX-FileCopyrightText: 2014 Samoilenko Yuri <kinnalru@gmail.com>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.kdeconnect as KDEConnect
QtObject {
id: root
required property KDEConnect.DeviceDbusInterface device
readonly property alias available: checker.available
readonly property KDEConnect.PluginChecker pluginChecker: KDEConnect.PluginChecker {
id: checker
pluginName: "findmyphone"
device: root.device
}
property KDEConnect.FindMyPhoneDbusInterface findMyPhone
function ring(): void {
if (findMyPhone) {
findMyPhone.ring();
}
}
onAvailableChanged: {
if (available) {
findMyPhone = KDEConnect.FindMyPhoneDbusInterfaceFactory.create(device.id());
} else {
findMyPhone = null;
}
}
}

View File

@@ -0,0 +1,98 @@
/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls as QQC2
import QtQuick.Layouts
import org.kde.config as KConfig
import org.kde.kdeconnect as KDEConnect
import org.kde.kirigami as Kirigami
import org.kde.plasma.components as PlasmaComponents3
import org.kde.plasma.extras as PlasmaExtras
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 {
anchors.fill: parent
contentItem: ListView {
id: devicesView
spacing: Kirigami.Units.smallSpacing
clip: true
delegate: DeviceDelegate {
width: ListView.view.width - ListView.view.leftMargin - ListView.view.rightMargin
}
PlasmaExtras.PlaceholderMessage {
width: parent.width - Kirigami.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: QQC2.Action {
text: i18n("Pair a Device…")
icon.name: "list-add"
onTriggered: KDEConnect.OpenConfig.openConfiguration()
enabled: pairedDevicesModel.count === 0
}
PlasmaComponents3.Button {
Layout.leftMargin: Kirigami.Units.gridUnit * 3
Layout.rightMargin: Kirigami.Units.gridUnit * 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: Kirigami.Units.gridUnit * 3
Layout.rightMargin: Kirigami.Units.gridUnit * 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/")
}
}
}
}
}

View File

@@ -0,0 +1,29 @@
/**
* SPDX-FileCopyrightText: 2018 Nicolas Fella <nicolas.fella@gmx.de>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.kdeconnect as KDEConnect
QtObject {
id: root
required property KDEConnect.DeviceDbusInterface device
readonly property alias available: checker.available
readonly property KDEConnect.PluginChecker pluginChecker: KDEConnect.PluginChecker {
id: checker
pluginName: "remotecommands"
device: root.device
}
property KDEConnect.RemoteCommandsDbusInterface plugin:
available ? KDEConnect.RemoteCommandsDbusInterfaceFactory.create(device.id()) : null
}

View File

@@ -0,0 +1,29 @@
/**
* SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <aleixpol@kde.org>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.kdeconnect as KDEConnect
QtObject {
id: root
required property KDEConnect.DeviceDbusInterface device
readonly property alias available: checker.available
readonly property KDEConnect.PluginChecker pluginChecker: KDEConnect.PluginChecker {
id: checker
pluginName: "sms"
device: root.device
}
readonly property KDEConnect.SmsDbusInterface plugin:
available ? KDEConnect.SmsDbusInterfaceFactory.create(device.id()) : null
}

View File

@@ -0,0 +1,42 @@
/**
* SPDX-FileCopyrightText: 2014 Samoilenko Yuri <kinnalru@gmail.com>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.kdeconnect as KDEConnect
QtObject {
id: root
required property KDEConnect.DeviceDbusInterface device
readonly property alias available: checker.available
readonly property KDEConnect.PluginChecker pluginChecker: KDEConnect.PluginChecker {
id: checker
pluginName: "sftp"
device: root.device
}
property KDEConnect.SftpDbusInterface sftp
function browse(): void {
if (sftp) {
sftp.startBrowsing();
}
}
onAvailableChanged: {
if (available) {
sftp = KDEConnect.SftpDbusInterfaceFactory.create(device.id());
} else {
sftp = null;
}
}
}

View File

@@ -0,0 +1,29 @@
/**
* SPDX-FileCopyrightText: 2018 Nicolas Fella <nicolas.fella@gmx.de>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.kdeconnect as KDEConnect
QtObject {
id: root
required property KDEConnect.DeviceDbusInterface device
readonly property alias available: checker.available
readonly property KDEConnect.PluginChecker pluginChecker: KDEConnect.PluginChecker {
id: checker
pluginName: "share"
device: root.device
}
property KDEConnect.ShareDbusInterface plugin:
available ? KDEConnect.ShareDbusInterfaceFactory.create(device.id()) : null
}

View File

@@ -0,0 +1,29 @@
/**
* SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.kdeconnect as KDEConnect
QtObject {
id: root
required property KDEConnect.DeviceDbusInterface device
readonly property alias available: checker.available
readonly property KDEConnect.PluginChecker pluginChecker: KDEConnect.PluginChecker {
id: checker
pluginName: "virtualmonitor"
device: root.device
}
readonly property KDEConnect.VirtualmonitorDbusInterface plugin:
available ? KDEConnect.VirtualmonitorDbusInterfaceFactory.create(device.id()) : null
}

View File

@@ -0,0 +1,62 @@
/**
* SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@kde.org>
* SPDX-FileCopyrightText: 2024 ivan tkachenko <me@ratijas.tk>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
pragma ComponentBehavior: Bound
import QtQuick
import org.kde.config as KConfig
import org.kde.kdeconnect as KDEConnect
import org.kde.kquickcontrolsaddons as KQuickControlsAddons
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.plasmoid
PlasmoidItem {
id: root
readonly property bool inPanel: [
PlasmaCore.Types.TopEdge,
PlasmaCore.Types.RightEdge,
PlasmaCore.Types.BottomEdge,
PlasmaCore.Types.LeftEdge,
].includes(Plasmoid.location)
KDEConnect.DevicesModel {
id: connectedDeviceModel
displayFilter: KDEConnect.DevicesModel.Paired | KDEConnect.DevicesModel.Reachable
}
KDEConnect.DevicesModel {
id: pairedDeviceModel
displayFilter: KDEConnect.DevicesModel.Paired
}
Plasmoid.icon: inPanel
? "kdeconnect-tray-symbolic"
: "kdeconnect-tray"
Plasmoid.status: connectedDeviceModel.count > 0 ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.PassiveStatus
fullRepresentation: FullRepresentation {
devicesModel: connectedDeviceModel
}
compactRepresentation: CompactRepresentation {
plasmoidItem: root
}
PlasmaCore.Action {
id: configureAction
text: i18n("KDE Connect Settings…")
icon.name: "configure"
onTriggered: KDEConnect.OpenConfig.openConfiguration()
}
Component.onCompleted: {
Plasmoid.setInternalAction("configure", configureAction);
}
}

View File

@@ -0,0 +1,150 @@
{
"KPackageStructure": "Plasma/Applet",
"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[da]": "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[ga]": "Albert Vaca Cintora",
"Name[gl]": "Albert Vaca Cintora",
"Name[he]": "אלברט ואקה סינטורה",
"Name[hi]": "अल्बर्ट वाका सिंटोरा",
"Name[hu]": "Albert Vaca Cintora",
"Name[ia]": "Albert Vaca Cintora",
"Name[is]": "Albert Vaca Cintora",
"Name[it]": "Albert Vaca Cintora",
"Name[ja]": "Albert Vaca Cintora",
"Name[ka]": "Albert Vaca Cintora",
"Name[ko]": "Albert Vaca Cintora",
"Name[lt]": "Albert Vaca Cintora",
"Name[lv]": "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[ro]": "Albert Vaca Cintora",
"Name[ru]": "Albert Vaca Cintora",
"Name[sa]": "अल्बर्ट वाका सिन्टोरा",
"Name[sk]": "Albert Vaca Cintora",
"Name[sl]": "Albert Vaca Cintora",
"Name[sv]": "Albert Vaca Cintora",
"Name[tr]": "Albert Vaca Cintora",
"Name[uk]": "Albert Vaca Cintora",
"Name[zh_CN]": "Albert Vaca Cintora",
"Name[zh_TW]": "Albert Vaca Cintora"
}
],
"Category": "System Information",
"Description": "Manage connected devices",
"Description[ar]": "تدير الأجهزة المتصلة",
"Description[bg]": "Управление на свързани устройства",
"Description[ca@valencia]": "Gestiona els dispositius connectats",
"Description[ca]": "Gestiona els dispositius connectats",
"Description[cs]": "Spravovat připojená zařízení",
"Description[da]": "Håndtér forbundede enheder",
"Description[de]": "Verbundene Geräte verwalten",
"Description[en_GB]": "Manage connected devices",
"Description[eo]": "Mastrumi konektitajn aparatojn",
"Description[es]": "Administrar dispositivos conectados",
"Description[eu]": "Konektatutako gailuak kudeatu",
"Description[fi]": "Hallitse kytkettyjä laitteita",
"Description[fr]": "Gérer les appareils connectés",
"Description[ga]": "Bainistigh gléasanna ceangailte",
"Description[gl]": "Xestionar os dispositivos conectados.",
"Description[he]": "ניהול התקנים מחוברים",
"Description[hu]": "Csatlakoztatott eszközök kezelése",
"Description[ia]": "Gere dispositivos connectite",
"Description[is]": "Stjórna tengdum tækjum",
"Description[it]": "Gestisci i dispositivi connessi",
"Description[ka]": "მიერთებული მოწყობილობების მართვა",
"Description[ko]": "연결된 장치 관리",
"Description[lt]": "Tvarkyti prijungtus įrenginius",
"Description[lv]": "Pārvaldīt savienotās ierīces",
"Description[nl]": "Verbonden apparaten beheren",
"Description[nn]": "Handsam tilkopla einingar",
"Description[pa]": "ਕਨੈਕਟ ਹੋਏ ਡਿਵਾਈਸਾਂ ਦਾ ਇੰਤਜ਼ਾਮ",
"Description[pl]": "Zarządzaj podłączonymi urządzeniami",
"Description[pt_BR]": "Gerenciar dispositivos conectados",
"Description[ro]": "Gestionează dispozitivele conectate",
"Description[ru]": "Управление подключёнными устройствами",
"Description[sa]": "संयोजितयन्त्राणां प्रबन्धनं कुर्वन्तु",
"Description[sl]": "Upravljaj povezane naprave",
"Description[sv]": "Hantera anslutna apparater",
"Description[ta]": "இணைந்துள்ள சாதனங்களை நிர்வகிக்க விடும்",
"Description[tr]": "Bağlı aygıtları yönetin",
"Description[uk]": "Керування з'єднаними пристроями",
"Description[zh_CN]": "管理已连接的设备",
"Description[zh_TW]": "管理已連線裝置",
"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[da]": "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]": "KDEConnect",
"Name[ga]": "KDE Connect",
"Name[gl]": "KDE Connect",
"Name[he]": "KDE Connect",
"Name[hi]": "केडीई कनेक्ट",
"Name[hu]": "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[lv]": "KDE Connect",
"Name[nl]": "KDE Connect",
"Name[nn]": "KDE Connect",
"Name[pa]": "KDE ਕਨੈਕਟ",
"Name[pl]": "KDE Connect",
"Name[pt]": "KDE Connect",
"Name[pt_BR]": "KDE Connect",
"Name[ro]": "KDE Connect",
"Name[ru]": "KDE Connect",
"Name[sa]": "KDE Connect इति",
"Name[sk]": "KDE Connect",
"Name[sl]": "KDE Connect",
"Name[sv]": "KDE-anslut",
"Name[ta]": "கே.டீ.யீ. கனெக்ட்",
"Name[tr]": "KDE Bağlan",
"Name[uk]": "KDE Connect",
"Name[zh_CN]": "KDE Connect",
"Name[zh_TW]": "KDE Connect",
"Version": "0.1",
"Website": "https://albertvaka.wordpress.com"
},
"X-Plasma-API": "declarativeappletscript",
"X-Plasma-API-Minimum-Version": "6.0",
"X-Plasma-MainScript": "ui/main.qml",
"X-Plasma-NotificationArea": "true",
"X-Plasma-NotificationAreaCategory": "Hardware"
}