2021-06-28 18:29:46 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
// Displays the dive profile. Used by the interactive profile widget
|
|
|
|
// and the printing/exporting code.
|
2021-06-05 16:42:56 +00:00
|
|
|
#ifndef PROFILESCENE_H
|
|
|
|
#define PROFILESCENE_H
|
|
|
|
|
|
|
|
#include <QGraphicsScene>
|
|
|
|
|
2021-06-28 18:29:46 +00:00
|
|
|
class DivePlotDataModel;
|
|
|
|
|
|
|
|
class DepthAxis;
|
|
|
|
class DiveCartesianAxis;
|
|
|
|
class PartialGasPressureAxis;
|
|
|
|
class TemperatureAxis;
|
|
|
|
class TimeAxis;
|
|
|
|
|
2021-06-05 16:42:56 +00:00
|
|
|
class ProfileScene : public QGraphicsScene {
|
|
|
|
public:
|
2021-06-28 18:29:46 +00:00
|
|
|
ProfileScene(double fontPrintScale);
|
2021-06-05 16:42:56 +00:00
|
|
|
~ProfileScene();
|
2021-06-28 18:29:46 +00:00
|
|
|
|
|
|
|
void updateAxes(); // Update axes according to preferences
|
|
|
|
bool isPointOutOfBoundaries(const QPointF &point) const;
|
|
|
|
|
|
|
|
int animSpeed;
|
|
|
|
private:
|
|
|
|
friend class ProfileWidget2; // For now, give the ProfileWidget full access to the objects on the scene
|
2021-07-29 04:50:59 +00:00
|
|
|
double fontPrintScale;
|
|
|
|
bool printMode;
|
|
|
|
bool isGrayscale;
|
|
|
|
|
2021-06-28 18:29:46 +00:00
|
|
|
DivePlotDataModel *dataModel;
|
|
|
|
DepthAxis *profileYAxis;
|
|
|
|
PartialGasPressureAxis *gasYAxis;
|
|
|
|
TemperatureAxis *temperatureAxis;
|
|
|
|
TimeAxis *timeAxis;
|
|
|
|
DiveCartesianAxis *cylinderPressureAxis;
|
|
|
|
DiveCartesianAxis *heartBeatAxis;
|
|
|
|
DiveCartesianAxis *percentageAxis;
|
2021-06-05 16:42:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|