Newer
Older
/** This file is part of Nootka (http://nootka.sf.net) *
* Copyright (C) 2017-2021 by Tomasz Bojczuk (seelook@gmail.com) *
* on the terms of GNU GPLv3 license (http://www.gnu.org/licenses) */
import QtQuick 2.12
import QtQuick.Controls 2.12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
property int instrument: -1
function getInstrument() {
return instrSel.instrument;
}
height: parent.height
contentHeight: instrCol.height
contentWidth: width
Tile {
y: (instrPage.height - height) / 2
bgColor: Qt.tint(nootkaWindow.labelColor, NOO.alpha(activPal.base, 230))
bgBorder {
width: 2
color: nootkaWindow.labelColor
}
Column {
id: instrCol
width: parent.width
spacing: NOO.factor() * 3
Text {
text: qsTr("What instrument do you play?")
width: parent.width
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
color: activPal.text
font {
pixelSize: NOO.factor() * 2
bold: true
}
}
InstrumentSelector {
id: instrSel
height: nootkaWindow.width / 7
anchors.horizontalCenter: parent.horizontalCenter
instrument: GLOB.instrument.type
}
}
function onCurrentIndexChanged() : void {
if (nootkaWindow.swipe.currentIndex != 1 && instrPage.instrument != instrSel.instrument)
instrPage.instrument = instrSel.instrument;
}