From 74244b3cfebb08d60fd32e938b396e8fa90a4774 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 10 Jul 2019 21:57:51 +0200 Subject: Profile: take int instead of bool in DiveEventItem::recalculatePos The goal here is to slowly make animation speed a variable of the profile widget, not of the global preferences. Currently the code does some trickeries with setting / unsetting the global animation speed. Start by not taking a bool "instant" but a speed in DiveEventItem::recalculatePos(). Signed-off-by: Berthold Stoeger --- profile-widget/diveeventitem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'profile-widget/diveeventitem.h') diff --git a/profile-widget/diveeventitem.h b/profile-widget/diveeventitem.h index 2039da616..0c065e131 100644 --- a/profile-widget/diveeventitem.h +++ b/profile-widget/diveeventitem.h @@ -16,13 +16,13 @@ public: void setEvent(struct event *ev, struct gasmix lastgasmix); struct event *getEvent(); void eventVisibilityChanged(const QString &eventName, bool visible); - void setVerticalAxis(DiveCartesianAxis *axis); + void setVerticalAxis(DiveCartesianAxis *axis, int speed); void setHorizontalAxis(DiveCartesianAxis *axis); void setModel(DivePlotDataModel *model); bool shouldBeHidden(); public slots: - void recalculatePos(bool instant = false); + void recalculatePos(int animationSpeed); private: void setupToolTipString(struct gasmix lastgasmix); -- cgit v1.2.3-70-g09d2