mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
add warning messages for clinican mode
This commit is contained in:
parent
c82ace546f
commit
14aabf133b
@ -578,10 +578,15 @@ void Daily::showEvent(QShowEvent *)
|
||||
|
||||
bool Daily::rejectToggleSessionEnable( Session*sess) {
|
||||
if (!sess) return true;
|
||||
if (!AppSetting->allowDisableSessions()) {
|
||||
QMessageBox mbox(QMessageBox::Warning, tr("Disable Session"), tr(" Disabling Sessions is not enabled"), QMessageBox::Ok , this);
|
||||
mbox.exec();
|
||||
return true;
|
||||
}
|
||||
bool enabled=sess->enabled();
|
||||
if (enabled ) {
|
||||
QMessageBox mbox(QMessageBox::Warning, tr("Disable Warning"),
|
||||
tr("Disabling a session will remove this session data \nfrom all graphs, reports and statistics."
|
||||
QMessageBox mbox(QMessageBox::Warning, tr("Disable Session"),
|
||||
tr("Disabling a session will remove this session \nfrom all graphs, reports and statistics."
|
||||
"\n\n"
|
||||
"The Search tab can find disabled sessions"
|
||||
"\n\n"
|
||||
|
@ -7,6 +7,9 @@
|
||||
* License. See the file COPYING in the main directory of the source code
|
||||
* for more details. */
|
||||
|
||||
#define TEST_MACROS_ENABLEDoff
|
||||
#include <test_macros.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
#include <QDataStream>
|
||||
@ -534,6 +537,8 @@ Statistics::Statistics(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
rows.push_back(StatisticsRow(tr("CPAP Statistics"), SC_HEADING, MT_CPAP));
|
||||
if (AppSetting->allowDisableSessions())
|
||||
rows.push_back(StatisticsRow(tr("Warning: Disabled session data is excluded in this report"),SC_WARNING,MT_CPAP));
|
||||
rows.push_back(StatisticsRow("", SC_DAYS, MT_CPAP));
|
||||
rows.push_back(StatisticsRow("", SC_COLUMNHEADERS, MT_CPAP));
|
||||
rows.push_back(StatisticsRow(tr("CPAP Usage"), SC_SUBHEADING, MT_CPAP));
|
||||
@ -601,7 +606,7 @@ Statistics::Statistics(QObject *parent) :
|
||||
// These are for formatting the headers for the first column
|
||||
int percentile=trunc(p_profile->general->prefCalcPercentile()); // Pholynyk, 10Mar2016
|
||||
char perCentStr[20];
|
||||
snprintf(perCentStr, 20, "%d%% %%1", percentile); //
|
||||
snprintf(perCentStr, 20, "%d%% %%1", percentile); //
|
||||
calcnames[SC_UNDEFINED] = "";
|
||||
calcnames[SC_MEDIAN] = tr("%1 Median");
|
||||
calcnames[SC_AVG] = tr("Average %1");
|
||||
@ -656,7 +661,6 @@ QString Statistics::getUserInfo () {
|
||||
}
|
||||
|
||||
const QString table_width = "width='100%'";
|
||||
|
||||
// Create the page header in HTML. Includes everything from <head> through <body>
|
||||
QString Statistics::generateHeader(bool onScreen)
|
||||
{
|
||||
@ -886,6 +890,7 @@ struct Period {
|
||||
QString header;
|
||||
};
|
||||
|
||||
const QString warning_color="#ff8888";
|
||||
const QString heading_color="#ffffff";
|
||||
const QString subheading_color="#e0e0e0";
|
||||
//const int rxthresh = 5;
|
||||
@ -1252,6 +1257,10 @@ QString Statistics::GenerateCPAPUsage()
|
||||
continue;
|
||||
} else if (row.calc == SC_UNDEFINED) {
|
||||
continue;
|
||||
} else if (row.calc == SC_WARNING) {
|
||||
html+=QString("<tr bgcolor='%1'><th colspan=%2 align=center><font size='+1'>%3</font></th></tr>").
|
||||
arg(warning_color).arg(periods.size()+1).arg(row.src);
|
||||
continue;
|
||||
} else {
|
||||
ChannelID id = schema::channel[row.src].id();
|
||||
if ((id == NoChannel) || (!p_profile->channelAvailable(id))) {
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
//! \brief Type of calculation on one statistics row
|
||||
enum StatCalcType {
|
||||
SC_UNDEFINED=0, SC_COLUMNHEADERS, SC_HEADING, SC_SUBHEADING, SC_MEDIAN, SC_AVG, SC_WAVG, SC_90P, SC_MIN, SC_MAX, SC_CPH, SC_SPH, SC_AHI, SC_HOURS, SC_COMPLIANCE, SC_DAYS, SC_ABOVE, SC_BELOW
|
||||
SC_UNDEFINED=0, SC_COLUMNHEADERS, SC_HEADING, SC_SUBHEADING, SC_MEDIAN, SC_AVG, SC_WAVG, SC_90P, SC_MIN, SC_MAX, SC_CPH, SC_SPH, SC_AHI, SC_HOURS, SC_COMPLIANCE, SC_DAYS, SC_ABOVE, SC_BELOW , SC_WARNING
|
||||
};
|
||||
|
||||
/*! \struct StatisticsRow
|
||||
@ -166,10 +166,6 @@ class Statistics : public QObject
|
||||
public:
|
||||
explicit Statistics(QObject *parent = 0);
|
||||
|
||||
void loadRXChanges();
|
||||
void saveRXChanges();
|
||||
void updateRXChanges();
|
||||
|
||||
QString GenerateHTML();
|
||||
|
||||
QString UpdateRecordsBox();
|
||||
@ -178,6 +174,10 @@ class Statistics : public QObject
|
||||
|
||||
|
||||
protected:
|
||||
void loadRXChanges();
|
||||
void saveRXChanges();
|
||||
void updateRXChanges();
|
||||
|
||||
QString getUserInfo();
|
||||
QString getRDIorAHIText();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user