QmlProfiler: drag&drop reordering of models in timeline

Task-number: QTCREATORBUG-12337
Change-Id: I399593f44aa8ff8dd79c623108fecb3c317cb63c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-08-27 12:11:26 +02:00
parent 00650c8b65
commit 36d8ad4c39
6 changed files with 136 additions and 4 deletions

View File

@@ -92,7 +92,7 @@ void TimelineModelAggregator::addModel(AbstractTimelineModel *m)
d->modelList << m;
connect(m,SIGNAL(expandedChanged()),this,SIGNAL(expandedChanged()));
connect(m,SIGNAL(rowHeightChanged()),this,SIGNAL(rowHeightChanged()));
emit modelsChanged();
emit modelsChanged(d->modelList.length(), d->modelList.length());
}
QVariantList TimelineModelAggregator::models() const
@@ -255,6 +255,12 @@ int TimelineModelAggregator::eventIdForLocation(int modelIndex, const QString &f
return d->modelList[modelIndex]->eventIdForLocation(filename, line, column);
}
void TimelineModelAggregator::swapModels(int modelIndex1, int modelIndex2)
{
qSwap(d->modelList[modelIndex1], d->modelList[modelIndex2]);
emit modelsChanged(modelIndex1, modelIndex2);
}
void TimelineModelAggregator::dataChanged()
{
// this is a slot connected for every modelproxy