aboutsummaryrefslogtreecommitdiffstats
path: root/backend-shared/exportfuncs.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-06 22:38:29 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-09 12:13:18 -0800
commit2ec570098b61d0ca9685420c82724633928192dc (patch)
tree18796a4150e389eab4a0b9c73fc6bd374e4ccf8a /backend-shared/exportfuncs.h
parent5b302235f4a7c3a5c8bf1bc6404171ebef1b321c (diff)
downloadsubsurface-2ec570098b61d0ca9685420c82724633928192dc.tar.gz
Cleanup: remove exportFunc class
exportFunc was a collections of functions for exporting dive data. It had no state, therefore there is no reason for it to ever be instantiated. Simply remove the class. Rename the saveProfile function to exportProfile so that all export functions start with "export". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'backend-shared/exportfuncs.h')
-rw-r--r--backend-shared/exportfuncs.h45
1 files changed, 17 insertions, 28 deletions
diff --git a/backend-shared/exportfuncs.h b/backend-shared/exportfuncs.h
index 530cde7e0..1b888b19f 100644
--- a/backend-shared/exportfuncs.h
+++ b/backend-shared/exportfuncs.h
@@ -6,33 +6,22 @@
#include <QFuture>
#include "core/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);
- QFuture<int> exportUsingStyleSheet(QString filename, bool doExport, int units,
- QString stylesheet, bool anonymize);
-
- // 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);
-};
+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);
+QFuture<int> exportUsingStyleSheet(QString filename, bool doExport, int units, QString stylesheet, bool anonymize);
+
+// prepareDivesForUploadDiveLog
+// prepareDivesForUploadDiveShare
+
+// WARNING
+// exportProfile 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 exportProfile(const struct dive *dive, const QString filename);
#endif // EXPORT_FUNCS_H