mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: move non-interactive chart elements to ProfileScene
This finalizes the split between interactive (ProfileWidget2) and non-interactive (ProfileScene) parts of the profile. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
bf12756819
commit
d9dcf9ef37
5 changed files with 437 additions and 441 deletions
|
@ -4,13 +4,32 @@
|
|||
#ifndef PROFILESCENE_H
|
||||
#define PROFILESCENE_H
|
||||
|
||||
#include "core/color.h"
|
||||
#include "core/display.h"
|
||||
|
||||
#include <QGraphicsScene>
|
||||
|
||||
class DivePlannerPointsModel;
|
||||
class DivePlotDataModel;
|
||||
|
||||
class AbstractProfilePolygonItem;
|
||||
class DepthAxis;
|
||||
class DiveCartesianAxis;
|
||||
class DiveCalculatedCeiling;
|
||||
class DiveCalculatedTissue;
|
||||
class DiveCartesianAxis;
|
||||
class DiveEventItem;
|
||||
class DiveGasPressureItem;
|
||||
class DiveHeartrateItem;
|
||||
class DiveMeanDepthItem;
|
||||
class DivePercentageItem;
|
||||
class DiveProfileItem;
|
||||
class DiveReportedCeiling;
|
||||
class DiveTemperatureItem;
|
||||
class DiveTextItem;
|
||||
class PartialGasPressureAxis;
|
||||
class PartialPressureGasItem;
|
||||
class TankItem;
|
||||
class TemperatureAxis;
|
||||
class TimeAxis;
|
||||
|
||||
|
@ -20,16 +39,31 @@ public:
|
|||
~ProfileScene();
|
||||
|
||||
void updateAxes(); // Update axes according to preferences
|
||||
void clear();
|
||||
bool isPointOutOfBoundaries(const QPointF &point) const;
|
||||
|
||||
// If a plannerModel is passed, the deco-information is taken from there.
|
||||
int animSpeed;
|
||||
void plotDive(const struct dive *d, int dc, DivePlannerPointsModel *plannerModel = nullptr, bool inPlanner = false,
|
||||
bool instant = false, bool calcMax = true);
|
||||
|
||||
const struct dive *d;
|
||||
int dc;
|
||||
private:
|
||||
template<typename T, class... Args> T *createItem(const DiveCartesianAxis &vAxis, int vColumn, int z, Args&&... args);
|
||||
PartialPressureGasItem *createPPGas(int column, color_index_t color, color_index_t colorAlert,
|
||||
const double *thresholdSettingsMin, const double *thresholdSettingsMax);
|
||||
void updateVisibility(); // Update visibility of non-interactive chart features according to preferences
|
||||
|
||||
friend class ProfileWidget2; // For now, give the ProfileWidget full access to the objects on the scene
|
||||
double fontPrintScale;
|
||||
bool printMode;
|
||||
bool isGrayscale;
|
||||
int maxtime;
|
||||
int maxdepth;
|
||||
|
||||
DivePlotDataModel *dataModel;
|
||||
struct plot_info plotInfo;
|
||||
DepthAxis *profileYAxis;
|
||||
PartialGasPressureAxis *gasYAxis;
|
||||
TemperatureAxis *temperatureAxis;
|
||||
|
@ -37,6 +71,28 @@ private:
|
|||
DiveCartesianAxis *cylinderPressureAxis;
|
||||
DiveCartesianAxis *heartBeatAxis;
|
||||
DiveCartesianAxis *percentageAxis;
|
||||
std::vector<AbstractProfilePolygonItem *> profileItems;
|
||||
DiveProfileItem *diveProfileItem;
|
||||
DiveTemperatureItem *temperatureItem;
|
||||
DiveMeanDepthItem *meanDepthItem;
|
||||
DiveGasPressureItem *gasPressureItem;
|
||||
QList<DiveEventItem *> eventItems;
|
||||
DiveTextItem *diveComputerText;
|
||||
DiveReportedCeiling *reportedCeiling;
|
||||
PartialPressureGasItem *pn2GasItem;
|
||||
PartialPressureGasItem *pheGasItem;
|
||||
PartialPressureGasItem *po2GasItem;
|
||||
PartialPressureGasItem *o2SetpointGasItem;
|
||||
PartialPressureGasItem *ccrsensor1GasItem;
|
||||
PartialPressureGasItem *ccrsensor2GasItem;
|
||||
PartialPressureGasItem *ccrsensor3GasItem;
|
||||
PartialPressureGasItem *ocpo2GasItem;
|
||||
DiveCalculatedCeiling *diveCeiling;
|
||||
DiveTextItem *decoModelParameters;
|
||||
QList<DiveCalculatedTissue *> allTissues;
|
||||
DiveHeartrateItem *heartBeatItem;
|
||||
QList<DivePercentageItem *> allPercentages;
|
||||
TankItem *tankItem;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue