2018-11-07 19:54:00 +00:00
|
|
|
/*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nicolas Fella <nicolas.fella@gmx.de>
|
2018-11-07 19:54:00 +00:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2018-11-07 19:54:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
import QtQuick 2.2
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
import org.kde.kirigami 2.0 as Kirigami
|
|
|
|
import org.kde.kdeconnect 1.0
|
|
|
|
|
|
|
|
Kirigami.Page
|
|
|
|
{
|
|
|
|
id: root
|
2019-12-21 07:59:36 +00:00
|
|
|
title: i18nd("kdeconnect-app", "Volume control")
|
2018-11-07 19:54:00 +00:00
|
|
|
property QtObject pluginInterface
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
id: sinkList
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: Kirigami.Units.largeSpacing
|
|
|
|
|
|
|
|
model: RemoteSinksModel {
|
|
|
|
deviceId: pluginInterface.deviceId
|
|
|
|
}
|
|
|
|
delegate: ColumnLayout {
|
|
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: description
|
2020-03-15 21:09:31 +00:00
|
|
|
elide: Text.ElideRight
|
|
|
|
Layout.fillWidth: true
|
2018-11-07 19:54:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
|
|
|
|
Button {
|
|
|
|
icon.name: muted ? "player-volume-muted" : "player-volume"
|
2020-08-06 23:08:31 +01:00
|
|
|
onClicked: muted = !muted
|
2018-11-07 19:54:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Slider {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
from: 0
|
|
|
|
value: volume
|
|
|
|
to: maxVolume
|
2020-08-06 23:08:31 +01:00
|
|
|
onMoved: volume = value
|
2018-11-07 19:54:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|