QmlProfiler: Reorganize timeline into rows

This potentially allows us to use different views for different
categories and reduces the reliance on TimelineModelAggregator.

Change-Id: I486481599d1517abc0087c565358f27405e4108b
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2014-10-30 14:57:49 +01:00
committed by Ulf Hermann
parent 3780afc1e0
commit b1f4f56e99
11 changed files with 592 additions and 612 deletions

View File

@@ -101,6 +101,8 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, Analyzer::IAnalyzerT
groupLayout->setContentsMargins(0, 0, 0, 0);
groupLayout->setSpacing(0);
qmlRegisterType<TimelineZoomControl>();
qmlRegisterType<QmlProfilerTimelineModel>();
qmlRegisterType<QmlProfilerNotesModel>();
d->m_mainView = new QmlProfilerQuickView(this);
@@ -195,7 +197,8 @@ void QmlProfilerTraceView::selectBySourceLocation(const QString &filename, int l
return;
for (int modelIndex = 0; modelIndex < d->m_modelProxy->modelCount(); ++modelIndex) {
int typeId = d->m_modelProxy->selectionIdForLocation(modelIndex, filename, line, column);
int typeId = d->m_modelProxy->model(modelIndex)->selectionIdForLocation(filename, line,
column);
if (typeId != -1) {
QMetaObject::invokeMethod(rootObject, "selectBySelectionId",
Q_ARG(QVariant,QVariant(modelIndex)),
@@ -264,7 +267,7 @@ void QmlProfilerTraceView::showContextMenu(QPoint position)
if (d->m_viewContainer->hasGlobalStats())
getGlobalStatsAction->setEnabled(false);
if (!d->m_modelProxy->isEmpty()) {
if (d->m_zoomControl->traceDuration() > 0) {
menu.addSeparator();
viewAllAction = menu.addAction(tr("Reset Zoom"));
}