2021-02-27 19:04:47 +00:00
|
|
|
/**
|
|
|
|
* SPDX-FileCopyrightText: 2019 Nicolas Fella <nicolas.fella@gmx.de>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
|
|
*/
|
|
|
|
|
2019-10-27 17:08:51 +00:00
|
|
|
import QtQuick 2.2
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
import org.kde.kirigami 2.5 as Kirigami
|
|
|
|
import org.kde.kdeconnect 1.0
|
|
|
|
|
|
|
|
Kirigami.FormLayout {
|
|
|
|
|
|
|
|
property string device
|
|
|
|
|
|
|
|
KdeConnectPluginConfig {
|
|
|
|
id: config
|
|
|
|
deviceId: device
|
|
|
|
pluginName: "kdeconnect_sendnotifications"
|
|
|
|
}
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
persistent.checked = config.getBool("generalPersistent", false)
|
|
|
|
includeBody.checked = config.getBool("generalIncludeBody", true)
|
|
|
|
includeIcon.checked = config.getBool("generalSynchronizeIcons", true)
|
|
|
|
urgency.value = config.getInt("generalUrgency", 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: persistent
|
|
|
|
text: i18n("Persistent notifications only")
|
|
|
|
onClicked: config.set("generalPersistent", checked)
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: includeBody
|
|
|
|
text: i18n("Include body")
|
|
|
|
onClicked: config.set("generalIncludeBody", checked)
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: includeIcon
|
|
|
|
text: i18n("Include icon")
|
|
|
|
onClicked: config.set("generalSynchronizeIcons", checked)
|
|
|
|
}
|
|
|
|
|
|
|
|
SpinBox {
|
|
|
|
id: urgency
|
|
|
|
Kirigami.FormData.label: i18n("Minimum urgency level:")
|
|
|
|
from: 0
|
|
|
|
to: 2
|
|
|
|
onValueModified: config.set("generalUrgency", value)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|