QmlProfiler: Put height of rows in the timeline into the model

Like that we can provide functionality to interactively resize rows in
the model so that one can zoom in to more interesting parts.

Change-Id: I31f14cd8aa37703240ebec744ca2e77188fb0f27
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-06-18 11:20:41 +02:00
parent d1cd1a490c
commit 63ca524069
10 changed files with 180 additions and 65 deletions

View File

@@ -91,6 +91,7 @@ void TimelineModelAggregator::addModel(AbstractTimelineModel *m)
{
d->modelList << m;
connect(m,SIGNAL(expandedChanged()),this,SIGNAL(expandedChanged()));
connect(m,SIGNAL(rowHeightChanged()),this,SIGNAL(rowHeightChanged()));
}
QStringList TimelineModelAggregator::categoryTitles() const
@@ -141,6 +142,26 @@ qint64 TimelineModelAggregator::lastTimeMark() const
return mark;
}
int TimelineModelAggregator::height(int modelIndex) const
{
return d->modelList[modelIndex]->height();
}
int TimelineModelAggregator::rowHeight(int modelIndex, int row) const
{
return d->modelList[modelIndex]->rowHeight(row);
}
int TimelineModelAggregator::rowOffset(int modelIndex, int row) const
{
return d->modelList[modelIndex]->rowOffset(row);
}
void TimelineModelAggregator::setRowHeight(int modelIndex, int row, int height)
{
d->modelList[modelIndex]->setRowHeight(row, height);
}
bool TimelineModelAggregator::expanded(int modelIndex) const
{
return d->modelList[modelIndex]->expanded();