profile: attempt to port mobile-visibility code

There was a bunch of conditionally compiled code on mobile
that had special hiding/unhiding rules.

Try to unify that with the desktop code by introducing a
"simplified" flag. This certainly breaks and will have to
be finetuned. In particular, I can't test CCR dives, which
are treated specially on mobile.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-10-09 23:22:42 +02:00 committed by Dirk Hohndel
parent 1a429d9b17
commit 5c83fcd647
2 changed files with 65 additions and 76 deletions

View file

@ -54,8 +54,8 @@ 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(bool diveHasHeartBeat); // Update visibility of non-interactive chart features according to preferences
void updateAxes(bool diveHasHeartBeat); // Update axes according to preferences
void updateVisibility(bool diveHasHeartBeat, bool simplified); // Update visibility of non-interactive chart features according to preferences
void updateAxes(bool diveHasHeartBeat, bool simplified); // Update axes according to preferences
friend class ProfileWidget2; // For now, give the ProfileWidget full access to the objects on the scene
double dpr; // Device Pixel Ratio. A DPR of one corresponds to a "standard" PC screen.