Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/main.qml
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | Copyright 2014-2015 Harald Sitter <sitter@kde.org> | 2 | Copyright 2014-2015 Harald Sitter <sitter@kde.org> | ||
3 | Copyright 2019 Sefa Eyeoglu <contact@scrumplex.net> | ||||
3 | 4 | | |||
4 | This program is free software; you can redistribute it and/or | 5 | This program is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU General Public License as | 6 | modify it under the terms of the GNU General Public License as | ||
6 | published by the Free Software Foundation; either version 2 of | 7 | published by the Free Software Foundation; either version 2 of | ||
7 | the License or (at your option) version 3 or any later version | 8 | the License or (at your option) version 3 or any later version | ||
8 | accepted by the membership of KDE e.V. (or its successor approved | 9 | accepted by the membership of KDE e.V. (or its successor approved | ||
9 | by the membership of KDE e.V.), which shall act as a proxy | 10 | by the membership of KDE e.V.), which shall act as a proxy | ||
10 | defined in Section 14 of version 3 of the license. | 11 | defined in Section 14 of version 3 of the license. | ||
Show All 20 Lines | |||||
31 | import "../code/icon.js" as Icon | 32 | import "../code/icon.js" as Icon | ||
32 | 33 | | |||
33 | Item { | 34 | Item { | ||
34 | id: main | 35 | id: main | ||
35 | 36 | | |||
36 | property bool volumeFeedback: Plasmoid.configuration.volumeFeedback | 37 | property bool volumeFeedback: Plasmoid.configuration.volumeFeedback | ||
37 | property int maxVolumeValue: Math.round(Plasmoid.configuration.maximumVolume * PulseAudio.NormalVolume / 100.0) | 38 | property int maxVolumeValue: Math.round(Plasmoid.configuration.maximumVolume * PulseAudio.NormalVolume / 100.0) | ||
38 | property int volumeStep: Math.round(Plasmoid.configuration.volumeStep * PulseAudio.NormalVolume / 100.0) | 39 | property int volumeStep: Math.round(Plasmoid.configuration.volumeStep * PulseAudio.NormalVolume / 100.0) | ||
40 | property bool showVirtualStreams: Plasmoid.configuration.showVirtualStreams | ||||
39 | property string displayName: i18n("Audio Volume") | 41 | property string displayName: i18n("Audio Volume") | ||
40 | property QtObject draggedStream: null | 42 | property QtObject draggedStream: null | ||
41 | 43 | | |||
42 | // DEFAULT_SINK_NAME in module-always-sink.c | 44 | // DEFAULT_SINK_NAME in module-always-sink.c | ||
43 | readonly property string dummyOutputName: "auto_null" | 45 | readonly property string dummyOutputName: "auto_null" | ||
44 | 46 | | |||
45 | Layout.minimumHeight: units.gridUnit * 18 | 47 | Layout.minimumHeight: units.gridUnit * 18 | ||
46 | Layout.minimumWidth: units.gridUnit * 18 | 48 | Layout.minimumWidth: units.gridUnit * 18 | ||
▲ Show 20 Lines • Show All 340 Lines • ▼ Show 20 Line(s) | 376 | ColumnLayout { | |||
387 | ListView { | 389 | ListView { | ||
388 | id: sinkInputView | 390 | id: sinkInputView | ||
389 | 391 | | |||
390 | Layout.fillWidth: true | 392 | Layout.fillWidth: true | ||
391 | Layout.minimumHeight: contentHeight | 393 | Layout.minimumHeight: contentHeight | ||
392 | Layout.maximumHeight: contentHeight | 394 | Layout.maximumHeight: contentHeight | ||
393 | 395 | | |||
394 | model: PulseObjectFilterModel { | 396 | model: PulseObjectFilterModel { | ||
395 | filters: [ { role: "VirtualStream", value: false } ] | 397 | filters: [ { role: "VirtualStream", value: showVirtualStreams } ] | ||
396 | sourceModel: SinkInputModel {} | 398 | sourceModel: SinkInputModel {} | ||
397 | } | 399 | } | ||
398 | boundsBehavior: Flickable.StopAtBounds; | 400 | boundsBehavior: Flickable.StopAtBounds; | ||
399 | delegate: StreamListItem { | 401 | delegate: StreamListItem { | ||
400 | type: "sink-input" | 402 | type: "sink-input" | ||
401 | draggable: sinkView.count > 1 | 403 | draggable: sinkView.count > 1 | ||
402 | onlyOne: streamsView.simpleMode | 404 | onlyOne: streamsView.simpleMode | ||
403 | } | 405 | } | ||
404 | } | 406 | } | ||
405 | 407 | | |||
406 | Header { | 408 | Header { | ||
407 | Layout.fillWidth: true | 409 | Layout.fillWidth: true | ||
408 | visible: sourceOutputView.count > 0 && !streamsView.simpleMode | 410 | visible: sourceOutputView.count > 0 && !streamsView.simpleMode | ||
409 | text: i18n("Recording Streams") | 411 | text: i18n("Recording Streams") | ||
410 | } | 412 | } | ||
411 | ListView { | 413 | ListView { | ||
412 | id: sourceOutputView | 414 | id: sourceOutputView | ||
413 | 415 | | |||
414 | Layout.fillWidth: true | 416 | Layout.fillWidth: true | ||
415 | Layout.minimumHeight: contentHeight | 417 | Layout.minimumHeight: contentHeight | ||
416 | Layout.maximumHeight: contentHeight | 418 | Layout.maximumHeight: contentHeight | ||
417 | 419 | | |||
418 | model: PulseObjectFilterModel { | 420 | model: PulseObjectFilterModel { | ||
419 | filters: [ { role: "VirtualStream", value: false } ] | 421 | filters: [ { role: "VirtualStream", value: showVirtualStreams } ] | ||
420 | sourceModel: SourceOutputModel {} | 422 | sourceModel: SourceOutputModel {} | ||
421 | } | 423 | } | ||
422 | boundsBehavior: Flickable.StopAtBounds; | 424 | boundsBehavior: Flickable.StopAtBounds; | ||
423 | delegate: StreamListItem { | 425 | delegate: StreamListItem { | ||
424 | type: "source-input" | 426 | type: "source-input" | ||
425 | draggable: sourceView.count > 1 | 427 | draggable: sourceView.count > 1 | ||
426 | onlyOne: streamsView.simpleMode | 428 | onlyOne: streamsView.simpleMode | ||
427 | } | 429 | } | ||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |