diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-02-14 16:34:22 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@digia.com> | 2014-02-19 16:26:15 +0200 |
commit | b1bc443f5cbb4d88b577d2bccbd05c16e02bc674 (patch) | |
tree | 58de3c47cefaa832815bead6be699df276c26ea7 /plugins/qmlprofilerextension/pixmapcachemodel.h | |
parent | 86b3da7cd2f0bec3656ea67ccf4550c96be41cf9 (diff) |
Reduce code duplication
Change-Id: Icc072982427dc3874262fcaaf9885931e1588e80
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'plugins/qmlprofilerextension/pixmapcachemodel.h')
-rw-r--r-- | plugins/qmlprofilerextension/pixmapcachemodel.h | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/plugins/qmlprofilerextension/pixmapcachemodel.h b/plugins/qmlprofilerextension/pixmapcachemodel.h index 89d1d64e1e..9fba4beb60 100644 --- a/plugins/qmlprofilerextension/pixmapcachemodel.h +++ b/plugins/qmlprofilerextension/pixmapcachemodel.h @@ -20,7 +20,7 @@ #define PIXMAPCACHEMODEL_H #include "qmlprofiler/qmlprofilertimelinemodelproxy.h" -#include "qmlprofiler/qmlprofilermodelmanager.h" +#include "qmlprofiler/singlecategorytimelinemodel.h" #include "qmlprofiler/qmlprofilersimplemodel.h" #include <QStringList> @@ -29,7 +29,7 @@ namespace QmlProfilerExtension { namespace Internal { -class PixmapCacheModel : public QmlProfiler::AbstractTimelineModel +class PixmapCacheModel : public QmlProfiler::SingleCategoryTimelineModel { Q_OBJECT public: @@ -55,33 +55,10 @@ public: }; PixmapCacheModel(QObject *parent = 0); - ~PixmapCacheModel(); - -// void setModelManager(QmlProfiler::Internal::QmlProfilerModelManager *modelManager); - - int count() const; - - bool eventAccepted(const QmlProfiler::QmlProfilerSimpleModel::QmlEventData &event) const; - - Q_INVOKABLE qint64 lastTimeMark() const; - - Q_INVOKABLE bool expanded(int category) const; - Q_INVOKABLE void setExpanded(int category, bool expanded); Q_INVOKABLE int categoryDepth(int categoryIndex) const; - Q_INVOKABLE int categoryCount() const; - Q_INVOKABLE const QString categoryLabel(int categoryIndex) const; - - int findFirstIndex(qint64 startTime) const; - int findFirstIndexNoParents(qint64 startTime) const; - int findLastIndex(qint64 endTime) const; - int getEventType(int index) const; - int getEventCategory(int index) const; int getEventRow(int index) const; - Q_INVOKABLE qint64 getDuration(int index) const; - Q_INVOKABLE qint64 getStartTime(int index) const; - Q_INVOKABLE qint64 getEndTime(int index) const; Q_INVOKABLE int getEventId(int index) const; Q_INVOKABLE QColor getColor(int index) const; Q_INVOKABLE float getHeight(int index) const; @@ -89,18 +66,13 @@ public: Q_INVOKABLE const QVariantList getLabelsForCategory(int category) const; Q_INVOKABLE const QVariantList getEventDetails(int index) const; - Q_INVOKABLE const QVariantMap getEventLocation(int index) const; - - Q_INVOKABLE int getEventIdForHash(const QString &eventHash) const; - Q_INVOKABLE int getEventIdForLocation(const QString &filename, int line, int column) const; void loadData(); void clear(); private: class PixmapCacheModelPrivate; - PixmapCacheModelPrivate *d; - + Q_DECLARE_PRIVATE(PixmapCacheModel) }; } // namespace Internal |