mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
5b302235f4
commit
2ec570098b
4 changed files with 41 additions and 58 deletions
|
@ -6,33 +6,22 @@
|
|||
#include <QFuture>
|
||||
#include "core/dive.h"
|
||||
|
||||
class exportFuncs: public QObject {
|
||||
Q_OBJECT
|
||||
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);
|
||||
|
||||
public:
|
||||
static exportFuncs *instance();
|
||||
// prepareDivesForUploadDiveLog
|
||||
// prepareDivesForUploadDiveShare
|
||||
|
||||
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);
|
||||
};
|
||||
// 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue