forked from qt-creator/qt-creator
QmlProfiler: Make notes a property of timeline model aggregator
Change-Id: I5aa8162d18fad46601198fe71fe87591737c30ff Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "qmlprofilerstatemanager.h"
|
||||
#include "qmlprofilermodelmanager.h"
|
||||
#include "timelinemodelaggregator.h"
|
||||
#include "qmlprofilernotesmodel.h"
|
||||
|
||||
// Needed for the load&save actions in the context menu
|
||||
#include <analyzerbase/ianalyzertool.h>
|
||||
@@ -100,6 +101,8 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, Analyzer::IAnalyzerT
|
||||
groupLayout->setContentsMargins(0, 0, 0, 0);
|
||||
groupLayout->setSpacing(0);
|
||||
|
||||
qmlRegisterType<QmlProfilerNotesModel>();
|
||||
|
||||
d->m_mainView = new QmlProfilerQuickView(this);
|
||||
d->m_mainView->setResizeMode(QQuickView::SizeRootObjectToView);
|
||||
QWidget *mainViewContainer = QWidget::createWindowContainer(d->m_mainView);
|
||||
|
||||
@@ -42,6 +42,7 @@ class TimelineModelAggregator : public QObject
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int height READ height NOTIFY heightChanged)
|
||||
Q_PROPERTY(QVariantList models READ models NOTIFY modelsChanged)
|
||||
Q_PROPERTY(QmlProfiler::QmlProfilerNotesModel *notes READ notes CONSTANT)
|
||||
public:
|
||||
TimelineModelAggregator(QObject *parent = 0);
|
||||
~TimelineModelAggregator();
|
||||
@@ -53,7 +54,7 @@ public:
|
||||
QVariantList models() const;
|
||||
int modelIndexFromManagerIndex(int modelManagerIndex) const;
|
||||
|
||||
Q_INVOKABLE QmlProfilerNotesModel *notes() const;
|
||||
QmlProfilerNotesModel *notes() const;
|
||||
Q_INVOKABLE int count(int modelIndex) const;
|
||||
void clear();
|
||||
Q_INVOKABLE int modelCount() const;
|
||||
|
||||
Reference in New Issue
Block a user