2013-06-17 22:58:26 +00:00
|
|
|
#ifndef QTHELPER_H
|
|
|
|
#define QTHELPER_H
|
|
|
|
|
|
|
|
#include <QMultiMap>
|
|
|
|
#include <QString>
|
|
|
|
#include <stdint.h>
|
2013-10-04 18:39:33 +00:00
|
|
|
#include "dive.h"
|
2013-11-26 17:44:18 +00:00
|
|
|
#include "divelist.h"
|
2013-10-09 05:25:02 +00:00
|
|
|
#include <QTranslator>
|
2015-02-26 13:39:42 +00:00
|
|
|
#include <QDir>
|
2013-10-09 05:25:02 +00:00
|
|
|
|
|
|
|
// global pointers for our translation
|
|
|
|
extern QTranslator *qtTranslator, *ssrfTranslator;
|
2013-06-17 22:58:26 +00:00
|
|
|
|
2013-10-04 18:39:33 +00:00
|
|
|
QString weight_string(int weight_in_grams);
|
2014-06-03 01:13:50 +00:00
|
|
|
bool gpsHasChanged(struct dive *dive, struct dive *master, const QString &gps_text, bool *parsed_out = 0);
|
2015-02-15 01:50:48 +00:00
|
|
|
extern "C" const char *printGPSCoords(int lat, int lon);
|
2013-11-26 17:44:18 +00:00
|
|
|
QList<int> getDivesInTrip(dive_trip_t *trip);
|
2015-05-28 19:23:49 +00:00
|
|
|
QString get_gas_string(struct gasmix gas);
|
|
|
|
QString get_divepoint_gas_string(const divedatapoint& dp);
|
2015-02-26 13:39:42 +00:00
|
|
|
void read_hashes();
|
|
|
|
void write_hashes();
|
|
|
|
void updateHash(struct picture *picture);
|
|
|
|
QByteArray hashFile(const QString filename);
|
2015-02-26 13:44:27 +00:00
|
|
|
void learnImages(const QDir dir, int max_recursions, bool recursed);
|
2015-03-02 15:17:51 +00:00
|
|
|
void add_hash(const QString filename, QByteArray hash);
|
2015-02-26 13:39:42 +00:00
|
|
|
QString localFilePath(const QString originalFilename);
|
|
|
|
QString fileFromHash(char *hash);
|
2015-03-02 15:18:16 +00:00
|
|
|
void learnHash(struct picture *picture, QByteArray hash);
|
2015-05-28 20:17:09 +00:00
|
|
|
weight_t string_to_weight(const char *str);
|
|
|
|
depth_t string_to_depth(const char *str);
|
|
|
|
pressure_t string_to_pressure(const char *str);
|
|
|
|
volume_t string_to_volume(const char *str, pressure_t workp);
|
|
|
|
fraction_t string_to_fraction(const char *str);
|
|
|
|
|
2013-06-17 22:58:26 +00:00
|
|
|
#endif // QTHELPER_H
|