2017-04-27 20:26:36 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2014-08-14 18:22:27 -06:00
|
|
|
#ifndef TANKITEM_H
|
|
|
|
#define TANKITEM_H
|
|
|
|
|
|
|
|
#include <QGraphicsItem>
|
2014-08-14 21:40:47 -06:00
|
|
|
#include <QBrush>
|
2016-04-04 22:02:03 -07:00
|
|
|
#include "profile-widget/divelineitem.h"
|
|
|
|
#include "profile-widget/divecartesianaxis.h"
|
|
|
|
#include "core/dive.h"
|
2014-08-14 18:22:27 -06:00
|
|
|
|
2020-12-23 12:26:12 +01:00
|
|
|
class TankItem : public QGraphicsRectItem
|
2014-08-14 18:22:27 -06:00
|
|
|
{
|
|
|
|
public:
|
2020-12-23 12:26:12 +01:00
|
|
|
explicit TankItem();
|
2014-08-14 18:22:27 -06:00
|
|
|
void setHorizontalAxis(DiveCartesianAxis *horizontal);
|
2020-12-23 12:00:55 +01:00
|
|
|
void setData(struct plot_info *plotInfo, struct dive *d);
|
2014-08-14 18:22:27 -06:00
|
|
|
|
|
|
|
private:
|
2019-10-27 17:48:04 +01:00
|
|
|
void createBar(int startTime, int stopTime, struct gasmix gas);
|
2020-12-23 12:26:12 +01:00
|
|
|
void replot();
|
2014-08-14 18:22:27 -06:00
|
|
|
DiveCartesianAxis *hAxis;
|
2019-10-27 18:08:07 +01:00
|
|
|
int plotEndTime;
|
2015-01-05 20:24:34 +01:00
|
|
|
QBrush air, nitrox, oxygen, trimix;
|
2014-08-14 18:22:27 -06:00
|
|
|
QList<QGraphicsRectItem *> rects;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TANKITEM_H
|