ResMed Mask Pressure Scale fix, and Pressure Graph event source change

This commit is contained in:
Mark Watkins 2011-07-25 03:24:54 +10:00
parent 395ab591fe
commit 8e24b90ee4
2 changed files with 13 additions and 13 deletions

View File

@ -15,19 +15,19 @@ class gYAxis:public gLayer
gYAxis(QColor col=QColor("black")); gYAxis(QColor col=QColor("black"));
virtual ~gYAxis(); virtual ~gYAxis();
virtual void Plot(gGraphWindow & w,float scrx,float scry); virtual void Plot(gGraphWindow & w,float scrx,float scry);
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; }
bool ShowMajorLines() { return m_show_major_lines; }; bool ShowMajorLines() { return m_show_major_lines; }
void SetShowMinorTicks(bool b) { m_show_minor_ticks=b; }; void SetShowMinorTicks(bool b) { m_show_minor_ticks=b; }
void SetShowMajorTicks(bool b) { m_show_major_ticks=b; }; void SetShowMajorTicks(bool b) { m_show_major_ticks=b; }
bool ShowMinorTicks() { return m_show_minor_ticks; }; bool ShowMinorTicks() { return m_show_minor_ticks; }
bool ShowMajorTicks() { return m_show_major_ticks; }; bool ShowMajorTicks() { return m_show_major_ticks; }
virtual const QString & Format(double v) { static QString t; t.sprintf("%.1f",v); return t; }; virtual const QString & Format(double v) { static QString t; t.sprintf("%.1f",v); return t; }
static const int Margin=50; // Left margin space static const int Margin=50; // Left margin space
void SetScale(float f) { m_yaxis_scale=f; }; // Scale yaxis ticker values (only what's displayed) void SetScale(float f) { m_yaxis_scale=f; } // Scale yaxis ticker values (only what's displayed)
float Scale() { return m_yaxis_scale; }; float Scale() { return m_yaxis_scale; }
protected: protected:
bool m_show_major_lines; bool m_show_major_lines;
bool m_show_minor_lines; bool m_show_minor_lines;

View File

@ -105,7 +105,7 @@ Daily::Daily(QWidget *parent,QGLWidget * shared) :
AddCPAPData(pressure_iap=new EventData(CPAP_IAP)); AddCPAPData(pressure_iap=new EventData(CPAP_IAP));
AddCPAPData(pressure_eap=new EventData(CPAP_EAP)); AddCPAPData(pressure_eap=new EventData(CPAP_EAP));
AddCPAPData(prd=new EventData(CPAP_Pressure)); AddCPAPData(prd=new EventData(CPAP_MaskPressureEvt));
pressure_eap->ForceMinY(0); pressure_eap->ForceMinY(0);
pressure_eap->ForceMaxY(30); pressure_eap->ForceMaxY(30);
@ -129,7 +129,7 @@ Daily::Daily(QWidget *parent,QGLWidget * shared) :
AddCPAPData(mp=new WaveData(CPAP_MaskPressure,1000000)); //FlowRate AddCPAPData(mp=new WaveData(CPAP_MaskPressure,1000000)); //FlowRate
gYAxis *y=new gYAxis(); gYAxis *y=new gYAxis();
y->SetScale(.1); y->SetScale(1.0/50.0);
MP->AddLayer(y); MP->AddLayer(y);
MP->AddLayer(new gXAxis()); MP->AddLayer(new gXAxis());
gLineChart *g=new gLineChart(mp,Qt::blue,4000,true); gLineChart *g=new gLineChart(mp,Qt::blue,4000,true);