2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2014-09-26 15:49:49 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2014-09-26 15:49:49 +02:00
|
|
|
|
|
|
|
|
#include "qmlprofilermodelmanager.h"
|
2016-04-26 12:26:46 +02:00
|
|
|
#include "qmlnote.h"
|
2018-05-03 09:50:11 +02:00
|
|
|
|
|
|
|
|
#include <tracing/timelinenotesmodel.h>
|
|
|
|
|
|
2014-09-26 15:49:49 +02:00
|
|
|
#include <QList>
|
|
|
|
|
#include <QHash>
|
|
|
|
|
|
|
|
|
|
namespace QmlProfiler {
|
2014-12-09 11:01:23 +01:00
|
|
|
class QMLPROFILER_EXPORT QmlProfilerNotesModel : public Timeline::TimelineNotesModel {
|
2014-09-26 15:49:49 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2014-10-27 17:41:22 +01:00
|
|
|
QmlProfilerNotesModel(QObject *parent);
|
2014-09-26 15:49:49 +02:00
|
|
|
|
2018-03-27 16:45:42 +02:00
|
|
|
void restore() override;
|
|
|
|
|
void stash() override;
|
2014-09-26 15:49:49 +02:00
|
|
|
|
2016-04-26 12:26:46 +02:00
|
|
|
const QVector<QmlNote> ¬es() const;
|
|
|
|
|
void setNotes(const QVector<QmlNote> ¬es);
|
2018-04-05 09:47:33 +02:00
|
|
|
void addNote(const QmlNote ¬e);
|
2018-03-27 16:45:42 +02:00
|
|
|
void clear() override;
|
2016-04-26 12:26:46 +02:00
|
|
|
|
2014-09-26 15:49:49 +02:00
|
|
|
protected:
|
2016-04-26 12:26:46 +02:00
|
|
|
QVector<QmlNote> m_notes;
|
2014-09-26 15:49:49 +02:00
|
|
|
|
2016-07-06 11:34:15 +02:00
|
|
|
int addQmlNote(int typeId, int collapsedRow, qint64 startTime, qint64 duration,
|
|
|
|
|
const QString &text);
|
2014-09-26 15:49:49 +02:00
|
|
|
};
|
2014-12-09 11:01:23 +01:00
|
|
|
} // namespace QmlProfiler
|