Add properties to octave controls in ambitus section

This commit is contained in:
Howard-C 2020-05-26 23:46:02 +08:00 committed by pereverzev_v
parent 76c899e1c0
commit 3bc80f05dc

View file

@ -110,6 +110,8 @@ StyledPopup {
}
IncrementalPropertyControl {
id: topOctaveControl
anchors.left: parent.horizontalCenter
anchors.leftMargin: 2
anchors.right: parent.right
@ -118,6 +120,15 @@ StyledPopup {
isIndeterminate: root.model ? root.model.topOctave.isUndefined : false
currentValue: root.model ? root.model.topOctave.value : 0
step: 1
decimals: 0
maxValue: 8
minValue: -1
validator: IntInputValidator {
top: topOctaveControl.maxValue
bottom: topOctaveControl.minValue
}
onValueEdited: { root.model.topOctave.value = newValue }
}
}
@ -145,6 +156,8 @@ StyledPopup {
}
IncrementalPropertyControl {
id: bottomOctaveControl
anchors.left: parent.horizontalCenter
anchors.leftMargin: 2
anchors.right: parent.right
@ -153,6 +166,15 @@ StyledPopup {
isIndeterminate: root.model ? root.model.bottomOctave.isUndefined : false
currentValue: root.model ? root.model.bottomOctave.value : 0
step: 1
decimals: 0
maxValue: 8
minValue: -1
validator: IntInputValidator {
top: bottomOctaveControl.maxValue
bottom: bottomOctaveControl.minValue
}
onValueEdited: { root.model.bottomOctave.value = newValue }
}
}