diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-12-23 12:33:05 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-10 15:57:39 -0800 |
commit | 7da5719cabdbe00d71264aa1a5fb492573c5e57a (patch) | |
tree | f590608b2fb14fb31bdbc92caa4a7e61f2b3e23e /profile-widget/tankitem.h | |
parent | 47d673bda324bf4a884fa41a0b95d08692a6f712 (diff) | |
download | subsurface-7da5719cabdbe00d71264aa1a5fb492573c5e57a.tar.gz |
profile: set axis in constructor of TankItem
There is no point in a separate set-axis function if we never
change the axis anyway. Make the axis a const-reference to
show that it can never be changed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/tankitem.h')
-rw-r--r-- | profile-widget/tankitem.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/profile-widget/tankitem.h b/profile-widget/tankitem.h index f3e0c0238..fb94dc481 100644 --- a/profile-widget/tankitem.h +++ b/profile-widget/tankitem.h @@ -11,14 +11,13 @@ class TankItem : public QGraphicsRectItem { public: - explicit TankItem(); - void setHorizontalAxis(DiveCartesianAxis *horizontal); + explicit TankItem(const DiveCartesianAxis &axis); void setData(struct plot_info *plotInfo, struct dive *d); private: void createBar(int startTime, int stopTime, struct gasmix gas); void replot(); - DiveCartesianAxis *hAxis; + const DiveCartesianAxis &hAxis; int plotEndTime; QBrush air, nitrox, oxygen, trimix; QList<QGraphicsRectItem *> rects; |