subsurface/core/string-format.h
Berthold Stoeger 1037c15b98 mobile: remove DiveObjectHelper code
When editing a dive, a DiveObjectHelper of the unmodified dive
was created to compare the edited with the old values. Since
the DiveObjectHelper is used here only as a pointless wrapper
around the formatting functions, call these functions directly.

However, note that the code is in principle wrong since the
change to the mobile-models, which do not use the DiveObjectHelper.
The real fix would be to reload the data from the model to prevent
going out-of-sync with respect to the formatting routines!

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-17 13:03:56 -08:00

29 lines
936 B
C

// SPDX-License-Identifier: GPL-2.0
// Various functions that format data into QStrings or QStringLists
#ifndef STRING_FORMAT_H
#define STRING_FORMAT_H
#include <QStringList>
struct dive;
QString formatSac(const dive *d);
QString formatNotes(const dive *d);
QString format_gps_decimal(const dive *d);
QStringList formatGetCylinder(const dive *d);
QStringList formatStartPressure(const dive *d);
QStringList formatEndPressure(const dive *d);
QStringList formatFirstGas(const dive *d);
QString formatGas(const dive *d);
QStringList formatFullCylinderList();
QStringList formatCylinders(const dive *d);
QString formatSumWeight(const dive *d);
QString formatWeightList(const dive *d);
QStringList formatWeights(const dive *d);
QString formatDiveDuration(const dive *d);
QString formatDiveGPS(const dive *d);
QString formatDiveDate(const dive *d);
QString formatDiveTime(const dive *d);
QString formatDiveDateTime(const dive *d);
#endif