-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.qml
64 lines (57 loc) · 1.74 KB
/
main.qml
1
2
3
4
5
6
7
8
9
10
11
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
61
62
63
64
import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 2.2
//import QtQuick 2.9 as HelloQuick
import HelloQuick 1.0 as HelloQuick
Window {
id: window
visible: true
width: 640
height: 480
title: "HelloQuick"
property alias zoomValue: zoomSlider.value
property alias rotationValue: rotationSlider.value
HelloQuick.Rectangle {
id: renderer
anchors.fill: parent
Item {
anchors.top: parent.bottom
anchors.topMargin: -88
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.left: parent.left
Button {
id: resetButton
width: height
text: "Reset"
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
onClicked: renderer.reset()
}
Slider {
id: zoomSlider
anchors.top: parent.top
anchors.right: parent.right
anchors.left: resetButton.right
stepSize: 1
from: -50
to: 49
value: 0
onValueChanged: renderer.zoom(value)
}
Slider {
id: rotationSlider
anchors.bottom: parent.bottom
anchors.top: zoomSlider.bottom
anchors.right: parent.right
anchors.left: resetButton.right
stepSize: 1
from: -50
to: 49
value: 0
onValueChanged: renderer.rotate(value)
}
}
}
}