From 61520a33f3a8fa2f631ee282a379653bea6f300b Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sat, 30 Jul 2011 09:14:06 +1000 Subject: [PATCH] Resored TAP graph --- Graphs/gYAxis.cpp | 4 ++-- Graphs/graphwindow.cpp | 2 ++ SleepLib/session.cpp | 2 +- SleepyHeadQT.pro | 1 - daily.cpp | 16 ++++++++-------- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Graphs/gYAxis.cpp b/Graphs/gYAxis.cpp index 489360f6..4de86d79 100644 --- a/Graphs/gYAxis.cpp +++ b/Graphs/gYAxis.cpp @@ -23,8 +23,8 @@ gYAxis::~gYAxis() } void gYAxis::Plot(gGraphWindow &w,float scrx,float scry) { - static QColor DARK_GREY(0xb8,0xb8,0xb8,0xa0); - static QColor LIGHT_GREY(0xd8,0xd8,0xd8,0xa0); + static QColor DARK_GREY(0xc0,0xc0,0xc0,0x80); + static QColor LIGHT_GREY(0xd8,0xd8,0xd8,0x80); float x,y; int labelW=0; diff --git a/Graphs/graphwindow.cpp b/Graphs/graphwindow.cpp index beb39181..3ebcd662 100644 --- a/Graphs/graphwindow.cpp +++ b/Graphs/graphwindow.cpp @@ -43,6 +43,8 @@ gGraphWindow::gGraphWindow(QWidget *parent, const QString & title, QGLWidget * s setFocusPolicy(Qt::StrongFocus); rmin_x=rmax_x=0; min_x=max_x=0; + rmin_y=rmax_y=0; + min_y=max_y=0; } /*gGraphWindow::gGraphWindow(QWidget *parent, const QString & title, QGLContext * context,Qt::WindowFlags f) diff --git a/SleepLib/session.cpp b/SleepLib/session.cpp index 92fd4d91..4a8e05d9 100644 --- a/SleepLib/session.cpp +++ b/SleepLib/session.cpp @@ -314,7 +314,7 @@ bool Session::LoadEvents(QString filename) in >> s_last; qint16 mcsize; - in >> mcsize; // Summary size (number of Machine Code lists) + in >> mcsize; // number of Machine Code lists MachineCode code; qint64 ts1,ts2; diff --git a/SleepyHeadQT.pro b/SleepyHeadQT.pro index d1d080ae..eff1ec04 100644 --- a/SleepyHeadQT.pro +++ b/SleepyHeadQT.pro @@ -97,7 +97,6 @@ HEADERS += \ Graphs/gFlagsLine.h \ Graphs/glcommon.h \ Graphs/gTitle.h \ - Graphs/gCandleStick.h \ Graphs/gBarChart.h \ Graphs/gSegmentChart.h\ Graphs/gSessionTime.h \ diff --git a/daily.cpp b/daily.cpp index f14c0449..de47e1ef 100644 --- a/daily.cpp +++ b/daily.cpp @@ -223,7 +223,7 @@ Daily::Daily(QWidget *parent,QGLWidget * shared) : TAP_IAP->SetGradientBackground(false); TAP->SetMargins(0,0,0,0); - TAP->AddLayer(AddCPAP(seg=new gTAPGraph(CPAP_Pressure,GST_Line))); + TAP->AddLayer(AddCPAP(seg=new gTAPGraph(CPAP_Pressure,GST_CandleStick))); TAP->hide(); TAP->SetGradientBackground(false); @@ -573,7 +573,7 @@ void Daily::Load(QDate date) } html+="\n"+tr("Event Breakdown")+"\n"; if (1) { // AHI Pie Chart - G_AHI->setFixedSize(gwwidth,gwheight); + G_AHI->setFixedSize(gwwidth,120); QPixmap pixmap=G_AHI->renderPixmap(gwwidth,120,false); //gwwidth,gwheight,false); QByteArray byteArray; QBuffer buffer(&byteArray); // use buffer to store pixmap into byteArray @@ -669,8 +669,8 @@ void Daily::Load(QDate date) if (mode==MODE_BIPAP) { { html+=("")+tr("Time@EPAP")+("\n"); - TAP_EAP->setFixedSize(gwwidth,gwheight); - QPixmap pixmap=TAP_EAP->renderPixmap(gwwidth,gwheight,false); + TAP_EAP->setFixedSize(gwwidth,30); + QPixmap pixmap=TAP_EAP->renderPixmap(gwwidth,30,false); QByteArray byteArray; QBuffer buffer(&byteArray); // use buffer to store pixmap into byteArray buffer.open(QIODevice::WriteOnly); @@ -679,8 +679,8 @@ void Daily::Load(QDate date) } { html+=("")+tr("Time@IPAP")+("\n"); - TAP_IAP->setFixedSize(gwwidth,gwheight); - QPixmap pixmap=TAP_IAP->renderPixmap(gwwidth,gwheight,false); + TAP_IAP->setFixedSize(gwwidth,30); + QPixmap pixmap=TAP_IAP->renderPixmap(gwwidth,30,false); QByteArray byteArray; QBuffer buffer(&byteArray); // use buffer to store pixmap into byteArray buffer.open(QIODevice::WriteOnly); @@ -690,8 +690,8 @@ void Daily::Load(QDate date) } else if (mode==MODE_APAP) { html+=("")+tr("Time@Pressure")+("\n"); - TAP->setFixedSize(gwwidth,gwheight); - QPixmap pixmap=TAP->renderPixmap(gwwidth,gwheight,false); + TAP->setFixedSize(gwwidth,30); + QPixmap pixmap=TAP->renderPixmap(gwwidth,30,false); QByteArray byteArray; QBuffer buffer(&byteArray); // use buffer to store pixmap into byteArray buffer.open(QIODevice::WriteOnly);