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);
|
2020-12-23 11:00:55 +00:00
|
|
|
void setData(struct plot_info *plotInfo, 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
|