42 lines
1.1 KiB
QML
42 lines
1.1 KiB
QML
import QtQuick 2.3
|
|
import LineItem 1.0
|
|
import DemoPlugin 1.0
|
|
|
|
Rectangle {
|
|
id: rr
|
|
color: "gray"
|
|
property var scale: 0.4
|
|
Flickable {
|
|
width: parent.width;
|
|
height: parent.height
|
|
contentWidth: 3000*rr.scale; contentHeight: 2000*rr.scale
|
|
flickDeceleration: 10000
|
|
leftMargin: Math.max((width - contentWidth)/2,0)
|
|
topMargin: Math.max((height - contentHeight)/2,0)
|
|
clip: true
|
|
|
|
Rectangle {
|
|
color: "white"
|
|
id: contentRect
|
|
anchors.top: parent.top
|
|
anchors.left: parent.left
|
|
width: parent.width/rr.scale
|
|
height: parent.height/rr.scale
|
|
|
|
transform: Scale {yScale: rr.scale; xScale: rr.scale}
|
|
transformOrigin: Item.TopLeft
|
|
|
|
Row {
|
|
x:0
|
|
y:0
|
|
|
|
LineItem {
|
|
height: 2000
|
|
width: 3000
|
|
scale: rr.scale
|
|
handler: DemoPlug.demoPlugin
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |