| 1 |
import QtQuick 2.0 |
| 2 |
import QtQuick.Controls 1.2 |
| 3 |
import QtQuick.Layouts 1.1 |
| 4 |
|
| 5 |
Rectangle { |
| 6 |
property int channel: channelSpinBox.value |
| 7 |
property int velocity: velocitySpinBox.value |
| 8 |
property int octave: octaveSpinBox.value |
| 9 |
property int numOctaves: numOctavesSpinBox.value |
| 10 |
id: controls |
| 11 |
Layout.minimumHeight: channelSpinBox.height |
| 12 |
RowLayout { |
| 13 |
spacing: 10 |
| 14 |
anchors.fill: parent |
| 15 |
Text { |
| 16 |
text: qsTr("Channel") |
| 17 |
} |
| 18 |
SpinBox { |
| 19 |
id: channelSpinBox |
| 20 |
Layout.fillWidth: true |
| 21 |
decimals: 0 |
| 22 |
maximumValue: 16 |
| 23 |
minimumValue: 1 |
| 24 |
value: 1 |
| 25 |
Keys.forwardTo: controls // to forward them further to keyboard to be able to play wrom computer keys |
| 26 |
} |
| 27 |
Text { |
| 28 |
text: qsTr("Velocity") |
| 29 |
} |
| 30 |
SpinBox { |
| 31 |
id: velocitySpinBox |
| 32 |
Layout.fillWidth: true |
| 33 |
decimals: 0 |
| 34 |
maximumValue: 127 |
| 35 |
minimumValue: 1 |
| 36 |
value: 64 |
| 37 |
Keys.forwardTo: controls |
| 38 |
} |
| 39 |
Text { |
| 40 |
text: qsTr("Octave") |
| 41 |
} |
| 42 |
SpinBox { |
| 43 |
id: octaveSpinBox |
| 44 |
Layout.fillWidth: true |
| 45 |
decimals: 0 |
| 46 |
maximumValue: 12 |
| 47 |
minimumValue: 0 |
| 48 |
value: 5 |
| 49 |
Keys.forwardTo: controls |
| 50 |
} |
| 51 |
Text { |
| 52 |
text: qsTr("Num Octaves") |
| 53 |
} |
| 54 |
SpinBox { |
| 55 |
id: numOctavesSpinBox |
| 56 |
Layout.fillWidth: true |
| 57 |
decimals: 0 |
| 58 |
maximumValue: 8 |
| 59 |
minimumValue: 1 |
| 60 |
value: 3 |
| 61 |
Keys.forwardTo: controls |
| 62 |
} |
| 63 |
} |
| 64 |
} |