diff --git a/Resources.qrc b/Resources.qrc
index 266b9433..18f45453 100644
--- a/Resources.qrc
+++ b/Resources.qrc
@@ -40,5 +40,6 @@
icons/session-off.png
icons/session-on.png
icons/bob-v3.0.png
+ docs/script.js
diff --git a/SleepyHeadQT.pro b/SleepyHeadQT.pro
index 1beb1a01..bd7ba679 100644
--- a/SleepyHeadQT.pro
+++ b/SleepyHeadQT.pro
@@ -185,7 +185,8 @@ OTHER_FILES += \
docs/countries.txt \
docs/tz.txt \
LICENSE.txt \
- docs/tooltips.css
+ docs/tooltips.css \
+ docs/script.js
diff --git a/docs/script.js b/docs/script.js
new file mode 100644
index 00000000..43b31777
--- /dev/null
+++ b/docs/script.js
@@ -0,0 +1,77 @@
+/* Borrowed from Michael Leigeber
+http://sixrevisions.com/tutorials/javascript_tutorial/create_lightweight_javascript_tooltip/
+*/
+var tooltip=function(){
+ var id = 'tt';
+ var top = 3;
+ var left = 3;
+ var maxw = 300;
+ var speed = 10;
+ var timer = 20;
+ var endalpha = 95;
+ var alpha = 0;
+ var tt,t,c,b,h;
+ var ie = document.all ? true : false;
+ return{
+ show:function(v,w){
+ if(tt == null){
+ tt = document.createElement('div');
+ tt.setAttribute('id',id);
+ t = document.createElement('div');
+ t.setAttribute('id',id + 'top');
+ c = document.createElement('div');
+ c.setAttribute('id',id + 'cont');
+ b = document.createElement('div');
+ b.setAttribute('id',id + 'bot');
+ tt.appendChild(t);
+ tt.appendChild(c);
+ tt.appendChild(b);
+ document.body.appendChild(tt);
+ tt.style.opacity = 0;
+ tt.style.filter = 'alpha(opacity=0)';
+ document.onmousemove = this.pos;
+ }
+ tt.style.display = 'block';
+ c.innerHTML = v;
+ tt.style.width = w ? w + 'px' : 'auto';
+ if(!w && ie){
+ t.style.display = 'none';
+ b.style.display = 'none';
+ tt.style.width = tt.offsetWidth;
+ t.style.display = 'block';
+ b.style.display = 'block';
+ }
+ if(tt.offsetWidth > maxw){tt.style.width = maxw + 'px'}
+ h = parseInt(tt.offsetHeight) + top;
+ clearInterval(tt.timer);
+ tt.timer = setInterval(function(){tooltip.fade(1)},timer);
+ },
+ pos:function(e){
+ var u = ie ? event.clientY + document.documentElement.scrollTop : e.pageY;
+ var l = ie ? event.clientX + document.documentElement.scrollLeft : e.pageX;
+ tt.style.top = (u - h) + 'px';
+ tt.style.left = (l + left) + 'px';
+ },
+ fade:function(d){
+ var a = alpha;
+ if((a != endalpha && d == 1) || (a != 0 && d == -1)){
+ var i = speed;
+ if(endalpha - a < speed && d == 1){
+ i = endalpha - a;
+ }else if(alpha < speed && d == -1){
+ i = a;
+ }
+ alpha = a + (i * d);
+ tt.style.opacity = alpha * .01;
+ tt.style.filter = 'alpha(opacity=' + alpha + ')';
+ }else{
+ clearInterval(tt.timer);
+ if(d == -1){tt.style.display = 'none'}
+ }
+ },
+ hide:function(){
+ clearInterval(tt.timer);
+ tt.timer = setInterval(function(){tooltip.fade(-1)},timer);
+ }
+ };
+}();
diff --git a/docs/tooltips.css b/docs/tooltips.css
index 92c1a24d..3f791f51 100644
--- a/docs/tooltips.css
+++ b/docs/tooltips.css
@@ -43,4 +43,12 @@ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0,
a:link, a:visited { color: inherit; text-decoration: none; font-weight: normal;}
a:hover { background-color: inherit; color: blue; text-decoration:none; font-weight: normal; }
+#text {margin:50px auto; width:500px}
+.hotspot {color:#900; padding-bottom:1px; border-bottom:1px dotted #900; cursor:pointer}
+
+#tt {position:absolute; display:block; background:url(images/tt_left.gif) top left no-repeat}
+#tttop {display:block; height:5px; margin-left:5px; background:url(images/tt_top.gif) top right no-repeat; overflow:hidden}
+#ttcont {display:block; padding:2px 12px 3px 7px; margin-left:5px; background:#666; color:#FFF}
+#ttbot {display:block; height:5px; margin-left:5px; background:url(images/tt_bottom.gif) top right no-repeat; overflow:hidden}
+
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 87021976..8d16389c 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -373,7 +373,8 @@ void MainWindow::on_action_Fullscreen_triggered()
QString htmlHeader()
{
-// "a:link,a:visited { color: '#000020'; text-decoration: none; font-weight: bold;}"
+
+ // "a:link,a:visited { color: '#000020'; text-decoration: none; font-weight: bold;}"
// "a:hover { background-color: inherit; color: red; text-decoration:none; font-weight: bold; }"
return QString("
"
""
@@ -382,7 +383,6 @@ QString htmlHeader()
"p,a,td,body { font-size: 14px }"
""
""
-
"";
updateFavourites();
html+=htmlFooter();
//QWebFrame *frame=ui->summaryView->page()->currentFrame();
@@ -2077,7 +2116,8 @@ void MainWindow::on_action_Rebuild_Oximetry_Index_triggered()
sess->m_sph.clear();
sess->m_avg.clear();
sess->m_wavg.clear();
- //sess->m_90p.clear();
+ sess->m_valuesummary.clear();
+ sess->m_timesummary.clear();
sess->m_firstchan.clear();
sess->m_lastchan.clear();
sess->SetChanged(true);