mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
4e690119ef
desktop-widgets/divelogexportdialog.* contains both the desktop dialog as well as the "real" export functions. Create a class to be shared between desktop and mobile Copy the export functions 1-1 from divelogexportdialog.* of course changing class names. saveProfile is highly dependent on the UI, so the implementaion will be done in each UI directory (desktop-widgets, mobile-widgets). Remark this commit just add the copied functions, in order to secure nothing is broken. Signed-off-by: Jan Iversen <jan@casacondor.com>
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef EXPORTFUNCS_H
|
|
#define EXPORTFUNCS_H
|
|
|
|
#include <QObject>
|
|
#include <QFuture>
|
|
#include "dive.h"
|
|
|
|
class exportFuncs: public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static exportFuncs *instance();
|
|
|
|
void exportProfile(QString filename, const bool selected_only);
|
|
void export_TeX(const char *filename, const bool selected_only, bool plain);
|
|
void export_depths(const char *filename, const bool selected_only);
|
|
std::vector<const dive_site *> getDiveSitesToExport(bool selectedOnly);
|
|
void exportUsingStyleSheet(QString filename, bool doExport, int units,
|
|
QString stylesheet, bool anonymize);
|
|
QFuture<int> future;
|
|
|
|
// prepareDivesForUploadDiveLog
|
|
// prepareDivesForUploadDiveShare
|
|
|
|
private:
|
|
exportFuncs() {}
|
|
|
|
// WARNING
|
|
// saveProfile uses the UI and are therefore different between
|
|
// Desktop (UI) and Mobile (QML)
|
|
// In order to solve this difference, the actual implementations
|
|
// are done in
|
|
// desktop-widgets/divelogexportdialog.cpp and
|
|
// mobile-widgets/qmlmanager.cpp
|
|
void saveProfile(const struct dive *dive, const QString filename);
|
|
};
|
|
|
|
#endif // EXPORT_FUNCS_H
|