Foobar removed from all Daily graphs bar Event Flags

This commit is contained in:
Mark Watkins 2011-06-28 19:19:35 +10:00
parent a39745ffb8
commit b22007358f
7 changed files with 30 additions and 29 deletions

View File

@ -32,6 +32,7 @@ void gFooBar::Plot(gGraphWindow & w,float scrx,float scry)
QColor & col1=color[0]; QColor & col1=color[0];
QColor & col2=color[1]; QColor & col2=color[1];
glDisable(GL_DEPTH_TEST);
float h=m_offset; float h=m_offset;
glColor4ub(col1.red(),col1.green(),col1.blue(),col1.alpha()); glColor4ub(col1.red(),col1.green(),col1.blue(),col1.alpha());

View File

@ -126,10 +126,14 @@ void gXAxis::Plot(gGraphWindow & w,float scrx,float scry)
int hour,minute,second,millisecond; int hour,minute,second,millisecond;
QDateTime d; QDateTime d;
// Need to use Qpainter clipping..
// messy. :(
glScissor(w.GetLeftMargin()-20,0,width+20,w.GetBottomMargin()); glScissor(w.GetLeftMargin()-20,0,width+20,w.GetBottomMargin());
glEnable(GL_SCISSOR_TEST); glEnable(GL_SCISSOR_TEST);
for (double i=st; i<=maxx+min_tick/10.0; i+=min_tick) { //const double extra=min_tick/10.0;
const double extra=0;
for (double i=st; i<=maxx+extra; i+=min_tick) {
d=QDateTime::fromMSecsSinceEpoch(i*86400000.0); d=QDateTime::fromMSecsSinceEpoch(i*86400000.0);
if (show_time) { if (show_time) {

View File

@ -14,7 +14,7 @@ class gXAxis:public gLayer
gXAxis(QColor col=QColor("black")); gXAxis(QColor col=QColor("black"));
virtual ~gXAxis(); virtual ~gXAxis();
virtual void Plot(gGraphWindow & w,float scrx,float scry); virtual void Plot(gGraphWindow & w,float scrx,float scry);
static const int Margin=40; // How much room does this take up. (Bottom margin) static const int Margin=25; // How much room does this take up. (Bottom margin)
void SetShowMinorLines(bool b) { m_show_minor_lines=b; }; void SetShowMinorLines(bool b) { m_show_minor_lines=b; };
void SetShowMajorLines(bool b) { m_show_major_lines=b; }; void SetShowMajorLines(bool b) { m_show_major_lines=b; };
bool ShowMinorLines() { return m_show_minor_lines; }; bool ShowMinorLines() { return m_show_minor_lines; };

View File

@ -36,9 +36,7 @@ gGraphWindow::gGraphWindow(QWidget *parent, const QString & title, QGLContext *
m_scrX = m_scrY = 100; m_scrX = m_scrY = 100;
m_title=title; m_title=title;
m_mouseRDown=m_mouseLDown=false; m_mouseRDown=m_mouseLDown=false;
//SetBackgroundColour( *wxWHITE );
SetMargins(10, 15, 0, 0); SetMargins(10, 15, 0, 0);
//m_block_move=false;
m_block_zoom=false; m_block_zoom=false;
m_drag_foobar=false; m_drag_foobar=false;
m_foobar_pos=0; m_foobar_pos=0;
@ -50,17 +48,12 @@ gGraphWindow::gGraphWindow(QWidget *parent, const QString & title, QGLContext *
if (!title.isEmpty()) { if (!title.isEmpty()) {
AddLayer(new gTitle(title)); AddLayer(new gTitle(title));
} }
//SetBackgroundStyle(wxBG_STYLE_CUSTOM);
} }
gGraphWindow::~gGraphWindow() gGraphWindow::~gGraphWindow()
{ {
for (list<gLayer *>::iterator l=layers.begin();l!=layers.end();l++) delete (*l); for (list<gLayer *>::iterator l=layers.begin();l!=layers.end();l++) delete (*l);
layers.clear(); layers.clear();
/* if (shared_context) {
delete shared_context;
shared_context=NULL;
}*/
} }
#include "gXAxis.h" #include "gXAxis.h"
@ -73,7 +66,8 @@ void gGraphWindow::AddLayer(gLayer *l) {
qWarning("Can only have one gXAxis per graph"); qWarning("Can only have one gXAxis per graph");
return; return;
} }
if (m_marginBottom<gXAxis::Margin) m_marginBottom+=gXAxis::Margin; //if (m_marginBottom<gXAxis::Margin)
m_marginBottom+=gXAxis::Margin;
xaxis=l; xaxis=l;
} }
if (dynamic_cast<gFooBar *>(l)) { if (dynamic_cast<gFooBar *>(l)) {
@ -81,7 +75,8 @@ void gGraphWindow::AddLayer(gLayer *l) {
qWarning("Can only have one gFooBar per graph"); qWarning("Can only have one gFooBar per graph");
return; return;
} }
if (m_marginBottom<gFooBar::Margin) m_marginBottom+=gFooBar::Margin; //if (m_marginBottom<gFooBar::Margin)
m_marginBottom+=gFooBar::Margin;
foobar=l; foobar=l;
} }
if (dynamic_cast<gYAxis *>(l)) { if (dynamic_cast<gYAxis *>(l)) {
@ -89,7 +84,8 @@ void gGraphWindow::AddLayer(gLayer *l) {
qWarning("Can only have one gYAxis per graph"); qWarning("Can only have one gYAxis per graph");
return; return;
} }
if (m_marginLeft<gYAxis::Margin) m_marginLeft+=gYAxis::Margin; //if (m_marginLeft<gYAxis::Margin)
m_marginLeft+=gYAxis::Margin;
yaxis=l; yaxis=l;
} }
if (dynamic_cast<gTitle *>(l)) { if (dynamic_cast<gTitle *>(l)) {
@ -97,7 +93,8 @@ void gGraphWindow::AddLayer(gLayer *l) {
qWarning("Can only have one gGraphTitle per graph"); qWarning("Can only have one gGraphTitle per graph");
return; return;
} }
if (m_marginLeft<gTitle::Margin) m_marginLeft+=gTitle::Margin; //if (m_marginLeft<gTitle::Margin)
m_marginLeft+=gTitle::Margin;
gtitle=l; gtitle=l;
} }
l->NotifyGraphWindow(this); l->NotifyGraphWindow(this);
@ -135,11 +132,7 @@ void gGraphWindow::ZoomXPixels(int x1, int x2)
} }
} }
//if (m_block_zoom) { SetXBounds(rx1,rx2);
// Refresh(false); //Rect(m_mouseRBrect,false);
//} else {
SetXBounds(rx1,rx2);
//}
} }
void gGraphWindow::ZoomXPixels(int x1,int x2,double &rx1,double &rx2) void gGraphWindow::ZoomXPixels(int x1,int x2,double &rx1,double &rx2)
{ {

View File

@ -65,13 +65,15 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
AddCPAPData(flags[7]=new FlagData(PRS1_PressurePulse,1)); AddCPAPData(flags[7]=new FlagData(PRS1_PressurePulse,1));
AddCPAPData(flags[8]=new FlagData(PRS1_VSnore2,1)); AddCPAPData(flags[8]=new FlagData(PRS1_VSnore2,1));
AddCPAPData(flags[9]=new FlagData(PRS1_Unknown0E,1)); AddCPAPData(flags[9]=new FlagData(PRS1_Unknown0E,1));
AddCPAPData(frw=new WaveData(CPAP_FlowRate));
AddGraph(SF=new gGraphWindow(gSplitter,tr("Event Flags"),(QGLWidget *)NULL)); AddGraph(SF=new gGraphWindow(gSplitter,tr("Event Flags"),(QGLWidget *)NULL));
int sfc=7;
SF->SetLeftMargin(SF->GetLeftMargin()+gYAxis::Margin); SF->SetLeftMargin(SF->GetLeftMargin()+gYAxis::Margin);
SF->SetBlockZoom(true); SF->SetBlockZoom(true);
SF->AddLayer(new gXAxis()); SF->AddLayer(new gXAxis());
bool extras=true; bool extras=true;
int sfc=7;
if (extras) { if (extras) {
sfc+=2; sfc+=2;
SF->AddLayer(new gFlagsLine(flags[9],QColor("dark green"),"U0E",8,sfc)); SF->AddLayer(new gFlagsLine(flags[9],QColor("dark green"),"U0E",8,sfc));
@ -94,7 +96,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
AddGraph(PRD=new gGraphWindow(gSplitter,tr("Pressure"),SF)); AddGraph(PRD=new gGraphWindow(gSplitter,tr("Pressure"),SF));
PRD->AddLayer(new gXAxis()); PRD->AddLayer(new gXAxis());
PRD->AddLayer(new gYAxis()); PRD->AddLayer(new gYAxis());
PRD->AddLayer(new gFooBar()); //PRD->AddLayer(new gFooBar());
PRD->AddLayer(new gLineChart(prd,QColor("dark green"),4096,false,false,true)); PRD->AddLayer(new gLineChart(prd,QColor("dark green"),4096,false,false,true));
PRD->AddLayer(new gLineChart(pressure_iap,Qt::blue,4096,false,true,true)); PRD->AddLayer(new gLineChart(pressure_iap,Qt::blue,4096,false,true,true));
PRD->AddLayer(new gLineChart(pressure_eap,Qt::red,4096,false,true,true)); PRD->AddLayer(new gLineChart(pressure_eap,Qt::red,4096,false,true,true));
@ -106,14 +108,15 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
AddGraph(LEAK=new gGraphWindow(gSplitter,tr("Leaks"),SF)); AddGraph(LEAK=new gGraphWindow(gSplitter,tr("Leaks"),SF));
LEAK->AddLayer(new gXAxis()); LEAK->AddLayer(new gXAxis());
LEAK->AddLayer(new gYAxis()); LEAK->AddLayer(new gYAxis());
LEAK->AddLayer(new gFooBar()); //LEAK->AddLayer(new gFooBar());
LEAK->AddLayer(new gLineChart(leakdata,QColor("purple"),4096,false,false,false)); LEAK->AddLayer(new gLineChart(leakdata,QColor("purple"),4096,false,false,false));
LEAK->setMinimumHeight(150); LEAK->setMinimumHeight(150);
AddCPAPData(frw=new WaveData(CPAP_FlowRate));
AddGraph(FRW=new gGraphWindow(gSplitter,tr("Flow Rate"),SF)); AddGraph(FRW=new gGraphWindow(gSplitter,tr("Flow Rate"),SF));
FRW->AddLayer(new gFooBar()); //FRW->AddLayer(new gFooBar());
FRW->AddLayer(new gYAxis()); FRW->AddLayer(new gYAxis());
FRW->AddLayer(new gXAxis()); FRW->AddLayer(new gXAxis());
FRW->AddLayer(new gLineOverlayBar(flags[0],QColor("light green"),"CSR")); FRW->AddLayer(new gLineOverlayBar(flags[0],QColor("light green"),"CSR"));
@ -139,7 +142,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
AddGraph(SNORE=new gGraphWindow(gSplitter,tr("Snore"),SF)); AddGraph(SNORE=new gGraphWindow(gSplitter,tr("Snore"),SF));
SNORE->AddLayer(new gXAxis()); SNORE->AddLayer(new gXAxis());
SNORE->AddLayer(new gYAxis()); SNORE->AddLayer(new gYAxis());
SNORE->AddLayer(new gFooBar()); //SNORE->AddLayer(new gFooBar());
SNORE->AddLayer(new gLineChart(snore,Qt::black,4096,false,false,true)); SNORE->AddLayer(new gLineChart(snore,Qt::black,4096,false,false,true));
SNORE->setMinimumHeight(150); SNORE->setMinimumHeight(150);
@ -150,7 +153,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
AddGraph(PULSE=new gGraphWindow(gSplitter,tr("Pulse"),SF)); AddGraph(PULSE=new gGraphWindow(gSplitter,tr("Pulse"),SF));
PULSE->AddLayer(new gXAxis()); PULSE->AddLayer(new gXAxis());
PULSE->AddLayer(new gYAxis()); PULSE->AddLayer(new gYAxis());
PULSE->AddLayer(new gFooBar()); // PULSE->AddLayer(new gFooBar());
PULSE->AddLayer(new gLineChart(pulse,Qt::red,65536,false,false,true)); PULSE->AddLayer(new gLineChart(pulse,Qt::red,65536,false,false,true));
PULSE->setMinimumHeight(150); PULSE->setMinimumHeight(150);
@ -161,7 +164,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
AddGraph(SPO2=new gGraphWindow(gSplitter,tr("SpO2"),SF)); AddGraph(SPO2=new gGraphWindow(gSplitter,tr("SpO2"),SF));
SPO2->AddLayer(new gXAxis()); SPO2->AddLayer(new gXAxis());
SPO2->AddLayer(new gYAxis()); SPO2->AddLayer(new gYAxis());
SPO2->AddLayer(new gFooBar()); // SPO2->AddLayer(new gFooBar());
SPO2->AddLayer(new gLineChart(spo2,Qt::blue,65536,false,false,true)); SPO2->AddLayer(new gLineChart(spo2,Qt::blue,65536,false,false,true));
SPO2->setMinimumHeight(150); SPO2->setMinimumHeight(150);
SPO2->LinkZoom(PULSE); SPO2->LinkZoom(PULSE);

View File

@ -263,7 +263,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>U</string> <string>u</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -11,7 +11,7 @@ p,a,td,body { font-size: 14px }
<tr> <tr>
<td valign="top" cellpadding=6> <td valign="top" cellpadding=6>
&nbsp;<br> &nbsp;<br>
<p>This software assists you in reviewing data at home for your CPAP Machine, Oximeter, Sleep Stage monitors, as well as help you track general issues related to sleep health.</p> <p>This software is designed to assist you in reviewing data for your CPAP Machine, Oximeter, and Sleep Stage monitors, as well as help you track general issues related to sleep health.</p>
<p>Currenly supports the following machines:</p> <p>Currenly supports the following machines:</p>
<li>Philips Respironics System One</li> <li>Philips Respironics System One</li>
<li>Contec CMS50 Oximeters</li> <li>Contec CMS50 Oximeters</li>