mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
ada4632ff1
dc_number is a global variable indicating the currently displayed dive on desktop. It makes no sense on mobile, since multiple profiles can be active at the same time. Therefore, the profile code should not access this global, but use the dc number that is passed in. This removes the last access. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
29 lines
707 B
C++
29 lines
707 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;
|
|
struct divecomputer;
|
|
class DiveCartesianAxis;
|
|
|
|
class TankItem : public QGraphicsRectItem
|
|
{
|
|
public:
|
|
explicit TankItem(const DiveCartesianAxis &axis, double dpr);
|
|
void setData(const struct dive *d, const struct divecomputer *dc, 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
|