mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Since the initial commit introducing TankItem, there was a connection that replotted the item if the horizontal axis sent the sizeChanged() signal. I never managed to create this signal for the horizontal axis, only for the vertical axes. Therefore remove this thing. If it turns out that we need it after all, readd it in a more deterministic way (i.e. call where it is needed). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
27 lines
651 B
C++
27 lines
651 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef TANKITEM_H
|
|
#define TANKITEM_H
|
|
|
|
#include <QGraphicsItem>
|
|
#include <QBrush>
|
|
#include "profile-widget/divelineitem.h"
|
|
#include "profile-widget/divecartesianaxis.h"
|
|
#include "core/dive.h"
|
|
|
|
class TankItem : public QGraphicsRectItem
|
|
{
|
|
public:
|
|
explicit TankItem();
|
|
void setHorizontalAxis(DiveCartesianAxis *horizontal);
|
|
void setData(struct plot_info *plotInfo, struct dive *d);
|
|
|
|
private:
|
|
void createBar(int startTime, int stopTime, struct gasmix gas);
|
|
void replot();
|
|
DiveCartesianAxis *hAxis;
|
|
int plotEndTime;
|
|
QBrush air, nitrox, oxygen, trimix;
|
|
QList<QGraphicsRectItem *> rects;
|
|
};
|
|
|
|
#endif // TANKITEM_H
|