diff --git a/sleepyhead/SleepLib/profiles.h b/sleepyhead/SleepLib/profiles.h
index 11f4a412..fe1ded5b 100644
--- a/sleepyhead/SleepLib/profiles.h
+++ b/sleepyhead/SleepLib/profiles.h
@@ -207,6 +207,8 @@ const QString STR_OS_SPO2DropDuration = "SPO2DropDuration";
const QString STR_OS_SPO2DropPercentage = "SPO2DropPercentage";
const QString STR_OS_PulseChangeDuration = "PulseChangeDuration";
const QString STR_OS_PulseChangeBPM = "PulseChangeBPM";
+const QString STR_OS_SkipOxiIntroScreen = "SkipOxiIntroScreen";
+
// CPAPSettings Strings
const QString STR_CS_ComplianceHours = "ComplianceHours";
@@ -413,6 +415,7 @@ class OxiSettings : public ProfileSettings
initPref(STR_OS_SPO2DropPercentage, 3.0);
initPref(STR_OS_PulseChangeDuration, 8.0);
initPref(STR_OS_PulseChangeBPM, 5.0);
+ initPref(STR_OS_SkipOxiIntroScreen, false);
}
bool oximetryEnabled() const { return getPref(STR_OS_EnableOximetry).toBool(); }
@@ -423,6 +426,8 @@ class OxiSettings : public ProfileSettings
double spO2DropPercentage() const { return getPref(STR_OS_SPO2DropPercentage).toDouble(); }
double pulseChangeDuration() const { return getPref(STR_OS_PulseChangeDuration).toDouble(); }
double pulseChangeBPM() const { return getPref(STR_OS_PulseChangeBPM).toDouble(); }
+ bool skipOxiIntroScreen() const { return getPref(STR_OS_SkipOxiIntroScreen).toBool(); }
+
void setOximetryEnabled(bool enabled) { setPref(STR_OS_EnableOximetry, enabled); }
void setSyncOximetry(bool synced) { setPref(STR_OS_SyncOximetry, synced); }
@@ -430,6 +435,7 @@ class OxiSettings : public ProfileSettings
void setOxiDiscardThreshold(double thresh) { setPref(STR_OS_OxiDiscardThreshold, thresh); }
void setSpO2DropDuration(double duration) { setPref(STR_OS_SPO2DropDuration, duration); }
void setPulseChangeBPM(double bpm) { setPref(STR_OS_PulseChangeBPM, bpm); }
+ void setSkipOxiIntroScreen(bool skip) { setPref(STR_OS_SkipOxiIntroScreen, skip); }
void setSpO2DropPercentage(double percentage) {
setPref(STR_OS_SPO2DropPercentage, percentage);
}
diff --git a/sleepyhead/oximeterimport.cpp b/sleepyhead/oximeterimport.cpp
index 3f554360..73a5440b 100644
--- a/sleepyhead/oximeterimport.cpp
+++ b/sleepyhead/oximeterimport.cpp
@@ -68,6 +68,18 @@ OximeterImport::OximeterImport(QWidget *parent) :
ELplethy = nullptr;
pulse = spo2 = -1;
+
+
+ ui->skipWelcomeCheckbox->setChecked(p_profile->oxi->skipOxiIntroScreen());
+ if (p_profile->oxi->skipOxiIntroScreen()) {
+ ui->stackedWidget->setCurrentWidget(ui->importSelectionPage);
+ ui->nextButton->setVisible(false);
+ ui->informationButton->setVisible(true);
+ } else {
+ ui->stackedWidget->setCurrentWidget(ui->welcomePage);
+ ui->nextButton->setVisible(true);
+ ui->informationButton->setVisible(false);
+ }
}
OximeterImport::~OximeterImport()
@@ -96,8 +108,12 @@ void OximeterImport::on_nextButton_clicked()
break;
case 1:
ui->nextButton->setVisible(false);
+ ui->informationButton->setVisible(true);
+
break;
default:
+ ui->informationButton->setVisible(true);
+
ui->nextButton->setVisible(true);
@@ -167,6 +183,7 @@ SerialOximeter * OximeterImport::detectOximeter()
void OximeterImport::on_directImportButton_clicked()
{
+ ui->informationButton->setVisible(false);
ui->stackedWidget->setCurrentWidget(ui->directImportPage);
oximodule = detectOximeter();
@@ -238,6 +255,7 @@ void OximeterImport::doUpdateProgress(int v, int t)
void OximeterImport::on_fileImportButton_clicked()
{
+
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
const QString documentsFolder = QDesktopServices::storageLocation(
QDesktopServices::DocumentsLocation);
@@ -266,6 +284,7 @@ void OximeterImport::on_fileImportButton_clicked()
QMessageBox::warning(this, STR_MessageBox_Warning, tr("No Oximetery module could parse the given file:")+QString("\n\n%1").arg(filename), QMessageBox::Ok);
return;
}
+ ui->informationButton->setVisible(false);
ui->stackedWidget->setCurrentWidget(ui->syncPage);
ui->syncSaveButton->setVisible(true);
@@ -278,6 +297,8 @@ void OximeterImport::on_fileImportButton_clicked()
void OximeterImport::on_liveImportButton_clicked()
{
+ ui->informationButton->setVisible(false);
+
ui->stackedWidget->setCurrentWidget(ui->liveImportPage);
ui->liveImportPage->layout()->addWidget(ui->progressBar);
QApplication::processEvents();
@@ -586,3 +607,16 @@ void OximeterImport::on_showLiveGraphs_clicked(bool checked)
plethyGraph->setVisible(checked);
liveView->redraw();
}
+
+void OximeterImport::on_skipWelcomeCheckbox_clicked(bool checked)
+{
+ p_profile->oxi->setSkipOxiIntroScreen(checked);
+}
+
+void OximeterImport::on_informationButton_clicked()
+{
+ ui->stackedWidget->setCurrentWidget(ui->welcomePage);
+ ui->nextButton->setVisible(true);
+ ui->informationButton->setVisible(false);
+
+}
diff --git a/sleepyhead/oximeterimport.h b/sleepyhead/oximeterimport.h
index 7c8f30c7..d2890c79 100644
--- a/sleepyhead/oximeterimport.h
+++ b/sleepyhead/oximeterimport.h
@@ -55,6 +55,10 @@ private slots:
void on_showLiveGraphs_clicked(bool checked);
+ void on_skipWelcomeCheckbox_clicked(bool checked);
+
+ void on_informationButton_clicked();
+
protected slots:
void on_updatePlethy(QByteArray plethy);
void finishedRecording();
diff --git a/sleepyhead/oximeterimport.ui b/sleepyhead/oximeterimport.ui
index d13f7853..54c5e3d2 100644
--- a/sleepyhead/oximeterimport.ui
+++ b/sleepyhead/oximeterimport.ui
@@ -620,7 +620,7 @@
-
- 3
+ 1
@@ -691,7 +691,7 @@ p, li { white-space: pre-wrap; }
-
-
+
Skip this page next time.
@@ -1476,7 +1476,7 @@ p, li { white-space: pre-wrap; }
QFrame::Raised
-
+
-
@@ -1484,6 +1484,13 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+ &Information Page
+
+
+
-
@@ -1512,19 +1519,16 @@ p, li { white-space: pre-wrap; }
-
-
+
- &Start
-
-
- true
+ &Save and Finish
-
-
+
- &Save and Finish
+ &Start