Warning, /network/kdeconnect-kde/plugins/pausemusic/kdeconnect_pausemusic_config.qml is written in an unsupported language. File is not indexed.

0001 /**
0002  * SPDX-FileCopyrightText: 2019 Nicolas Fella <nicolas.fella@gmx.de>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 import QtQuick 2.15
0008 import QtQuick.Controls 2.15 as QQC2
0009 import QtQuick.Layouts 1.15
0010 import org.kde.kirigami 2.20 as Kirigami
0011 import org.kde.kdeconnect 1.0
0012 
0013 Kirigami.FormLayout {
0014     property string device
0015 
0016     KdeConnectPluginConfig {
0017         id: config
0018         deviceId: device
0019         pluginName: "kdeconnect_pausemusic"
0020     }
0021 
0022     Component.onCompleted: {
0023         talking.checked = config.getBool("conditionTalking", false)
0024         mute.checked = config.getBool("actionMute", false)
0025         pause.checked = config.getBool("actionPause", true)
0026         resume.checked = config.getBool("actionResume", true)
0027     }
0028 
0029     QQC2.RadioButton {
0030         text: i18n("Pause as soon as phone rings")
0031         checked: !talking.checked
0032     }
0033 
0034     QQC2.RadioButton {
0035         id: talking
0036         onCheckedChanged: config.set("conditionTalking", checked)
0037         text: i18n("Pause only while talking")
0038     }
0039 
0040     QQC2.CheckBox {
0041         id: pause
0042         text: i18n("Pause media players")
0043         onClicked: config.set("actionPause", checked)
0044     }
0045 
0046     QQC2.CheckBox {
0047         id: mute
0048         text: i18n("Mute system sound")
0049         onClicked: config.set("actionMute", checked)
0050     }
0051 
0052     QQC2.CheckBox {
0053         id: resume
0054         text: i18n("Resume automatically when call ends")
0055         onClicked: config.set("actionResume", checked)
0056     }
0057 }