diff options
Diffstat (limited to 'profile-widget/divecartesianaxis.cpp')
-rw-r--r-- | profile-widget/divecartesianaxis.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/profile-widget/divecartesianaxis.cpp b/profile-widget/divecartesianaxis.cpp index e37c311d3..c4beb4036 100644 --- a/profile-widget/divecartesianaxis.cpp +++ b/profile-widget/divecartesianaxis.cpp @@ -10,6 +10,7 @@ #include "profile-widget/animationfunctions.h" #include "profile-widget/divelineitem.h" #include "profile-widget/profilewidget2.h" +#include "core/settings/qPrefDisplay.h" // TODO: Remove QPen DiveCartesianAxis::gridPen() { @@ -130,7 +131,7 @@ void emptyList(QList<T *> &list, int steps) { while (list.size() > steps) { T *removedItem = list.takeLast(); - Animations::animDelete(removedItem); + Animations::animDelete(removedItem, qPrefDisplay::animation_speed()); } } @@ -177,9 +178,9 @@ void DiveCartesianAxis::updateTicks(color_index_t color) labels[i]->setText(textForValue(currValueText)); if (orientation == LeftToRight || orientation == RightToLeft) { - Animations::moveTo(labels[i],childPos, m.y1() + tick_size); + Animations::moveTo(labels[i], qPrefDisplay::animation_speed(), childPos, m.y1() + tick_size); } else { - Animations::moveTo(labels[i],m.x1() - tick_size, childPos); + Animations::moveTo(labels[i], qPrefDisplay::animation_speed() ,m.x1() - tick_size, childPos); } } @@ -189,9 +190,9 @@ void DiveCartesianAxis::updateTicks(color_index_t color) begin - i * stepSize; if (orientation == LeftToRight || orientation == RightToLeft) { - Animations::moveTo(lines[i],childPos, m.y1()); + Animations::moveTo(lines[i], qPrefDisplay::animation_speed(), childPos, m.y1()); } else { - Animations::moveTo(lines[i],m.x1(), childPos); + Animations::moveTo(lines[i], qPrefDisplay::animation_speed(), m.x1(), childPos); } } @@ -212,11 +213,11 @@ void DiveCartesianAxis::updateTicks(color_index_t color) if (orientation == RightToLeft || orientation == LeftToRight) { label->setAlignment(Qt::AlignBottom | Qt::AlignHCenter); label->setPos(scene()->sceneRect().width() + 10, m.y1() + tick_size); // position it outside of the scene); - Animations::moveTo(label,childPos, m.y1() + tick_size); + Animations::moveTo(label, qPrefDisplay::animation_speed(),childPos , m.y1() + tick_size); } else { label->setAlignment(Qt::AlignVCenter | Qt::AlignLeft); label->setPos(m.x1() - tick_size, scene()->sceneRect().height() + 10); - Animations::moveTo(label,m.x1() - tick_size, childPos); + Animations::moveTo(label, qPrefDisplay::animation_speed(), m.x1() - tick_size, childPos); } } @@ -237,13 +238,13 @@ void DiveCartesianAxis::updateTicks(color_index_t color) if (orientation == RightToLeft || orientation == LeftToRight) { line->setLine(0, -line_size, 0, 0); line->setPos(scene()->sceneRect().width() + 10, m.y1()); // position it outside of the scene); - Animations::moveTo(line,childPos, m.y1()); + Animations::moveTo(line, qPrefDisplay::animation_speed(), childPos, m.y1()); } else { QPointF p1 = mapFromScene(3, 0); QPointF p2 = mapFromScene(line_size, 0); line->setLine(p1.x(), 0, p2.x(), 0); line->setPos(m.x1(), scene()->sceneRect().height() + 10); - Animations::moveTo(line,m.x1(), childPos); + Animations::moveTo(line, qPrefDisplay::animation_speed(), m.x1(), childPos); } } |