forked from qt-creator/qt-creator
QmlProfiler: tooltips for the labels column
Due to space restrictions, the descriptive text of events in the labels column of the timeline view are elided. This patch adds tooltips on mouseover with location and details. Change-Id: I229988e114f21e4d9575dff137aa91918ad1afa3 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -39,6 +39,7 @@ Item {
|
||||
property int typeIndex: index
|
||||
|
||||
property variant descriptions: []
|
||||
property variant extdescriptions: []
|
||||
property variant eventIds: []
|
||||
|
||||
height: root.singleRowHeight
|
||||
@@ -67,17 +68,21 @@ Item {
|
||||
onDataReady: {
|
||||
var desc=[];
|
||||
var ids=[];
|
||||
var extdesc=[];
|
||||
for (var i=0; i<qmlEventList.uniqueEventsOfType(typeIndex); i++) {
|
||||
desc[i] = qmlEventList.eventTextForType(typeIndex, i);
|
||||
ids[i] = qmlEventList.eventIdForType(typeIndex, i);
|
||||
extdesc[i] = qmlEventList.eventDisplayNameForType(typeIndex, i) + " : " + desc[i];
|
||||
}
|
||||
descriptions = desc;
|
||||
eventIds = ids;
|
||||
extdescriptions = extdesc;
|
||||
updateHeight();
|
||||
}
|
||||
onDataClear: {
|
||||
descriptions = [];
|
||||
eventIds = [];
|
||||
extdescriptions = [];
|
||||
updateHeight();
|
||||
}
|
||||
}
|
||||
@@ -121,6 +126,9 @@ Item {
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: changeToolTip(extdescriptions[index]);
|
||||
onExited: changeToolTip("");
|
||||
onClicked: {
|
||||
if (mouse.modifiers & Qt.ShiftModifier)
|
||||
view.selectPrevFromId(eventIds[index]);
|
||||
|
||||
Reference in New Issue
Block a user