Commit 441966fa authored by Christiaan Janssen's avatar Christiaan Janssen

QmlProfiler: zooming on the timeline

Change-Id: I3057c687d9e812448fd2c2846b06ac7c2d32d5e3
Reviewed-on: http://codereview.qt.nokia.com/476Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent 245eb743
......@@ -49,47 +49,75 @@ Item {
}
property real value
//onValueChanged: console.log("*************** " + value)
/*Image {
id: leftRange
source: "range.png"
anchors.horizontalCenter: parent.left
anchors.bottom: parent.bottom
}*/
MouseArea {
anchors.fill: parent
drag.target: rangeMover
drag.axis: "XAxis"
drag.minimumX: 0
drag.maximumX: canvas.width - rangeMover.width //###
}
Rectangle {
id: rect
color: "#cc80b2f6"
width: 20
//anchors.left: parent.left
//anchors.right: rightRange.horizontalCenter
height: parent.height
}
Rectangle {
id: leftRange
property int currentX: rangeMover.x
property int currentWidth : rect.width
height: parent.height
width: 5
color: Qt.darker(rect.color);
opacity: 0.3
MouseArea {
anchors.fill: parent
drag.target: leftRange
drag.axis: "XAxis"
drag.minimumX: -parent.currentX
drag.maximumX: parent.currentWidth - 20
onPressed: {
parent.currentX = rangeMover.x;
parent.currentWidth = rect.width;
}
}
onXChanged: {
if (x!=0) {
rect.width = currentWidth - x;
rangeMover.x = currentX + x;
x = 0;
}
}
}
/*Image {
Rectangle {
id: rightRange
source: "range.png"
x: 13
anchors.bottom: parent.bottom
property int currentX: rangeMover.x
height: parent.height
width: 5
anchors.right: parent.right
color: Qt.darker(rect.color);
opacity: 0.3
MouseArea {
width: parent.width
height: 15
anchors.fill: parent
drag.target: rightRange
drag.axis: "XAxis"
drag.minimumX: -7 //###
drag.maximumX: canvas.width - rangeMover.width //###
drag.minimumX: 15
drag.maximumX: canvas.width - parent.currentX;
onPressed: parent.currentX = rangeMover.x;
}
onXChanged: {
if (x != rect.width - width) {
rect.width = x + width;
}
}
}*/
MouseArea {
anchors.fill: parent
drag.target: rangeMover
drag.axis: "XAxis"
drag.minimumX: 0
drag.maximumX: canvas.width - rangeMover.width //###
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment