- MainView {
- width: units.gu(50)
- height: units.gu(75)
- property int mathPart: 1
- Column {
- spacing: units.gu(1)
- anchors {
- margins: units.gu(2)
- fill: parent
- }
- Label {
- id: labelScore
- text: actualValue.toString()
- property int actualValue: 0
- }
- Grid {
- id: buttonGrid
- columns: 3
- rows: 3
- spacing: 1
- Repeater{
- model: 9
- Button {
- text: index+1
- width: (buttonGrid.width - units.gu(1)) / 3 ; height: units.gu(8)
- color: UbuntuColors.darkGrey
- onClicked: labelScore.actualValue += index+1 * mathPart
- }
- }
- }
- }
- }