Commit 3cd2d375 authored by Ulf Hermann's avatar Ulf Hermann

QmlProfiler: Rename QmlProfilerEventsModelProxy

It is only used for the statistics view.

Change-Id: I71027dd864715b4a2f95c2b11af0c0d83c514229
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent 4223d76c
......@@ -13,7 +13,6 @@ SOURCES += \
qmlprofilerconfigwidget.cpp \
qmlprofilerdatamodel.cpp \
qmlprofilerdetailsrewriter.cpp \
qmlprofilereventsmodelproxy.cpp \
qmlprofilermodelmanager.cpp \
qmlprofilernotesmodel.cpp \
qmlprofileroptionspage.cpp \
......@@ -25,6 +24,7 @@ SOURCES += \
qmlprofilersettings.cpp \
qmlprofilerstatemanager.cpp \
qmlprofilerstatewidget.cpp \
qmlprofilerstatisticsmodel.cpp \
qmlprofilerstatisticsview.cpp \
qmlprofilertimelinemodel.cpp \
qmlprofilertimelinemodelfactory.cpp \
......@@ -44,7 +44,6 @@ HEADERS += \
qmlprofilerconstants.h \
qmlprofilerdatamodel.h \
qmlprofilerdetailsrewriter.h \
qmlprofilereventsmodelproxy.h \
qmlprofilereventsview.h \
qmlprofilermodelmanager.h \
qmlprofilernotesmodel.h \
......@@ -57,6 +56,7 @@ HEADERS += \
qmlprofilersettings.h \
qmlprofilerstatemanager.h \
qmlprofilerstatewidget.h \
qmlprofilerstatisticsmodel.h \
qmlprofilerstatisticsview.h \
qmlprofilertimelinemodel.h \
qmlprofilertimelinemodelfactory.h \
......
......@@ -29,7 +29,6 @@ QtcPlugin {
"qmlprofilerconfigwidget.ui", "qmlprofilerconstants.h",
"qmlprofilerdatamodel.cpp", "qmlprofilerdatamodel.h",
"qmlprofilerdetailsrewriter.cpp", "qmlprofilerdetailsrewriter.h",
"qmlprofilereventsmodelproxy.cpp", "qmlprofilereventsmodelproxy.h",
"qmlprofilereventsview.h",
"qmlprofilermodelmanager.cpp", "qmlprofilermodelmanager.h",
"qmlprofilernotesmodel.cpp", "qmlprofilernotesmodel.h",
......@@ -42,6 +41,7 @@ QtcPlugin {
"qmlprofilersettings.cpp", "qmlprofilersettings.h",
"qmlprofilerstatemanager.cpp", "qmlprofilerstatemanager.h",
"qmlprofilerstatewidget.cpp", "qmlprofilerstatewidget.h",
"qmlprofilerstatisticsmodel.cpp", "qmlprofilerstatisticsmodel.h",
"qmlprofilerstatisticsview.cpp", "qmlprofilerstatisticsview.h",
"qmlprofilertimelinemodel.cpp", "qmlprofilertimelinemodel.h",
"qmlprofilertimelinemodelfactory.cpp", "qmlprofilertimelinemodelfactory.h",
......
......@@ -28,9 +28,8 @@
**
****************************************************************************/
#ifndef QMLPROFILEREVENTSMODELPROXY_H
#define QMLPROFILEREVENTSMODELPROXY_H
#ifndef QMLPROFILERSTATISTICSMODEL_H
#define QMLPROFILERSTATISTICSMODEL_H
#include "qmlprofilerdatamodel.h"
#include "qmlprofilernotesmodel.h"
......@@ -40,13 +39,10 @@
#include <QHash>
#include <QVector>
namespace QmlProfiler {
class QmlProfilerModelManager;
namespace Internal {
class QmlProfilerEventsModelProxy : public QObject
class QmlProfilerStatisticsModel : public QObject
{
Q_OBJECT
public:
......@@ -67,8 +63,8 @@ public:
bool isBindingLoop;
};
QmlProfilerEventsModelProxy(QmlProfilerModelManager *modelManager, QObject *parent = 0);
~QmlProfilerEventsModelProxy();
QmlProfilerStatisticsModel(QmlProfilerModelManager *modelManager, QObject *parent = 0);
~QmlProfilerStatisticsModel();
void setEventTypeAccepted(QmlDebug::RangeType type, bool accepted);
bool eventTypeAccepted(QmlDebug::RangeType) const;
......@@ -88,7 +84,6 @@ signals:
private:
void loadData(qint64 rangeStart = -1, qint64 rangeEnd = -1);
const QSet<int> &eventsInBindingLoop() const;
private slots:
......@@ -96,38 +91,35 @@ private slots:
void notesChanged(int typeIndex);
private:
class QmlProfilerEventsModelProxyPrivate;
QmlProfilerEventsModelProxyPrivate *d;
class QmlProfilerStatisticsModelPrivate;
QmlProfilerStatisticsModelPrivate *d;
friend class QmlProfilerEventParentsModelProxy;
friend class QmlProfilerEventChildrenModelProxy;
friend class QmlProfilerStatisticsParentsModel;
friend class QmlProfilerStatisticsChildrenModel;
};
class QmlProfilerEventRelativesModelProxy : public QObject
class QmlProfilerStatisticsRelativesModel : public QObject
{
Q_OBJECT
public:
struct QmlEventRelativesData {
struct QmlStatisticsRelativesData {
qint64 duration;
qint64 calls;
bool isBindingLoop;
};
typedef QHash <int, QmlEventRelativesData> QmlEventRelativesMap;
typedef QHash <int, QmlStatisticsRelativesData> QmlStatisticsRelativesMap;
QmlProfilerEventRelativesModelProxy(QmlProfilerModelManager *modelManager,
QmlProfilerEventsModelProxy *eventsModel,
QmlProfilerStatisticsRelativesModel(QmlProfilerModelManager *modelManager,
QmlProfilerStatisticsModel *statisticsModel,
QObject *parent = 0);
~QmlProfilerEventRelativesModelProxy();
int count() const;
void clear();
const QmlEventRelativesMap &getData(int typeId) const;
const QmlStatisticsRelativesMap &getData(int typeId) const;
QVariantList getNotes(int typeId) const;
const QVector<QmlProfilerDataModel::QmlEventTypeData> &getTypes() const;
protected:
virtual void loadData() = 0;
......@@ -138,38 +130,35 @@ protected slots:
void dataChanged();
protected:
QHash <int, QmlEventRelativesMap> m_data;
QHash <int, QmlStatisticsRelativesMap> m_data;
QmlProfilerModelManager *m_modelManager;
QmlProfilerEventsModelProxy *m_eventsModel;
QmlProfilerStatisticsModel *m_statisticsModel;
};
class QmlProfilerEventParentsModelProxy : public QmlProfilerEventRelativesModelProxy
class QmlProfilerStatisticsParentsModel : public QmlProfilerStatisticsRelativesModel
{
Q_OBJECT
public:
QmlProfilerEventParentsModelProxy(QmlProfilerModelManager *modelManager,
QmlProfilerEventsModelProxy *eventsModel,
QmlProfilerStatisticsParentsModel(QmlProfilerModelManager *modelManager,
QmlProfilerStatisticsModel *statisticsModel,
QObject *parent = 0);
~QmlProfilerEventParentsModelProxy();
protected:
virtual void loadData();
};
class QmlProfilerEventChildrenModelProxy : public QmlProfilerEventRelativesModelProxy
class QmlProfilerStatisticsChildrenModel : public QmlProfilerStatisticsRelativesModel
{
Q_OBJECT
public:
QmlProfilerEventChildrenModelProxy(QmlProfilerModelManager *modelManager,
QmlProfilerEventsModelProxy *eventsModel,
QmlProfilerStatisticsChildrenModel(QmlProfilerModelManager *modelManager,
QmlProfilerStatisticsModel *statisticsModel,
QObject *parent = 0);
~QmlProfilerEventChildrenModelProxy();
protected:
virtual void loadData();
};
}
}
#endif
#endif // QMLPROFILERSTATISTICSMODEL_H
......@@ -32,7 +32,7 @@
#define QMLPROFILERSTATISTICSVIEW_H
#include "qmlprofilermodelmanager.h"
#include "qmlprofilereventsmodelproxy.h"
#include "qmlprofilerstatisticsmodel.h"
#include "qmlprofilerviewmanager.h"
#include "qmlprofilereventsview.h"
......@@ -117,8 +117,7 @@ class QmlProfilerStatisticsMainView : public Utils::TreeView
{
Q_OBJECT
public:
explicit QmlProfilerStatisticsMainView(QWidget *parent,
QmlProfilerEventsModelProxy *modelProxy);
explicit QmlProfilerStatisticsMainView(QWidget *parent, QmlProfilerStatisticsModel *model);
~QmlProfilerStatisticsMainView();
void setFieldViewable(Fields field, bool show);
......@@ -151,7 +150,7 @@ public slots:
private:
void selectItem(const QStandardItem *item);
void setHeaderLabels();
void parseModelProxy();
void parseModel();
QStandardItem *itemFromIndex(const QModelIndex &index) const;
private:
......@@ -164,8 +163,8 @@ class QmlProfilerStatisticsRelativesView : public Utils::TreeView
{
Q_OBJECT
public:
explicit QmlProfilerStatisticsRelativesView(QmlProfilerEventRelativesModelProxy *modelProxy,
QWidget *parent );
explicit QmlProfilerStatisticsRelativesView(QmlProfilerStatisticsRelativesModel *model,
QWidget *parent);
~QmlProfilerStatisticsRelativesView();
signals:
......@@ -178,7 +177,7 @@ public slots:
void clear();
private:
void rebuildTree(const QmlProfilerEventParentsModelProxy::QmlEventRelativesMap &eventMap);
void rebuildTree(const QmlProfilerStatisticsParentsModel::QmlStatisticsRelativesMap &map);
void updateHeader();
QStandardItemModel *treeModel();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment