kdeconnect-kde/plugins/sendnotifications/kdeconnect_sendnotifications_config.qml
Nicolas Fella 645bf381c4 Add missing license headers
I'm the sole author of these files
2021-02-27 20:04:47 +01:00

56 lines
1.4 KiB
QML

/**
* 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
*/
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)
}
}