mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 03:21:29 +00:00
85d1e1d199
This was a rather trivial change: simply pass in the first and the last second to the plot function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
28 lines
655 B
C++
28 lines
655 B
C++
// 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, double dpr);
|
|
void setData(const struct dive *d, int plotStartTime, int plotEndTime);
|
|
double height() const;
|
|
|
|
private:
|
|
void createBar(int startTime, int stopTime, struct gasmix gas);
|
|
const DiveCartesianAxis &hAxis;
|
|
double dpr;
|
|
QBrush air, nitrox, oxygen, trimix;
|
|
QList<QGraphicsRectItem *> rects;
|
|
};
|
|
|
|
#endif // TANKITEM_H
|