QmlProfiler: show ranges in time display

Change-Id: I6f42db3d5de02ee0198ff51aae8421bbdc5ea9c4
Reviewed-on: http://codereview.qt.nokia.com/836
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2011-06-27 18:33:20 +02:00
parent ddb602536c
commit 17db97b698
3 changed files with 103 additions and 24 deletions

View File

@@ -439,4 +439,60 @@ Rectangle {
opacity: 0
anchors.top: canvas.top
}
// the next elements are here because I want them rendered on top of the other
Rectangle {
id: timeDisplayLabel
color: "lightsteelblue"
border.color: Qt.darker(color)
border.width: 1
radius: 2
height: Math.max(labels.y-2, timeDisplayText.height);
y: timeDisplayEnd.visible ? flick.height - 1 : 1
width: timeDisplayText.width + 10 + ( timeDisplayEnd.visible ? timeDisplayCloseControl.width + 10 : 0 )
visible: false
function hideAll() {
timeDisplayBegin.visible = false;
timeDisplayEnd.visible = false;
timeDisplayLabel.visible = false;
}
Text {
id: timeDisplayText
x: 5
y: parent.height/2 - height/2 + 1
font.pointSize: 8
}
Text {
id: timeDisplayCloseControl
text:"X"
anchors.right: parent.right
anchors.rightMargin: 3
y: parent.height/2 - height/2 + 1
visible: timeDisplayEnd.visible
MouseArea {
anchors.fill: parent
onClicked: {
timeDisplayLabel.hideAll();
}
}
}
}
Rectangle {
id: timeDisplayBegin
width: 1
color: Qt.rgba(0,0,64,0.7);
height: flick.height + labels.y
visible: false
}
Rectangle {
id: timeDisplayEnd
width: 1
color: Qt.rgba(0,0,64,0.7);
height: flick.height + labels.y
visible: false
}
}