aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--backend-shared/exportfuncs.cpp3
-rw-r--r--mobile-widgets/qml/Export.qml73
-rw-r--r--mobile-widgets/qmlmanager.cpp31
-rw-r--r--mobile-widgets/qmlmanager.h12
4 files changed, 7 insertions, 112 deletions
diff --git a/backend-shared/exportfuncs.cpp b/backend-shared/exportfuncs.cpp
index a48f60066..2a23e3b97 100644
--- a/backend-shared/exportfuncs.cpp
+++ b/backend-shared/exportfuncs.cpp
@@ -12,6 +12,7 @@
#include "core/divesite.h"
#include "exportfuncs.h"
+#if !defined(SUBSURFACE_MOBILE)
void exportProfile(QString filename, bool selected_only)
{
struct dive *dive;
@@ -32,7 +33,6 @@ void exportProfile(QString filename, bool selected_only)
}
}
-
void export_TeX(const char *filename, bool selected_only, bool plain)
{
FILE *f;
@@ -269,6 +269,7 @@ void export_depths(const char *filename, bool selected_only)
}
free_buffer(&buf);
}
+#endif /* ! SUBSURFACE_MOBILE */
std::vector<const dive_site *> getDiveSitesToExport(bool selectedOnly)
{
diff --git a/mobile-widgets/qml/Export.qml b/mobile-widgets/qml/Export.qml
index 7384bcbe2..2b1b004ab 100644
--- a/mobile-widgets/qml/Export.qml
+++ b/mobile-widgets/qml/Export.qml
@@ -166,79 +166,6 @@ Kirigami.ScrollablePage {
explain.text = qsTr("Send the dive data to dive-share.appspot.com website.")
}
}
- RadioButton {
- Layout.fillWidth: true
- text: qsTr("Export CSV dive profile")
- exclusiveGroup: radioGroup
- onClicked: {
- selectedExport = ExportType.EX_CSV_DIVE_PROFILE
- explain.text = qsTr("Comma separated values describing the dive profile.")
- }
- }
- RadioButton {
- Layout.fillWidth: true
- text: qsTr("Export CSV dive details")
- exclusiveGroup: radioGroup
- onClicked: {
- selectedExport = ExportType.EX_CSV_DETAILS
- explain.text = qsTr("Comma separated values of the dive information. This includes most of the dive details but no profile information.")
- }
- }
- RadioButton {
- Layout.fillWidth: true
- text: qsTr("Export CSV profile data")
- exclusiveGroup: radioGroup
- onClicked: {
- selectedExport = ExportType.EX_CSV_PROFILE
- explain.text = qsTr("Write profile data to a CSV file.")
- }
- }
- RadioButton {
- Layout.fillWidth: true
- visible: false // TEMPORARY MEASURE, until a non UI PNG generation is ready
- text: qsTr("Export Dive profile")
- exclusiveGroup: radioGroup
- onClicked: {
- selectedExport = ExportType.EX_PROFILE_PNG
- explain.text = qsTr("Write the profile image as PNG file.")
- }
- }
- RadioButton {
- Layout.fillWidth: true
- text: qsTr("Export Worldmap")
- exclusiveGroup: radioGroup
- onClicked: {
- selectedExport = ExportType.EX_WORLD_MAP
- explain.text = qsTr("HTML export of the dive locations, visualized on a world map.")
- }
- }
- RadioButton {
- Layout.fillWidth: true
- text: qsTr("Export TeX")
- exclusiveGroup: radioGroup
- onClicked: {
- selectedExport = ExportType.EX_TEX
- explain.text = qsTr("Write dive as TeX macros to file.")
- }
- }
- RadioButton {
- Layout.fillWidth: true
- text: qsTr("Export LaTeX")
- exclusiveGroup: radioGroup
- onClicked: {
- selectedExport = ExportType.EX_LATEX
- explain.text = qsTr("Write dive as LaTeX macros to file.")
- }
- }
- RadioButton {
- Layout.fillWidth: true
- text: qsTr("Export Image depths")
- exclusiveGroup: radioGroup
- onClicked: {
- selectedExport = ExportType.EX_IMAGE_DEPTHS
- explain.text = qsTr("Write depths of images to file.")
- }
- }
Text {
id: explain
Layout.fillWidth: true
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 8a0a410b5..a877818cb 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -2124,6 +2124,7 @@ void QMLManager::appInitialized()
#endif
}
+#if !defined(Q_OS_ANDROID)
void QMLManager::exportToFile(export_types type, QString dir, bool anonymize)
{
// dir starts with "file://" e.g. "file:///tmp"
@@ -2144,40 +2145,12 @@ void QMLManager::exportToFile(export_types type, QString dir, bool anonymize)
case EX_UDDF:
exportUsingStyleSheet(fileName + ".uddf", true, 0, "uddf-export.xslt", anonymize);
break;
- case EX_CSV_DIVE_PROFILE:
- exportUsingStyleSheet(fileName + ".uddf", true, 0, "xml2csv.xslt", anonymize);
- break;
- case EX_CSV_DETAILS:
- exportUsingStyleSheet(fileName + ".uddf", true, 0, "xml2manualcsv.xslt", anonymize);
- break;
- case EX_CSV_PROFILE:
- save_profiledata(qPrintable(fileName + ".csv"), true);
- break;
- case EX_PROFILE_PNG:
- exportProfile(qPrintable(fileName + ".png"), false);
- break;
- case EX_WORLD_MAP:
- export_worldmap_HTML(qPrintable(fileName + ".html"), true);
- break;
- case EX_TEX:
- export_TeX(qPrintable(fileName + ".tex"), true, true);
- break;
- case EX_LATEX:
- export_TeX(qPrintable(fileName + ".tex"), true, false);
- break;
- case EX_IMAGE_DEPTHS:
- export_depths(qPrintable(fileName), false);
- break;
default:
qDebug() << "export to unknown type " << type << " using " << dir << " remove names " << anonymize;
break;
}
}
-
-void exportProfile(const struct dive *, const QString)
-{
- // TBD
-}
+#endif
void QMLManager::exportToWEB(export_types type, QString userId, QString password, bool anonymize)
{
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index a3fce0576..c3124c21c 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -61,18 +61,12 @@ public:
EX_DIVE_SITES_XML,
EX_UDDF,
EX_DIVELOGS_DE,
- EX_DIVESHARE,
- EX_CSV_DIVE_PROFILE,
- EX_CSV_DETAILS,
- EX_CSV_PROFILE,
- EX_PROFILE_PNG,
- EX_WORLD_MAP,
- EX_TEX,
- EX_LATEX,
- EX_IMAGE_DEPTHS
+ EX_DIVESHARE
};
Q_ENUM(export_types)
+#if !defined(Q_OS_ANDROID)
Q_INVOKABLE void exportToFile(export_types type, QString directory, bool anonymize);
+#endif
Q_INVOKABLE void exportToWEB(export_types type, QString userId, QString password, bool anonymize);