Debian Codegraph @

au4/src/playback/qml/Audacity/Playback/components/TimecodeStartEnd.qml

raw
1 /*
2 * Audacity: A Digital Audio Editor
3 */
4 import QtQuick 2.15
5 import QtQuick.Controls 2.15
6 import QtQuick.Layouts 1.15
7
8 import Muse.Ui 1.0
9 import Muse.UiComponents 1.0
10
11 import Audacity.Playback 1.0
12
13 RowLayout {
14 id: root
15
16 property alias startValue: startTimecode.value
17 property alias endValue: endTimecode.value
18
19 property real sampleRate: 0.0
20 property real tempo: 0.0
21 property int upperTimeSignature: 0
22 property int lowerTimeSignature: 0
23
24 property int currentFormat: 0
25
26 signal startValueChangeRequested(var newValue)
27 signal endValueChangeRequested(var newValue)
28 signal formatChangeRequested(var newFormat)
29
30 spacing: 1
31
32 Timecode {
33 id: startTimecode
34
35 sampleRate: root.sampleRate
36 tempo: root.tempo
37 upperTimeSignature: root.upperTimeSignature
38 lowerTimeSignature: root.lowerTimeSignature
39
40 currentFormat: root.currentFormat
41
42 showMenu: false
43
44 onValueChangeRequested: function(newValue) {
45 root.startValueChangeRequested(newValue)
46 }
47 }
48
49 Timecode {
50 id: endTimecode
51
52 sampleRate: root.sampleRate
53 tempo: root.tempo
54 upperTimeSignature: root.upperTimeSignature
55 lowerTimeSignature: root.lowerTimeSignature
56
57 currentFormat: root.currentFormat
58
59 backgroundLeftRadius: 0
60
61 onValueChangeRequested: function(newValue) {
62 root.endValueChangeRequested(newValue)
63 }
64
65 onCurrentFormatChanged: function() {
66 root.formatChangeRequested(currentFormat)
67 }
68 }
69 }