diff --git a/sleepyhead/Graphs/gGraphView.cpp b/sleepyhead/Graphs/gGraphView.cpp
index 53d42326..83ce7b79 100644
--- a/sleepyhead/Graphs/gGraphView.cpp
+++ b/sleepyhead/Graphs/gGraphView.cpp
@@ -3855,8 +3855,9 @@ void gGraphView::wheelEvent(QWheelEvent * event)
py+=graphSpacer; // do we want the extra spacer down the bottom?
}
} else {
+ int scrollDampening=PROFILE.general->scrollDampening();
if (event->orientation()==Qt::Vertical) { // Vertical Scrolling
- if (horizScrollTime.elapsed()<100)
+ if (horizScrollTime.elapsed() < scrollDampening)
return;
m_scrollbar->SendWheelEvent(event); // Just forwarding the event to scrollbar for now..
@@ -3865,7 +3866,7 @@ void gGraphView::wheelEvent(QWheelEvent * event)
} else { //Horizontal Panning
// (This is a total pain in the butt on MacBook touchpads..)
- if (vertScrollTime.elapsed()<100)
+ if (vertScrollTime.elapsed() < scrollDampening)
return;
horizScrollTime.start();
diff --git a/sleepyhead/Graphs/gSummaryChart.cpp b/sleepyhead/Graphs/gSummaryChart.cpp
index 5ec98740..de162b2c 100644
--- a/sleepyhead/Graphs/gSummaryChart.cpp
+++ b/sleepyhead/Graphs/gSummaryChart.cpp
@@ -578,8 +578,8 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
if ((px2-lastX[j])>barw+1) {
lastdaygood=false;
}
- if (days<180)
- points->add(px2-barw/2,py2,col1);
+// if (days<180)
+// points->add(px2-barw/2,py2,col1);
if (lastdaygood) {
lines->add(lastX[j]-barw/2,lastY[j],px2-barw/2,py2,col2);
} else {
diff --git a/sleepyhead/SleepLib/profiles.h b/sleepyhead/SleepLib/profiles.h
index 9c01a646..185db0bb 100644
--- a/sleepyhead/SleepLib/profiles.h
+++ b/sleepyhead/SleepLib/profiles.h
@@ -243,6 +243,7 @@ const QString STR_US_PrefCalcMiddle="PrefCalcMiddle";
const QString STR_US_PrefCalcPercentile="PrefCalcPercentile";
const QString STR_US_PrefCalcMax="PrefCalcMax";
const QString STR_US_TooltipTimeout="TooltipTimeout";
+const QString STR_US_ScrollDampening="ScrollDampening";
class DoctorInfo
@@ -603,6 +604,7 @@ public:
if (!m_profile->contains(STR_US_PrefCalcPercentile)) (*m_profile)[STR_US_PrefCalcPercentile]=(double)95.0;
if (!m_profile->contains(STR_US_PrefCalcMax)) (*m_profile)[STR_US_PrefCalcMax]=(int)0;
if (!m_profile->contains(STR_US_TooltipTimeout)) (*m_profile)[STR_US_TooltipTimeout]=(int)2500;
+ if (!m_profile->contains(STR_US_ScrollDampening)) (*m_profile)[STR_US_ScrollDampening]=(int)50;
}
~UserSettings() {}
@@ -620,6 +622,7 @@ public:
double prefCalcPercentile() { return (*m_profile)[STR_US_PrefCalcPercentile].toDouble(); }
int prefCalcMax() { return (*m_profile)[STR_US_PrefCalcMax].toInt(); }
int tooltipTimeout() { return (*m_profile)[STR_US_TooltipTimeout].toInt(); }
+ int scrollDampening() { return (*m_profile)[STR_US_ScrollDampening].toInt(); }
void setUnitSystem(UnitSystem us) { (*m_profile)[STR_US_UnitSystem]=(int)us; }
@@ -634,6 +637,7 @@ public:
void setPrefCalcPercentile(double p) { (*m_profile)[STR_US_PrefCalcPercentile]=p; }
void setPrefCalcMax(int i) { (*m_profile)[STR_US_PrefCalcMax]=i; }
void setTooltipTimeout(int i) { (*m_profile)[STR_US_TooltipTimeout]=i; }
+ void setScrollDampening(int i) { (*m_profile)[STR_US_ScrollDampening]=i; }
Profile *m_profile;
};
diff --git a/sleepyhead/preferencesdialog.cpp b/sleepyhead/preferencesdialog.cpp
index 0c626532..f35550d3 100644
--- a/sleepyhead/preferencesdialog.cpp
+++ b/sleepyhead/preferencesdialog.cpp
@@ -179,7 +179,14 @@ PreferencesDialog::PreferencesDialog(QWidget *parent,Profile * _profile) :
float f=profile->general->prefCalcPercentile();
ui->prefCalcPercentile->setValue(f);
- ui->tooltipTimeoutSlider->setValue(profile->general->tooltipTimeout());
+ ui->tooltipTimeoutSlider->setValue(profile->general->tooltipTimeout()/50);
+ 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);
bool bcd=profile->session->backupCardData();
ui->createSDBackups->setChecked(bcd);
@@ -355,7 +362,9 @@ bool PreferencesDialog::Save()
profile->appearance->setSquareWavePlots(ui->useSquareWavePlots->isChecked());
profile->appearance->setGraphSnapshots(ui->enableGraphSnapshots->isChecked());
profile->general->setSkipEmptyDays(ui->skipEmptyDays->isChecked());
- profile->general->setTooltipTimeout(ui->tooltipTimeoutSlider->value());
+
+ profile->general->setTooltipTimeout(ui->tooltipTimeoutSlider->value()*50);
+ profile->general->setScrollDampening(ui->scrollDampeningSlider->value()*10);
profile->session->setMultithreading(ui->enableMultithreading->isChecked());
profile->session->setCacheSessions(ui->cacheSessionData->isChecked());
@@ -835,3 +844,15 @@ void PreferencesDialog::on_okButton_clicked()
if (Save())
accept();
}
+
+void PreferencesDialog::on_scrollDampeningSlider_valueChanged(int value)
+{
+ if (value>0)
+ ui->scrollDampDisplay->display(value*10);
+ else ui->scrollDampDisplay->display(STR_TR_Off);
+}
+
+void PreferencesDialog::on_tooltipTimeoutSlider_valueChanged(int value)
+{
+ ui->tooltipMS->display(value*50);
+}
diff --git a/sleepyhead/preferencesdialog.h b/sleepyhead/preferencesdialog.h
index 83be6cfc..a326f311 100644
--- a/sleepyhead/preferencesdialog.h
+++ b/sleepyhead/preferencesdialog.h
@@ -91,6 +91,10 @@ private slots:
void on_okButton_clicked();
+ void on_scrollDampeningSlider_valueChanged(int value);
+
+ void on_tooltipTimeoutSlider_valueChanged(int value);
+
private:
//! \brief Populates the Graph Model view with data from the Daily, Overview & Oximetry gGraphView objects
void resetGraphModel();
diff --git a/sleepyhead/preferencesdialog.ui b/sleepyhead/preferencesdialog.ui
index 8d37dd58..62c75eb8 100644
--- a/sleepyhead/preferencesdialog.ui
+++ b/sleepyhead/preferencesdialog.ui
@@ -9,15 +9,15 @@
0
0
- 640
- 504
+ 721
+ 502
-
-
- 640
- 16777215
-
+
+
+ 0
+ 0
+
Preferences
@@ -306,6 +306,12 @@ p, li { white-space: pre-wrap; }
-
+
+
+ 0
+ 0
+
+
Session Storage Options
@@ -1916,21 +1922,6 @@ p, li { white-space: pre-wrap; }
Graph Settings
-
- 8
-
-
- 8
-
-
- 8
-
-
- 8
-
-
- -1
-
-
@@ -1944,6 +1935,30 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+
+ 0
+ 0
+
+
+
+ The visual method of displaying waveform overlay flags.
+
+
+
-
+
+ Standard Bars
+
+
+ -
+
+ Top & Bottom Markers
+
+
+
+
-
@@ -1951,34 +1966,6 @@ p, li { white-space: pre-wrap; }
- -
-
-
- How long you want the tooltips to stay visible.
-
-
- 250
-
-
- 10000
-
-
- 250
-
-
- 1000
-
-
- Qt::Horizontal
-
-
- QSlider::TicksBelow
-
-
- 250
-
-
-
-
@@ -2004,6 +1991,13 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+ Graph Tooltips
+
+
+
-
@@ -2014,7 +2008,110 @@ p, li { white-space: pre-wrap; }
- -
+
-
+
+
-
+
+
+ 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
+
+
+
+ -
+
+
-
+
+
+ <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
+
+
+
+
+
+ -
Qt::Vertical
@@ -2027,37 +2124,6 @@ p, li { white-space: pre-wrap; }
- -
-
-
-
- 0
- 0
-
-
-
- The visual method of displaying waveform overlay flags.
-
-
-
-
-
- Standard Bars
-
-
- -
-
- Top & Bottom Markers
-
-
-
-
- -
-
-
- Graph Tooltips
-
-
-