-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPanoramaKing.qml
64 lines (52 loc) · 1.68 KB
/
PanoramaKing.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
// King of Workaround - QuicKing.wordpress.com
import QtQuick 1.0
Rectangle {
id: root
width: 800; height: 600
clip: true
property Image panorama: Image { source: "imgs/panorama1_frente.png" }
property int panWidth: panorama.width
PathView {
id: pathPano
anchors.fill: parent
model:2
highlightRangeMode: "NoHighlightRange" // snap false
flickDeceleration: 20
delegate: Item{
width: panWidth
height: panorama.height
clip: true
property real posLine: PathView.posLine;
Image{
source: "imgs/panorama1_bg.png"
width: panWidth
anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenterOffset: posLine
}
Image{
anchors.horizontalCenter: parent.horizontalCenter
source: panorama.source
}
Item{
width: parent.width
height: 50
anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenterOffset: -posLine
Image{
x: 200; y: 100
source: "imgs/ballon.png"
}
Image{
x: 1000; y: 400
source: "imgs/boat.png"
}
}
}
path: Path {
startX: -panWidth/2; startY: root.height/2
PathAttribute { name: "posLine"; value: 200 }
PathLine {x: panWidth + panWidth/2; y:root.height/2 }
PathAttribute { name: "posLine"; value: -200 }
}
}
}