Debian Codegraph @

au4/src/playback/qml/Audacity/Playback/toolbars/PlaybackLevel.qml

raw
1 /*
2 * Audacity: A Digital Audio Editor
3 */
4 import QtQuick 2.15
5 import QtQuick.Layouts 1.15
6
7 import Muse.UiComponents 1.0
8 import Muse.Ui 1.0
9
10 import "../components"
11
12 Item {
13 id: root
14
15 property alias volumeLevel: volumeSlider.volumeLevel
16
17 property alias leftCurrentVolumePressure: leftVolumePressure.currentVolumePressure
18 property alias leftRecentPeak: leftVolumePressure.recentPeak
19 property alias leftMaxPeak: leftVolumePressure.maxPeak
20
21 property alias rightCurrentVolumePressure: rightVolumePressure.currentVolumePressure
22 property alias rightRecentPeak: rightVolumePressure.recentPeak
23 property alias rightMaxPeak: rightVolumePressure.maxPeak
24
25 property NavigationPanel navigationPanel: null
26 property int navigationOrder: 0
27
28 signal volumeLevelChangeRequested(var level)
29
30 RowLayout {
31 anchors.fill: parent
32
33 StyledIconLabel {
34 Layout.preferredWidth: root.height
35 Layout.preferredHeight: root.height
36
37 iconCode: IconCode.AUDIO
38 }
39
40 Item {
41 Layout.fillWidth: true
42 Layout.preferredHeight: root.height
43
44 Column {
45 id: volumePressureContainer
46
47 anchors.fill: parent
48 anchors.topMargin: 4
49 anchors.rightMargin: volumeSlider.handleWidth/2 - leftVolumePressure.overloadWidth
50
51 spacing: 2
52
53 VolumePressureMeter {
54 id: leftVolumePressure
55 enabled: root.enabled
56 }
57 VolumePressureMeter {
58 id: rightVolumePressure
59 showRuler: true
60 enabled: root.enabled
61 }
62 }
63
64 VolumeSlider {
65 id: volumeSlider
66
67 anchors.left: parent.left
68 anchors.leftMargin: -handleWidth/2
69 anchors.right: parent.right
70 anchors.top: parent.top
71 anchors.topMargin: 3
72
73 enabled: root.enabled
74
75 navigation.panel: root.navigationPanel
76 navigation.order: root.navigationOrder
77
78 onVolumeLevelMoved: function(level) {
79 root.volumeLevelChangeRequested(Math.round(level * 10) / 10)
80 }
81 }
82 }
83 }
84 }