From c93fb83edfe4bfab6bd2c01e2c54cfe7b39f0506 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 5 Jun 2021 09:05:46 +0200 Subject: profile: pass event at construction time to DiveEventItem There is no point in having a dive event without an event. Let's pass the event at construction time to avoid having to handle "invalid" events. Signed-off-by: Berthold Stoeger --- profile-widget/diveeventitem.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'profile-widget/diveeventitem.h') diff --git a/profile-widget/diveeventitem.h b/profile-widget/diveeventitem.h index 1b2c1c5ba..a04d89214 100644 --- a/profile-widget/diveeventitem.h +++ b/profile-widget/diveeventitem.h @@ -11,9 +11,8 @@ struct event; class DiveEventItem : public DivePixmapItem { Q_OBJECT public: - DiveEventItem(QGraphicsItem *parent = 0); + DiveEventItem(const struct dive *d, struct event *ev, struct gasmix lastgasmix, QGraphicsItem *parent = 0); ~DiveEventItem(); - void setEvent(const struct dive *d, struct event *ev, struct gasmix lastgasmix); struct event *getEvent(); void eventVisibilityChanged(const QString &eventName, bool visible); void setVerticalAxis(DiveCartesianAxis *axis, int speed); -- cgit v1.2.3-70-g09d2