var xmargin = 0;
var ymargin = 0;
var drawFpsGraph = false;
+var nestingDepth = [];
var names = [ "Painting", "Compiling", "Creating", "Binding", "Handling Signal"]
//### need better way to manipulate color from QML. In the meantime, these need to be kept in sync.
xmargin = 0;
ymargin = 0;
valuesdone = false;
+ nestingDepth = [];
}
function calcFps()
}
// todo: consider nestingLevel
- if (!Plotter.valuesdone)
- Plotter.ranges.push( { type: type, start: startTime, duration: length, label: data, fileName: fileName, line: line } );
+ if (!Plotter.valuesdone) {
+ if (!Plotter.nestingDepth[type])
+ Plotter.nestingDepth[type] = nestingInType;
+ else
+ Plotter.nestingDepth[type] = Math.max(Plotter.nestingDepth[type], nestingInType);
+ Plotter.ranges.push( { type: type, start: startTime, duration: length, label: data, fileName: fileName, line: line, nestingLevel: nestingInType, nestingDepth: Plotter.nestingDepth[type] } );
+ if (nestingInType == 1)
+ Plotter.nestingDepth[type] = 1;
+ }
}
onComplete: {
mouseArea.exited()
}
- height: view.height / labels.rowCount
- y: type * view.height / labels.rowCount;
+ property int baseY: type * view.height / labels.rowCount;
+ property int baseHeight: view.height / labels.rowCount
+ y: baseY + (nestingLevel-1)*(baseHeight / nestingDepth);
+ height: baseHeight / nestingDepth;
gradient: Gradient {
GradientStop { position: 0.0; color: myColor }
GradientStop { position: 0.5; color: Qt.darker(myColor, 1.1) }
ctxt->setContextProperty("fileName", m_ranges.property(i).property("fileName").toString());
ctxt->setContextProperty("line", m_ranges.property(i).property("line").toNumber());
ctxt->setContextProperty("index", i);
+ ctxt->setContextProperty("nestingLevel", m_ranges.property(i).property("nestingLevel").toNumber());
+ ctxt->setContextProperty("nestingDepth", m_ranges.property(i).property("nestingDepth").toNumber());
QString label;
QVariantList list = m_ranges.property(i).property("label").toVariant().value<QVariantList>();
for (int i = 0; i < list.size(); ++i) {
}
if (item) {
item->setX(m_starts.at(i)*spacing);
- item->setWidth((m_ends.at(i)-m_starts.at(i)) * spacing);
+ qreal width = (m_ends.at(i)-m_starts.at(i)) * spacing;
+ item->setWidth(width > 1 ? width : 1);
item->setZValue(++z);
}
if (creating)