diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-06-05 09:05:46 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-06-05 11:29:00 -0700 |
commit | c93fb83edfe4bfab6bd2c01e2c54cfe7b39f0506 (patch) | |
tree | 58a72e048d0483734b6552f80a42d558f8235dd3 /profile-widget/diveeventitem.h | |
parent | e42fc1a1e9a13c77d3474dbcb26b68b8772b8c6d (diff) | |
download | subsurface-c93fb83edfe4bfab6bd2c01e2c54cfe7b39f0506.tar.gz |
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/diveeventitem.h')
-rw-r--r-- | profile-widget/diveeventitem.h | 3 |
1 files changed, 1 insertions, 2 deletions
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); |