aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget/tankitem.h
blob: 9890eb93db874c22a69ec80a8906fd6845544236 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// SPDX-License-Identifier: GPL-2.0
#ifndef TANKITEM_H
#define TANKITEM_H

#include "profile-widget/divelineitem.h"
#include "core/gas.h"
#include <QGraphicsRectItem>
#include <QBrush>

struct dive;
class DiveCartesianAxis;

class TankItem : public QGraphicsRectItem
{
public:
	explicit TankItem(const DiveCartesianAxis &axis);
	void setData(struct plot_info *plotInfo, struct dive *d);

private:
	void createBar(int startTime, int stopTime, struct gasmix gas);
	const DiveCartesianAxis &hAxis;
	int plotEndTime;
	QBrush air, nitrox, oxygen, trimix;
	QList<QGraphicsRectItem *> rects;
};

#endif // TANKITEM_H