diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-06-05 09:15:51 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-06-05 11:29:00 -0700 |
commit | fd2862042b1aa925bd842f512ee6260865e2f5b1 (patch) | |
tree | 4bfd092b0fc2573a53e07b1ff82201e0acc632e8 /profile-widget/diveeventitem.h | |
parent | c93fb83edfe4bfab6bd2c01e2c54cfe7b39f0506 (diff) | |
download | subsurface-fd2862042b1aa925bd842f512ee6260865e2f5b1.tar.gz |
profile: pass axes and model to DiveEventItem on construction
Firstly, there is no point in supporting DiveEventItems without
model and axis. Secondly, this avoid pointless position-
recalculations.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/diveeventitem.h')
-rw-r--r-- | profile-widget/diveeventitem.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/profile-widget/diveeventitem.h b/profile-widget/diveeventitem.h index a04d89214..1bb217d92 100644 --- a/profile-widget/diveeventitem.h +++ b/profile-widget/diveeventitem.h @@ -11,7 +11,9 @@ struct event; class DiveEventItem : public DivePixmapItem { Q_OBJECT public: - DiveEventItem(const struct dive *d, struct event *ev, struct gasmix lastgasmix, QGraphicsItem *parent = 0); + DiveEventItem(const struct dive *d, struct event *ev, struct gasmix lastgasmix, + DivePlotDataModel *model, DiveCartesianAxis *hAxis, DiveCartesianAxis *vAxis, + int speed, QGraphicsItem *parent = nullptr); ~DiveEventItem(); struct event *getEvent(); void eventVisibilityChanged(const QString &eventName, bool visible); |