aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/qmlprofilerextension/memoryusagemodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/qmlprofilerextension/memoryusagemodel.h')
-rw-r--r--plugins/qmlprofilerextension/memoryusagemodel.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/qmlprofilerextension/memoryusagemodel.h b/plugins/qmlprofilerextension/memoryusagemodel.h
index 9a297d748e..acd8431673 100644
--- a/plugins/qmlprofilerextension/memoryusagemodel.h
+++ b/plugins/qmlprofilerextension/memoryusagemodel.h
@@ -19,8 +19,7 @@
#ifndef MEMORYUSAGEMODEL_H
#define MEMORYUSAGEMODEL_H
-#include "qmlprofiler/qmlprofilertimelinemodelproxy.h"
-#include "qmlprofiler/abstracttimelinemodel.h"
+#include "qmlprofiler/qmlprofilertimelinemodel.h"
#include "qmlprofiler/qmlprofilerdatamodel.h"
#include <QStringList>
@@ -29,13 +28,13 @@
namespace QmlProfilerExtension {
namespace Internal {
-class MemoryUsageModel : public QmlProfiler::AbstractTimelineModel
+class MemoryUsageModel : public QmlProfiler::QmlProfilerTimelineModel
{
Q_OBJECT
public:
struct MemoryAllocation {
- QmlDebug::MemoryType type;
+ int typeId;
qint64 size;
qint64 allocated;
qint64 deallocated;
@@ -43,18 +42,17 @@ public:
int deallocations;
int originTypeIndex;
- MemoryAllocation(QmlDebug::MemoryType type = QmlDebug::MaximumMemoryType,
- qint64 baseAmount = 0, int originTypeIndex = -1);
+ MemoryAllocation(int typeId = -1, qint64 baseAmount = 0, int originTypeIndex = -1);
void update(qint64 amount);
};
- MemoryUsageModel(QObject *parent = 0);
- quint64 features() const;
+ MemoryUsageModel(QmlProfiler::QmlProfilerModelManager *manager, QObject *parent = 0);
int rowMaxValue(int rowNumber) const;
- int row(int index) const;
- int selectionId(int index) const;
+ int expandedRow(int index) const;
+ int collapsedRow(int index) const;
+ int typeId(int index) const;
QColor color(int index) const;
float relativeHeight(int index) const;
@@ -68,8 +66,10 @@ protected:
void clear();
private:
- class MemoryUsageModelPrivate;
- Q_DECLARE_PRIVATE(MemoryUsageModel)
+ static QString memoryTypeName(int type);
+
+ QVector<MemoryAllocation> m_data;
+ qint64 m_maxSize;
};
} // namespace Internal