1
0
mirror of https://gitlab.com/pholy/OSCAR-code.git synced 2025-04-13 09:10:45 +00:00

Clean up tr() strings a bit and hunt for untranslateables

This commit is contained in:
Mark Watkins 2018-06-14 17:25:54 +10:00
parent 9da8b2a7d3
commit 076e657ec1
18 changed files with 130 additions and 150 deletions

View File

@ -1,4 +1,4 @@
/* MinutesAtPressure Graph Implementation /* MinutesAtPressure Graph Implementation
* *
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
* *
@ -309,7 +309,7 @@ void MinutesAtPressure::paint(QPainter &painter, gGraph &graph, const QRegion &r
graph.renderText(label, left-8-w, bot+h/2-2 ); graph.renderText(label, left-8-w, bot+h/2-2 );
bot -= peakmult; bot -= peakmult;
} }
label = QString("Peak %1").arg(qMax(ipap.peaktime, epap.peaktime)/60.0); label = QObject::tr("Peak %1").arg(qMax(ipap.peaktime, epap.peaktime)/60.0);
graph.renderText(label, left, top+5 ); graph.renderText(label, left, top+5 );
xstep /= 5.0; xstep /= 5.0;

View File

@ -1,4 +1,4 @@
/* gGraph Implemntation /* gGraph Implemntation
* *
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
* *
@ -790,7 +790,7 @@ void gGraph::mouseMoveEvent(QMouseEvent *event)
int ms(a % 1000); int ms(a % 1000);
if (d > 1) { if (d > 1) {
m_selDurString.sprintf("%1.0f days", d); m_selDurString = tr("%1 days").arg(floor(d));
} else { } else {
m_selDurString.sprintf("%02i:%02i:%02i:%03i", h, m, s, ms); m_selDurString.sprintf("%02i:%02i:%02i:%03i", h, m, s, ms);

View File

@ -1,4 +1,4 @@
/* glcommon GL code & font stuff /* glcommon GL code & font stuff
* *
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
* *
@ -42,14 +42,11 @@ QColor brighten(QColor color, float mult)
} }
#ifdef BUILD_WITH_MSVC #if defined(_MSC_VER) && (_MSC_VER < 1800)
#if (_MSC_VER < 1800)
double round(double number) double round(double number)
{ {
return number < 0.0 ? ceil(number - 0.5) : floor(number + 0.5); return number < 0.0 ? ceil(number - 0.5) : floor(number + 0.5);
} }
#endif #endif
#endif

View File

@ -62,11 +62,9 @@ const int max_history = 50;
const double M_PI = 3.141592653589793; const double M_PI = 3.141592653589793;
#endif #endif
#ifdef BUILD_WITH_MSVC
// Visual C++ earlier than 2013 doesn't have round in it's maths header.. // Visual C++ earlier than 2013 doesn't have round in it's maths header..
#if (_MSC_VER < 1800) #if defined(_MSC_VER) && (_MSC_VER < 1800)
double round(double number); double round(double number);
#endif #endif
#endif
#endif // GLCOMMON_H #endif // GLCOMMON_H

View File

@ -18,13 +18,10 @@
#include "SleepLib/common.h" #include "SleepLib/common.h"
#ifndef BUILD_WITH_MSVC
# include <unistd.h>
#endif
#ifdef _MSC_VER #ifdef _MSC_VER
#include <QtZlib/zlib.h> #include <QtZlib/zlib.h>
#else #else
#include <unistd.h>
#include <zlib.h> #include <zlib.h>
#endif #endif
@ -70,6 +67,7 @@ const QString getDefaultAppRoot()
bool gfxEgnineIsSupported(GFXEngine e) bool gfxEgnineIsSupported(GFXEngine e)
{ {
#if defined(Q_OS_WIN32) #if defined(Q_OS_WIN32)
Q_UNUSED(e)
return true; return true;
#else #else
switch(e) { switch(e) {

View File

@ -1,4 +1,4 @@
/* EDF Parser Header /* EDF Parser Header
* *
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
* *
@ -35,7 +35,7 @@ struct EDFHeader {
char dur_data_records[8]; char dur_data_records[8];
char num_signals[4]; char num_signals[4];
} }
#ifndef BUILD_WITH_MSVC #ifndef _MSC_VER
__attribute__((packed)) __attribute__((packed))
#endif #endif
; ;

View File

@ -1,4 +1,4 @@
/* SleepyHead AboutDialog Implementation /* SleepyHead AboutDialog Implementation
* *
* Date created: 7/5/2018 * Date created: 7/5/2018
* *
@ -63,7 +63,7 @@ void AboutDialog::on_donateButton_clicked()
QString AboutDialog::getRelnotes() QString AboutDialog::getRelnotes()
{ {
QFile clfile(":/docs/release_notes.html"); QFile clfile(":/docs/release_notes.html");
QString changeLog = QObject::tr("Sorry, could not locate changelog."); QString changeLog = tr("Sorry, could not locate changelog.");
if (clfile.open(QIODevice::ReadOnly)) { if (clfile.open(QIODevice::ReadOnly)) {
//Todo, write XML parser and only show the latest.. //Todo, write XML parser and only show the latest..
//QTextStream ts(&clfile); //QTextStream ts(&clfile);
@ -76,8 +76,8 @@ QString AboutDialog::getRelnotes()
"<span style=\" font-size:14pt;\">"+tr("SleepyHead v%1").arg(VersionString)+"</span>" "<span style=\" font-size:14pt;\">"+tr("SleepyHead v%1").arg(VersionString)+"</span>"
"<hr/>"; "<hr/>";
if (ReleaseStatus != "r") { if (ReleaseStatus != "r") {
text += "<p><font color='red' size=+1><b>"+QObject::tr("Important:")+"</b></font> " text += "<p><font color='red' size=+1><b>"+tr("Important:")+"</b></font> "
"<font size=+1><i>"+QObject::tr("As this is a pre-release version, it is recommended that you <b>back up your data folder manually</b> before proceding, because attempting to roll back later may break things.")+"</i></font></p><hr/>"; "<font size=+1><i>"+tr("As this is a pre-release version, it is recommended that you <b>back up your data folder manually</b> before proceding, because attempting to roll back later may break things.")+"</i></font></p><hr/>";
} }
text += changeLog; text += changeLog;
text += "</body></html>"; text += "</body></html>";
@ -89,7 +89,7 @@ QString AboutDialog::getLicense()
QString text; QString text;
QString licenseFile = ":/docs/GPLv3-"+AppSetting->language(); QString licenseFile = ":/docs/GPLv3-"+AppSetting->language();
if (!QFile::exists(licenseFile)) { if (!QFile::exists(licenseFile)) {
ui->licenceLabel->setText(QObject::tr("To see if the license text is available in your language, see %1.").arg("<a href=\"https://www.gnu.org/licenses/translations.en.html\">https://www.gnu.org/licenses/translations.en.html</a>\"")); ui->licenceLabel->setText(tr("To see if the license text is available in your language, see %1.").arg("<a href=\"https://www.gnu.org/licenses/translations.en.html\">https://www.gnu.org/licenses/translations.en.html</a>"));
ui->licenceLabel->setVisible(true); ui->licenceLabel->setVisible(true);
licenseFile = ":/docs/GPLv3-en_US"; licenseFile = ":/docs/GPLv3-en_US";
} else { } else {

View File

@ -1 +1 @@
const int build_number = 0; const int build_number = 2;

View File

@ -1,4 +1,4 @@
/* Daily Panel /* Daily Panel
* *
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
* *
@ -123,7 +123,7 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
layout2->insertWidget(1,sessionbar,0); layout2->insertWidget(1,sessionbar,0);
// add the sessionbar after it. // add the sessionbar after it.
ui->tabWidget->insertTab(0,widget,QIcon(),"Details"); ui->tabWidget->insertTab(0, widget, QIcon(), tr("Details"));
ui->graphFrame->setLayout(layout); ui->graphFrame->setLayout(layout);
//ui->graphMainArea->setLayout(layout); //ui->graphMainArea->setLayout(layout);
@ -163,7 +163,7 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
const QString STR_GRAPH_TAP = "TimeAtPressure"; const QString STR_GRAPH_TAP = "TimeAtPressure";
// gGraph * SG; // gGraph * SG;
// graphlist[STR_GRAPH_DailySummary] = SG = new gGraph(STR_GRAPH_DailySummary, GraphView, QObject::tr("Summary"), QObject::tr("Summary of this daily information"), default_height); // graphlist[STR_GRAPH_DailySummary] = SG = new gGraph(STR_GRAPH_DailySummary, GraphView, tr("Summary"), tr("Summary of this daily information"), default_height);
// SG->AddLayer(new gLabelArea(nullptr),LayerLeft,gYAxis::Margin); // SG->AddLayer(new gLabelArea(nullptr),LayerLeft,gYAxis::Margin);
// SG->AddLayer(new gDailySummary()); // SG->AddLayer(new gDailySummary());
@ -274,7 +274,7 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
pc->addPlot(CPAP_IPAPHi, square); pc->addPlot(CPAP_IPAPHi, square);
gGraph * TAP2; gGraph * TAP2;
graphlist[STR_GRAPH_TAP] = TAP2 = new gGraph(STR_GRAPH_TAP, GraphView, QObject::tr("Time at Pressure"), QObject::tr("Time at Pressure"), default_height); graphlist[STR_GRAPH_TAP] = TAP2 = new gGraph(STR_GRAPH_TAP, GraphView, tr("Time at Pressure"), tr("Time at Pressure"), default_height);
MinutesAtPressure * map; MinutesAtPressure * map;
TAP2->AddLayer(map = new MinutesAtPressure()); TAP2->AddLayer(map = new MinutesAtPressure());
TAP2->AddLayer(new gLabelArea(map),LayerLeft,gYAxis::Margin); TAP2->AddLayer(new gLabelArea(map),LayerLeft,gYAxis::Margin);
@ -872,7 +872,7 @@ QString Daily::getSessionInformation(Day * day)
Session *sess=*s; Session *sess=*s;
QString tooltip = QObject::tr("Click to %1 this session.").arg(sess->enabled() ? QObject::tr("disable") : QObject::tr("enable")); QString tooltip = tr("Click to %1 this session.").arg(sess->enabled() ? tr("disable") : tr("enable"));
html+=QString("<tr><td colspan=5 align=center>%2</td></tr>" html+=QString("<tr><td colspan=5 align=center>%2</td></tr>"
"<tr>" "<tr>"
"<td width=26>" "<td width=26>"
@ -888,8 +888,8 @@ QString Daily::getSessionInformation(Day * day)
"<td align=left>%3</td></tr>" "<td align=left>%3</td></tr>"
) )
.arg((*s)->session()) .arg((*s)->session())
.arg(QObject::tr("%1 Session #%2").arg((*s)->machine()->loaderName()).arg((*s)->session(),8,10,QChar('0'))) .arg(tr("%1 Session #%2").arg((*s)->machine()->loaderName()).arg((*s)->session(),8,10,QChar('0')))
.arg(QString("%1h %2m %3s").arg(h,2,10,QChar('0')).arg(m,2,10,QChar('0')).arg(s1,2,10,QChar('0'))) .arg(tr("%1h %2m %3s").arg(h,2,10,QChar('0')).arg(m,2,10,QChar('0')).arg(s1,2,10,QChar('0')))
.arg((sess->enabled() ? "on" : "off")) .arg((sess->enabled() ? "on" : "off"))
.arg(fd.date().toString(Qt::SystemLocaleShortDate)) .arg(fd.date().toString(Qt::SystemLocaleShortDate))
.arg(fd.toString("HH:mm:ss")) .arg(fd.toString("HH:mm:ss"))
@ -1457,7 +1457,7 @@ void Daily::Load(QDate date)
pixmap.save(&buffer, "PNG"); pixmap.save(&buffer, "PNG");
html += "<tr><td align=center><img src=\"data:image/png;base64," + byteArray.toBase64() + "\"></td></tr>\n"; html += "<tr><td align=center><img src=\"data:image/png;base64," + byteArray.toBase64() + "\"></td></tr>\n";
} else { } else {
html += "<tr><td align=center>Unable to display Pie Chart on this system</td></tr>\n"; html += "<tr><td align=center>"+tr("Unable to display Pie Chart on this system")+"</td></tr>\n";
} }
} else if (day->channelHasData(CPAP_Obstructive) } else if (day->channelHasData(CPAP_Obstructive)
|| day->channelHasData(CPAP_Hypopnea) || day->channelHasData(CPAP_Hypopnea)
@ -1532,7 +1532,6 @@ void Daily::Load(QDate date)
const int maxcolors=sizeof(cols)/sizeof(QColor); const int maxcolors=sizeof(cols)/sizeof(QColor);
QList<Session *>::iterator i; QList<Session *>::iterator i;
// WebView trashes it without asking.. :(
if (cpap) { if (cpap) {
int c=0; int c=0;

View File

@ -1,4 +1,4 @@
/* SleepyHead Help Implementation /* SleepyHead Help Implementation
* *
* Copyright (c) 2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2018 Mark Watkins <mark@jedimark.net>
* *
@ -97,7 +97,7 @@ Help::Help(QWidget *parent) :
if (!helpLoaded) { if (!helpLoaded) {
QString html = "<html><body><div align=\"center\" valign=\"center\"><img src=\"qrc://docs/sheep.png\"><br/><h2>No documentation available</h2></div></body></html>"; QString html = "<html><body><div align=\"center\" valign=\"center\"><img src=\"qrc://docs/sheep.png\"><br/><h2>"+tr("No documentation available")+"</h2></div></body></html>";
helpBrowser->setHtml(html); helpBrowser->setHtml(html);
return; return;
} else { } else {
@ -185,7 +185,7 @@ void Help::on_homeButton_clicked()
void Help::on_searchComplete(int count) void Help::on_searchComplete(int count)
{ {
if (!searchReady) { if (!searchReady) {
QString html = "<h1>Please wait a bit.. Indexing still in progress</h1>"; QString html = "<h1>"+tr("Please wait a bit.. Indexing still in progress")+"</h1>";
helpBrowser->setText(html); helpBrowser->setText(html);
return; return;
} }

View File

@ -1,4 +1,4 @@
/* SleepyHead Main /* SleepyHead Main
* *
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
* *
@ -128,8 +128,9 @@ int main(int argc, char *argv[])
initializeStrings(); // This must be called AFTER translator is installed, but before mainwindow is setup initializeStrings(); // This must be called AFTER translator is installed, but before mainwindow is setup
QFontDatabase::addApplicationFont("://fonts/FreeSans.ttf"); // QFontDatabase::addApplicationFont("://fonts/FreeSans.ttf");
a.setFont(QFont("FreeSans", 11, QFont::Normal, false)); // a.setFont(QFont("FreeSans", 11, QFont::Normal, false));
mainwin = new MainWindow; mainwin = new MainWindow;
#ifdef BROKEN_OPENGL_BUILD #ifdef BROKEN_OPENGL_BUILD

View File

@ -1,4 +1,4 @@
/* Profile Select Implementation (Login Screen) /* Profile Select Implementation (Login Screen)
* *
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
* *
@ -256,7 +256,7 @@ void ProfileSelect::deleteProfile()
QMessageBox::Ok); QMessageBox::Ok);
} }
qDebug() << "Delete" << path; qDebug() << "Delete" << path;
QMessageBox::information(this, STR_MessageBox_Information, QString(tr("Profile '%1' was succesfully deleted").arg(name)),QMessageBox::Ok); QMessageBox::information(this, STR_MessageBox_Information, tr("Profile '%1' was succesfully deleted").arg(name),QMessageBox::Ok);
} }
int row = ui->listView->currentIndex().row(); int row = ui->listView->currentIndex().row();

View File

@ -1,4 +1,4 @@
/* Profile Selector Implementation /* Profile Selector Implementation
* *
* Copyright (c) 2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2018 Mark Watkins <mark@jedimark.net>
* *
@ -423,7 +423,7 @@ void ProfileSelector::on_buttonDestroyProfile_clicked()
QMessageBox::Ok); QMessageBox::Ok);
} }
qDebug() << "Delete" << path; qDebug() << "Delete" << path;
QMessageBox::information(this, STR_MessageBox_Information, QString(tr("Profile '%1' was succesfully deleted").arg(name)),QMessageBox::Ok); QMessageBox::information(this, STR_MessageBox_Information, tr("Profile '%1' was succesfully deleted").arg(name),QMessageBox::Ok);
} }
updateProfileList(); updateProfileList();
@ -431,8 +431,9 @@ void ProfileSelector::on_buttonDestroyProfile_clicked()
} }
} }
QString formatSize(qint64 size) { QString ProfileSelector::formatSize(qint64 size)
QStringList units = { "Bytes", "KB", "MB", "GB", "TB", "PB" }; {
QStringList units = { tr("Bytes"), tr("KB"), tr("MB"), tr("GB"), tr("TB"), tr("PB") };
int i; int i;
double outputSize = size; double outputSize = size;
for (i=0; i<units.size()-1; i++) { for (i=0; i<units.size()-1; i++) {
@ -443,7 +444,7 @@ QString formatSize(qint64 size) {
} }
QString getProfileDiskInfo(Profile *profile) QString ProfileSelector::getProfileDiskInfo(Profile *profile)
{ {
QString html; QString html;
if (profile) { if (profile) {
@ -452,9 +453,9 @@ QString getProfileDiskInfo(Profile *profile)
qint64 sizeBackups = profile->diskSpaceBackups(); qint64 sizeBackups = profile->diskSpaceBackups();
html += "<table>" html += "<table>"
"<tr><td align=right>"+QObject::tr("Summaries:")+"</td><td>"+formatSize(sizeSummaries)+"</td></tr>" "<tr><td align=right>"+tr("Summaries:")+"</td><td>"+formatSize(sizeSummaries)+"</td></tr>"
"<tr><td align=right>"+QObject::tr("Events:")+"</td><td>"+formatSize(sizeEvents)+"</td></tr>" "<tr><td align=right>"+tr("Events:")+"</td><td>"+formatSize(sizeEvents)+"</td></tr>"
"<tr><td align=right>"+QObject::tr("Backups:")+"</td><td>"+formatSize(sizeBackups)+"</td></tr>" "<tr><td align=right>"+tr("Backups:")+"</td><td>"+formatSize(sizeBackups)+"</td></tr>"
"</table>"; "</table>";
} }
return html; return html;

View File

@ -1,4 +1,4 @@
/* Profile Selector Header /* Profile Selector Header
* *
* Copyright (c) 2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2018 Mark Watkins <mark@jedimark.net>
* *
@ -58,6 +58,9 @@ private slots:
void on_selectionChanged(const QModelIndex &current, const QModelIndex &previous); void on_selectionChanged(const QModelIndex &current, const QModelIndex &previous);
private: private:
QString getProfileDiskInfo(Profile *profile);
QString formatSize(qint64 size);
Ui::ProfileSelector *ui; Ui::ProfileSelector *ui;
QStandardItemModel *model; QStandardItemModel *model;
MySortFilterProxyModel2 *proxy; MySortFilterProxyModel2 *proxy;

View File

@ -1,4 +1,4 @@
/* SessionBar Graph Implementation /* SessionBar Graph Implementation
* *
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
* *
@ -243,8 +243,7 @@ void SessionBar::paintEvent(QPaintEvent *)
int m = (len / 60) % 60; int m = (len / 60) % 60;
//int s=len % 60; //int s=len % 60;
QString msg = QString("%1h %2m").arg((short)h, 1, 10, QChar('0')).arg((short)m, 1, 10, QString msg = tr("%1h %2m").arg((short)h, 1, 10, QChar('0')).arg((short)m, 1, 10, QChar('0'));
QChar('0')); //.arg((short)s,2,10,QChar('0'));
//painter.setBrush(QBrush((*i).color); //painter.setBrush(QBrush((*i).color);
QRect segrect(3 + sx, 3, ex, height() - 6); QRect segrect(3 + sx, 3, ex, height() - 6);

View File

@ -14,38 +14,33 @@ DEFINES += QT_DEPRECATED_WARNINGS
#SleepyHead requires OpenGL 2.0 support to run smoothly #SleepyHead requires OpenGL 2.0 support to run smoothly
#On platforms where it's not available, it can still be built to work #On platforms where it's not available, it can still be built to work
#provided the BrokenGL DEFINES flag is passed to qmake (eg, qmake [specs] /path/to/SleepyHeadQT.pro DEFINES+=BrokenGL) #provided the BrokenGL DEFINES flag is passed to qmake (eg, qmake [specs] /path/to/SleepyHeadQT.pro DEFINES+=BrokenGL) (hint, Projects button on the left)
contains(DEFINES, BrokenGL) { contains(DEFINES, NoGL) {
message("BrokgenGL has been disabled to test the Dynamic GFX Engine selection") message("Building with QWidget gGraphView to support systems without ANY OpenGL")
DEFINES += BROKEN_OPENGL_BUILD
DEFINES += NO_OPENGL_BUILD
} else:contains(DEFINES, BrokenGL) {
DEFINES += BROKEN_OPENGL_BUILD
message("Building with QWidget gGraphView to support systems with legacy graphics")
DEFINES-=BrokenGL DEFINES-=BrokenGL
} else {
QT += opengl
message("Building with regular OpenGL gGraphView")
} }
# message("Building with QWidget gGraphView")
# DEFINES += BROKEN_OPENGL_BUILD
#} else:contains(DEFINES, NoGL) {
# message("Building with QWidget gGraphView (No GL at all)")
# DEFINES += BROKEN_OPENGL_BUILD
# DEFINES += NO_OPENGL_BUILD
#} else {
# message("Building with QGLWidget gGraphView")
#}
QT += opengl
DEFINES += LOCK_RESMED_SESSIONS DEFINES += LOCK_RESMED_SESSIONS
CONFIG += c++11 CONFIG += c++11
CONFIG += rtti CONFIG += rtti
CONFIG -= debug_and_release
# Remove this crap because it sucks
CONFIG-=debug_and_release
contains(DEFINES, STATIC) { contains(DEFINES, STATIC) {
static { static {
CONFIG += static CONFIG += static
QTPLUGIN += qsvg qgif qpng QTPLUGIN += qgif qpng
message("Static build.") message("Static build.")
} }
} }
TARGET = SleepyHead TARGET = SleepyHead
@ -69,9 +64,6 @@ win32 {
PRE_TARGETDEPS += git_info.h PRE_TARGETDEPS += git_info.h
QMAKE_EXTRA_TARGETS += gitinfotarget QMAKE_EXTRA_TARGETS += gitinfotarget
#Comment out for official builds
DEFINES += BETA_BUILD
#Build the help documentation #Build the help documentation
message("Generating help files"); message("Generating help files");
qtPrepareTool(QCOLGENERATOR, qcollectiongenerator) qtPrepareTool(QCOLGENERATOR, qcollectiongenerator)
@ -80,30 +72,17 @@ command=$$QCOLGENERATOR $$PWD/help/index.qhcp -o $$PWD/help/index.qhc
system($$command)|error("Failed to run: $$command") system($$command)|error("Failed to run: $$command")
message("Finished generating help files"); message("Finished generating help files");
unix:!macx:!haiku {
LIBS += -lX11 -lz -lGLU
DEFINES += _TTY_POSIX_
}
macx { macx {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
LIBS += -lz LIBS += -lz
ICON = icons/iconfile.icns ICON = icons/iconfile.icns
} } else:haiku {
haiku {
LIBS += -lz -lGLU LIBS += -lz -lGLU
DEFINES += _TTY_POSIX_ DEFINES += _TTY_POSIX_
} } else:unix {
LIBS += -lX11 -lz -lGLU
CONFIG(release, debug|release) { DEFINES += _TTY_POSIX_
contains(DEFINES, UPX_PACK_EXE) { } else:win32 {
DEFINES-=UPX_PACK_EXE
win32:QMAKE_POST_LINK += upx -k --best --overlay=strip --strip-relocs=0 $(DESTDIR_TARGET)
}
}
win32 {
DEFINES += WINVER=0x0501 # needed for mingw to pull in appropriate dbt business...probably a better way to do this DEFINES += WINVER=0x0501 # needed for mingw to pull in appropriate dbt business...probably a better way to do this
LIBS += -lsetupapi LIBS += -lsetupapi
@ -112,28 +91,30 @@ win32 {
QMAKE_TARGET_COPYRIGHT = Copyright (c)2011-2018 Mark Watkins QMAKE_TARGET_COPYRIGHT = Copyright (c)2011-2018 Mark Watkins
QMAKE_TARGET_DESCRIPTION = "OpenSource CPAP Research & Review" QMAKE_TARGET_DESCRIPTION = "OpenSource CPAP Research & Review"
VERSION = 1.1.0.0 VERSION = 1.1.0.0
RC_ICONS = ./icons/bob-v3.0.ico RC_ICONS = ./icons/bob-v3.0.ico
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
INCLUDEPATH += $$[QT_INSTALL_PREFIX]/../src/qtbase/src/3rdparty/zlib INCLUDEPATH += $$[QT_INSTALL_PREFIX]/../src/qtbase/src/3rdparty/zlib
if (*-msvc*):!equals(TEMPLATE_PREFIX, "vc") { if (*-msvc*):!equals(TEMPLATE_PREFIX, "vc") {
LIBS += -ladvapi32 LIBS += -ladvapi32
DEFINES += "BUILD_WITH_MSVC=1"
} else { } else {
# MingW needs this # MingW needs this
LIBS += -lz LIBS += -lz
} }
if (*-msvc*) { if (*-msvc*) {
CONFIG += precompile_header CONFIG += precompile_header
PRECOMPILED_HEADER = pch.h PRECOMPILED_HEADER = pch.h
HEADERS += pch.h HEADERS += pch.h
} }
CONFIG(release, debug|release) {
contains(DEFINES, OfficialBuild) {
QMAKE_POST_LINK += "$$PWD/../../scripts/release_tool.sh --testing --source \"$$PWD/..\" --binary \"$${OUT_PWD}/$${TARGET}.exe\""
}
}
} }
TRANSLATIONS = $$files($$PWD/../Translations/*.ts) TRANSLATIONS = $$files($$PWD/../Translations/*.ts)

View File

@ -1,4 +1,4 @@
/* Statistics Report Generator Implementation /* Statistics Report Generator Implementation
* *
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net> * Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
* *
@ -575,7 +575,7 @@ Statistics::Statistics(QObject *parent) :
} }
const QString table_width = "width=99%"; const QString table_width = "width=99%";
QString htmlHeader(bool showheader) QString Statistics::htmlHeader(bool showheader)
{ {
QString address = p_profile->user->address(); QString address = p_profile->user->address();
@ -584,18 +584,18 @@ QString htmlHeader(bool showheader)
QString userinfo; QString userinfo;
if (!p_profile->user->firstName().isEmpty()) { if (!p_profile->user->firstName().isEmpty()) {
userinfo = QString(QObject::tr("Name: %1, %2")).arg(p_profile->user->lastName()).arg(p_profile->user->firstName()) + "<br/>"; userinfo = tr("Name: %1, %2").arg(p_profile->user->lastName()).arg(p_profile->user->firstName()) + "<br/>";
if (!p_profile->user->DOB().isNull()) { if (!p_profile->user->DOB().isNull()) {
userinfo += QString(QObject::tr("DOB: %1")).arg(p_profile->user->DOB().toString()) + "<br/>"; userinfo += tr("DOB: %1").arg(p_profile->user->DOB().toString()) + "<br/>";
} }
if (!p_profile->user->phone().isEmpty()) { if (!p_profile->user->phone().isEmpty()) {
userinfo += QString(QObject::tr("Phone: %1")).arg(p_profile->user->phone()) + "<br/>"; userinfo += tr("Phone: %1").arg(p_profile->user->phone()) + "<br/>";
} }
if (!p_profile->user->email().isEmpty()) { if (!p_profile->user->email().isEmpty()) {
userinfo += QString(QObject::tr("Email: %1")).arg(p_profile->user->email()) + "<br/><br/>"; userinfo += tr("Email: %1").arg(p_profile->user->email()) + "<br/><br/>";
} }
if (!p_profile->user->address().isEmpty()) { if (!p_profile->user->address().isEmpty()) {
userinfo += QObject::tr("Address:")+"<br/>"+address; userinfo += tr("Address:")+"<br/>"+address;
} }
} }
@ -638,22 +638,22 @@ QString htmlHeader(bool showheader)
html += "<div align=center>" html += "<div align=center>"
+resizeHTMLPixmap(bobPixmap,64,64)+"<br/>" +resizeHTMLPixmap(bobPixmap,64,64)+"<br/>"
"<font size='+3'>" + STR_TR_SleepyHead + "</font><br/>" "<font size='+3'>" + STR_TR_SleepyHead + "</font><br/>"
"<font size='+2'>" + QObject::tr("Usage Statistics") + "</font><br/>" "<font size='+2'>" + tr("Usage Statistics") + "</font><br/>"
"<font size='+1' title=\""+QObject::tr("This is for legal reasons. Sorry, not sorry. Without manufacturer support and documentation, SleepyHead is unsuitable as a compliance/medical reporting tool.")+"\">" + QObject::tr("(NOT approved for compliance or medical reporting purposes)")+"</font><br/>"; "<font size='+1' title=\""+tr("This is for legal reasons. Sorry, not sorry. Without manufacturer support and documentation, SleepyHead is unsuitable as a compliance/medical reporting tool.")+"\">" + tr("(NOT approved for compliance or medical reporting purposes)")+"</font><br/>";
if (!userinfo.isEmpty()) html += "<br/>"+userinfo+"<br/>"; if (!userinfo.isEmpty()) html += "<br/>"+userinfo+"<br/>";
html += "</div><br/>"; html += "</div><br/>";
} }
return html; return html;
} }
QString htmlFooter(bool showinfo=true) QString Statistics::htmlFooter(bool showinfo)
{ {
QString html; QString html;
if (showinfo) { if (showinfo) {
html += "<hr/><div align=center><font size='-1'><i>"; html += "<hr/><div align=center><font size='-1'><i>";
html += QString(QObject::tr("This report was generated by SleepyHead v%1")).arg(ShortVersionString) + "<br/>" html += tr("This report was generated by SleepyHead v%1").arg(ShortVersionString) + "<br/>"
+QObject::tr("SleepyHead is free open-source CPAP research software available from http://sleepyhead.jedimark.net"); +tr("SleepyHead is free open-source CPAP research software available from http://sleepyhead.jedimark.net");
html += "</i></font></div>"; html += "</i></font></div>";
} }
@ -1019,7 +1019,7 @@ QString Statistics::GenerateHTML()
// int decimals = 2; // int decimals = 2;
html += "<div align=center>"; html += "<div align=center>";
html += QString("<table class=curved "+table_width+">"); html += "<table class=curved "+table_width+">";
int number_periods = 0; int number_periods = 0;
if (p_profile->general->statReportMode() == 1) { if (p_profile->general->statReportMode() == 1) {
@ -1119,16 +1119,16 @@ QString Statistics::GenerateHTML()
if (value == 0) { if (value == 0) {
html+=QString("<tr><td colspan=%1 align=center>%2</td></tr>\n").arg(periods.size()+1). html+=QString("<tr><td colspan=%1 align=center>%2</td></tr>\n").arg(periods.size()+1).
arg(QString(tr("No %1 data available.")).arg(machine)); arg(tr("No %1 data available.").arg(machine));
} else if (value == 1) { } else if (value == 1) {
html+=QString("<tr><td colspan=%1 align=center>%2</td></tr>\n").arg(periods.size()+1). html+=QString("<tr><td colspan=%1 align=center>%2</td></tr>\n").arg(periods.size()+1).
arg(QString(tr("%1 day of %2 Data on %3")) arg(tr("%1 day of %2 Data on %3")
.arg(value) .arg(value)
.arg(machine) .arg(machine)
.arg(last.toString())); .arg(last.toString()));
} else { } else {
html+=QString("<tr><td colspan=%1 align=center>%2</td></tr>\n").arg(periods.size()+1). html+=QString("<tr><td colspan=%1 align=center>%2</td></tr>\n").arg(periods.size()+1).
arg(QString(tr("%1 days of %2 Data, between %3 and %4")) arg(tr("%1 days of %2 Data, between %3 and %4")
.arg(value) .arg(value)
.arg(machine) .arg(machine)
.arg(first.toString()) .arg(first.toString())
@ -1210,10 +1210,10 @@ void Statistics::UpdateRecordsBox()
float comperc = (100.0 / float(totaldays)) * float(compliant); float comperc = (100.0 / float(totaldays)) * float(compliant);
html += "<b>"+QObject::tr("CPAP Usage")+"</b><br/>"; html += "<b>"+tr("CPAP Usage")+"</b><br/>";
html += QObject::tr("Days Used: %1").arg(totaldays) + "<br/>"; html += tr("Days Used: %1").arg(totaldays) + "<br/>";
html += QObject::tr("Low Use Days: %1").arg(totaldays - compliant) + "<br/>"; html += tr("Low Use Days: %1").arg(totaldays - compliant) + "<br/>";
html += QObject::tr("Compliance: %1%").arg(comperc, 0, 'f', 1) + "<br/>"; html += tr("Compliance: %1%").arg(comperc, 0, 'f', 1) + "<br/>";
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
/// AHI Records /// AHI Records
@ -1237,30 +1237,30 @@ void Statistics::UpdateRecordsBox()
} }
ahilist.insert(ahi, date); ahilist.insert(ahi, date);
} }
html += QObject::tr("Days AHI of 5 or greater: %1").arg(baddays) + "<br/><br/>"; html += tr("Days AHI of 5 or greater: %1").arg(baddays) + "<br/><br/>";
if (ahilist.size() > (show_records * 2)) { if (ahilist.size() > (show_records * 2)) {
it = ahilist.begin(); it = ahilist.begin();
it_end = ahilist.end(); it_end = ahilist.end();
html += "<b>"+QObject::tr("Best AHI")+"</b><br/>"; html += "<b>"+tr("Best AHI")+"</b><br/>";
for (int i=0; (i<show_records) && (it != it_end); ++i, ++it) { for (int i=0; (i<show_records) && (it != it_end); ++i, ++it) {
html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate)) html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate))
+QObject::tr("Date: %1 AHI: %2").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>"; +tr("Date: %1 AHI: %2").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>";
} }
html += "<br/>"; html += "<br/>";
html += "<b>"+QObject::tr("Worst AHI")+"</b><br/>"; html += "<b>"+tr("Worst AHI")+"</b><br/>";
it = ahilist.end() - 1; it = ahilist.end() - 1;
it_end = ahilist.begin(); it_end = ahilist.begin();
for (int i=0; (i<show_records) && (it != it_end); ++i, --it) { for (int i=0; (i<show_records) && (it != it_end); ++i, --it) {
html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate)) html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate))
+QObject::tr("Date: %1 AHI: %2").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>"; +tr("Date: %1 AHI: %2").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>";
} }
@ -1291,29 +1291,29 @@ void Statistics::UpdateRecordsBox()
it = ahilist.begin(); it = ahilist.begin();
it_end = ahilist.end(); it_end = ahilist.end();
html += "<b>"+QObject::tr("Best Flow Limitation")+"</b><br/>"; html += "<b>"+tr("Best Flow Limitation")+"</b><br/>";
for (int i=0; (i<show_records) && (it != it_end); ++i, ++it) { for (int i=0; (i<show_records) && (it != it_end); ++i, ++it) {
html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate)) html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate))
+QObject::tr("Date: %1 FL: %2").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>"; +tr("Date: %1 FL: %2").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>";
} }
html += "<br/>"; html += "<br/>";
html += "<b>"+QObject::tr("Worst Flow Limtation")+"</b><br/>"; html += "<b>"+tr("Worst Flow Limtation")+"</b><br/>";
it = ahilist.end() - 1; it = ahilist.end() - 1;
it_end = ahilist.begin(); it_end = ahilist.begin();
for (int i=0; (i<show_records) && (it != it_end); ++i, --it) { for (int i=0; (i<show_records) && (it != it_end); ++i, --it) {
if (it.key() > 0) { if (it.key() > 0) {
html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate)) html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate))
+QObject::tr("Date: %1 FL: %2").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>"; +tr("Date: %1 FL: %2").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>";
cnt++; cnt++;
} }
} }
if (cnt == 0) { if (cnt == 0) {
html+= "<i>"+QObject::tr("No Flow Limitation on record")+"</i><br/>"; html+= "<i>"+tr("No Flow Limitation on record")+"</i><br/>";
} }
html += "<br/>"; html += "<br/>";
@ -1334,7 +1334,7 @@ void Statistics::UpdateRecordsBox()
cnt = 0; cnt = 0;
if (ahilist.size() > (show_records * 2)) { if (ahilist.size() > (show_records * 2)) {
html += "<b>"+QObject::tr("Worst Large Leaks")+"</b><br/>"; html += "<b>"+tr("Worst Large Leaks")+"</b><br/>";
it = ahilist.end() - 1; it = ahilist.end() - 1;
it_end = ahilist.begin(); it_end = ahilist.begin();
@ -1342,13 +1342,13 @@ void Statistics::UpdateRecordsBox()
for (int i=0; (i<show_records) && (it != it_end); ++i, --it) { for (int i=0; (i<show_records) && (it != it_end); ++i, --it) {
if (it.key() > 0) { if (it.key() > 0) {
html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate)) html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate))
+QObject::tr("Date: %1 Leak: %2%").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>"; +tr("Date: %1 Leak: %2%").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>";
cnt++; cnt++;
} }
} }
if (cnt == 0) { if (cnt == 0) {
html+= "<i>"+QObject::tr("No Large Leaks on record")+"</i><br/>"; html+= "<i>"+tr("No Large Leaks on record")+"</i><br/>";
} }
html += "<br/>"; html += "<br/>";
@ -1371,7 +1371,7 @@ void Statistics::UpdateRecordsBox()
} }
if (ahilist.size() > (show_records * 2)) { if (ahilist.size() > (show_records * 2)) {
html += "<b>"+QObject::tr("Worst CSR")+"</b><br/>"; html += "<b>"+tr("Worst CSR")+"</b><br/>";
it = ahilist.end() - 1; it = ahilist.end() - 1;
it_end = ahilist.begin(); it_end = ahilist.begin();
@ -1379,12 +1379,12 @@ void Statistics::UpdateRecordsBox()
if (it.key() > 0) { if (it.key() > 0) {
html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate)) html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate))
+QObject::tr("Date: %1 CSR: %2%").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>"; +tr("Date: %1 CSR: %2%").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>";
cnt++; cnt++;
} }
} }
if (cnt == 0) { if (cnt == 0) {
html+= "<i>"+QObject::tr("No CSR on record")+"</i><br/>"; html+= "<i>"+tr("No CSR on record")+"</i><br/>";
} }
html += "<br/>"; html += "<br/>";
@ -1401,7 +1401,7 @@ void Statistics::UpdateRecordsBox()
} }
if (ahilist.size() > (show_records * 2)) { if (ahilist.size() > (show_records * 2)) {
html += "<b>"+QObject::tr("Worst PB")+"</b><br/>"; html += "<b>"+tr("Worst PB")+"</b><br/>";
it = ahilist.end() - 1; it = ahilist.end() - 1;
it_end = ahilist.begin(); it_end = ahilist.begin();
@ -1409,12 +1409,12 @@ void Statistics::UpdateRecordsBox()
if (it.key() > 0) { if (it.key() > 0) {
html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate)) html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate))
+QObject::tr("Date: %1 PB: %2%").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>"; +tr("Date: %1 PB: %2%").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>";
cnt++; cnt++;
} }
} }
if (cnt == 0) { if (cnt == 0) {
html+= "<i>"+QObject::tr("No PB on record")+"</i><br/>"; html+= "<i>"+tr("No PB on record")+"</i><br/>";
} }
html += "<br/>"; html += "<br/>";
@ -1422,9 +1422,9 @@ void Statistics::UpdateRecordsBox()
} }
} else { } else {
html += "<br/><b>"+QObject::tr("Want more information?")+"</b><br/>"; html += "<br/><b>"+tr("Want more information?")+"</b><br/>";
html += "<i>"+QObject::tr("SleepyHead needs all summary data loaded to calculate best/worst data for individual days.")+"</i><br/><br/>"; html += "<i>"+tr("SleepyHead needs all summary data loaded to calculate best/worst data for individual days.")+"</i><br/><br/>";
html += "<i>"+QObject::tr("Please enable Pre-Load Summaries checkbox in preferences to make sure this data is available.")+"</i><br/><br/>"; html += "<i>"+tr("Please enable Pre-Load Summaries checkbox in preferences to make sure this data is available.")+"</i><br/><br/>";
} }
@ -1444,26 +1444,26 @@ void Statistics::UpdateRecordsBox()
if (list.size() >= 2) { if (list.size() >= 2) {
html += "<b>"+QObject::tr("Best RX Setting")+"</b><br/>"; html += "<b>"+tr("Best RX Setting")+"</b><br/>";
const RXItem & rxbest = *list.at(0); const RXItem & rxbest = *list.at(0);
html += QString("<a href='overview=%1,%2'>").arg(rxbest.start.toString(Qt::ISODate)).arg(rxbest.end.toString(Qt::ISODate)) + html += QString("<a href='overview=%1,%2'>").arg(rxbest.start.toString(Qt::ISODate)).arg(rxbest.end.toString(Qt::ISODate)) +
QObject::tr("Date: %1 - %2").arg(rxbest.start.toString(Qt::SystemLocaleShortDate)).arg(rxbest.end.toString(Qt::SystemLocaleShortDate)) + "</a><br/>"; tr("Date: %1 - %2").arg(rxbest.start.toString(Qt::SystemLocaleShortDate)).arg(rxbest.end.toString(Qt::SystemLocaleShortDate)) + "</a><br/>";
html += QString("%1").arg(rxbest.machine->model()) + "<br/>"; html += QString("%1").arg(rxbest.machine->model()) + "<br/>";
html += QString("Serial: %1").arg(rxbest.machine->serial()) + "<br/>"; html += QString("Serial: %1").arg(rxbest.machine->serial()) + "<br/>";
html += QObject::tr("Culminative AHI: %1").arg(double(rxbest.ahi) / rxbest.hours, 0, 'f', 2) + "<br/>"; html += tr("Culminative AHI: %1").arg(double(rxbest.ahi) / rxbest.hours, 0, 'f', 2) + "<br/>";
html += QObject::tr("Culminative Hours: %1").arg(rxbest.hours, 0, 'f', 2) + "<br/>"; html += tr("Culminative Hours: %1").arg(rxbest.hours, 0, 'f', 2) + "<br/>";
html += QString("%1").arg(rxbest.pressure) + "<br/>"; html += QString("%1").arg(rxbest.pressure) + "<br/>";
html += QString("%1").arg(rxbest.relief) + "<br/>"; html += QString("%1").arg(rxbest.relief) + "<br/>";
html += "<br/>"; html += "<br/>";
html += "<b>"+QObject::tr("Worst RX Setting")+"</b><br/>"; html += "<b>"+tr("Worst RX Setting")+"</b><br/>";
const RXItem & rxworst = *list.at(list.size() -1); const RXItem & rxworst = *list.at(list.size() -1);
html += QString("<a href='overview=%1,%2'>").arg(rxworst.start.toString(Qt::ISODate)).arg(rxworst.end.toString(Qt::ISODate)) + html += QString("<a href='overview=%1,%2'>").arg(rxworst.start.toString(Qt::ISODate)).arg(rxworst.end.toString(Qt::ISODate)) +
QObject::tr("Date: %1 - %2").arg(rxworst.start.toString(Qt::SystemLocaleShortDate)).arg(rxworst.end.toString(Qt::SystemLocaleShortDate)) + "</a><br/>"; tr("Date: %1 - %2").arg(rxworst.start.toString(Qt::SystemLocaleShortDate)).arg(rxworst.end.toString(Qt::SystemLocaleShortDate)) + "</a><br/>";
html += QString("%1").arg(rxworst.machine->model()) + "<br/>"; html += QString("%1").arg(rxworst.machine->model()) + "<br/>";
html += QString("Serial: %1").arg(rxworst.machine->serial()) + "<br/>"; html += QString("Serial: %1").arg(rxworst.machine->serial()) + "<br/>";
html += QObject::tr("Culminative AHI: %1").arg(double(rxworst.ahi) / rxworst.hours, 0, 'f', 2) + "<br/>"; html += tr("Culminative AHI: %1").arg(double(rxworst.ahi) / rxworst.hours, 0, 'f', 2) + "<br/>";
html += QObject::tr("Culminative Hours: %1").arg(rxworst.hours, 0, 'f', 2) + "<br/>"; html += tr("Culminative Hours: %1").arg(rxworst.hours, 0, 'f', 2) + "<br/>";
html += QString("%1").arg(rxworst.pressure) + "<br/>"; html += QString("%1").arg(rxworst.pressure) + "<br/>";
html += QString("%1").arg(rxworst.relief) + "<br/>"; html += QString("%1").arg(rxworst.relief) + "<br/>";

View File

@ -164,6 +164,9 @@ class Statistics : public QObject
protected: protected:
QString htmlHeader(bool showheader);
QString htmlFooter(bool showinfo=true);
// Using a map to maintain order // Using a map to maintain order
QList<StatisticsRow> rows; QList<StatisticsRow> rows;
QMap<StatCalcType, QString> calcnames; QMap<StatCalcType, QString> calcnames;