64 lines
1.5 KiB
QML
64 lines
1.5 KiB
QML
import QtQuick 2.11
|
|
import QtQuick.Controls 2.4
|
|
|
|
Page {
|
|
id: calculatorStartPage
|
|
|
|
Label {
|
|
id: calculatorStartPageHeading
|
|
anchors {
|
|
top: parent.top
|
|
topMargin: parent.height * 0.05
|
|
horizontalCenter: parent.horizontalCenter
|
|
}
|
|
font.pixelSize: parent.height * 0.15
|
|
text: "Calculator"
|
|
}
|
|
|
|
SpinBox {
|
|
id: calculatorTickInterval
|
|
from: 1
|
|
to: 100000
|
|
stepSize: 1
|
|
value: 1000
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
editable: true
|
|
anchors {
|
|
left: parent.left
|
|
top: parent.top
|
|
leftMargin: parent.width * 0.5 - width * 0.5
|
|
topMargin: parent.height * 0.3 - height * 0.5
|
|
}
|
|
onValueChanged: {
|
|
calculator.tickInterval = calculatorTickInterval.value
|
|
}
|
|
|
|
}
|
|
|
|
SpinBox {
|
|
id: calculatorNumCount
|
|
from: 1
|
|
to: 100000
|
|
stepSize: 1
|
|
value: 10
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
editable: true
|
|
anchors {
|
|
left: parent.left
|
|
top: parent.top
|
|
leftMargin: parent.width * 0.5 - width * 0.5
|
|
topMargin: parent.height * 0.6 - height * 0.5
|
|
}
|
|
onValueChanged: {
|
|
calculator.numCount = calculatorNumCount.value
|
|
}
|
|
}
|
|
|
|
Button {
|
|
id: calculatorStartButton
|
|
text: "start"
|
|
onClicked: {
|
|
calculator.start()
|
|
}
|
|
}
|
|
}
|