diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-09-02 12:19:33 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@digia.com> | 2014-09-10 15:43:00 +0200 |
commit | 2677e3378254917fc15032c008440ff86b5cf352 (patch) | |
tree | 137a177de199108002e20d0080c9560956ced74f /src/plugins/qmlprofiler | |
parent | 9e52d0c6d44671d1b0c43f81d2d03b8cda81db6d (diff) | |
download | qt-creator-2677e3378254917fc15032c008440ff86b5cf352.tar.gz |
QmlProfiler: rename relative height of timeline items to "relativeHeight"
This clarifies that the item height is not absolute but relative to the
row height, and it reduces the ambiguity of the various "height" methods.
Change-Id: I391441147c88b47a14e539fc3853702bb517d27b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/plugins/qmlprofiler')
8 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/qmlprofiler/abstracttimelinemodel.cpp b/src/plugins/qmlprofiler/abstracttimelinemodel.cpp index a3b486dedc..95ee07da3d 100644 --- a/src/plugins/qmlprofiler/abstracttimelinemodel.cpp +++ b/src/plugins/qmlprofiler/abstracttimelinemodel.cpp @@ -168,7 +168,7 @@ int AbstractTimelineModel::bindingLoopDest(int index) const return -1; } -float AbstractTimelineModel::height(int index) const +float AbstractTimelineModel::relativeHeight(int index) const { Q_UNUSED(index); return 1.0f; diff --git a/src/plugins/qmlprofiler/abstracttimelinemodel.h b/src/plugins/qmlprofiler/abstracttimelinemodel.h index 525a7263a6..a1e783d2bf 100644 --- a/src/plugins/qmlprofiler/abstracttimelinemodel.h +++ b/src/plugins/qmlprofiler/abstracttimelinemodel.h @@ -81,7 +81,7 @@ public: virtual int eventIdForTypeIndex(int typeIndex) const; virtual int eventIdForLocation(const QString &filename, int line, int column) const; virtual int bindingLoopDest(int index) const; - virtual float height(int index) const; + virtual float relativeHeight(int index) const; virtual int rowMinValue(int rowNumber) const; virtual int rowMaxValue(int rowNumber) const; virtual void clear(); diff --git a/src/plugins/qmlprofiler/qml/Overview.js b/src/plugins/qmlprofiler/qml/Overview.js index d7e299fe4b..e300c49b77 100644 --- a/src/plugins/qmlprofiler/qml/Overview.js +++ b/src/plugins/qmlprofiler/qml/Overview.js @@ -66,7 +66,7 @@ function drawData(canvas, ctxt) xx = Math.round(xx); - var itemHeight = qmlProfilerModelProxy.height(modelIndex,ii) * blockHeight; + var itemHeight = qmlProfilerModelProxy.relativeHeight(modelIndex, ii) * blockHeight; var yy = (modelIndex + 1) * blockHeight - itemHeight ; ctxt.fillStyle = qmlProfilerModelProxy.color(modelIndex, ii); diff --git a/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.cpp b/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.cpp index 3d3760170b..884c066c9b 100644 --- a/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.cpp @@ -193,7 +193,7 @@ QColor PaintEventsModelProxy::color(int index) const return colorByFraction(fpsFraction); } -float PaintEventsModelProxy::height(int index) const +float PaintEventsModelProxy::relativeHeight(int index) const { Q_D(const PaintEventsModelProxy); const QmlPaintEventData &data = d->data[index]; diff --git a/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.h b/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.h index cb6536adf1..ef9844b271 100644 --- a/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.h +++ b/src/plugins/qmlprofiler/qmlprofilerpainteventsmodelproxy.h @@ -71,7 +71,7 @@ public: int row(int index) const; QColor color(int index) const; - float height(int index) const; + float relativeHeight(int index) const; QVariantList labels() const; QVariantMap details(int index) const; diff --git a/src/plugins/qmlprofiler/timelinemodelaggregator.cpp b/src/plugins/qmlprofiler/timelinemodelaggregator.cpp index f40fee2754..5158b4cde4 100644 --- a/src/plugins/qmlprofiler/timelinemodelaggregator.cpp +++ b/src/plugins/qmlprofiler/timelinemodelaggregator.cpp @@ -224,9 +224,9 @@ QColor TimelineModelAggregator::color(int modelIndex, int index) const return d->modelList[modelIndex]->color(index); } -float TimelineModelAggregator::height(int modelIndex, int index) const +float TimelineModelAggregator::relativeHeight(int modelIndex, int index) const { - return d->modelList[modelIndex]->height(index); + return d->modelList[modelIndex]->relativeHeight(index); } QVariantList TimelineModelAggregator::labels(int modelIndex) const diff --git a/src/plugins/qmlprofiler/timelinemodelaggregator.h b/src/plugins/qmlprofiler/timelinemodelaggregator.h index 6067649b4a..b345cd03a1 100644 --- a/src/plugins/qmlprofiler/timelinemodelaggregator.h +++ b/src/plugins/qmlprofiler/timelinemodelaggregator.h @@ -81,7 +81,7 @@ public: Q_INVOKABLE int eventId(int modelIndex, int index) const; Q_INVOKABLE int bindingLoopDest(int modelIndex, int index) const; Q_INVOKABLE QColor color(int modelIndex, int index) const; - Q_INVOKABLE float height(int modelIndex, int index) const; + Q_INVOKABLE float relativeHeight(int modelIndex, int index) const; Q_INVOKABLE QVariantList labels(int modelIndex) const; diff --git a/src/plugins/qmlprofiler/timelinerenderer.cpp b/src/plugins/qmlprofiler/timelinerenderer.cpp index 7e242b7e0d..d03e623671 100644 --- a/src/plugins/qmlprofiler/timelinerenderer.cpp +++ b/src/plugins/qmlprofiler/timelinerenderer.cpp @@ -174,7 +174,7 @@ void TimelineRenderer::drawItemsToPainter(QPainter *p, int modelIndex, int fromI continue; itemHeight = m_profilerModelProxy->rowHeight(modelIndex, rowNumber) * - m_profilerModelProxy->height(modelIndex, i); + m_profilerModelProxy->relativeHeight(modelIndex, i); currentY += m_profilerModelProxy->rowHeight(modelIndex, rowNumber) - itemHeight; if (currentY + itemHeight < 0) @@ -220,7 +220,7 @@ void TimelineRenderer::drawSelectionBoxes(QPainter *p, int modelIndex, int fromI int row = m_profilerModelProxy->row(modelIndex, i); int rowHeight = m_profilerModelProxy->rowHeight(modelIndex, row); - int itemHeight = rowHeight * m_profilerModelProxy->height(modelIndex, i); + int itemHeight = rowHeight * m_profilerModelProxy->relativeHeight(modelIndex, i); currentY = modelRowStart + m_profilerModelProxy->rowOffset(modelIndex, row) + rowHeight - itemHeight - y(); |