-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
88 lines (75 loc) · 1.98 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import QtQuick 2.7
import QtQuick.Layouts 1.1
import QtQuick.Window 2.2
import QtQuick.Controls 2.1
import App 1.0
Window {
id: window
width: 400
height: 300
title: qsTr("Perlin Islands")
visible: true
ColumnLayout {
anchors.fill: parent
Label {
text: "Constant \"A\""
Layout.alignment: Qt.AlignHCenter
}
Slider {
id: constantASlider
from: 0.2
value: 0.3
to: 0.4
live: true
Layout.alignment: Qt.AlignHCenter
ToolTip {
parent: constantASlider.handle
visible: constantASlider.pressed
text: constantASlider.value.toFixed(2)
}
}
Label {
text: "Constant \"B\""
Layout.alignment: Qt.AlignHCenter
}
Slider {
id: constantBSlider
from: 0.4
value: 0.4
to: 0.6
live: true
Layout.alignment: Qt.AlignHCenter
ToolTip {
parent: constantBSlider.handle
visible: constantBSlider.pressed
text: constantBSlider.value.toFixed(2)
}
}
Label {
text: "Seed"
Layout.alignment: Qt.AlignHCenter
}
Slider {
id: seedSlider
from: 0
value: 0
to: 10000
stepSize: 1
live: true
Layout.alignment: Qt.AlignHCenter
ToolTip {
parent: seedSlider.handle
visible: seedSlider.pressed
text: seedSlider.value.toFixed(0)
}
}
PerlinItem {
constantA: constantASlider.value
constantB: constantBSlider.value
seed: seedSlider.value
Layout.preferredWidth: 100
Layout.preferredHeight: 100
Layout.alignment: Qt.AlignHCenter
}
}
}