diff --git a/oscar/Graphs/gGraphView.cpp b/oscar/Graphs/gGraphView.cpp index 3104ac8b..8915c1fc 100644 --- a/oscar/Graphs/gGraphView.cpp +++ b/oscar/Graphs/gGraphView.cpp @@ -1432,81 +1432,47 @@ void gGraphView::paintGL() graphs_drawn = renderGraphs(painter); -// qDebug() << "Finished call renderGraphs from paintGL()"; -// sleep(3); - - if (!graphs_drawn) { // No graphs drawn? show something useful :) - qDebug() << "No graphs drawn"; -// sleep(3); +// +// Show message to user if no graphs available +// + if (!graphs_drawn) { + qDebug() << "gGraphView: No graphs drawn"; QString txt; if (m_showAuthorMessage) { if (emptyText() == STR_Empty_Brick) { - txt = QObject::tr("I'm very sorry your machine doesn't record useful data to graph in Daily View :("); + txt = QObject::tr("Your machine doesn't record data to graph in Daily View"); } else { // not proud of telling them their machine is a Brick.. ;) txt = QObject::tr("There is no data to graph"); } } - qDebug() << txt; -// sleep(3); - -// int x2, y2; -// GetTextExtent(m_emptytext, x2, y2, bigfont); -// int tp2, tp1; - - if (this->m_emptyimage.isNull() ) - qDebug() << "m_emptyimage is NULL"; - else - qDebug() << "m_emptyimage is not NULL"; -// sleep(3); + qDebug() << "gGraphView:" + txt; +/*** This doesn't seem to do anything? if (! this->m_emptyimage.isNull()) { int x = width()/2 - this->m_emptyimage.width()/2; int y = height()/2 - this->m_emptyimage.height()/2; -// qDebug() << "size is " + QString::number(m_emptyimage.width()) + " by " + QString::number(m_emptyimage.height()); -// qDebug() << "x-pos: " + QString::number(x) + " y-pos: " + QString::number(y); -// sleep(3); QRectF target(QRect(x, y, this->m_emptyimage.width(), this->m_emptyimage.height())); QRectF source(QRect(0, 0, this->m_emptyimage.width(), this->m_emptyimage.height())); - -// painter.drawPixmap(target, this->m_emptyimage, source); // this is segfaulting! WHY ?? - -// tp2 = height() /2 + m_emptyimage.height()/2 + y2; - } /*else { - tp2 = height() / 2 + y2; - }*/ -// qDebug() << "Break 9"; -// sleep(3); + } +***/ QColor col = Qt::black; painter.setPen(col); -// painter.setFont(*bigfont); -// painter.drawText((width() / 2) - x2 / 2, tp2, m_emptytext); - QRectF rec(0,0,width(),0); -// if (defaultfont == nullptr) -// qDebug() << "Default font is NULL"; -// else -// qDebug() << "Default font is not NULL"; -// sleep(3); + // To put text in center of screen: +// QRectF rec(0,0,width(),height(0)); - painter.setFont(*defaultfont); + painter.setFont(*mediumfont); +// rec = painter.boundingRect(rec, Qt::AlignCenter, txt); rec = painter.boundingRect(rec, Qt::AlignHCenter | Qt::AlignBottom, txt); - rec.moveBottom(height()-5); - -// qDebug() << "Break 8"; -// sleep(3); - - painter.drawText(rec, Qt::AlignHCenter | Qt::AlignBottom, txt); -// qDebug() << "Break 7"; -// sleep(3); + rec.moveBottom(height()-15); + painter.drawText(rec, Qt::AlignCenter, txt); } -// qDebug() << "Break 1"; -// sleep(3); if (AppSetting->lineCursorMode()) { emit updateCurrentTime(graphs_drawn ? m_currenttime : 0.0F); @@ -1515,14 +1481,8 @@ void gGraphView::paintGL() } AppSetting->usePixmapCaching() ? DrawTextQueCached(painter) :DrawTextQue(painter); -// qDebug() << "Break 2"; -// sleep(3); - m_tooltip->paint(painter); -// qDebug() << "Break 3"; -// sleep(3); - #ifdef DEBUG_EFFICIENCY const int rs = 20; static double ring[rs] = {0}; diff --git a/oscar/SleepLib/common.cpp b/oscar/SleepLib/common.cpp index 571ea7fb..672a0a9c 100644 --- a/oscar/SleepLib/common.cpp +++ b/oscar/SleepLib/common.cpp @@ -698,9 +698,9 @@ void initializeStrings() STR_MessageBox_PleaseNote = QObject::tr("Please Note"); STR_Empty_NoData = QObject::tr("No Data Available"); - STR_Empty_Brick = QObject::tr("Compliance Only :("); + STR_Empty_Brick = QObject::tr("Only Settings and Compliance Data Available"); STR_Empty_NoGraphs = QObject::tr("Graphs Switched Off"); - STR_Empty_SummaryOnly = QObject::tr("Summary Only :("); + STR_Empty_SummaryOnly = QObject::tr("Summary Data Only"); STR_Empty_NoSessions = QObject::tr("Sessions Switched Off"); diff --git a/oscar/daily.cpp b/oscar/daily.cpp index eb289e1b..4011b23e 100644 --- a/oscar/daily.cpp +++ b/oscar/daily.cpp @@ -1701,8 +1701,8 @@ void Daily::Load(QDate date) htmlLeftAHI+=QString("

%3

  %5\n") .arg("#F88017").arg(COLOR_Text.name()).arg(ahiname).arg(schema::channel[ahichan].fullname()).arg(ahi,0,'f',2); } else { - htmlLeftAHI+=QString("%2\n") - .arg("#F88017").arg(tr("BRICK! :(")); + htmlLeftAHI+=QString("%2\n") + .arg("#F88017").arg(tr("This CPAP machine does NOT record detailed data")); } htmlLeftAHI+="\n"; htmlLeftAHI+="\n";