2017-04-27 18:26:36 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2014-08-15 00:22:27 +00:00
|
|
|
#ifndef TANKITEM_H
|
|
|
|
#define TANKITEM_H
|
|
|
|
|
2016-04-05 05:02:03 +00:00
|
|
|
#include "profile-widget/divelineitem.h"
|
2020-12-23 11:39:07 +00:00
|
|
|
#include "core/gas.h"
|
|
|
|
#include <QGraphicsRectItem>
|
|
|
|
#include <QBrush>
|
|
|
|
|
|
|
|
struct dive;
|
|
|
|
class DiveCartesianAxis;
|
2014-08-15 00:22:27 +00:00
|
|
|
|
2020-12-23 11:26:12 +00:00
|
|
|
class TankItem : public QGraphicsRectItem
|
2014-08-15 00:22:27 +00:00
|
|
|
{
|
|
|
|
public:
|
2020-12-23 11:33:05 +00:00
|
|
|
explicit TankItem(const DiveCartesianAxis &axis);
|
2021-01-11 17:54:48 +00:00
|
|
|
void setData(const struct plot_info *plotInfo, const struct dive *d);
|
2014-08-15 00:22:27 +00:00
|
|
|
|
|
|
|
private:
|
2019-10-27 16:48:04 +00:00
|
|
|
void createBar(int startTime, int stopTime, struct gasmix gas);
|
2020-12-23 11:33:05 +00:00
|
|
|
const DiveCartesianAxis &hAxis;
|
2019-10-27 17:08:07 +00:00
|
|
|
int plotEndTime;
|
2015-01-05 19:24:34 +00:00
|
|
|
QBrush air, nitrox, oxygen, trimix;
|
2014-08-15 00:22:27 +00:00
|
|
|
QList<QGraphicsRectItem *> rects;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TANKITEM_H
|