diff --git a/sleepyhead/SleepLib/common.cpp b/sleepyhead/SleepLib/common.cpp
index 39b642fe..0e226c65 100644
--- a/sleepyhead/SleepLib/common.cpp
+++ b/sleepyhead/SleepLib/common.cpp
@@ -129,6 +129,10 @@ QString STR_UNIT_CMH2O;
QString STR_UNIT_Hours;
QString STR_UNIT_Minutes;
QString STR_UNIT_Seconds;
+QString STR_UNIT_h;
+QString STR_UNIT_m;
+QString STR_UNIT_s;
+QString STR_UNIT_ms;
QString STR_UNIT_BPM; // Beats per Minute
QString STR_UNIT_LPM; // Litres per Minute
QString STR_UNIT_ml; // MilliLitres
@@ -325,6 +329,10 @@ void initializeStrings()
STR_UNIT_Hours = QObject::tr("Hours");
STR_UNIT_Minutes = QObject::tr("Minutes");
STR_UNIT_Seconds = QObject::tr("Seconds");
+ STR_UNIT_h = QObject::tr("h"); // hours shortform
+ STR_UNIT_m = QObject::tr("m"); // minutes shortform
+ STR_UNIT_s = QObject::tr("s"); // seconds shortform
+ STR_UNIT_ms = QObject::tr("ms"); // milliseconds
STR_UNIT_EventsPerHour = QObject::tr("Events/hr"); // Events per hour
STR_UNIT_Percentage = QObject::tr("%");
STR_UNIT_Hz = QObject::tr("Hz"); // Hertz
diff --git a/sleepyhead/SleepLib/common.h b/sleepyhead/SleepLib/common.h
index 829777c2..5223ecc7 100644
--- a/sleepyhead/SleepLib/common.h
+++ b/sleepyhead/SleepLib/common.h
@@ -159,6 +159,10 @@ extern QString STR_UNIT_CMH2O;
extern QString STR_UNIT_Hours;
extern QString STR_UNIT_Minutes;
extern QString STR_UNIT_Seconds;
+extern QString STR_UNIT_h; // (h)ours, (m)inutes, (s)econds
+extern QString STR_UNIT_m;
+extern QString STR_UNIT_s;
+extern QString STR_UNIT_ms;
extern QString STR_UNIT_BPM; // Beats per Minute
extern QString STR_UNIT_LPM; // Litres per Minute
extern QString STR_UNIT_ml; // millilitres
diff --git a/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp b/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp
index 7debd1ef..27d2d219 100644
--- a/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp
+++ b/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp
@@ -2102,6 +2102,8 @@ bool PRS1Import::ParseSummaryF5V2()
CPAPMode cpapmode = MODE_UNKNOWN;
summary_duration = data[0x18] | data[0x19] << 8;
+
+ return true;
}
bool PRS1Import::ParseSummaryF0V6()
diff --git a/sleepyhead/preferencesdialog.cpp b/sleepyhead/preferencesdialog.cpp
index 60afa2da..4ea1ef7c 100644
--- a/sleepyhead/preferencesdialog.cpp
+++ b/sleepyhead/preferencesdialog.cpp
@@ -173,14 +173,12 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, Profile *_profile) :
float f = profile->general->prefCalcPercentile();
ui->prefCalcPercentile->setValue(f);
- ui->tooltipTimeoutSlider->setValue(profile->general->tooltipTimeout() / 50);
- ui->tooltipMS->display(profile->general->tooltipTimeout());
+ ui->tooltipTimeoutSlider->setValue(profile->general->tooltipTimeout());
+ on_tooltipTimeoutSlider_valueChanged(ui->tooltipTimeoutSlider->value());
+ //ui->tooltipMS->display(profile->general->tooltipTimeout());
ui->scrollDampeningSlider->setValue(profile->general->scrollDampening() / 10);
-
- if (profile->general->scrollDampening() > 0) {
- ui->scrollDampDisplay->display(profile->general->scrollDampening());
- } else { ui->scrollDampDisplay->display(STR_TR_Off); }
+ on_scrollDampeningSlider_valueChanged(ui->scrollDampeningSlider->value());
bool bcd = profile->session->backupCardData();
ui->createSDBackups->setChecked(bcd);
@@ -723,7 +721,7 @@ bool PreferencesDialog::Save()
profile->general->setSkipEmptyDays(ui->skipEmptyDays->isChecked());
- profile->general->setTooltipTimeout(ui->tooltipTimeoutSlider->value() * 50);
+ profile->general->setTooltipTimeout(ui->tooltipTimeoutSlider->value());
profile->general->setScrollDampening(ui->scrollDampeningSlider->value() * 10);
profile->general->setShowUnknownFlags(ui->showUnknownFlags->isChecked());
@@ -1068,13 +1066,13 @@ void PreferencesDialog::on_okButton_clicked()
void PreferencesDialog::on_scrollDampeningSlider_valueChanged(int value)
{
if (value > 0) {
- ui->scrollDampDisplay->display(value * 10);
- } else { ui->scrollDampDisplay->display(STR_TR_Off); }
+ ui->scrollDampDisplay->setText(QString("%1%2").arg(value * 10).arg(STR_UNIT_ms));
+ } else { ui->scrollDampDisplay->setText(STR_TR_Off); }
}
void PreferencesDialog::on_tooltipTimeoutSlider_valueChanged(int value)
{
- ui->tooltipMS->display(value * 50);
+ ui->tooltipTimeoutDisplay->setText(QString("%1%2").arg(double(value)/1000.0,0,'f',1).arg(STR_UNIT_s));
}
void PreferencesDialog::on_resetChannelDefaults_clicked()
diff --git a/sleepyhead/preferencesdialog.ui b/sleepyhead/preferencesdialog.ui
index 8be4c266..9b7b095f 100644
--- a/sleepyhead/preferencesdialog.ui
+++ b/sleepyhead/preferencesdialog.ui
@@ -57,7 +57,7 @@
- 1
+ 6
@@ -2146,215 +2146,6 @@ p, li { white-space: pre-wrap; }
Graph Settings
- -
-
-
-
-
- Bar Tops
-
-
- -
-
- Line Chart
-
-
-
-
- -
-
-
- Overview Linecharts
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
-
-
-
-
-
- <html><head/><body><p>This makes scrolling when zoomed in easier on sensitive bidirectional TouchPads</p><p>50ms is recommended value.</p></body></html>
-
-
- 25
-
-
- 1
-
-
- 5
-
-
- Qt::Horizontal
-
-
- false
-
-
- QSlider::TicksBelow
-
-
- 1
-
-
-
- -
-
-
- milliseconds
-
-
- QFrame::StyledPanel
-
-
- 3
-
-
- QLCDNumber::Flat
-
-
-
-
-
- -
-
-
-
-
-
- How long you want the tooltips to stay visible.
-
-
- 1
-
-
- 150
-
-
- 10
-
-
- 50
-
-
- 1
-
-
- Qt::Horizontal
-
-
- QSlider::TicksBelow
-
-
- 10
-
-
-
- -
-
-
- QFrame::StyledPanel
-
-
- 5
-
-
- QLCDNumber::Flat
-
-
-
-
-
- -
-
-
- Scroll Dampening
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Tooltip Timeout
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Default display height of graphs in pixels
-
-
- 50
-
-
- 600
-
-
- 10
-
-
- 180
-
-
-
- -
-
-
- Graph Tooltips
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- The visual method of displaying waveform overlay flags.
-
-
-
-
-
- Standard Bars
-
-
- -
-
- Top Markers
-
-
-
-
-
@@ -2391,6 +2182,30 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+
+ 0
+ 0
+
+
+
+ The visual method of displaying waveform overlay flags.
+
+
+
-
+
+ Standard Bars
+
+
+ -
+
+ Top Markers
+
+
+
+
-
-
@@ -2417,6 +2232,212 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+ Scroll Dampening
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
-
+
+
+ How long you want the tooltips to stay visible.
+
+
+ 1000
+
+
+ 30000
+
+
+ 100
+
+
+ 500
+
+
+ 5000
+
+
+ Qt::Horizontal
+
+
+ QSlider::TicksBelow
+
+
+ 1000
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 0
+
+
+
+ QFrame::Box
+
+
+ TextLabel
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
+ Tooltip Timeout
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
-
+
+
+ <html><head/><body><p>This makes scrolling when zoomed in easier on sensitive bidirectional TouchPads</p><p>50ms is recommended value.</p></body></html>
+
+
+ 25
+
+
+ 1
+
+
+ 5
+
+
+ Qt::Horizontal
+
+
+ false
+
+
+ QSlider::TicksBelow
+
+
+ 1
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 0
+
+
+
+ QFrame::Box
+
+
+ TextLabel
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Default display height of graphs in pixels
+
+
+ 50
+
+
+ 600
+
+
+ 10
+
+
+ 180
+
+
+
+ -
+
+
+ Graph Tooltips
+
+
+
+ -
+
+
-
+
+ Bar Tops
+
+
+ -
+
+ Line Chart
+
+
+
+
+ -
+
+
+ Overview Linecharts
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+