diff --git a/oscar/mainwindow.cpp b/oscar/mainwindow.cpp
index d356c44e..ce8a6e9b 100644
--- a/oscar/mainwindow.cpp
+++ b/oscar/mainwindow.cpp
@@ -246,6 +246,8 @@ void MainWindow::SetupGUI()
ui->actionChange_Data_Folder->setVisible(false);
ui->action_Frequently_Asked_Questions->setVisible(false);
+ ui->actionReport_a_Bug->setVisible(false); // remove this once we actually implement it
+ ui->actionExport_Review->setVisible(false); // remove this once we actually implement it
#ifndef helpless
help = new Help(this);
@@ -2561,6 +2563,39 @@ void MainWindow::on_mainsplitter_splitterMoved(int, int)
AppSetting->setRightPanelWidth(ui->mainsplitter->sizes()[1]);
}
+void MainWindow::on_actionCreate_Card_zip_triggered()
+{
+ // TODO: use similar workflow to SD card import to select the card(s) to archive.
+ // TODO: select where to write the zip file, disallow the SD card itself
+ // TODO: implement creation of .zip
+ qDebug() << "Create zip of SD card";
+}
+
+void MainWindow::on_actionCreate_OSCAR_Data_zip_triggered()
+{
+ QString folder;
+
+ // Note: macOS ignores this and points to OSCAR's most recently used directory for saving.
+ folder = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
+
+ folder += QDir::separator() + STR_AppData + ".zip";
+
+ QString filename = QFileDialog::getSaveFileName(this, tr("Choose where to save archive"), folder, tr("ZIP files (*.zip)"));
+
+ if (filename.isEmpty()) {
+ return; // aborted
+ }
+
+ if (!filename.toLower().endsWith(".zip")) {
+ filename += ".zip";
+ }
+
+ qDebug() << "Create zip of OSCAR data folder:" << filename;
+ // TODO: implement creation of .zip
+ // TODO: write debug log to .txt file in data folder (or zip)
+ // NOTE: make sure not to include .zip in itself if the user chooses to write the zip in the data folder itself!
+}
+
#include "translation.h"
void MainWindow::on_actionReport_a_Bug_triggered()
{
diff --git a/oscar/mainwindow.h b/oscar/mainwindow.h
index b9e6a4a1..db5f4da0 100644
--- a/oscar/mainwindow.h
+++ b/oscar/mainwindow.h
@@ -332,6 +332,10 @@ class MainWindow : public QMainWindow
void on_mainsplitter_splitterMoved(int pos, int index);
+ void on_actionCreate_Card_zip_triggered();
+
+ void on_actionCreate_OSCAR_Data_zip_triggered();
+
void on_actionReport_a_Bug_triggered();
void on_actionSystem_Information_triggered();
diff --git a/oscar/mainwindow.ui b/oscar/mainwindow.ui
index ff346765..e7c4a2bc 100644
--- a/oscar/mainwindow.ui
+++ b/oscar/mainwindow.ui
@@ -2865,8 +2865,11 @@ p, li { white-space: pre-wrap; }
-
+
+
+
+
- &Import SDcard Data
+ &Import CPAP Card Data
Shift+F2
@@ -3201,6 +3204,16 @@ p, li { white-space: pre-wrap; }
Show Performance Information
+
+
+ Create archive of CPAP data card
+
+
+
+
+ Create archive of all OSCAR data
+
+
CSV Export Wizard