Remove KCM

The KDE Connect QML app has reached the point where it has almost 100% feature parity with the KCM (two features missing only: exporting/importing commands lists for the runcommand plugin, and configuring the applications for the receive notifications plugin). So I think it's time we kill the KCM module and replace it with the nicer looking QML app, removing in the process a whole lot of code duplication.

I originally wrote the KCM module 12 years ago now and it has served us well all this years, but it's time for it to go 😄
This commit is contained in:
Albert Vaca Cintora
2025-06-24 23:07:40 +02:00
parent 1275c8e031
commit c8ab073892
62 changed files with 32 additions and 3077 deletions

View File

@@ -102,13 +102,7 @@ if (Qt6Gui_VERSION VERSION_GREATER_EQUAL "6.10.0")
endif()
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications
KIO KCMUtils Service Solid Kirigami People WindowSystem GuiAddons Crash ItemModels)
find_package(KF6DocTools ${KF_MIN_VERSION})
set_package_properties(KF6DocTools PROPERTIES DESCRIPTION
"Tools to generate documentation"
TYPE OPTIONAL
)
KIO ColorScheme Service Solid Kirigami People WindowSystem GuiAddons Crash ItemModels)
if (WIN32)
get_filename_component(WINDOWS_KITS_DIR
@@ -130,9 +124,6 @@ add_subdirectory(icons)
add_subdirectory(data)
add_subdirectory(cli)
add_subdirectory(declarativeplugin)
add_subdirectory(kcm)
add_subdirectory(kcmplugin)
add_subdirectory(daemon)
add_subdirectory(app)
add_subdirectory(indicator)
@@ -140,7 +131,6 @@ add_subdirectory(urlhandler)
add_subdirectory(nautilus-extension)
add_subdirectory(fileitemactionplugin)
add_subdirectory(smsapp)
add_subdirectory(settings)
if(NOT WIN32 AND NOT APPLE)
add_subdirectory(kio)
@@ -148,10 +138,6 @@ if(NOT WIN32 AND NOT APPLE)
endif()
ki18n_install(po)
if(KF6DocTools_FOUND)
kdoctools_install(po)
add_subdirectory(doc)
endif()
if(BUILD_TESTING)
add_subdirectory(tests)

View File

@@ -14,7 +14,3 @@ function(kdeconnect_add_plugin plugin_name)
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin ${PlUGIN_WITHOUT_PREFIX})")
endfunction()
function(kdeconnect_add_kcm plugin)
kcoreaddons_add_plugin(${plugin} ${ARGN} INSTALL_NAMESPACE kdeconnect/kcms)
install(FILES "${plugin}.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)
endfunction()

View File

@@ -41,7 +41,7 @@ ecm_target_qml_sources(kdeconnect-app SOURCES
qml/WelcomePage.qml
)
target_link_libraries(kdeconnect-app PRIVATE Qt::Quick Qt::QuickControls2 Qt::Widgets KF6::CoreAddons KF6::I18n KF6::KCMUtils KF6::Crash KF6::ItemModels KF6::DBusAddons KF6::WindowSystem)
target_link_libraries(kdeconnect-app PRIVATE Qt::Quick Qt::QuickControls2 Qt::Widgets KF6::CoreAddons KF6::I18n KF6::ColorScheme KF6::Crash KF6::ItemModels KF6::DBusAddons KF6::WindowSystem)
install(TARGETS kdeconnect-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.kdeconnect.app.desktop DESTINATION ${KDE_INSTALL_APPDIR})

View File

@@ -7,6 +7,7 @@
#include "openconfig.h"
#include <QDebug>
#include <QProcess>
#include <KIO/CommandLauncherJob>
@@ -22,22 +23,25 @@ void OpenConfig::openConfiguration(const QString &deviceId, const QString &plugi
QString argument;
if (!deviceId.isEmpty()) {
args << QStringLiteral("--args");
argument = deviceId;
args << QStringLiteral("--device");
args << deviceId;
if (!pluginId.isEmpty()) {
argument += QLatin1Char(':') + pluginId;
args << QStringLiteral("--plugin-config");
args << pluginId;
}
args << argument;
}
auto job = new KIO::CommandLauncherJob(QStringLiteral("kdeconnect-settings"), args);
job->setDesktopName(QStringLiteral("org.kde.kdeconnect-settings"));
#ifdef Q_OS_WIN
QProcess::startDetached(QStringLiteral("kdeconnect-app.exe"), args);
#else
auto job = new KIO::CommandLauncherJob(QStringLiteral("kdeconnect-app"), args);
job->setDesktopName(QStringLiteral("org.kde.kdeconnect.app"));
job->setStartupId(m_currentToken.toUtf8());
job->start();
m_currentToken = QString();
#endif
}
#include "moc_openconfig.cpp"

View File

@@ -164,17 +164,13 @@
<content_rating type="oars-1.1"/>
<project_group>KDE</project_group>
<launchable type="desktop-id">org.kde.kdeconnect.app.desktop</launchable>
<launchable type="desktop-id">org.kde.kdeconnect-settings.desktop</launchable>
<provides>
<binary>kdeconnectd</binary>
<binary>kdeconnect-cli</binary>
<binary>kdeconnect-app</binary>
<binary>kdeconnect-indicator</binary>
<binary>kdeconnect-settings</binary>
<binary>kdeconnect-sms</binary>
<binary>kdeconnect-handler</binary>
<binary>kdeconnect-handler</binary>
<id>org.kde.kdeconnect.kcm.desktop</id>
<dbus>org.kde.kdeconnect</dbus>
</provides>
<categories>

View File

@@ -1 +0,0 @@
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR kdeconnect)

View File

@@ -1,55 +0,0 @@
<?xml version="1.0" ?>
<!DOCTYPE article PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN"
"dtd/kdedbx45.dtd" [
<!ENTITY % addindex "IGNORE">
<!ENTITY % English "INCLUDE" > <!-- change language only here -->
]>
<article id="kdeconnect" lang="&language;">
<articleinfo>
<title>KDE Connect</title>
<authorgroup>
<author>&Aleix.Pol;</author>
<!-- TRANS:ROLES_OF_TRANSLATORS -->
</authorgroup>
<date>2015-10-19</date>
<releaseinfo>0.9</releaseinfo>
<keywordset>
<keyword>KDE</keyword>
<keyword>Connect</keyword>
<keyword>phone</keyword>
<keyword>remote</keyword>
<keyword>device</keyword>
<keyword>pair</keyword>
</keywordset>
</articleinfo>
<sect1 id="kdeconnect-kcm">
<title>KDE Connect</title>
<para>You can use this dialog to configure which devices we're paired to and what we're sharing. The UI is divided in 2 main parts:</para>
<sect2>
<title>Devices List</title>
<para>It contains a list of devices separated between paired and unpaired. Select one to pair it and when it's paired, configure it.</para>
</sect2>
<sect2>
<title>Device Configuration</title>
<para>It offers a list of the available plugins related to the device. These plugins will correspond to the different features available for the device. This is useful mainly for knowing what plugins are available and, in case there's some information that should not be shared with a device, explicitly disable it.</para>
</sect2>
<sect2>
<title>General interaction with the devices</title>
<para>KDE Connect doesn't offer a central place to interact with your devices. It's designed to integrate properly with your operating system, making it possible to share files from the different applications or integrating with the notification system to display information.</para>
</sect2>
</sect1>
</article>

View File

@@ -40,7 +40,7 @@ ecm_qt_declare_logging_category(kdeconnect-indicator
target_include_directories(kdeconnect-indicator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/systray_actions)
target_link_libraries(kdeconnect-indicator Qt::Widgets Qt::QuickControls2 KF6::CoreAddons KF6::I18n KF6::Notifications KF6::DBusAddons KF6::KCMUtils KF6::Crash kdeconnectinterfaces kdeconnectcore kdeconnectversion)
target_link_libraries(kdeconnect-indicator Qt::Widgets Qt::QuickControls2 KF6::CoreAddons KF6::I18n KF6::Notifications KF6::DBusAddons KF6::ColorScheme KF6::Crash kdeconnectinterfaces kdeconnectcore kdeconnectversion)
if (WIN32)
target_link_libraries(kdeconnect-indicator windowsapp)

View File

@@ -22,7 +22,6 @@ const QString dbus_daemon = QStringLiteral("dbus-daemon.exe");
const QString kdeconnect_daemon = QStringLiteral("kdeconnectd.exe");
const QString kdeconnect_app = QStringLiteral("kdeconnect-app.exe");
const QString kdeconnect_handler = QStringLiteral("kdeconnect-handler.exe");
const QString kdeconnect_settings = QStringLiteral("kdeconnect-settings.exe");
const QString kdeconnect_sms = QStringLiteral("kdeconnect-sms.exe");
};
#endif

View File

@@ -33,7 +33,6 @@ IndicatorHelper::~IndicatorHelper()
this->terminateProcess(processes::dbus_daemon, m_indicatorUrl);
this->terminateProcess(processes::kdeconnect_app, m_indicatorUrl);
this->terminateProcess(processes::kdeconnect_handler, m_indicatorUrl);
this->terminateProcess(processes::kdeconnect_settings, m_indicatorUrl);
this->terminateProcess(processes::kdeconnect_sms, m_indicatorUrl);
this->terminateProcess(processes::kdeconnect_daemon, m_indicatorUrl);
}

View File

@@ -22,7 +22,6 @@
#endif
#include <KAboutData>
#include <KCMultiDialog>
#include <KColorSchemeManager>
#include <KCrash>
#include <KDBusService>
@@ -37,6 +36,7 @@
#include <dbushelper.h>
#include "indicatorhelper.h"
#include "openconfig.h"
int main(int argc, char **argv)
{
@@ -93,11 +93,9 @@ int main(int argc, char **argv)
proxyModel.setSourceModel(&model);
QMenu *menu = new QMenu;
QPointer<KCMultiDialog> dialog;
DaemonDbusInterface iface;
auto refreshMenu = [&iface, &proxyModel, &menu, &dialog]() {
auto refreshMenu = [&iface, &proxyModel, &menu]() {
menu->clear();
#if defined Q_OS_MAC
// On macOS, a single click on the icon doesn't open the app like on other platforms.
@@ -106,18 +104,10 @@ int main(int argc, char **argv)
QProcess::startDetached(appPath);
});
#endif
auto configure = menu->addAction(QIcon::fromTheme(QStringLiteral("configure")), i18n("Configure"));
QObject::connect(configure, &QAction::triggered, configure, [&dialog]() {
if (dialog == nullptr) {
dialog = new KCMultiDialog;
dialog->addModule(KPluginMetaData(QStringLiteral("plasma/kcms/systemsettings_qwidgets/kcm_kdeconnect")));
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
dialog->raise();
} else {
dialog->raise();
dialog->activateWindow();
}
auto configure = menu->addAction(QIcon::fromTheme(QStringLiteral("configure")), i18n("Configure..."));
QObject::connect(configure, &QAction::triggered, configure, []() {
OpenConfig oc;
oc.openConfiguration();
});
for (int i = 0, count = proxyModel.rowCount(); i < count; ++i) {
QObject *deviceObject = proxyModel.data(proxyModel.index(i, 0), DevicesModel::DeviceRole).value<QObject *>();
@@ -175,10 +165,8 @@ int main(int argc, char **argv)
});
QObject::connect(&systray, &QSystemTrayIcon::activated, [](QSystemTrayIcon::ActivationReason reason) {
if (reason == QSystemTrayIcon::Trigger) {
const QString kdeconnectAppExecutable = QStandardPaths::findExecutable(QStringLiteral("kdeconnect-app"), {QCoreApplication::applicationDirPath()});
if (!kdeconnectAppExecutable.isEmpty()) {
QProcess::startDetached(kdeconnectAppExecutable, {});
}
OpenConfig oc;
oc.openConfiguration();
}
});

View File

@@ -1,19 +0,0 @@
qt_add_resources(kcm_SRCS assets.qrc)
add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kcm")
kcoreaddons_add_plugin(kcm_kdeconnect SOURCES kcm.cpp ${kcm_SRCS} INSTALL_NAMESPACE plasma/kcms/systemsettings_qwidgets)
kcmutils_generate_desktop_file(kcm_kdeconnect)
ki18n_wrap_ui(kcm_kdeconnect kcm.ui)
target_link_libraries(kcm_kdeconnect
Qt::Core
Qt::Gui
Qt::QuickWidgets
Qt::QuickControls2
KF6::I18n
KF6::KCMUtils
kdeconnectinterfaces
kdeconnectversion
)

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env bash
$EXTRACTRC `find -name '*.ui' -o -name '*.rc'` >> rc.cpp
$XGETTEXT rc.cpp -o $podir/kdeconnect-kcm.pot
rm -f rc.cpp
#.cpp (-j passed to merge into existing file)
$XGETTEXT `find . -name '*.qml'` -j -o $podir/kdeconnect-kcm.pot
$XGETTEXT `find . -name '*.cpp'` -j -o $podir/kdeconnect-kcm.pot

View File

@@ -1,7 +0,0 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource prefix="/kdeconnectkcm">
<file>list.qml</file>
</qresource>
</RCC>

View File

@@ -1,444 +0,0 @@
/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "kcm.h"
#include <KColorSchemeManager>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KPluginMetaData>
#include <QMessageBox>
#include <QtWidgets/QListView>
#include <kcmutils_version.h>
#include <QQmlContext>
#include <QQuickItem>
#include <QQuickStyle>
#include <qassert.h>
#include "dbushelpers.h"
#include "dbusinterfaces.h"
#include "devicesmodel.h"
#include "devicessortproxymodel.h"
#include "kdeconnect-version.h"
K_PLUGIN_CLASS_WITH_JSON(KdeConnectKcm, "kcm_kdeconnect.json")
class QQuickWidgetPaleteChangeWatcher : public QObject
{
using QObject::QObject;
bool eventFilter(QObject *watched, QEvent *event) override
{
if (event->type() == QEvent::PaletteChange || event->type() == QEvent::ApplicationPaletteChange) {
// We know that watched is a QQuickWidget
QQuickWidget *w = static_cast<QQuickWidget *>(watched);
w->setClearColor(w->palette().color(QPalette::Window));
}
return QObject::eventFilter(watched, event);
}
};
void adjustListWidgetHeight(QListWidget *listWidget)
{
int totalHeight = 0;
for (int i = 0; i < listWidget->count(); ++i) {
totalHeight += listWidget->sizeHintForRow(i);
}
totalHeight += 2 * listWidget->frameWidth();
listWidget->setFixedHeight(totalHeight);
}
KdeConnectKcm::KdeConnectKcm(QObject *parent, const KPluginMetaData &md, const QVariantList &args)
: KCModule(parent, md)
, daemon(new DaemonDbusInterface(this))
, devicesModel(new DevicesModel(this))
, currentDevice(nullptr)
{
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
// Ensure we have a suitable color theme set for light/dark mode. KColorSchemeManager implicitly applies
// a suitable default theme.
KColorSchemeManager::instance();
// Force breeze style to ensure coloring works consistently in dark mode. Specifically tab colors have
// troubles on windows.
QApplication::setStyle(QStringLiteral("breeze"));
// Force breeze icon theme to ensure we can correctly adapt icons to color changes WRT dark/light mode.
// Without this we may end up with hicolor and fail to support icon recoloring.
QIcon::setThemeName(QStringLiteral("breeze"));
#else
QIcon::setFallbackThemeName(QStringLiteral("breeze"));
#endif
// Default to org.kde.desktop style unless the user forces another style
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
}
kcmUi.setupUi(widget());
sortProxyModel = new DevicesSortProxyModel(devicesModel);
kcmUi.list_quick_widget->setMinimumWidth(250);
kcmUi.list_quick_widget->rootContext()->setContextObject(new KLocalizedContext(kcmUi.list_quick_widget));
kcmUi.list_quick_widget->setClearColor(kcmUi.list_quick_widget->palette().color(QPalette::Window));
kcmUi.list_quick_widget->setSource(QUrl(QStringLiteral("qrc:/kdeconnectkcm/list.qml")));
kcmUi.list_quick_widget->rootObject()->setProperty("model", QVariant::fromValue(sortProxyModel));
connect(kcmUi.list_quick_widget->rootObject(), SIGNAL(clicked(QString)), this, SLOT(deviceSelected(QString)));
kcmUi.list_quick_widget->installEventFilter(new QQuickWidgetPaleteChangeWatcher(kcmUi.list_quick_widget));
kcmUi.deviceInfo->setVisible(false);
kcmUi.progressBar->setVisible(false);
kcmUi.messages->setVisible(false);
// Workaround: If we set this directly (or if we set it in the .ui file), the layout breaks
kcmUi.noDeviceLinks->setWordWrap(false);
QTimer::singleShot(0, this, [this] {
kcmUi.noDeviceLinks->setWordWrap(true);
});
setWhenAvailable(
daemon->announcedName(),
[this](bool error, const QString &announcedName) {
kcmUi.renameShow_button->setEnabled(!error);
if (error) {
kcmUi.rename_label->setText(i18n("Error: KDE Connect is not running"));
} else {
kcmUi.rename_label->setText(announcedName);
kcmUi.rename_edit->setText(announcedName);
}
},
this);
setWhenAvailable(
daemon->linkProviders(),
[this](bool error, const QStringList &linkProviders) {
if (error) {
return;
}
kcmUi.linkProviders_list->clear();
if (linkProviders.size() <= 1) {
kcmUi.linkProviders_list->hide();
kcmUi.linkProviders_label->hide();
} else {
for (int i = 0; i < linkProviders.size(); ++i) {
const QStringList linkProvider = linkProviders.at(i).split(QStringLiteral("|"));
const QString providerId = linkProvider.at(0);
QString displayName;
if (providerId == QLatin1StringView("BluetoothLinkProvider")) {
displayName = i18nc("@info KDE Connect provider name", "Bluetooth");
} else if (providerId == QLatin1StringView("LoopbackLinkProvider")) {
displayName = i18nc("@info KDE Connect provider name", "Loopback");
} else if (providerId == QLatin1StringView("LanLinkProvider")) {
displayName = i18nc("@info KDE Connect provider name", "Network");
} else {
Q_ASSERT_X(false, Q_FUNC_INFO, "Unknow provider given");
displayName = i18nc("@info KDE Connect provider name", "Unknown");
}
QString providerStatus = linkProvider.at(1);
QListWidgetItem *linkProviderItem = new QListWidgetItem(displayName, kcmUi.linkProviders_list);
linkProviderItem->setData(Qt::UserRole, providerId);
if (providerStatus.compare(QStringLiteral("enabled")) == 0) {
linkProviderItem->setCheckState(Qt::Checked);
} else {
linkProviderItem->setCheckState(Qt::Unchecked);
}
kcmUi.linkProviders_list->addItem(linkProviderItem);
}
// Hack to make the list widget resize to fit the contents
adjustListWidgetHeight(kcmUi.linkProviders_list);
}
connect(kcmUi.linkProviders_list, &QListWidget::itemChanged, this, [this](const QListWidgetItem *item) {
bool checked = item->checkState() == Qt::Checked;
daemon->setLinkProviderState(item->data(Qt::UserRole).toString(), checked);
});
},
this);
connect(daemon, &DaemonDbusInterface::announcedNameChanged, kcmUi.rename_edit, &QLineEdit::setText);
connect(daemon, &DaemonDbusInterface::announcedNameChanged, kcmUi.rename_label, &QLabel::setText);
connect(daemon, &DaemonDbusInterface::linkProvidersChanged, this, [this](const QStringList &providers) {
if (kcmUi.linkProviders_list->count() == 0) {
return; // not yet setup
}
for (auto i = 0, count = kcmUi.linkProviders_list->count(); i < count; i++) {
const auto item = kcmUi.linkProviders_list->item(i);
const auto id = item->data(Qt::UserRole).toString();
bool found = false;
for (const auto &provider : providers) {
if (provider.startsWith(id)) {
const auto status = provider.split(QStringLiteral("|")).at(1);
if (status.compare(QStringLiteral("enabled")) == 0) {
item->setCheckState(Qt::Checked);
} else {
item->setCheckState(Qt::Unchecked);
}
found = true;
break;
}
}
Q_ASSERT_X(found, Q_FUNC_INFO, "A new backend appeared, this should not happen as the list of backends is static");
}
});
setRenameMode(false);
setButtons(KCModule::Help | KCModule::NoAdditionalButton);
connect(devicesModel, &QAbstractItemModel::rowsRemoved, this, &KdeConnectKcm::devicesRemoved);
connect(kcmUi.accept_button, &QAbstractButton::clicked, this, &KdeConnectKcm::acceptPairing);
connect(kcmUi.reject_button, &QAbstractButton::clicked, this, &KdeConnectKcm::cancelPairing);
connect(kcmUi.cancel_button, &QAbstractButton::clicked, this, &KdeConnectKcm::cancelPairing);
connect(kcmUi.pair_button, &QAbstractButton::clicked, this, &KdeConnectKcm::requestPairing);
connect(kcmUi.unpair_button, &QAbstractButton::clicked, this, &KdeConnectKcm::unpair);
connect(kcmUi.ping_button, &QAbstractButton::clicked, this, &KdeConnectKcm::sendPing);
connect(kcmUi.refresh_button, &QAbstractButton::clicked, this, &KdeConnectKcm::refresh);
connect(kcmUi.rename_edit, &QLineEdit::returnPressed, this, &KdeConnectKcm::renameDone);
connect(kcmUi.renameDone_button, &QAbstractButton::clicked, this, &KdeConnectKcm::renameDone);
connect(kcmUi.renameShow_button, &QAbstractButton::clicked, this, &KdeConnectKcm::renameShow);
connect(kcmUi.pluginSelector, &KPluginWidget::changed, this, &KdeConnectKcm::pluginsConfigChanged);
if (!args.isEmpty() && !args.first().isNull() && args.first().canConvert<QString>()) {
const QString input = args.first().toString();
const auto colonIdx = input.indexOf(QLatin1Char(':'));
const QString deviceId = input.left(colonIdx);
const QString pluginCM = colonIdx < 0 ? QString() : input.mid(colonIdx + 1);
connect(devicesModel, &DevicesModel::rowsInserted, this, [this, deviceId, pluginCM]() {
kcmUi.list_quick_widget->rootObject()->setProperty("currentDeviceId", deviceId);
deviceSelected(deviceId);
if (!pluginCM.isEmpty()) {
kcmUi.pluginSelector->showConfiguration(pluginCM);
}
disconnect(devicesModel, &DevicesModel::rowsInserted, this, nullptr);
});
}
}
void KdeConnectKcm::devicesRemoved()
{
if (!currentDevice) {
return;
}
// If current device no longer exists, unselect it
if (devicesModel->rowForDevice(currentDevice->id()) == -1) {
delete currentDevice;
currentDevice = nullptr;
kcmUi.deviceInfo->setVisible(false);
}
}
void KdeConnectKcm::renameShow()
{
setRenameMode(true);
}
void KdeConnectKcm::renameDone()
{
QString newName = kcmUi.rename_edit->text();
if (newName.isEmpty()) {
// Rollback changes
kcmUi.rename_edit->setText(kcmUi.rename_label->text());
} else {
kcmUi.rename_label->setText(newName);
daemon->setAnnouncedName(newName);
}
setRenameMode(false);
}
void KdeConnectKcm::setRenameMode(bool b)
{
kcmUi.renameDone_button->setVisible(b);
kcmUi.rename_edit->setVisible(b);
kcmUi.renameShow_button->setVisible(!b);
kcmUi.rename_label->setVisible(!b);
}
KdeConnectKcm::~KdeConnectKcm()
{
}
void KdeConnectKcm::refresh()
{
daemon->forceOnNetworkChange();
}
void KdeConnectKcm::deviceSelected(const QString &deviceId)
{
if (currentDevice) {
disconnect(currentDevice, nullptr, this, nullptr);
}
currentDevice = devicesModel->getDevice(devicesModel->rowForDevice(deviceId));
if (!currentDevice) {
currentDevice = nullptr;
kcmUi.deviceInfo->setVisible(false);
return;
}
kcmUi.noDevicePlaceholder->setVisible(false);
bool valid = (currentDevice != nullptr && currentDevice->isValid());
kcmUi.deviceInfo->setVisible(valid);
if (!valid) {
return;
}
kcmUi.messages->setVisible(false);
resetDeviceView();
connect(currentDevice, &DeviceDbusInterface::pluginsChanged, this, &KdeConnectKcm::resetCurrentDevice);
connect(currentDevice, &DeviceDbusInterface::pairingFailed, this, &KdeConnectKcm::pairingFailed);
connect(currentDevice, &DeviceDbusInterface::pairStateChanged, this, &KdeConnectKcm::setCurrentDevicePairState);
}
void KdeConnectKcm::resetCurrentDevice()
{
const QStringList supportedPluginNames = currentDevice->supportedPlugins();
if (m_oldSupportedPluginNames != supportedPluginNames) {
resetDeviceView();
}
}
void KdeConnectKcm::resetDeviceView()
{
kcmUi.name_label->setText(currentDevice->name());
setWhenAvailable(
currentDevice->pairStateAsInt(),
[this](bool error, int pairStateAsInt) {
if (!error) {
setCurrentDevicePairState(pairStateAsInt);
}
},
this);
const QVector<KPluginMetaData> pluginInfo = KPluginMetaData::findPlugins(QStringLiteral("kdeconnect"));
QVector<KPluginMetaData> availablePluginInfo;
m_oldSupportedPluginNames = currentDevice->supportedPlugins();
for (auto it = pluginInfo.cbegin(), itEnd = pluginInfo.cend(); it != itEnd; ++it) {
if (m_oldSupportedPluginNames.contains(it->pluginId())) {
availablePluginInfo.append(*it);
}
}
KSharedConfigPtr deviceConfig = KSharedConfig::openConfig(currentDevice->pluginsConfigFile());
kcmUi.pluginSelector->clear();
kcmUi.pluginSelector->setConfigurationArguments({currentDevice->id()});
kcmUi.pluginSelector->addPlugins(availablePluginInfo, i18n("Available plugins"));
kcmUi.pluginSelector->setConfig(deviceConfig->group(QStringLiteral("Plugins")));
}
void KdeConnectKcm::requestPairing()
{
if (!currentDevice) {
return;
}
kcmUi.messages->hide();
currentDevice->requestPairing();
}
void KdeConnectKcm::unpair()
{
if (!currentDevice) {
return;
}
currentDevice->unpair();
}
void KdeConnectKcm::acceptPairing()
{
if (!currentDevice) {
return;
}
currentDevice->acceptPairing();
}
void KdeConnectKcm::cancelPairing()
{
if (!currentDevice) {
return;
}
currentDevice->cancelPairing();
}
void KdeConnectKcm::pairingFailed(const QString &error)
{
if (sender() != currentDevice)
return;
kcmUi.messages->setText(i18n("Error trying to pair: %1", error));
kcmUi.messages->animatedShow();
}
void KdeConnectKcm::setCurrentDevicePairState(int pairStateAsInt)
{
PairState state = (PairState)pairStateAsInt; // Hack because qdbus doesn't like enums
kcmUi.accept_button->setVisible(state == PairState::RequestedByPeer);
kcmUi.reject_button->setVisible(state == PairState::RequestedByPeer);
kcmUi.cancel_button->setVisible(state == PairState::Requested);
kcmUi.pair_button->setVisible(state == PairState::NotPaired);
kcmUi.unpair_button->setVisible(state == PairState::Paired);
kcmUi.progressBar->setVisible(state == PairState::Requested);
kcmUi.ping_button->setVisible(state == PairState::Paired);
kcmUi.verificationKey->setVisible(state == PairState::Requested || state == PairState::RequestedByPeer);
switch (state) {
case PairState::Paired:
kcmUi.status_label->setText(i18n("(paired)"));
break;
case PairState::NotPaired:
kcmUi.status_label->setText(i18n("(not paired)"));
break;
case PairState::RequestedByPeer:
kcmUi.status_label->setText(i18n("(incoming pair request)"));
kcmUi.verificationKey->setText(i18n("Key: %1", currentDevice->verificationKey()));
break;
case PairState::Requested:
kcmUi.status_label->setText(i18n("(pairing requested)"));
kcmUi.verificationKey->setText(i18n("Key: %1", currentDevice->verificationKey()));
break;
}
}
void KdeConnectKcm::pluginsConfigChanged(bool changed)
{
if (!changed)
return;
if (!currentDevice)
return;
kcmUi.pluginSelector->save();
currentDevice->reloadPlugins();
}
void KdeConnectKcm::save()
{
KCModule::save();
}
void KdeConnectKcm::sendPing()
{
if (!currentDevice)
return;
currentDevice->pluginCall(QStringLiteral("ping"), QStringLiteral("sendPing"));
}
#include "kcm.moc"
#include "moc_kcm.cpp"

View File

@@ -1,60 +0,0 @@
/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include <KCModule>
#include <QStandardItemModel>
#include <kconfigwidgets_version.h>
#include "ui_kcm.h"
#include <core/pairstate.h>
class QModelIndex;
class DeviceDbusInterface;
class DaemonDbusInterface;
class DevicesModel;
class DevicesSortProxyModel;
class KdeConnectKcm : public KCModule
{
Q_OBJECT
public:
KdeConnectKcm(QObject *parent, const KPluginMetaData &md, const QVariantList &args);
~KdeConnectKcm() override;
private:
void save() override;
private Q_SLOTS:
void deviceSelected(const QString &deviceId);
void requestPairing();
void pluginsConfigChanged(bool changed);
void sendPing();
void pairingFailed(const QString &error);
void refresh();
void renameShow();
void renameDone();
void setRenameMode(bool b);
void resetCurrentDevice();
void setCurrentDevicePairState(int pairStateAsInt);
void acceptPairing();
void cancelPairing();
void devicesRemoved();
private:
void resetDeviceView();
Ui::KdeConnectKcmUi kcmUi;
DaemonDbusInterface *daemon;
DevicesModel *devicesModel;
DevicesSortProxyModel *sortProxyModel;
DeviceDbusInterface *currentDevice;
QStringList m_oldSupportedPluginNames;
public Q_SLOTS:
void unpair();
};

View File

@@ -1,452 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>KdeConnectKcmUi</class>
<widget class="QWidget" name="KdeConnectKcmUi">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1130</width>
<height>740</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>250</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="rename_group_2">
<item>
<widget class="QLabel" name="rename_label">
<property name="font">
<font>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>KDE Connect</string>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::PlainText</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="renameShow_button">
<property name="text">
<string>Edit</string>
</property>
<property name="icon">
<iconset theme="edit-rename"/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="rename_group">
<item>
<widget class="QLineEdit" name="rename_edit">
<property name="maxLength">
<number>64</number>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="renameDone_button">
<property name="text">
<string>Save</string>
</property>
<property name="icon">
<iconset theme="dialog-ok"/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QQuickWidget" name="list_quick_widget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="resizeMode">
<enum>QQuickWidget::ResizeMode::SizeRootObjectToView</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="refresh_button">
<property name="text">
<string>Refresh</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="linkProviders_label">
<property name="text">
<string>Backends:</string>
</property>
</widget>
</item>
<item>
<widget class="QListWidget" name="linkProviders_list">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="deviceInfoBorder">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="deviceInfoBorder_layout">
<item>
<widget class="QWidget" name="deviceInfo" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="deviceInfo_layout">
<item>
<widget class="QWidget" name="header_2" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="header">
<property name="sizeConstraint">
<enum>QLayout::SizeConstraint::SetMaximumSize</enum>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QWidget" name="deviceAndStatus" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="deviceAndStatus_layout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="name_label">
<property name="font">
<font>
<pointsize>10</pointsize>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Device</string>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::PlainText</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="status_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>(status)</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="KSqueezedTextLabel" name="verificationKey">
<property name="text">
<string>KSqueezedTextLabel</string>
</property>
<property name="textInteractionFlags">
<set>Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="cancel_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="progressBar">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>0</number>
</property>
<property name="value">
<number>-1</number>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="accept_button">
<property name="text">
<string>Accept</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="reject_button">
<property name="text">
<string>Reject</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pair_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Request pairing</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="unpair_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Unpair</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="ping_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Send ping</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="KMessageWidget" name="messages"/>
</item>
<item>
<widget class="KPluginWidget" name="pluginSelector" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::FocusPolicy::WheelFocus</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="noDevicePlaceholder" native="true">
<layout class="QVBoxLayout" name="noDevicePlaceholder_layout">
<item>
<widget class="QLabel" name="noDeviceLinks">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;No device selected.&lt;br&gt;&lt;br&gt;If you own an Android device, make sure to install the &lt;a href=&quot;https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;KDE Connect Android app&lt;/span&gt;&lt;/a&gt; (also available &lt;a href=&quot;https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;from F-Droid&lt;/span&gt;&lt;/a&gt;) and it should appear in the list. If you have an iPhone, make sure to install the &lt;a href=&quot;https://apps.apple.com/us/app/kde-connect/id1580245991&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;KDE Connect iOS app&lt;/span&gt;&lt;/a&gt; &lt;br&gt;&lt;br&gt;If you are having problems, visit the &lt;a href=&quot;https://userbase.kde.org/KDEConnect&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;KDE Connect Community wiki&lt;/span&gt;&lt;/a&gt; for help.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>40</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextInteractionFlag::LinksAccessibleByKeyboard|Qt::TextInteractionFlag::LinksAccessibleByMouse</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KMessageWidget</class>
<extends>QFrame</extends>
<header>kmessagewidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KSqueezedTextLabel</class>
<extends>QLabel</extends>
<header>ksqueezedtextlabel.h</header>
</customwidget>
<customwidget>
<class>QQuickWidget</class>
<extends>QWidget</extends>
<header location="global">QtQuickWidgets/QQuickWidget</header>
</customwidget>
<customwidget>
<class>KPluginWidget</class>
<extends>QWidget</extends>
<header>kpluginwidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@@ -1,129 +0,0 @@
{
"KPlugin": {
"BugReportUrl": "https://bugs.kde.org/enter_bug.cgi?product=systemsettings&component=kcm_kdeconnect",
"Description": "Configure device synchronization",
"Description[ar]": "ضبط مزامنة الجهاز",
"Description[bg]": "Конфигуриране на синхронизирането на устройствата",
"Description[ca@valencia]": "Configura la sincronització del dispositiu",
"Description[ca]": "Configura la sincronització del dispositiu",
"Description[cs]": "Nastavit synchronizaci zařízení...",
"Description[de]": "Geräteabgleich einrichten",
"Description[en_GB]": "Configure device synchronisation",
"Description[eo]": "Agordi aparatan sinkronigon",
"Description[es]": "Configurar sincronización de dispositivos",
"Description[eu]": "Konfiguratu gailuaren sinkronizazioa",
"Description[fi]": "Laitteiden tahdistuksen asetukset",
"Description[fr]": "Configurer la synchronisation des périphériques",
"Description[gl]": "Configurar a sincronización de dispositivos.",
"Description[he]": "הגדרת סנכרון מכשירים",
"Description[hu]": "Eszközszinkronizáció beállítása",
"Description[ia]": "Configura Synchronisation de dispositivo",
"Description[is]": "Grunnstilla samstillingu tækja",
"Description[it]": "Configura la sincronizzazione del dispositivo",
"Description[ka]": "მოწყობილობის სინქრონიზაციის მორგება",
"Description[ko]": "장치 동기화 설정",
"Description[lt]": "Konfigūruoti įrenginių sinchronizavimą",
"Description[lv]": "Konfigurēt ierīces sinhronizāciju",
"Description[nl]": "Synchronisatie van apparaat configureren",
"Description[nn]": "Set opp einingssynkronisering",
"Description[pa]": "ਡਿਵਾਈਸ ਸੈਕਰੋਨਾਈਜ਼ੇਸ਼ਨ ਦੀ ਸੰਰਚਨਾ",
"Description[pl]": "Ustawienia synchronizacji urządzenia",
"Description[pt_BR]": "Configurar sincronização do dispositivo",
"Description[ru]": "Настройка синхронизации устройства",
"Description[sa]": "उपकरणसमन्वयनं विन्यस्यताम्",
"Description[sl]": "Konfiguriraj sinhronizacijo naprave",
"Description[sv]": "Anpassa enhetssynkronisering",
"Description[ta]": "சாதன ஒத்திசைவு அமைப்புகள்",
"Description[tr]": "Aygıt eşzamanlamayı yapılandırın",
"Description[uk]": "Налаштовування синхронізації із пристроями",
"Description[x-test]": "xxConfigure device synchronizationxx",
"Description[zh_CN]": "配置设备同步",
"Description[zh_TW]": "設定裝置同步",
"Icon": "preferences-kde-connect",
"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[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[x-test]": "xxKDE Connectxx",
"Name[zh_CN]": "KDE Connect",
"Name[zh_TW]": "KDE Connect"
},
"X-DocPath": "kdeconnect/index.html",
"X-KDE-Keywords": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share",
"X-KDE-Keywords[ar]": "هاتف,أندرويد,جهاز,تحكم,وسائط,رن,صوت,متصل,شبكة,جوال,متنقل,اتصل,هاتف ذكي,متراسلون,أخذ صورة,لوحة مفاتيح",
"X-KDE-Keywords[bg]": "мрежа, свързване с kde, свързване, телефон, синхронизиране, мобилен телефон, android, ios, изпращане на файлове, споделяне файлове,прехвърляне на файлове,получаване на файлове,устройства,устройство,синхронизация,повиквания,телефон, смартфон, контакти, sms, телефонни известия, контрол на звука, система сила на звука, мелодия, възпроизвеждане на звук, презентация, правене на снимка, правене на снимка, споделен клипборд, монитор за свързаност, отдалечено въвеждане, отдалечена мишка, отдалечена клавиатура,mpris, телефонна интеграция, команди, заключване на устройство, управление на мултимедия, sftp, разглеждане телефон,споделяне",
"X-KDE-Keywords[ca@valencia]": "xarxa,kde connect,connect,telèfon,sincronitzar,mòbil,android,ios,enviar fitxers,compartir fitxers,transferir fitxers,rebre fitxers,dispositius,dispositius,sincronització,tocades,telèfon,telèfon intel·ligent,contactes,sms,notificacions de telèfon,control de volum,volum del sistema,to de tocada,reproducció de so,presentació,prendre imatge,prendre foto,porta-retalls compartit,connectivitat de monitor,entrada remota,ratolí remot,teclat remot,mpris,integració del telèfon,ordres,bloqueig de dispositiu,control multimèdia,sftp,navegar de telèfon,compartir",
"X-KDE-Keywords[ca]": "xarxa,kde connect,connect,telèfon,sincronitzar,mòbil,android,ios,enviar fitxers,compartir fitxers,transferir fitxers,rebre fitxers,dispositius,dispositius,sincronització,trucades,telèfon,telèfon intel·ligent,contactes,sms,notificacions de telèfon,control de volum,volum del sistema,to de trucada,reproducció de so,presentació,prendre imatge,prendre foto,porta-retalls compartit,connectivitat de monitor,entrada remota,ratolí remot,teclat remot,mpris,integració del telèfon,ordres,bloqueig de dispositiu,control multimèdia,sftp,navegar de telèfon,compartir",
"X-KDE-Keywords[cs]": "síť,kde connect,spojit,telefon,synchronizace,mobilita,android,ios,poslat soubory,sdílet soubory,přenos souborů,příjem souborů,zařízení,synchronizace,telefonáty,chytrý telefon,kontakty,sms,oznámení na telefonu,ovládání hlasitosti,hlasitost systému,vyzváněcí melodie,přehrát melodii,prezentace,zachytit obrázek,pořídit fotku,sdílená schránka,monitor připojení,vzdálené ovládání,vzdálená myš,vzdálená klávesnice,mpris,integrace telefonu,příkazy,zamknout zařízení,ovládání multimédií,sftp,prohlížení telefonu,sdílet",
"X-KDE-Keywords[de]": "Netzwerk,KDE verbinden,verbinden,Handy,mobil,Dateien senden,Dateien teilen,Dateien übertragen,Dateien erhalten,Geräte,Gerät,Synchronisieren,Anrufe,Telefon,Kontakte,Telefonbenachrichtigungen,Lautstärke einrichten,Systemlautstärke,Klingelton,Präsentation,Bild aufnehmen,Foto aufnehmen,geteilte Zwischenablage,Verbindungsüberwachung,entfernte Eingabe,entfernte Maus,entfernte Tastatur,Telefoneinbindung,Befehle,Gerät sperren,Multimediasteuerung,Telefon durchsuchen,teilen",
"X-KDE-Keywords[en_GB]": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share",
"X-KDE-Keywords[eo]": "reto,kde connect,konekti,telefono,sinkronigi,poŝtelefono,android,ios,sendi dosierojn,kunhavigi dosierojn,transdoni dosierojn,ricevi dosierojn, aparatoj,aparato,sinkronigo,vokoj,telefono,saĝtelefono,kontaktoj,sms,telefonaj sciigoj,regi laŭtecon,sistemlaŭteco,sonortono,ludi sonon,prezento,prezentaĵo,foti,kunhava tondujo,konektiveca monitoro,fora enigo,fora muso,fora klavaro,mpris,telefona integriĝo,komandoj,ŝlosi aparaton,plurmedia mastrumo,sftp,foliumi telefonon,kunhavigi",
"X-KDE-Keywords[es]": "red,kde connect,connect,teléfono,sinc,móvil,android,ios,envío de archivos,compartir archivos,transferir archivos,recibir archivos,dispositivos,sincronización,llamadas,teléfono inteligente,contactos,sms,notificaciones del teléfono,control del volumen,volumen del sistema,tonos,reproducir sonido,presentación,hacer una foto,portapapeles compartido,conexión a un monitor,entrada remota,ratón remoto,teclado remoto,mpris,integración con el teléfono,órdenes,bloquear dispositivo,control multimedia,sftp,navegación por el teléfono,compartir",
"X-KDE-Keywords[eu]": "sarea,kde connect,kde konektatu,konektatu,telefonoa,sinkronizatu,mugikorra,android,ios,bidali fitxategiak,partekatu fitxategiak,transferitu fitxategiak,jaso fitxategiak,gailuak,gailua,sinkronizatzea,deiak,telefonoa,telefono adimenduna,kontaktuak,sms,telefonoko jakinarazpenak,kontrolatu bolumena,sistemaren bolumena,txirrin hotsa,soinua jo,aurkezpena,atera argazkia,egin argazkia,arbela partekatua,konexio begiralea,urruneko sarrera,urruneko sagua,urruneko teklatua,mpris,telefono integrazioa,komandoak,giltzatu gailua,multimedia agintea,multimedia kontrola,sftp,arakatu telefonoa,partekatu",
"X-KDE-Keywords[fi]": "verkko,kde connect,connect,puhelin,synkronointi,synkkaus,tahdistus,mobiili,android,ios,lähetä tiedosto,lähetä tiedostoja,jaa tiedosto,jaa tiedostoja,siirrä tiedosto,siirrä tiedostoja,vastaanota tiedosto,vastaanota tiedostoja,laitteet,laite,puhelu,puhelut,puhelin,älypuhelin,tekstiviesti,tekstiviestit,sms,puhelimen ilmoitukset,äänenvoimakkuus,soittoääni,esitys,ota kuva,ota valokuva,jaettu leikepöytä,yhteyden valvonta,etäsyöte,etähiiri,etänäppäimistö,kauko-ohjain,mpris,puhelimen eheytys,puhelimen integrointi,komennot,lukitse laite,laitteen lukitus,multimediasäätimet,sftp,selaa puhelinta,jaa",
"X-KDE-Keywords[fr]": "réseau, KDEConnect, connexion, téléphone, synchroniser, mobile, Android, iOS, envoyer des fichiers, partager des fichiers, transférer des fichiers, recevoir des fichiers, périphériques, synchronisation, appels, smartphone, contacts, SMS, notifications de téléphone, contrôler le volume, volume du système, sonnerie, jouer un son, présentation, prendre une photo, partager le presse-papier, surveillance de la connectivité, saisie à distance, entrée à distance, souris sans fil, clavier sans fil, MPRIS, intégration avec un téléphone,commandes, verrouiller un périphérique, contrôle multimédia, sftp, naviguer dans le téléphone, partager",
"X-KDE-Keywords[gl]": "network,rede,kde connect,connect,conectar,phone,teléfono,sync,sincronizar,móbil,mobile,android,ios,send files,enviar ficheiros,share files,compartir ficheiros,transfer files,transferir ficheiros,receive files,recibir ficheiros,devices,dispositivos,device,dispositivo,synchronization,sincronización,calls,chamadas,telephone,teléfono,smartphone,teléfono intelixente,contacts,contactos,sms,phone notifications,notificacións telefónicas,control volume,controlar o volume,system volume,volume do sistema,ringtone,ton de chamada,play sound,reproducir un son,presentation,presentación,take picture,sacar unha foto,take photo,shared clipboard,portapapeis compartido,conectivity monitor,seguimento de conectividade,monitor de conectividade,remote input,entrada remota,remote mouse,rato remoto,remote keyboard,teclado remoto,mpris,phone integration,integración co teléfono,commands,ordes,comandos,lock device,bloquear o dispositivo,multimedia control,control multimedia,sftp,browse phone,examinar o teléfono,explorar o teléfono,navegar o teléfono,share,compartir,compartición",
"X-KDE-Keywords[he]": "רשת,kde connect,התחברות,קישור,התקשרות,טלפון, סנכרון, שליחת קבצים,שיתוף קבצים,העברת קבצים,התקנים, סנכרון,שיחות,טלפון,טלפון חכם,סלולרי,מסרון,sms,התראות בטלפון,שליטה בעוצמת השמע,ווליום,עוצמת שמע המערכת,צלצול,רינגטון,השמעת צליל,מצגת,צילום תמונה,לוח גזירים משותף,צג חיבור,מד חיבור,קלט מרוחק,עכבר מרוחק,מקלדת מרוחקת,mpris,שילוב עם טלפון,פקודות,נעילת מסך,בקרת מדיה,שליטה על מדיה,sftp,עיון בטלפון,שיתוף",
"X-KDE-Keywords[hu]": "hálózat,kde connect,connect,telefon,szinkronizálás,mobil,android,ios,fájlok küldése,fájlok megosztása,fájlok átvitele,fájlok fogadása,eszközök,eszköz,szinkronizáció,hívások,telefon,okostelefon,névjegyek,sms,telefon értesítések,hangerő-szabályozás,rendszerhangerő,hanglejátszás,prezentáció,kép készítése,fénykép készítése,megosztott vágólap,kapcsolódásfigyelő,távoli bevitel,távoli egér,távoli billentyűzet,mpris,telefonintegráció,parancsok,eszköz zárolása,multimédiavezérlés,sftp,telefon böngészése,megosztás",
"X-KDE-Keywords[ia]": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share",
"X-KDE-Keywords[is]": "net,kde connect,tengja,sími,samstilling,farsími,android,ios,senda skrár,deila skrám,flytja skrár,taka við skrám,tæki,samstilla,hringingar,snjalltæki,tengiliðir,sms,tilkynningar,hljóðstilling,hljóðstyrkur,hringitónn,hljóðspilun,kynning,taka mynd,myndataka,deila klippispjaldi,tengivöktun,fjarinnsláttur,fjartengd mús,fjartengt lyklaborð,mpris,samþætting síma,skipanir,læsa tæki,margmiðlunarstýring,sftp,vafra á síma,deila",
"X-KDE-Keywords[it]": "rete,kde connect,connessione,telefono,sincronizzazione,cellulare,android,ios,invio file,condivisione file,trasferimento file,ricezione file,dispositivi,dispositivo,sincronizzazione,chiamate,telefono,smartphone,contatti,sms,telefono notifiche,controllo volume ,volume di sistema,suoneria,riproduzione audio,presentazione,scattare foto,appunti condivisi,monitor connettività,input remoto,mouse remoto,tastiera remota,mpris,integrazione telefono,comandi,blocco dispositivo,controllo multimediale,sftp,sfogliare il telefono,condividere",
"X-KDE-Keywords[ka]": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share,გაზიარება,ტელეფონი,ქსელი,ფაილების გაგზავნა, მოწყობილობების სინქრონიზაცია,დაშორებული თაგუნა, დაშორებული კლავიატურა",
"X-KDE-Keywords[ko]": "네트워크,연결,폰,휴대폰,동기화,모바일,안드로이드,파일 보내기,파일 전송,파일 공유,파일 받기,파일 수신,장치,동기화,통화,스마트폰,연락처,문자 메시지,알림,휴대폰 알림,음량,볼륨,클립보드,벨소리,프레젠테이션,사진 찍기,클립보드 공유,원격 입력,원격 마우스,원격 키보드,휴대폰 통합,명령,장치 잠금,멀티미디어 제외,휴대폰 탐색,공유",
"X-KDE-Keywords[lt]": "tinklas,kde connect,connect,prisijungti,ryšys,prisijungimas,rysys,telefonas,telefono,sinchronizavimas,sinchronizacija,mobiliojo,mobilusis,android,ios,siųsti failus,siusti failus,bendrinti failus,dalytis failais,dalintis failais,persiųsti failus,persiusti failus,perkelti failus,perduoti failus,gauti failus,priimti failus,įrenginiai,irenginiai,įrenginys,irenginys,skambučiai,skambuciai,išmanusis,ismanusis,adresatai,kontaktai,sms,telefono pranešimai,telefono pranesimai,pranešimai iš telefono,pranesimai is telefono,valdyti garsumą,valdyti garsą,valdyti garsį,sistemos garsumas,sistemos garsis,sistemos garsas,skambučio melodija,skambucio melodija,atkurti garsą,atkurti garsa,pateiktis,prezentacija,pristatymas,fotografuoti,daryti nuotrauką,daryti nuotrauka,bendrinama iškarpinė,bendrinama iskarpine,jungiamumo prižiūryklė,nuotolinė įvestis,nuotoline ivestis,nuotolinis įvedimas,nuotolinis ivedimas,nuotolinė pelė,nuotoline pele,nuotolinė klaviatūra,nuotoline klaviatura,mpris,telefono integracija,telefono integravimas,komandos,užrakinti įrenginį,užrakinti prietaisą,uzrakinti irengini,uzrakinti prietaisa,multimedijos valdymas,daugialypės terpės valdymas,daugialypes terpes valdymas,sftp,naršyti telefone,narsyti telefone,naršyti telefoną,narsyti telefona,bendrinti,dalytis,dalintis",
"X-KDE-Keywords[lv]": "tīlks,kde connect,connect,savienot,tālrunis,sinhronizēt,mobilais,android,ios,sūtīt datnes,kopīgot datnes,nosūtīt datnes,saņemt datnes,ierīces,ierīces,sinhronizācija,zvani,tālrunis,telefons,viedtālrunis,kontakti,sms,tālruņa paziņojumi,skaņas vadība,sistēmas skaļums,zvans,atskaņot skaņu,prezentācija,uzņemt attēlu,fotografēt,kopīgotā starpliktuve,savienojuma pārraudzība,attālā ievade,attālā pele,attālā tastatūra,mpris,tālruņa integrācija,komandas,slēgt ierīci,multivides kontrole,sftp,pārlūkot tālruni,kopīgot",
"X-KDE-Keywords[nl]": "netwerk,kde verbinden,telefoon,sync,mobiel,android,ios,bestanden verzenden,bestanden delen,bestanden overdragen,bestanden ontvangen,apparaten,apparaat,synchronisatie,oproepen,telefoon,smartphone,contactpersonen,sms,telefoonmeldingen,volumebesturing,systeemvolume,ringtone,geluid afspelen,presentatie,foto maken,gedeeld klembord,connectiviteitsmonitor,invoer op afstand,muis op afstand,toetsenbord op afstand,mpris,telefoonintegratie,commando's,apparaat vergrendelen,multimediabesturing,sftp,delen",
"X-KDE-Keywords[nn]": "nettverk,kde connect,kopla til,tilkopling,telefon,synkroniser,mobil,android,ios,send filer,overfør filer,ta imot filer,einingar,eining,synkronisering,samtale,samtalar,samtaler,anrop,oppringing,ringje,smarttelefon,kontaktar,adressebok,sms,varslingar,lydstyrke,systemlydstyrke,ringjetone,spel lyd,presentasjon,ta bilete,ta foto,delt utklippstavle,del utklippstavle,sambandsovervaking,tilkoplingsovervaking,fjerntastatur,fjernstyring,fjernmus,mpris,telefonintegrasjon,kommandoar,lås eining,multimediakontroll,sftp,bla gjennom telefon,del,deling",
"X-KDE-Keywords[pl]": "sieć,kde connect,podłącz,telefon,synchronizacja,komórka,android,ios,wyślij pliki,udostępnij pliki,prześlij pliki,pobierz pliki,urządzenia,urządzenie,synchronizacja,rozmowy,telefon,smartfon,kontakty,sms,powiadomienia na telefonie,sterowanie głośnością,głośność systemowa,dzwonek,odtwórz dźwięk,prezentacja,zrób zdjęcie,zrób zdjęcie,współdzielony schowek,monitor łączności,zdalna obsługa,zdalna mysz,zdalna klawiatura,mpris,integracja z telefonem,polecenia,zblokuj urządzenie,sterowani multimediami,sftp,przeglądanie telefonu,udostępnij",
"X-KDE-Keywords[pt_BR]": "rede, kde connect, conectar, telefone, sincronizar, celular, android, ios, enviar arquivos, compartilhar arquivos, transferir arquivos, receber arquivos, dispositivos, dispositivo, sincronização, chamadas, telefone, smartphone, contatos, sms, notificações do telefone, controlar volume, volume do sistema, toque, reproduzir som, apresentação, tirar foto, tirar foto, área de transferência compartilhada, monitor de conectividade, entrada remota, mouse remoto, teclado remoto, mpris, integração do telefone, comandos, bloquear dispositivo, controle multimídia, sftp, navegar no telefone, compartilhar",
"X-KDE-Keywords[ru]": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share,подключиться,телефон,синхронизировать,мобильный,андроид,отправить файлы,поделиться файлами,передать файлы,получить файлы,устройства,устройство,синхронизация,звонки,вызовы,смартфон,контакты,смс,уведомления на телефоне,управлять громкостью,системная громкость,рингтон,воспроизвести звук,презентация,сделать снимок,общий буфер обмена,мониторинг подключения,удалённый ввод,удалённая мышь,удалённая клавиатура,интеграция с телефоном,команды,заблокировать устройство,управление мультимедиа,общий доступ,опубликовать",
"X-KDE-Keywords[sa]": "नेटवर्क,kde कनेक्ट,कनेक्ट,फोन,सिंक,मोबाइल,एंड्रॉयड,ios,सञ्चिकाः प्रेषयन्तु,सञ्चिकाः साझां कुर्वन्तु,सञ्चिकाः स्थानान्तरयन्तु,सञ्चिकाः,उपकरणाः,यन्त्रं,समन्वयन,कॉल,दूरभाष,स्मार्टफोन,संपर्क,sms,फोनसूचना,नियंत्रण मात्रा ,प्रणाली मात्रा,रिंगटोन,वादन ध्वनि,प्रस्तुति,चित्र लेना,फोटो लेना,साझा क्लिपबोर्ड,संपर्कता मॉनिटर,दूरस्थ इनपुट,दूरस्थ माउस,दूरस्थ कीबोर्ड,mpris,फोन एकीकरण,आदेश,लॉक उपकरण,मल्टीमीडिया नियंत्रण,sftp,फोन ब्राउज़ करें,साझा करें",
"X-KDE-Keywords[sl]": "omrežje,kde connect,povezava,telefon,sinhronizacija,mobilnik,android,ios,pošiljanje datotek,souporaba datotek,prenos datotek,prejemanje datotek,naprave,naprava,sinhronizacija,klici,telefon,pametni telefon,stiki,sms,telefonska obvestila,nadzor glasnosti,glasnost sistema,melodija zvonjenja,predvajanje zvoka,predstavitev,slikanje,fotografiranje,skupno odložišče,nadzor povezljivosti, oddaljeni vnos,oddaljena miška,oddaljena tipkovnica,mpris,integracija telefona, ukazi,zaklepanje naprave,večpredstavnostni nadzor,sftp, brskanje po telefonu,skupni disk",
"X-KDE-Keywords[sv]": "nätverk,kde anslut,anslut,telefon,synkronisera,mobil,android,ios,skicka filer,dela filer,överför filer,ta emot filer,apparater,apparat,synkronisering,samtal,telefon,smart telefon,kontakter,sms,telefonunderrättelser,kontrollera volym,systemvolym,rington,spela ljud,presentation,ta bild,ta foto,delat klippbord,anslutningsövervakare,fjärrinmatning,fjärrmus,fjärrtangentbord,mpris,telefonintegrering,kommandon,lås apparat,multimediastyrning,sftp,bläddra på telefon,dela",
"X-KDE-Keywords[ta]": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share, பிணையம், இணையம், கே.டீ.யீ. கனெக்ட், கனெக்ட், இணை, கைபேசி, தொலைபேசி, திறன்பேசி, ஒத்திசைவு, மொபைல், ஆண்டராய்டு, ஆப்பிள், கோப்புகளை அனுப்பு, கோப்புகளை பகிர், அனுப்பு, பகிர், பெறு, கோப்புகளை பெறு, சாதனம், சாதனங்கள், அழைப்பு, தொடர்வு, தொடர்புகள், குறுஞ்செய்தி, அறிவிப்பு, ஒலியளவு, ஒலி, வில்லை, வில்லைக்காட்சி, படம், புகைப்படம், பிடிப்புப்பலகை, ஒட்டுபலகை, நினைவுப்பலகை, தொலை விசைப்பலகை, விசைப்பலகை, கட்டளை, பூட்டு, உலாவு",
"X-KDE-Keywords[tr]": "ağ,kde connect,kde bağlan,bağlan,telefon,eşzamanla,mobil,taşınabilir,cep,android,ios,dosya gönder,dosya paylaş,dosya aktar,dosya transfer et,dosya al,aygıt,cihaz,aygıtlar,cihazlar,aygıt eşzamanlama,aygıt senkronizasyonu,aramalar,çağrılar,telefon,akıllı telefon,smartphone,kişiler,kontaklar,sms,bildirimler,sesi aç,sesi kapat,sistem se düzeyi,zil tonu,ses çal,sunum,resim çek,fotoğraf çek,paylaşılan pano,bağlantı monitorü,uzak giriş,uzak fare,uzak klavye,telefon entegrasyonu,telefon tümleştirmesi,komut,komutlar,aygıtı kilitle,cihazı kilitle,ortam denetimi,multimedya denetimi,sftp,telefona göz at,paylaş",
"X-KDE-Keywords[uk]": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share,мережа,конект,телефон,синхронізація,синхронізувати,мобільний,андроїд,айос,надсилати,файли,оприлюднювати,спільні,передавати,передавання,отримувати,отримання,пристрої,пристрій,виклики,телефон,смартфон,контакт,есемес,сповіщення,гучність,дзвінок,мелодія,звук,презентація,знімок,знімати,фото,буфер,обміну,спостереження,введення,миша,клавіатура,інтеграція,команди,блокування,мультимедіа,навігація,спільне",
"X-KDE-Keywords[x-test]": "xxnetworkxx,xxkde connectxx,xxconnectxx,xxphonexx,xxsyncxx,xxmobilexx,xxandroidxx,xxiosxx,xxsend filesxx,xxshare filesxx,xxtransfer filesxx,xxreceive filesxx,xxdevicesxx,xxdevicexx,xxsynchronizationxx,xxcallsxx,xxtelephonexx,xxsmartphonexx,xxcontactsxx,xxsmsxx,xxphone notificationsxx,xxcontrol volumexx,xxsystem volumexx,xxringtonexx,xxplay soundxx,xxpresentationxx,xxtake picturexx,xxtake photoxx,xxshared clipboardxx,xxconectivity monitorxx,xxremote inputxx,xxremote mousexx,xxremote keyboardxx,xxmprisxx,xxphone integrationxx,xxcommandsxx,xxlock devicexx,xxmultimedia controlxx,xxsftpxx,xxbrowse phonexx,xxsharexx",
"X-KDE-Keywords[zh_CN]": "network,kde connect,connect,phone,sync,mobile,android,ios,send files,share files,transfer files,receive files,devices,device,synchronization,calls,telephone,smartphone,contacts,sms,phone notifications,control volume,system volume,ringtone,play sound,presentation,take picture,take photo,shared clipboard,conectivity monitor,remote input,remote mouse,remote keyboard,mpris,phone integration,commands,lock device,multimedia control,sftp,browse phone,share,wangluo,lianjie,dianhua,tongbu,shouji,yidong,anzhuo,pingguo,fasongwenjian,chuanshuwenjian,jieshouwenjian,shebei,hujiao,tonghua,dianhua,zhinengshouji,lianxiren,duanxin,dianhuatongzhi,kongzhiyinliang,xitongyinliang,lingsheng,bofangshengyin,yanshi,paishezhaopian,jiantiebangongxiang,lianjiejiankong,liuliangjiankong,wangluojiankong,yuanchengshuru,yuanchengshubiao,yuanchengjianpan,yaokong,shoujizhenghe,mingling,zhiling,suodingshebei,duomeitikongzhi,liulanshouji,gongxiang,fenxiang,网络,连接,电话,同步,手机,移动,安卓,苹果,发送文件,传输文件,接收文件,设备,呼叫,通话,电话,智能手机,联系人,短信,电话通知,控制音量,系统音量,铃声,播放声音,演示,拍摄照片,剪贴板共享,连接监控,流量监控,网络监控,远程输入,远程鼠标,远程键盘,遥控,手机整合,命令,指令,锁定设备,多媒体控制,浏览手机,共享,分享",
"X-KDE-Keywords[zh_TW]": "網路,網絡,kde 連線,連線,連接,同步,手機,傳送檔案,分享檔案,傳輸檔案,接收檔案,裝置,電話,打電話,聯絡人,簡訊,手機通知,控制音量,系統音量,鈴聲,播放聲音,簡報,拍照,分享剪貼簿,連線狀態監控,遠端輸入,遠端滑鼠,遠端鍵盤,手機整合,指令,命令,鎖定裝置,多媒體控制,瀏覽手機,分享,kde connect",
"X-KDE-System-Settings-Parent-Category": "hardware",
"X-KDE-Weight": 60
}

View File

@@ -1,88 +0,0 @@
/*
* SPDX-FileCopyrightText: 2016 Aleix Pol Gonzalez <aleixpol@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
import org.kde.kdeconnect
ScrollView {
id: root
focus: true
signal clicked(string device)
property string currentDeviceId
property alias model: devices.model
Kirigami.Theme.colorSet: Kirigami.Theme.View
Kirigami.Theme.inherit: false
background: Rectangle {
color: Kirigami.Theme.backgroundColor
radius: Kirigami.Units.cornerRadius
border.color: Kirigami.ColorUtils.linearInterpolation(
Kirigami.Theme.backgroundColor,
Kirigami.Theme.textColor,
Kirigami.Theme.frameContrast
)
}
ListView {
id: devices
focus: true
section {
property: "status"
delegate: Kirigami.ListSectionHeader {
width: ListView.view.width
text: switch (parseInt(section))
{
case DevicesModel.Paired:
return i18nd("kdeconnect-kcm", "Remembered")
case DevicesModel.Reachable:
return i18nd("kdeconnect-kcm", "Available")
case (DevicesModel.Reachable | DevicesModel.Paired):
return i18nd("kdeconnect-kcm", "Connected")
}
}
}
Kirigami.PlaceholderMessage {
text: i18nd("kdeconnect-kcm", "No devices found")
icon.name: 'edit-none-symbolic'
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 4)
visible: devices.count === 0
}
delegate: ItemDelegate {
id: delegate
icon.name: iconName
text: model.name
width: ListView.view.width
focus: true
contentItem: Kirigami.IconTitleSubtitle {
title: delegate.text
subtitle: toolTip
icon: icon.fromControlsIcon(delegate.icon)
}
onClicked: {
root.currentDeviceId = deviceId
root.clicked(deviceId)
}
}
}
}

View File

@@ -1,23 +0,0 @@
add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-core\")
add_library(kdeconnectpluginkcm kdeconnectpluginkcm.cpp)
target_link_libraries(kdeconnectpluginkcm
PUBLIC
kdeconnectcore
KF6::KCMUtils
PRIVATE
Qt::DBus
Qt::Gui
KF6::I18n
KF6::ConfigCore
)
set_target_properties(kdeconnectpluginkcm PROPERTIES
VERSION ${KDECONNECT_VERSION}
SOVERSION ${KDECONNECT_VERSION_MAJOR}
)
generate_export_header(kdeconnectpluginkcm EXPORT_FILE_NAME kdeconnectpluginkcm_export.h BASE_NAME kdeconnectpluginkcm)
# Remove NAMELINK_SKIP if/when headers are being installed and the library becomes public.
install(TARGETS kdeconnectpluginkcm EXPORT kdeconnectLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)

View File

@@ -1,18 +0,0 @@
/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "kdeconnectpluginkcm.h"
KdeConnectPluginKcm::KdeConnectPluginKcm(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: KCModule(parent)
, m_deviceId(args.at(0).toString())
// The plugin name is the KCMs ID with the postfix removed
, m_config(new KdeConnectPluginConfig(m_deviceId, data.pluginId().remove(QLatin1String("_config")), this))
{
Q_ASSERT(data.isValid()); // Even if we have empty metadata, it should be valid!
}
#include "moc_kdeconnectpluginkcm.cpp"

View File

@@ -1,47 +0,0 @@
/**
* SPDX-FileCopyrightText: 2015 Albert Vaca <albertvaka@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include <KCModule>
#include <KPluginMetaData> // Not in KCModule header of older KF5 versions
#include <kconfigwidgets_version.h>
#include "core/kdeconnectpluginconfig.h"
#include "kdeconnectpluginkcm_export.h"
/**
* Inheriting your plugin's KCM from this class gets you a easy way to share
* configuration values between the KCM and the plugin.
*/
class KDECONNECTPLUGINKCM_EXPORT KdeConnectPluginKcm : public KCModule
{
Q_OBJECT
public:
explicit KdeConnectPluginKcm(QObject *parent, const KPluginMetaData &data, const QVariantList &args);
/**
* The device this kcm is instantiated for
*/
QString deviceId() const
{
return m_deviceId;
}
/**
* The object where to save the config, so the plugin can access it
*/
KdeConnectPluginConfig *config() const
{
return m_config;
}
private:
const QString m_deviceId;
const QString m_pluginName;
KdeConnectPluginConfig *const m_config;
};

View File

@@ -12,7 +12,6 @@ import QtQuick.Controls as QQC2
import QtQuick.Layouts
import org.kde.config as KConfig
import org.kde.kcmutils as KCMUtils
import org.kde.kdeconnect as KDEConnect
import org.kde.kirigami as Kirigami
import org.kde.plasma.components as PlasmaComponents3
@@ -70,8 +69,8 @@ PlasmaExtras.Representation {
helpfulAction: QQC2.Action {
text: i18n("Pair a Device…")
icon.name: "list-add"
onTriggered: KCMUtils.KCMLauncher.openSystemSettings("kcm_kdeconnect")
enabled: pairedDevicesModel.count === 0 && KConfig.KAuthorized.authorizeControlModule("kcm_kdeconnect")
onTriggered: KDEConnect.OpenConfig.openConfiguration()
enabled: pairedDevicesModel.count === 0
}
PlasmaComponents3.Button {

View File

@@ -10,7 +10,6 @@ pragma ComponentBehavior: Bound
import QtQuick
import org.kde.config as KConfig
import org.kde.kcmutils as KCMUtils
import org.kde.kdeconnect as KDEConnect
import org.kde.kquickcontrolsaddons as KQuickControlsAddons
import org.kde.plasma.core as PlasmaCore
@@ -54,10 +53,7 @@ PlasmoidItem {
id: configureAction
text: i18n("KDE Connect Settings…")
icon.name: "configure"
visible: KConfig.KAuthorized.authorizeControlModule("kcm_kdeconnect")
onTriggered: checked => {
KCMUtils.KCMLauncher.openSystemSettings("kcm_kdeconnect");
}
onTriggered: KDEConnect.OpenConfig.openConfiguration()
}
Component.onCompleted: {

View File

@@ -142,9 +142,6 @@
},
"X-Plasma-API": "declarativeappletscript",
"X-Plasma-API-Minimum-Version": "6.0",
"X-Plasma-ConfigPlugins": [
"kcm_kdeconnect"
],
"X-Plasma-MainScript": "ui/main.qml",
"X-Plasma-NotificationArea": "true",
"X-Plasma-NotificationAreaCategory": "Hardware"

View File

@@ -6,11 +6,4 @@ target_link_libraries(kdeconnect_clipboard kdeconnectcore
${kdeconnect_clipboard_WL_LINK_LIBS}
)
kdeconnect_add_kcm(kdeconnect_clipboard_config SOURCES clipboard_config.cpp)
ki18n_wrap_ui(kdeconnect_clipboard_config clipboard_config.ui)
target_link_libraries(kdeconnect_clipboard_config
kdeconnectcore
kdeconnectpluginkcm
KF6::I18n
KF6::KCMUtils
)
install(FILES "kdeconnect_clipboard_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)

View File

@@ -1,68 +0,0 @@
/**
* SPDX-FileCopyrightText: 2022 Yuchen Shi <bolshaya_schists@mail.gravitide.co>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "clipboard_config.h"
#include <KPluginFactory>
#include <QSpinBox>
#include <QStringLiteral>
K_PLUGIN_CLASS(ClipboardConfig)
ClipboardConfig::ClipboardConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: KdeConnectPluginKcm(parent, data, args)
{
m_ui.setupUi(widget());
connect(m_ui.check_autoshare, &QCheckBox::toggled, this, &ClipboardConfig::autoShareChanged);
connect(m_ui.check_password, &QCheckBox::toggled, this, &ClipboardConfig::markAsChanged);
connect(m_ui.spinBox_max_clipboard_size, &QSpinBox::valueChanged, this, &ClipboardConfig::maxClipboardSizeChanged);
}
void ClipboardConfig::autoShareChanged()
{
m_ui.check_password->setEnabled(m_ui.check_autoshare->isChecked());
markAsChanged();
}
void ClipboardConfig::maxClipboardSizeChanged(int value)
{
m_ui.spinBox_max_clipboard_size->setValue(value);
markAsChanged();
}
void ClipboardConfig::defaults()
{
KCModule::defaults();
m_ui.check_autoshare->setChecked(true);
m_ui.check_password->setChecked(true);
m_ui.spinBox_max_clipboard_size->setValue(50);
markAsChanged();
}
void ClipboardConfig::load()
{
KCModule::load();
// "sendUnknown" is the legacy name for this setting
bool autoShare = config()->getBool(QStringLiteral("autoShare"), config()->getBool(QStringLiteral("sendUnknown"), true));
bool password = config()->getBool(QStringLiteral("sendPassword"), true);
int maxClipboardFileSizeMB = config()->getInt(QStringLiteral("maxClipboardFileSizeMB"), 50);
m_ui.check_autoshare->setChecked(autoShare);
m_ui.check_password->setChecked(password);
m_ui.spinBox_max_clipboard_size->setValue(maxClipboardFileSizeMB);
autoShareChanged();
}
void ClipboardConfig::save()
{
config()->set(QStringLiteral("autoShare"), m_ui.check_autoshare->isChecked());
config()->set(QStringLiteral("sendPassword"), m_ui.check_password->isChecked());
config()->set(QStringLiteral("maxClipboardFileSizeMB"), m_ui.spinBox_max_clipboard_size->value());
KCModule::save();
}
#include "clipboard_config.moc"
#include "moc_clipboard_config.cpp"

View File

@@ -1,27 +0,0 @@
/**
* SPDX-FileCopyrightText: 2022 Yuchen Shi <bolshaya_schists@mail.gravitide.co>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include "kcmplugin/kdeconnectpluginkcm.h"
#include "ui_clipboard_config.h"
class ClipboardConfig : public KdeConnectPluginKcm
{
Q_OBJECT
public:
ClipboardConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &);
void save() override;
void load() override;
void defaults() override;
private:
void autoShareChanged();
void maxClipboardSizeChanged(int value);
Ui::ClipboardConfigUi m_ui;
};

View File

@@ -1,93 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ClipboardConfigUi</class>
<widget class="QWidget" name="ClipboardConfigUi">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>368</width>
<height>241</height>
</rect>
</property>
<property name="windowTitle">
<string>Clipboard plugin</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_1">
<property name="spacing">
<number>20</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Automatic synchronization</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="check_autoshare">
<property name="text">
<string>Automatically share the clipboard from this device</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_password">
<property name="text">
<string>Including passwords (as marked by password managers)</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_clipboard_size">
<item>
<widget class="QSpinBox" name="spinBox_max_clipboard_size">
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1000000</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_max_clipboard_size">
<property name="text">
<string>Max Clipboard File Size (MB)</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources />
<connections />
</ui>

View File

@@ -158,7 +158,6 @@
"Name[zh_CN]": "剪切板",
"Name[zh_TW]": "剪貼簿"
},
"X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_clipboard_config",
"X-KdeConnect-OutgoingPacketType": [
"kdeconnect.clipboard",
"kdeconnect.clipboard.connect",

View File

@@ -30,18 +30,3 @@ if (NOT WIN32)
KF6::PulseAudioQt
)
endif()
# Target kdeconnect_findthisdevice_config
kdeconnect_add_kcm(kdeconnect_findthisdevice_config SOURCES findthisdevice_config.cpp findthisdevicehelper.cpp)
ki18n_wrap_ui(kdeconnect_findthisdevice_config findthisdevice_config.ui)
target_link_libraries(kdeconnect_findthisdevice_config
kdeconnectpluginkcm
Qt::Multimedia
Qt::Qml
KF6::I18n
KF6::CoreAddons
KF6::ConfigWidgets
KF6::KIOWidgets # KUrlRequester
)

View File

@@ -1,75 +0,0 @@
/**
* SPDX-FileCopyrightText: 2018 Friedrich W. H. Kossebau <kossebau@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "findthisdevice_config.h"
#include "findthisdevicehelper.h"
#include "findthisdeviceplugin.h"
// KF
#include <KLocalizedString>
#include <KPluginFactory>
// Qt
#include <QMediaPlayer>
#include <QStandardPaths>
#include <QAudioOutput>
K_PLUGIN_CLASS(FindThisDeviceConfig)
FindThisDeviceConfig::FindThisDeviceConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: KdeConnectPluginKcm(parent, data, args)
{
m_ui.setupUi(widget());
const QStringList soundDirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("sounds"), QStandardPaths::LocateDirectory);
if (!soundDirs.isEmpty()) {
m_ui.soundFileRequester->setStartDir(QUrl::fromLocalFile(soundDirs.last()));
}
connect(m_ui.playSoundButton, &QToolButton::clicked, this, [this]() {
if (const QUrl soundUrl = m_ui.soundFileRequester->url(); soundUrl.isValid()) {
playSound(soundUrl);
}
});
connect(m_ui.soundFileRequester, &KUrlRequester::textChanged, this, &FindThisDeviceConfig::markAsChanged);
}
void FindThisDeviceConfig::defaults()
{
KCModule::defaults();
m_ui.soundFileRequester->setText(FindThisDeviceHelper::defaultSound());
markAsChanged();
}
void FindThisDeviceConfig::load()
{
KCModule::load();
const QString ringTone = config()->getString(QStringLiteral("ringtone"), FindThisDeviceHelper::defaultSound());
m_ui.soundFileRequester->setText(ringTone);
}
void FindThisDeviceConfig::save()
{
config()->set(QStringLiteral("ringtone"), m_ui.soundFileRequester->text());
KCModule::save();
}
void FindThisDeviceConfig::playSound(const QUrl &soundUrl)
{
QMediaPlayer *player = new QMediaPlayer;
auto audioOutput = new QAudioOutput();
audioOutput->setVolume(100);
player->setSource(soundUrl);
player->setAudioOutput(audioOutput);
player->play();
connect(player, &QMediaPlayer::playingChanged, player, &QObject::deleteLater);
}
#include "findthisdevice_config.moc"
#include "moc_findthisdevice_config.cpp"

View File

@@ -1,25 +0,0 @@
/**
* SPDX-FileCopyrightText: 2018 Friedrich W. H. Kossebau <kossebau@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include "ui_findthisdevice_config.h"
#include <kcmplugin/kdeconnectpluginkcm.h>
class FindThisDeviceConfig : public KdeConnectPluginKcm
{
Q_OBJECT
public:
FindThisDeviceConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &);
void save() override;
void load() override;
void defaults() override;
private:
void playSound(const QUrl &soundUrl);
Ui::FindThisDeviceConfigUi m_ui;
};

View File

@@ -1,72 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FindThisDeviceConfigUi</class>
<widget class="QWidget" name="FindThisDeviceConfigUi">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>569</width>
<height>140</height>
</rect>
</property>
<layout class="QVBoxLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Discovery Utilities</string>
</property>
<layout class="QVBoxLayout">
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLabel">
<property name="text">
<string>Sound to play:</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="playSoundButton">
<property name="icon">
<iconset theme="media-playback-start"/>
</property>
</widget>
</item>
<item>
<widget class="KUrlRequester" name="soundFileRequester">
<property name="toolTip">
<string>Select the sound to play</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KUrlRequester</class>
<extends>QWidget</extends>
<header>kurlrequester.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@@ -154,7 +154,6 @@
"Name[zh_CN]": "查找此设备",
"Name[zh_TW]": "尋找這個裝置"
},
"X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_findthisdevice_config",
"X-KdeConnect-OutgoingPacketType": [],
"X-KdeConnect-SupportedPacketType": [
"kdeconnect.findmyphone.request"

View File

@@ -36,10 +36,6 @@
"items": {
"type": "string"
}
},
"X-KDE-ConfigModule": {
"type": "string",
"pattern": "^kdeconnect/kcms/[^/]+$"
}
}
}

View File

@@ -18,15 +18,4 @@ else()
target_link_libraries(kdeconnect_pausemusic KF6::PulseAudioQt)
endif()
#######################################
# Config
kdeconnect_add_kcm(kdeconnect_pausemusic_config SOURCES pausemusic_config.cpp)
ki18n_wrap_ui(kdeconnect_pausemusic_config pausemusic_config.ui)
target_link_libraries(kdeconnect_pausemusic_config
kdeconnectcore
kdeconnectpluginkcm
KF6::I18n
KF6::KCMUtils
)
install(FILES "kdeconnect_pausemusic_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)

View File

@@ -157,7 +157,6 @@
"Name[zh_CN]": "来电时暂停媒体",
"Name[zh_TW]": "在通話過程中暫停媒體"
},
"X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_pausemusic_config",
"X-KdeConnect-OutgoingPacketType": [],
"X-KdeConnect-SupportedPacketType": [
"kdeconnect.telephony"

View File

@@ -1,62 +0,0 @@
/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "pausemusic_config.h"
#include <KPluginFactory>
K_PLUGIN_CLASS(PauseMusicConfig)
PauseMusicConfig::PauseMusicConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: KdeConnectPluginKcm(parent, data, args)
{
m_ui.setupUi(widget());
connect(m_ui.rad_ringing, &QCheckBox::toggled, this, &PauseMusicConfig::markAsChanged);
connect(m_ui.rad_talking, &QCheckBox::toggled, this, &PauseMusicConfig::markAsChanged);
connect(m_ui.check_pause, &QCheckBox::toggled, this, &PauseMusicConfig::markAsChanged);
connect(m_ui.check_mute, &QCheckBox::toggled, this, &PauseMusicConfig::markAsChanged);
connect(m_ui.check_resume, &QCheckBox::toggled, this, &PauseMusicConfig::markAsChanged);
}
void PauseMusicConfig::defaults()
{
KCModule::defaults();
m_ui.rad_talking->setChecked(false);
m_ui.rad_ringing->setChecked(true);
m_ui.check_pause->setChecked(true);
m_ui.check_mute->setChecked(false);
m_ui.check_resume->setChecked(true);
markAsChanged();
}
void PauseMusicConfig::load()
{
KCModule::load();
bool talking = config()->getBool(QStringLiteral("conditionTalking"), false);
m_ui.rad_talking->setChecked(talking);
m_ui.rad_ringing->setChecked(!talking);
bool pause = config()->getBool(QStringLiteral("actionPause"), true);
bool mute = config()->getBool(QStringLiteral("actionMute"), false);
m_ui.check_pause->setChecked(pause);
m_ui.check_mute->setChecked(mute);
const bool autoResume = config()->getBool(QStringLiteral("actionResume"), true);
m_ui.check_resume->setChecked(autoResume);
}
void PauseMusicConfig::save()
{
config()->set(QStringLiteral("conditionTalking"), m_ui.rad_talking->isChecked());
config()->set(QStringLiteral("actionPause"), m_ui.check_pause->isChecked());
config()->set(QStringLiteral("actionMute"), m_ui.check_mute->isChecked());
config()->set(QStringLiteral("actionResume"), m_ui.check_resume->isChecked());
KCModule::save();
}
#include "moc_pausemusic_config.cpp"
#include "pausemusic_config.moc"

View File

@@ -1,24 +0,0 @@
/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include "kcmplugin/kdeconnectpluginkcm.h"
#include "ui_pausemusic_config.h"
class PauseMusicConfig : public KdeConnectPluginKcm
{
Q_OBJECT
public:
PauseMusicConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &);
void save() override;
void load() override;
void defaults() override;
private:
Ui::PauseMusicConfigUi m_ui;
};

View File

@@ -1,105 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PauseMusicConfigUi</class>
<widget class="QWidget" name="PauseMusicConfigUi">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>368</width>
<height>241</height>
</rect>
</property>
<property name="windowTitle">
<string>Pause music plugin</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>20</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Condition</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="rad_ringing">
<property name="text">
<string>Pause as soon as phone rings</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rad_talking">
<property name="text">
<string>Pause only while talking</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Actions</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="check_pause">
<property name="text">
<string>Pause media players</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_mute">
<property name="text">
<string>Mute system sound</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_resume">
<property name="text">
<string>Automatically resume media when call has finished</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -2,16 +2,6 @@ kdeconnect_add_plugin(kdeconnect_runcommand SOURCES runcommandplugin.cpp)
target_link_libraries(kdeconnect_runcommand
kdeconnectcore
Qt::DBus
KF6::KCMUtils
KF6::I18n)
#----------------------
kdeconnect_add_kcm(kdeconnect_runcommand_config SOURCES runcommand_config.cpp)
target_link_libraries(kdeconnect_runcommand_config
kdeconnectcore
kdeconnectpluginkcm
Qt::DBus
KF6::I18n
KF6::CoreAddons
KF6::ConfigWidgets
)
install(FILES "kdeconnect_runcommand_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)

View File

@@ -212,7 +212,6 @@
"Name[zh_CN]": "执行命令",
"Name[zh_TW]": "執行命令"
},
"X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_runcommand_config",
"X-KdeConnect-OutgoingPacketType": [
"kdeconnect.runcommand"
],

View File

@@ -1,254 +0,0 @@
/**
* SPDX-FileCopyrightText: 2015 David Edmundson <davidedmundson@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "runcommand_config.h"
#include <QDebug>
#include <QFileDialog>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QJsonArray>
#include <QJsonDocument>
#include <QMenu>
#include <QPushButton>
#include <QStandardItemModel>
#include <QStandardPaths>
#include <QTableView>
#include <QUuid>
#include <KLocalizedString>
#include <KPluginFactory>
#include <dbushelper.h>
K_PLUGIN_CLASS(RunCommandConfig)
RunCommandConfig::RunCommandConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: KdeConnectPluginKcm(parent, data, args)
{
// The qdbus executable name is different on some systems
QString qdbusExe = QStringLiteral("qdbus-qt6");
if (QStandardPaths::findExecutable(qdbusExe).isEmpty()) {
qdbusExe = QStringLiteral("qdbus");
}
QMenu *defaultMenu = new QMenu(widget());
#ifdef Q_OS_WIN
addSuggestedCommand(defaultMenu, i18n("Schedule a shutdown"), QStringLiteral("shutdown /s /t 60"));
addSuggestedCommand(defaultMenu, i18n("Shutdown now"), QStringLiteral("shutdown /s /t 0"));
addSuggestedCommand(defaultMenu, i18n("Cancel last shutdown"), QStringLiteral("shutdown /a"));
addSuggestedCommand(defaultMenu, i18n("Schedule a reboot"), QStringLiteral("shutdown /r /t 60"));
addSuggestedCommand(defaultMenu, i18n("Suspend"), QStringLiteral("rundll32.exe powrprof.dll,SetSuspendState 0,1,0"));
addSuggestedCommand(defaultMenu, i18n("Lock Screen"), QStringLiteral("rundll32.exe user32.dll,LockWorkStation"));
addSuggestedCommand(
defaultMenu,
i18n("Say Hello"),
QStringLiteral("PowerShell -Command Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('hello');"));
#else
addSuggestedCommand(defaultMenu, i18n("Shutdown"), QStringLiteral("systemctl poweroff"));
addSuggestedCommand(defaultMenu, i18n("Reboot"), QStringLiteral("systemctl reboot"));
addSuggestedCommand(defaultMenu, i18n("Suspend"), QStringLiteral("systemctl suspend"));
addSuggestedCommand(
defaultMenu,
i18n("Maximum Brightness"),
QStringLiteral("%0 org.kde.Solid.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl "
"org.kde.Solid.PowerManagement.Actions.BrightnessControl.setBrightness `%0 org.kde.Solid.PowerManagement "
"/org/kde/Solid/PowerManagement/Actions/BrightnessControl org.kde.Solid.PowerManagement.Actions.BrightnessControl.brightnessMax`")
.arg(qdbusExe));
addSuggestedCommand(defaultMenu, i18n("Lock Screen"), QStringLiteral("loginctl lock-session"));
addSuggestedCommand(defaultMenu, i18n("Unlock Screen"), QStringLiteral("loginctl unlock-session"));
addSuggestedCommand(defaultMenu, i18n("Close All Vaults"), QStringLiteral("%0 org.kde.kded5 /modules/plasmavault closeAllVaults").arg(qdbusExe));
addSuggestedCommand(defaultMenu,
i18n("Forcefully Close All Vaults"),
QStringLiteral("%0 org.kde.kded5 /modules/plasmavault forceCloseAllVaults").arg(qdbusExe));
#endif
QTableView *table = new QTableView(widget());
table->horizontalHeader()->setStretchLastSection(true);
table->verticalHeader()->setVisible(false);
QPushButton *button = new QPushButton(QIcon::fromTheme(QStringLiteral("list-add")), i18n("Sample commands"), widget());
button->setMenu(defaultMenu);
QHBoxLayout *importExportLayout = new QHBoxLayout();
QPushButton *exportButton = new QPushButton(i18n("Export"), widget());
importExportLayout->addWidget(exportButton);
connect(exportButton, &QPushButton::clicked, this, &RunCommandConfig::exportCommands);
QPushButton *importButton = new QPushButton(i18n("Import"), widget());
importExportLayout->addWidget(importButton);
connect(importButton, &QPushButton::clicked, this, &RunCommandConfig::importCommands);
QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(table);
layout->addLayout(importExportLayout);
layout->addWidget(button);
widget()->setLayout(layout);
m_entriesModel = new QStandardItemModel(this);
table->setModel(m_entriesModel);
m_entriesModel->setHorizontalHeaderLabels(QStringList{i18n("Name"), i18n("Command")});
}
void RunCommandConfig::exportCommands()
{
QString filePath = QFileDialog::getSaveFileName(widget(), i18n("Export Commands"), QDir::homePath(), QStringLiteral("JSON (*.json)"));
if (filePath.isEmpty())
return;
QFile file(filePath);
if (!file.open(QFile::WriteOnly | QFile::Text)) {
qWarning() << "Could not write to file:" << filePath;
return;
}
QJsonArray jsonArray;
for (int i = 0; i < m_entriesModel->rowCount(); i++) {
QJsonObject jsonObj;
jsonObj[QStringLiteral("name")] = m_entriesModel->index(i, 0).data().toString();
jsonObj[QStringLiteral("command")] = m_entriesModel->index(i, 1).data().toString();
jsonArray.append(jsonObj);
}
QJsonDocument jsonDocument(jsonArray);
file.write(jsonDocument.toJson());
file.close();
}
void RunCommandConfig::importCommands()
{
QString filePath = QFileDialog::getOpenFileName(widget(), i18n("Import Commands"), QDir::homePath(), QStringLiteral("JSON (*.json)"));
if (filePath.isEmpty())
return;
QFile file(filePath);
if (!file.open(QFile::ReadOnly | QFile::Text)) {
qWarning() << "Could not read file:" << filePath;
return;
}
QByteArray jsonData = file.readAll();
file.close();
QJsonDocument jsonDoc = QJsonDocument::fromJson(jsonData);
if (jsonDoc.isNull() || !jsonDoc.isArray()) {
qWarning() << "Invalid JSON format.";
return;
}
// Clear the current command list
m_entriesModel->removeRows(0, m_entriesModel->rowCount());
// Populate the model with the imported commands
QJsonArray jsonArray = jsonDoc.array();
for (const QJsonValue &jsonValue : jsonArray) {
QJsonObject jsonObj = jsonValue.toObject();
QString name = jsonObj.value(QStringLiteral("name")).toString();
QString command = jsonObj.value(QStringLiteral("command")).toString();
insertRow(m_entriesModel->rowCount(), name, command);
}
markAsChanged();
}
void RunCommandConfig::addSuggestedCommand(QMenu *menu, const QString &name, const QString &command)
{
auto action = new QAction(name);
connect(action, &QAction::triggered, action, [this, name, command]() {
insertRow(0, name, command);
markAsChanged();
});
menu->addAction(action);
}
void RunCommandConfig::defaults()
{
KCModule::defaults();
m_entriesModel->removeRows(0, m_entriesModel->rowCount());
markAsChanged();
}
void RunCommandConfig::load()
{
KCModule::load();
QJsonDocument jsonDocument = QJsonDocument::fromJson(config()->getByteArray(QStringLiteral("commands"), "{}"));
QJsonObject jsonConfig = jsonDocument.object();
const QStringList keys = jsonConfig.keys();
for (const QString &key : keys) {
const QJsonObject entry = jsonConfig[key].toObject();
const QString name = entry[QStringLiteral("name")].toString();
const QString command = entry[QStringLiteral("command")].toString();
QStandardItem *newName = new QStandardItem(name);
newName->setEditable(true);
newName->setData(key);
QStandardItem *newCommand = new QStandardItem(command);
newName->setEditable(true);
m_entriesModel->appendRow(QList<QStandardItem *>() << newName << newCommand);
}
m_entriesModel->sort(0);
insertEmptyRow();
connect(m_entriesModel, &QAbstractItemModel::dataChanged, this, &RunCommandConfig::onDataChanged);
}
void RunCommandConfig::save()
{
KCModule::save();
QJsonObject jsonConfig;
for (int i = 0; i < m_entriesModel->rowCount(); i++) {
QString key = m_entriesModel->item(i, 0)->data().toString();
const QString name = m_entriesModel->item(i, 0)->text();
const QString command = m_entriesModel->item(i, 1)->text();
if (name.isEmpty() || command.isEmpty()) {
continue;
}
if (key.isEmpty()) {
key = QUuid::createUuid().toString(QUuid::WithoutBraces);
DBusHelper::filterNonExportableCharacters(key);
}
QJsonObject entry;
entry[QStringLiteral("name")] = name;
entry[QStringLiteral("command")] = command;
jsonConfig[key] = entry;
}
QJsonDocument document;
document.setObject(jsonConfig);
config()->set(QStringLiteral("commands"), document.toJson(QJsonDocument::Compact));
}
void RunCommandConfig::insertEmptyRow()
{
insertRow(m_entriesModel->rowCount(), {}, {});
}
void RunCommandConfig::insertRow(int i, const QString &name, const QString &command)
{
QStandardItem *newName = new QStandardItem(name);
newName->setEditable(true);
QStandardItem *newCommand = new QStandardItem(command);
newName->setEditable(true);
m_entriesModel->insertRow(i, QList<QStandardItem *>() << newName << newCommand);
}
void RunCommandConfig::onDataChanged(const QModelIndex & /*topLeft*/, const QModelIndex &bottomRight)
{
markAsChanged();
if (bottomRight.row() == m_entriesModel->rowCount() - 1) {
// TODO check both entries are still empty
insertEmptyRow();
}
}
#include "moc_runcommand_config.cpp"
#include "runcommand_config.moc"

View File

@@ -1,34 +0,0 @@
/**
* SPDX-FileCopyrightText: 2015 David Edmundson <davidedmundson@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include "kcmplugin/kdeconnectpluginkcm.h"
class QMenu;
class QStandardItemModel;
class RunCommandConfig : public KdeConnectPluginKcm
{
Q_OBJECT
public:
RunCommandConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &);
void save() override;
void load() override;
void defaults() override;
private:
void onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
void exportCommands();
void importCommands();
void addSuggestedCommand(QMenu *menu, const QString &name, const QString &command);
void insertRow(int i, const QString &name, const QString &command);
void insertEmptyRow();
QStandardItemModel *m_entriesModel;
};

View File

@@ -15,7 +15,6 @@
#include <QSettings>
#include <KShell>
#include <kcmutils_version.h>
#include <core/daemon.h>
#include <core/device.h>

View File

@@ -23,19 +23,4 @@ target_sources(kdeconnect_sendnotifications PRIVATE dbusnotificationslistener.cp
target_link_libraries(kdeconnect_sendnotifications PkgConfig::DBus)
endif()
# Config
kdeconnect_add_kcm(kdeconnect_sendnotifications_config)
ki18n_wrap_ui(kdeconnect_sendnotifications_config sendnotifications_config.ui)
target_sources(kdeconnect_sendnotifications_config PRIVATE
sendnotifications_config.cpp
notifyingapplication.cpp
notifyingapplicationmodel.cpp
)
target_link_libraries(kdeconnect_sendnotifications_config
kdeconnectcore
kdeconnectpluginkcm
KF6::I18n
KF6::KCMUtils
)
install(FILES "kdeconnect_sendnotifications_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)

View File

@@ -152,7 +152,6 @@
"Name[zh_CN]": "发送通知",
"Name[zh_TW]": "傳送通知"
},
"X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_sendnotifications_config",
"X-KdeConnect-OutgoingPacketType": [
"kdeconnect.notification"
],

View File

@@ -1,97 +0,0 @@
/**
* SPDX-FileCopyrightText: 2015 Holger Kaelberer <holger.k@elberer.de>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "sendnotifications_config.h"
#include "notifyingapplicationmodel.h"
#include <KCModule>
#include <KPluginFactory>
K_PLUGIN_CLASS(SendNotificationsConfig)
SendNotificationsConfig::SendNotificationsConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: KdeConnectPluginKcm(parent, data, args)
, appModel(new NotifyingApplicationModel)
{
m_ui.setupUi(widget());
m_ui.appList->setIconSize(QSize(32, 32));
m_ui.appList->setModel(appModel);
m_ui.appList->horizontalHeader()->setSectionResizeMode(0, QHeaderView::QHeaderView::Fixed);
m_ui.appList->horizontalHeader()->setSectionResizeMode(1, QHeaderView::QHeaderView::Stretch);
m_ui.appList->horizontalHeader()->setSectionResizeMode(2, QHeaderView::QHeaderView::Stretch);
for (int i = 0; i < 3; i++)
m_ui.appList->resizeColumnToContents(i);
connect(m_ui.appList->horizontalHeader(), &QHeaderView::sortIndicatorChanged, m_ui.appList, &QTableView::sortByColumn);
connect(m_ui.check_persistent, &QCheckBox::toggled, this, &SendNotificationsConfig::markAsChanged);
connect(m_ui.spin_urgency, &QSpinBox::editingFinished, this, &SendNotificationsConfig::markAsChanged);
connect(m_ui.check_body, &QCheckBox::toggled, this, &SendNotificationsConfig::markAsChanged);
connect(m_ui.check_icons, &QCheckBox::toggled, this, &SendNotificationsConfig::markAsChanged);
connect(appModel, &NotifyingApplicationModel::applicationsChanged, this, &SendNotificationsConfig::markAsChanged);
connect(config(), &KdeConnectPluginConfig::configChanged, this, &SendNotificationsConfig::loadApplications);
}
void SendNotificationsConfig::defaults()
{
KCModule::defaults();
m_ui.check_persistent->setChecked(false);
m_ui.spin_urgency->setValue(0);
m_ui.check_body->setChecked(true);
m_ui.check_icons->setChecked(true);
markAsChanged();
}
void SendNotificationsConfig::loadApplications()
{
appModel->clearApplications();
QVariantList list = config()->getList(QStringLiteral("applications"));
for (const auto &a : list) {
NotifyingApplication app = a.value<NotifyingApplication>();
if (!appModel->containsApp(app.name)) {
appModel->appendApp(app);
}
}
}
void SendNotificationsConfig::load()
{
KCModule::load();
bool persistent = config()->getBool(QStringLiteral("generalPersistent"), false);
m_ui.check_persistent->setChecked(persistent);
bool body = config()->getBool(QStringLiteral("generalIncludeBody"), true);
m_ui.check_body->setChecked(body);
bool icons = config()->getBool(QStringLiteral("generalSynchronizeIcons"), true);
m_ui.check_icons->setChecked(icons);
int urgency = config()->getInt(QStringLiteral("generalUrgency"), 0);
m_ui.spin_urgency->setValue(urgency);
loadApplications();
}
void SendNotificationsConfig::save()
{
KCModule::save();
config()->set(QStringLiteral("generalPersistent"), m_ui.check_persistent->isChecked());
config()->set(QStringLiteral("generalIncludeBody"), m_ui.check_body->isChecked());
config()->set(QStringLiteral("generalSynchronizeIcons"), m_ui.check_icons->isChecked());
config()->set(QStringLiteral("generalUrgency"), m_ui.spin_urgency->value());
QVariantList list;
const auto apps = appModel->apps();
list.reserve(apps.size());
for (const auto &a : apps) {
list.append(QVariant::fromValue<NotifyingApplication>(a));
}
config()->setList(QStringLiteral("applications"), list);
}
#include "moc_sendnotifications_config.cpp"
#include "sendnotifications_config.moc"

View File

@@ -1,28 +0,0 @@
/**
* SPDX-FileCopyrightText: 2015 Holger Kaelberer <holger.k@elberer.de>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include "kcmplugin/kdeconnectpluginkcm.h"
#include "ui_sendnotifications_config.h"
class NotifyingApplicationModel;
class SendNotificationsConfig : public KdeConnectPluginKcm
{
Q_OBJECT
public:
SendNotificationsConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &);
void save() override;
void load() override;
void defaults() override;
private:
void loadApplications();
Ui::SendNotificationsConfigUi m_ui;
NotifyingApplicationModel *appModel;
};

View File

@@ -1,204 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SendNotificationsConfigUi</class>
<widget class="QWidget" name="SendNotificationsConfigUi">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>350</width>
<height>328</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>350</width>
<height>0</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>General</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="check_persistent">
<property name="toolTip">
<string>Synchronize only notifications with a timeout value of 0?</string>
</property>
<property name="text">
<string>Persistent notifications only</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_body">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="toolTip">
<string>Append the notification body to the summary when synchronizing notifications?</string>
</property>
<property name="text">
<string>Include body</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_icons">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="toolTip">
<string>Synchronize icons of notifying applications if possible?</string>
</property>
<property name="text">
<string>Synchronize icons</string>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="horizontalWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSpinBox" name="spin_urgency">
<property name="maximumSize">
<size>
<width>40</width>
<height>32</height>
</size>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Minimum urgency level of the notifications&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="maximum">
<number>2</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="toolTip">
<string>Synchronize only notifications with the given urgency level.</string>
</property>
<property name="text">
<string>Minimum urgency level</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string/>
</property>
<property name="title">
<string>Applications</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QTableView" name="appList">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="gridStyle">
<enum>Qt::NoPen</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderVisible">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>150</number>
</attribute>
<attribute name="horizontalHeaderMinimumSectionSize">
<number>20</number>
</attribute>
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -9,13 +9,4 @@ target_link_libraries(kdeconnect_share
KF6::Service
)
kdeconnect_add_kcm(kdeconnect_share_config SOURCES share_config.cpp)
ki18n_wrap_ui(kdeconnect_share_config share_config.ui)
target_link_libraries(kdeconnect_share_config
kdeconnectpluginkcm
KF6::I18n
KF6::CoreAddons
KF6::ConfigWidgets
KF6::KIOWidgets
KF6::Notifications
)
install(FILES "kdeconnect_share_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/kdeconnect)

View File

@@ -157,7 +157,6 @@
"Name[zh_CN]": "分享和接收",
"Name[zh_TW]": "分享及接收"
},
"X-KDE-ConfigModule": "kdeconnect/kcms/kdeconnect_share_config",
"X-KdeConnect-OutgoingPacketType": [
"kdeconnect.share.request",
"kdeconnect.share.request.update"

View File

@@ -1,51 +0,0 @@
/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "share_config.h"
#include <QStandardPaths>
#include <KPluginFactory>
#include <KUrlRequester>
K_PLUGIN_CLASS(ShareConfig)
ShareConfig::ShareConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: KdeConnectPluginKcm(parent, data, args)
{
m_ui.setupUi(widget());
// xgettext:no-c-format
m_ui.commentLabel->setTextFormat(Qt::RichText);
m_ui.commentLabel->setText(i18n("&percnt;1 in the path will be replaced with the specific device name."));
connect(m_ui.kurlrequester, &KUrlRequester::textChanged, this, &ShareConfig::markAsChanged);
}
void ShareConfig::defaults()
{
KCModule::defaults();
m_ui.kurlrequester->setText(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation));
markAsChanged();
}
void ShareConfig::load()
{
KCModule::load();
const auto standardPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
m_ui.kurlrequester->setText(config()->getString(QStringLiteral("incoming_path"), standardPath));
}
void ShareConfig::save()
{
KCModule::save();
config()->set(QStringLiteral("incoming_path"), m_ui.kurlrequester->text());
}
#include "moc_share_config.cpp"
#include "share_config.moc"

View File

@@ -1,24 +0,0 @@
/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include "kcmplugin/kdeconnectpluginkcm.h"
#include "ui_share_config.h"
class ShareConfig : public KdeConnectPluginKcm
{
Q_OBJECT
public:
ShareConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args);
void save() override;
void load() override;
void defaults() override;
private:
Ui::ShareConfigUi m_ui;
};

View File

@@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ShareConfigUi</class>
<widget class="QWidget" name="ShareConfigUi">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>569</width>
<height>140</height>
</rect>
</property>
<property name="windowTitle">
<string>Share plugin settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Receiving</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Save files in:</string>
</property>
</widget>
</item>
<item>
<widget class="KUrlRequester" name="kurlrequester">
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="mode">
<set>KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly</set>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="commentLabel"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KUrlRequester</class>
<extends>QWidget</extends>
<header>kurlrequester.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@@ -17,5 +17,6 @@ target_link_libraries(kdeconnect_sms
Qt::DBus
KF6::I18n
KF6::Notifications
KF6::ColorScheme
Qt::Widgets
)

View File

@@ -1,20 +0,0 @@
add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-settings")
qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc)
add_executable(kdeconnect-settings
main.cpp
${kdeconnect_custom_icons_SRCS}
)
target_link_libraries(kdeconnect-settings
kdeconnectversion
Qt::QuickControls2
KF6::I18n
KF6::KCMUtils
KF6::DBusAddons
KF6::WindowSystem
KF6::Crash)
install(TARGETS kdeconnect-settings ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES org.kde.kdeconnect-settings.desktop DESTINATION ${KDE_INSTALL_APPDIR})

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env bash
$EXTRACTRC `find -name '*.ui' -o -name '*.rc'` >> rc.cpp
$XGETTEXT rc.cpp -o $podir/kdeconnect-settings.pot
rm -f rc.cpp
#.cpp (-j passed to merge into existing file)
$XGETTEXT `find . -name '*.cpp'` -j -o $podir/kdeconnect-settings.pot

View File

@@ -1,86 +0,0 @@
/*
* SPDX-FileCopyrightText: 2018 Nicolas Fella <nicolas.fella@gmx.de>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include <QApplication>
#include <QCommandLineParser>
#include <QIcon>
#include <QQuickStyle>
#include <QStandardPaths>
#include "kdeconnect-version.h"
#include <KAboutData>
#include <KCMultiDialog>
#include <KColorSchemeManager>
#include <KCrash>
#include <KDBusService>
#include <KLocalizedString>
#include <KWindowSystem>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kdeconnect")));
KAboutData aboutData(QStringLiteral("kdeconnect-settings"),
i18n("KDE Connect Settings"),
QStringLiteral(KDECONNECT_VERSION_STRING),
i18n("KDE Connect Settings"),
KAboutLicense::GPL,
i18n("© 20182025 KDE Connect Team"));
aboutData.addAuthor(i18n("Nicolas Fella"), {}, QStringLiteral("nicolas.fella@gmx.de"));
KAboutData::setApplicationData(aboutData);
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
// Ensure we have a suitable color theme set for light/dark mode. KColorSchemeManager implicitly applies
// a suitable default theme.
KColorSchemeManager::instance();
// Force breeze style to ensure coloring works consistently in dark mode. Specifically tab colors have
// troubles on windows.
QApplication::setStyle(QStringLiteral("breeze"));
// Force breeze icon theme to ensure we can correctly adapt icons to color changes WRT dark/light mode.
// Without this we may end up with hicolor and fail to support icon recoloring.
QIcon::setThemeName(QStringLiteral("breeze"));
#else
QIcon::setFallbackThemeName(QStringLiteral("breeze"));
#endif
// Default to org.kde.desktop style unless the user forces another style
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) {
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
}
KCrash::initialize();
QCommandLineParser parser;
parser.addOption(QCommandLineOption(QStringLiteral("args"), i18n("Arguments for the config module"), QStringLiteral("args")));
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
KDBusService dbusService(KDBusService::Unique);
KCMultiDialog *dialog = new KCMultiDialog;
dialog->addModule(KPluginMetaData(QStringLiteral("plasma/kcms/systemsettings_qwidgets/kcm_kdeconnect")), {parser.value(QStringLiteral("args"))});
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
QObject::connect(&dbusService, &KDBusService::activateRequested, dialog, [dialog](const QStringList &args, const QString & /*workingDir*/) {
KWindowSystem::updateStartupId(dialog->windowHandle());
KWindowSystem::activateWindow(dialog->windowHandle());
QCommandLineParser parser;
parser.addOption(QCommandLineOption(QStringLiteral("args"), i18n("Arguments for the config module"), QStringLiteral("args")));
parser.parse(args);
dialog->clear();
dialog->addModule(KPluginMetaData(QStringLiteral("plasma/kcms/systemsettings_qwidgets/kcm_kdeconnect")), {parser.value(QStringLiteral("args"))});
});
app.setQuitOnLastWindowClosed(true);
return app.exec();
}

View File

@@ -1,136 +0,0 @@
[Desktop Entry]
Type=Application
Icon=kdeconnect
Terminal=false
Exec=kdeconnect-settings
Name=KDE Connect Settings
Name[ar]=إعدادات جسر كِيدِي
Name[az]=KDE Connect Ayarları
Name[bg]=Настройки на KDE Connect
Name[ca]=Arranjament del KDE Connect
Name[ca@valencia]=Configureu KDE Connect
Name[cs]=Nastavení KDE Connect
Name[da]=Indstilling af KDE Connect
Name[de]=KDE Connect-Einstellungen
Name[el]=Ρυθμίσεις KDE Connect
Name[en_GB]=KDE Connect Settings
Name[eo]=KDE Connect-Agordojn
Name[es]=Ajustes de KDE Connect
Name[et]=KDE Connecti seadistused
Name[eu]=KDE Connect ezarpenak
Name[fi]=KDE Connectin asetukset
Name[fr]=Paramètres de KDEConnect
Name[gl]=Configuración de KDE Connect
Name[he]=הגדרות KDE Connect
Name[hi]=केडीई कनेक्ट सेटिंग्स
Name[hu]=A KDE Connect beállításai
Name[ia]=Preferentias de KDE Connect
Name[id]=Pengaturan KDE Connect
Name[is]=Stillingar KDE Connect
Name[it]=Impostazioni di KDE Connect
Name[ja]=KDE Connect の設定
Name[ka]=KDE Connect -ის მორგება
Name[ko]=KDE Connect 설정
Name[lt]=KDE Connect nuostatos
Name[lv]=„KDE Connect“ iestatījumi
Name[nl]=Instellingen van KDE Connect
Name[nn]=Innstillingar for KDE Connect
Name[pa]=KDE ਕਨੈਕਟ ਸੈਟਿੰਗਾਂ
Name[pl]=Ustawienia KDE Connect
Name[pt]=Configuração do KDE Connect
Name[pt_BR]=Configurações do KDE Connect
Name[ro]=Configurări KDE Connect
Name[ru]=Настройка KDE Connect
Name[sa]=KDE Connect सेटिंग्स्
Name[sk]=Nastavenia aplikácie KDE Connect
Name[sl]=Nastavitve KDE Connect
Name[sr]=Поставке за КДЕ‑конекцију
Name[sr@ijekavian]=Поставке за КДЕ‑конекцију
Name[sr@ijekavianlatin]=Postavke za KDEkonekciju
Name[sr@latin]=Postavke za KDEkonekciju
Name[sv]=Inställning av KDE-anslut
Name[ta]=கே.டீ.யீ. கனெக்ட் அமைப்புகள்
Name[tr]=KDE Bağlan Ayarları
Name[uk]=Параметри KDE Connect
Name[x-test]=xxKDE Connect Settingsxx
Name[zh_CN]=KDE Connect 设置
Name[zh_TW]=KDE Connect 設定
GenericName=Device Synchronization Settings
GenericName[ar]=إعدادات مزامنة الجهاز
GenericName[bg]=Настройки на синхронизацията на устройство
GenericName[ca]=Paràmetres de sincronització de dispositius
GenericName[ca@valencia]=Paràmetres de sincronització de dispositius
GenericName[cs]=Nastavení synchronizace zařízení
GenericName[de]=Geräteabgleich-Einstellungen
GenericName[en_GB]=Device Synchronisation Settings
GenericName[eo]=Aparat-Sinkroniga Agordo
GenericName[es]=Preferencias de sincronización de dispositivos
GenericName[eu]=Gailua sinkronizatzeko ezarpenak
GenericName[fi]=Laitteiden tahdistuksen asetukset
GenericName[fr]=Configuration pour la synchronisation de périphériques
GenericName[gl]=Configuración da sincronización de dispositivos
GenericName[he]=הגדרות סנכרון מכשירים
GenericName[hu]=Eszközszinkronizációs beállítások
GenericName[ia]=Preferentias de Synchronisation de dispositivo
GenericName[is]=Stilling á samstillingu tækja
GenericName[it]=Impostazioni di sincronizzazione del dispositivo
GenericName[ka]=მოწყობილობის სინქრონიზაციის მორგება
GenericName[ko]=장치 동기화 설정
GenericName[lt]=Įrenginių sinchronizavimo nuostatos
GenericName[lv]=Ierīces sinhronizācijas iestatījumi
GenericName[nl]=Instellingen voor synchronisatie van apparaat
GenericName[nn]=Innstillingar for einingssynkronisering
GenericName[pa]=ਡਿਵਾਈਸ ਸੈਕਰੋਨਾਈਜ਼ ਸੈਟਿੰਗਾਂ
GenericName[pl]=Ustawienia synchronizacji urządzenia
GenericName[pt_BR]=Configurações da sincronização de dispositivo
GenericName[ru]=Параметры синхронизации с мобильным устройством
GenericName[sa]=उपकरण समन्वयन सेटिंग्स्
GenericName[sl]=Nastavitve sinhronizacijenaprav
GenericName[sv]=Inställning av enhetssynkronisering
GenericName[ta]=சாதன ஒத்திசைவு அமைப்புகள்
GenericName[tr]=Aygıt Eşzamanlama Ayarları
GenericName[uk]=Параметри синхронізації із пристроями
GenericName[x-test]=xxDevice Synchronization Settingsxx
GenericName[zh_CN]=设备同步设置
GenericName[zh_TW]=裝置同步設定
Comment=Configure device synchronization
Comment[ar]=ضبط مزامنة الجهاز
Comment[bg]=Конфигуриране на синхронизирането на устройството
Comment[ca]=Configura la sincronització dels dispositius
Comment[ca@valencia]=Configura la sincronització dels dispositius
Comment[cs]=Nastavit synchronizaci zařízení...
Comment[de]=Geräteabgleich einrichten
Comment[en_GB]=Configure device synchronisation
Comment[eo]=Agordi aparatan sinkronigon
Comment[es]=Configurar sincronización de dispositivos
Comment[eu]=Konfiguratu gailuaren sinkronizazioa
Comment[fi]=Laitteiden tahdistuksen asetukset
Comment[fr]=Configurer la synchronisation de périphériques
Comment[gl]=Configurar a sincronización de dispositivos.
Comment[he]=הגדרת סנכרון מכשירים
Comment[hu]=Eszközszinkronizáció beállítása
Comment[ia]=Configura Synchronisation de dispositivo
Comment[is]=Grunnstilla samstillingu tækja
Comment[it]=Configura la sincronizzazione del dispositivo
Comment[ka]=მოწყობილობის სინქრონიზაციის მორგება
Comment[ko]=장치 동기화 설정
Comment[lt]=Konfigūruoti įrenginių sinchronizavimą
Comment[lv]=Konfigurējiet ierīces sinhronizāciju
Comment[nl]=Synchronisatie van apparaat configureren
Comment[nn]=Set opp einingssynkronisering
Comment[pa]=ਡਿਵਾਈਸ ਸੈਕਰੋਨਾਈਜ਼ੇਸ਼ਨ ਦੀ ਸੰਰਚਨਾ
Comment[pl]=Ustawienia synchronizacji urządzenia
Comment[pt_BR]=Configurar sincronização de dispositivo
Comment[ru]=Настройка синхронизации с мобильным устройством
Comment[sa]=उपकरणसमन्वयनं विन्यस्यताम्
Comment[sl]=Konfiguriraj sinhronizacijo naprav
Comment[sv]=Anpassa enhetssynkronisering
Comment[ta]=சாதன ஒத்திசைவை அமைக்க விடும்
Comment[tr]=Aygıt eşzamanlamayı yapılandırın
Comment[uk]=Налаштовування синхронізації із пристроями
Comment[x-test]=xxConfigure device synchronizationxx
Comment[zh_CN]=配置设备同步
Comment[zh_TW]=設定裝置同步
Categories=Qt;KDE;Settings;HardwareSettings;
NotShowIn=KDE;
SingleMainWindow=true

View File

@@ -66,7 +66,7 @@ target_link_libraries(kdeconnect-sms PRIVATE
KF6::DBusAddons
KF6::I18n
KF6::People
KF6::KCMUtils
KF6::ColorScheme
KF6::Crash
)