QmlProfiler: Move some methods from statistics view into model

This allows us to tighten up the public interface of the model.

Change-Id: Iaa0363993de7cd94c3468d2c939198e65746e829
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Ulf Hermann
2018-03-23 10:29:02 +01:00
parent 085dfac560
commit 1155601da5
4 changed files with 81 additions and 68 deletions

View File

@@ -49,6 +49,8 @@ class QmlProfilerStatisticsModel : public QObject
{
Q_OBJECT
public:
static QString nameForType(RangeType typeNumber);
struct QmlEventStats {
qint64 duration = 0;
qint64 durationSelf = 0;
@@ -68,6 +70,8 @@ public:
void restrictToFeatures(quint64 features);
bool isRestrictedToRange() const;
QStringList details(int typeIndex) const;
QString summary(const QVector<int> &typeIds) const;
const QHash<int, QmlEventStats> &getData() const;
const QVector<QmlEventType> &getTypes() const;
const QHash<int, QString> &getNotes() const;
@@ -77,7 +81,6 @@ public:
void setRelativesModel(QmlProfilerStatisticsRelativesModel *childModel,
QmlProfilerStatisticsRelation relation);
QmlProfilerModelManager *modelManager() const;
signals:
void dataAvailable();