mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
More profile settings system cleanup
This commit is contained in:
parent
0186e520e1
commit
a776b7a1f0
@ -551,7 +551,7 @@ void GLFloatBuffer::draw()
|
||||
{
|
||||
if (m_cnt<=0) return;
|
||||
|
||||
bool antialias=m_forceantialias || (PROFILE["UseAntiAliasing"].toBool() && m_antialias);
|
||||
bool antialias=m_forceantialias || (PROFILE.appearance->antiAliasing() && m_antialias);
|
||||
float size=m_size;
|
||||
if (antialias) {
|
||||
glEnable(GL_BLEND);
|
||||
@ -1698,10 +1698,9 @@ QPixmap gGraph::renderPixmap(int w, int h, float scale)
|
||||
sg->setFixedSize(w,h);
|
||||
|
||||
float tmp=m_height;
|
||||
m_height=h; //PROFILE["GraphHeight"].toInt();//*sg->printScaleY();
|
||||
m_height=h;
|
||||
sg->trashGraphs();
|
||||
sg->addGraph(this);
|
||||
//sg->updateScale();
|
||||
|
||||
sg->setScaleY(1.0);
|
||||
|
||||
@ -2032,7 +2031,7 @@ void gGraphView::ResetBounds(bool refresh) //short group)
|
||||
if (!m2 || m_graphs[i]->max_x>m2) m2=m_graphs[i]->max_x;
|
||||
}
|
||||
|
||||
if (PROFILE["LinkGroups"].toBool()) {
|
||||
if (PROFILE.general->linkGroups()) {
|
||||
for (int i=0;i<m_graphs.size();i++) {
|
||||
m_graphs[i]->SetMinX(m1);
|
||||
m_graphs[i]->SetMaxX(m2);
|
||||
@ -2069,7 +2068,7 @@ void gGraphView::GetXBounds(qint64 & st,qint64 & et)
|
||||
void gGraphView::SetXBounds(qint64 minx, qint64 maxx,short group,bool refresh)
|
||||
{
|
||||
for (int i=0;i<m_graphs.size();i++) {
|
||||
if (PROFILE["LinkGroups"].toBool()|| (m_graphs[i]->group()==group)) {
|
||||
if (PROFILE.general->linkGroups() || (m_graphs[i]->group()==group)) {
|
||||
m_graphs[i]->SetXBounds(minx,maxx);
|
||||
}
|
||||
}
|
||||
@ -2326,7 +2325,7 @@ bool gGraphView::renderGraphs()
|
||||
|
||||
// Tempory hack using this pref..
|
||||
//#ifdef ENABLED_THREADED_DRAWING
|
||||
/*if ((*profile)["EnableMultithreading"].toBool()) { // && (m_idealthreads>1)) {
|
||||
/*if (profile->session->multithreading()) { // && (m_idealthreads>1)) {
|
||||
threaded=true;
|
||||
for (int i=0;i<m_idealthreads;i++) {
|
||||
if (!m_threads[i]->isRunning())
|
||||
@ -2593,7 +2592,7 @@ void gGraphView::paintGL()
|
||||
}
|
||||
|
||||
// Show FPS and draw time
|
||||
if (m_showsplitter && PROFILE["ShowDebug"].toBool()) {
|
||||
if (m_showsplitter && PROFILE.general->showDebug()) {
|
||||
QString ss;
|
||||
int ela=time.elapsed();
|
||||
ss="Debug Mode "+QString::number(ela)+"ms ("+QString::number(1000.0/float(ela),'f',1)+"fps)";
|
||||
@ -3032,7 +3031,7 @@ void gGraphView::timedRedraw(int ms)
|
||||
}
|
||||
void gGraphView::resetLayout()
|
||||
{
|
||||
int default_height=PROFILE["GraphHeight"].toInt();
|
||||
int default_height=PROFILE.appearance->graphHeight();
|
||||
for (int i=0;i<m_graphs.size();i++) {
|
||||
m_graphs[i]->setHeight(default_height);
|
||||
}
|
||||
|
@ -32,9 +32,10 @@ void gLineChart::SetDay(Day *d)
|
||||
Layer::SetDay(d);
|
||||
|
||||
|
||||
if (m_code==CPAP_Leak) {
|
||||
subtract_offset=PROFILE["IntentionalLeak"].toDouble();
|
||||
} else subtract_offset=0;
|
||||
//if (m_code==CPAP_Leak) {
|
||||
// subtract_offset=profile.cpap.[IntentionalLeak].toDouble();
|
||||
//} else
|
||||
subtract_offset=0;
|
||||
|
||||
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ void gLineOverlayBar::paint(gGraph & w, int left, int topp, int width, int heigh
|
||||
quads->add(x1,start_py,x2,start_py,x2,start_py+height,x1,start_py+height,m_flag_color);
|
||||
if (quads->full()) { verts_exceeded=true; break; }
|
||||
} else if (m_flt==FT_Dot) {
|
||||
if ((PROFILE["AlwaysShowOverlayBars"].toInt()==0) || (xx<3600000)) {
|
||||
if ((PROFILE.appearance->overlayType()==ODT_Bars) || (xx<3600000)) {
|
||||
// show the fat dots in the middle
|
||||
points->add(x1,double(height)/double(yy)*double(-20-w.min_y)+topp);
|
||||
if (points->full()) { verts_exceeded=true; break; }
|
||||
@ -102,7 +102,7 @@ void gLineOverlayBar::paint(gGraph & w, int left, int topp, int width, int heigh
|
||||
}
|
||||
} else if (m_flt==FT_Bar) {
|
||||
int z=start_py+height;
|
||||
if ((PROFILE["AlwaysShowOverlayBars"].toInt()==0) || (xx<3600000)) {
|
||||
if ((PROFILE.appearance->overlayType()==ODT_Bars) || (xx<3600000)) {
|
||||
z=top;
|
||||
|
||||
points->add(x1,top);
|
||||
|
@ -121,7 +121,8 @@ void SummaryChart::SetDay(Day * nullday)
|
||||
for (int j=0;j<m_codes.size();j++) { // for each code slice
|
||||
code=m_codes[j];
|
||||
//m_values[dn][0]=0;
|
||||
if (code==CPAP_Leak) suboffset=PROFILE["IntentionalLeak"].toDouble(); else suboffset=0;
|
||||
//if (code==CPAP_Leak) suboffset=PROFILE.cpap->IntentionalLeak(); else
|
||||
suboffset=0;
|
||||
type=m_type[j];
|
||||
for (int i=0;i<d.value().size();i++) { // for each machine object for this day
|
||||
day=d.value()[i];
|
||||
@ -338,8 +339,8 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
|
||||
lastY[i]=top+height-1-h;
|
||||
}
|
||||
float compliance_hours=0;
|
||||
if (PROFILE.ExistsAndTrue("ShowCompliance")) {
|
||||
compliance_hours=PROFILE["ComplianceHours"].toDouble();
|
||||
if (PROFILE.cpap->showComplianceInfo()) {
|
||||
compliance_hours=PROFILE.cpap->complianceHours();
|
||||
}
|
||||
|
||||
int incompliant=0;
|
||||
@ -558,7 +559,7 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
|
||||
}
|
||||
}*/
|
||||
a+="Days="+QString::number(total_days,'f',0);
|
||||
if (PROFILE.ExistsAndTrue("ShowCompliance")) {
|
||||
if (PROFILE.cpap->showComplianceInfo()) {
|
||||
if (ishours && incompliant>0) {
|
||||
a+=" Low Usage Days="+QString::number(incompliant,'f',0)+" (%"+QString::number((1.0/daynum)*(total_days-incompliant)*100.0,'f',2)+" compliant, defined as >"+QString::number(compliance_hours,'f',1)+" hours)";
|
||||
}
|
||||
@ -703,7 +704,7 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event)
|
||||
//if (day && (day->channelExists(m_codes[i]) || day->settingExists(m_codes[i]))) {
|
||||
schema::Channel & chan=schema::channel[m_codes[i]];
|
||||
if (m_codes[i]==Journal_Weight) {
|
||||
val=weightString(d.value()[i+1],unitSystem());
|
||||
val=weightString(d.value()[i+1],PROFILE.general->unitSystem());
|
||||
} else
|
||||
val=QString::number(d.value()[i+1],'f',2);
|
||||
z+="\r\n"+chan.label()+" "+a+"="+val;
|
||||
|
@ -233,7 +233,7 @@ int filterFlow(Session *session, EventList *in, EventList *out, EventList *tv, E
|
||||
if (!SearchApnea(session,time)) {
|
||||
if (!uf) {
|
||||
uf=new EventList(EVL_Event,1,0,0,0,0,true);
|
||||
session->eventlist["UserFlag1"].push_back(uf);
|
||||
session->eventlist[CPAP_UserFlag1].push_back(uf);
|
||||
}
|
||||
uf->AddEvent(time,len/1000L,1);
|
||||
}
|
||||
@ -512,16 +512,10 @@ int calcPulseChange(Session *session)
|
||||
EventDataType val,val2,change,tmp;
|
||||
qint64 time,time2;
|
||||
bool ok;
|
||||
qint64 window=PROFILE["PulseChangeDuration"].toDouble(&ok);
|
||||
if (!ok) {
|
||||
PROFILE["PulseChangeDuration"]=8;
|
||||
window=8000;
|
||||
} else window*=1000;
|
||||
change=PROFILE["PulseChangeBPM"].toDouble(&ok);
|
||||
if (!ok) {
|
||||
PROFILE["PulseChangeBPM"]=5;
|
||||
change=5;
|
||||
}
|
||||
qint64 window=PROFILE.oxi->pulseChangeDuration();
|
||||
window*=1000;
|
||||
|
||||
change=PROFILE.oxi->pulseChangeBPM();
|
||||
|
||||
EventList *pc=new EventList(EVL_Event,1,0,0,0,0,true);
|
||||
pc->setFirst(session->first(OXI_Pulse));
|
||||
@ -586,16 +580,9 @@ int calcSPO2Drop(Session *session)
|
||||
EventDataType val,val2,change,tmp;
|
||||
qint64 time,time2;
|
||||
bool ok;
|
||||
qint64 window=PROFILE["SPO2DropDuration"].toDouble(&ok);
|
||||
if (!ok) {
|
||||
PROFILE["SPO2DropDuration"]=10;
|
||||
window=10000;
|
||||
} else window*=1000;
|
||||
change=PROFILE["SPO2DropPercentage"].toDouble(&ok);
|
||||
if (!ok) {
|
||||
PROFILE["SPO2DropPercentage"]=3;
|
||||
change=3;
|
||||
}
|
||||
qint64 window=PROFILE.oxi->spO2DropDuration();
|
||||
window*=1000;
|
||||
change=PROFILE.oxi->spO2DropPercentage();
|
||||
|
||||
EventList *pc=new EventList(EVL_Event,1,0,0,0,0,true);
|
||||
qint64 lastt;
|
||||
|
@ -21,24 +21,6 @@ qint64 timezoneOffset() {
|
||||
return _TZ_offset;
|
||||
}
|
||||
|
||||
|
||||
UnitSystem unitSystem(bool reset)
|
||||
{
|
||||
static bool cached=false;
|
||||
static UnitSystem us=US_Undefined;
|
||||
if (!reset && cached) return us;
|
||||
|
||||
if (!p_profile) return US_Undefined;
|
||||
if (PROFILE["Units"].toString()=="metric")
|
||||
us=US_Metric;
|
||||
else if (PROFILE["Units"].toString()=="archiac")
|
||||
us=US_Archiac;
|
||||
else return US_Undefined;
|
||||
|
||||
cached=true;
|
||||
return us;
|
||||
}
|
||||
|
||||
QString weightString(float kg, UnitSystem us)
|
||||
{
|
||||
if (us==US_Metric) {
|
||||
|
@ -2,16 +2,24 @@
|
||||
#define COMMON_H
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
|
||||
enum UnitSystem { US_Undefined, US_Metric, US_Archiac };
|
||||
|
||||
UnitSystem unitSystem(bool reset=true);
|
||||
|
||||
const float ounce_convert=28.3495231; // grams
|
||||
const float pound_convert=ounce_convert*16;
|
||||
|
||||
QString weightString(float kg, UnitSystem us);
|
||||
|
||||
const QString STR_UNIT_CM=QObject::tr("cm");
|
||||
const QString STR_UNIT_INCH=QObject::tr("\"");
|
||||
const QString STR_UNIT_FOOT=QObject::tr("ft");
|
||||
const QString STR_UNIT_POUND=QObject::tr("lb");
|
||||
const QString STR_UNIT_OUNCE=QObject::tr("oz");
|
||||
const QString STR_UNIT_KG=QObject::tr("Kg");
|
||||
|
||||
const QString STR_MESSAGE_ERROR=QObject::tr("Error");
|
||||
const QString STR_MESSAGE_WARNING=QObject::tr("Warning");
|
||||
|
||||
|
||||
|
||||
|
@ -76,19 +76,9 @@ Day *Machine::AddSession(Session *s,Profile *p)
|
||||
highest_sessionid=s->session();
|
||||
|
||||
|
||||
QTime split_time(12,0,0);
|
||||
if (PROFILE.Exists("DaySplitTime")) {
|
||||
split_time=PROFILE["DaySplitTime"].toTime();
|
||||
}
|
||||
int combine_sessions;
|
||||
if (PROFILE.Exists("CombineCloserSessions")) {
|
||||
combine_sessions=PROFILE["CombineCloserSessions"].toInt(); // In Minutes
|
||||
} else combine_sessions=0;
|
||||
|
||||
int ignore_sessions;
|
||||
if (PROFILE.Exists("IgnoreShorterSessions")) {
|
||||
ignore_sessions=PROFILE["IgnoreShorterSessions"].toInt(); // In Minutes
|
||||
} else ignore_sessions=0;
|
||||
QTime split_time=PROFILE.session->daySplitTime();
|
||||
int combine_sessions=PROFILE.session->combineCloseSessions();
|
||||
int ignore_sessions=PROFILE.session->ignoreShortSessions();
|
||||
|
||||
int session_length=s->last()-s->first();
|
||||
session_length/=60000;
|
||||
@ -309,7 +299,7 @@ bool Machine::Save()
|
||||
}
|
||||
savelistCnt=0;
|
||||
savelistSize=m_savelist.size();
|
||||
if (!PROFILE["EnableMultithreading"].toBool()) {
|
||||
if (!PROFILE.session->multithreading()) {
|
||||
for (int i=0;i<savelistSize;i++) {
|
||||
qprogress->setValue(0+(float(savelistCnt)/float(savelistSize)*100.0));
|
||||
QApplication::processEvents();
|
||||
|
@ -38,8 +38,8 @@ Profile::Profile()
|
||||
cpap=new CPAPSettings(this);
|
||||
oxi=new OxiSettings(this);
|
||||
appearance=new AppearanceSettings(this);
|
||||
import=new ImportSettings(this);
|
||||
settings=new UserSettings(this);
|
||||
session=new SessionSettings(this);
|
||||
general=new UserSettings(this);
|
||||
}
|
||||
Profile::Profile(QString path)
|
||||
:Preferences(),is_first_day(true)
|
||||
@ -58,8 +58,8 @@ Profile::Profile(QString path)
|
||||
cpap=new CPAPSettings(this);
|
||||
oxi=new OxiSettings(this);
|
||||
appearance=new AppearanceSettings(this);
|
||||
import=new ImportSettings(this);
|
||||
settings=new UserSettings(this);
|
||||
session=new SessionSettings(this);
|
||||
general=new UserSettings(this);
|
||||
}
|
||||
bool Profile::Save(QString filename)
|
||||
{
|
||||
@ -114,8 +114,8 @@ Profile::~Profile()
|
||||
delete cpap;
|
||||
delete oxi;
|
||||
delete appearance;
|
||||
delete import;
|
||||
delete settings;
|
||||
delete session;
|
||||
delete general;
|
||||
for (QHash<MachineID,Machine *>::iterator i=machlist.begin(); i!=machlist.end(); i++) {
|
||||
delete i.value();
|
||||
}
|
||||
@ -159,11 +159,11 @@ void Profile::LoadMachineData()
|
||||
in >> mid;
|
||||
in >> cache[mid];
|
||||
}
|
||||
PROFILE["RebuildCache"]=false;
|
||||
PROFILE.general->setRebuildCache(false);
|
||||
} else {
|
||||
if (mainwin) {
|
||||
mainwin->Notify(QObject::tr("Caching session data, this may take a little while."));
|
||||
PROFILE["RebuildCache"]=true;
|
||||
PROFILE.general->setRebuildCache(true);
|
||||
|
||||
QApplication::processEvents();
|
||||
}
|
||||
@ -542,12 +542,15 @@ void Scan()
|
||||
|
||||
} // namespace Profiles
|
||||
|
||||
// DoctorInfo Strings
|
||||
const char * DI_STR_Name="DoctorName";
|
||||
const char * DI_STR_Phone="DoctorPhone";
|
||||
const char * DI_STR_Email="DoctorEmail";
|
||||
const char * DI_STR_Practice="DoctorPractice";
|
||||
const char * DI_STR_Address="DoctorAddress";
|
||||
const char * DI_STR_PatientID="DoctorPatientID";
|
||||
|
||||
// UserInfo Strings
|
||||
const char * UI_STR_DOB="DOB";
|
||||
const char * UI_STR_FirstName="FirstName";
|
||||
const char * UI_STR_LastName="LastName";
|
||||
@ -563,6 +566,7 @@ const char * UI_STR_TimeZone="TimeZone";
|
||||
const char * UI_STR_Language="Language";
|
||||
const char * UI_STR_DST="DST";
|
||||
|
||||
// OxiSettings Strings
|
||||
const char * OS_STR_EnableOximetry="EnableOximetry";
|
||||
const char * OS_STR_SyncOximetry="SyncOximetry";
|
||||
const char * OS_STR_OximeterType="OximeterType";
|
||||
@ -572,6 +576,7 @@ const char * OS_STR_SPO2DropPercentage="SPO2DropPercentage";
|
||||
const char * OS_STR_PulseChangeDuration="PulseChangeDuration";
|
||||
const char * OS_STR_PulseChangeBPM="PulseChangeBPM";
|
||||
|
||||
// CPAPSettings Strings
|
||||
const char * CS_STR_ComplianceHours="ComplianceHours";
|
||||
const char * CS_STR_ShowCompliance="ShowCompliance";
|
||||
const char * CS_STR_ShowLeaksMode="ShowLeaksMode";
|
||||
@ -585,12 +590,16 @@ const char * CS_STR_UntreatedAHI="UntreatedAHI";
|
||||
const char * CS_STR_Notes="CPAPNotes";
|
||||
const char * CS_STR_DateDiagnosed="DateDiagnosed";
|
||||
|
||||
// ImportSettings Strings
|
||||
const char * IS_STR_DaySplitTime="DaySplitTime";
|
||||
const char * IS_STR_CacheSessions="MemoryHog";
|
||||
const char * IS_STR_CombineCloseSessions="CombineCloserSessions";
|
||||
const char * IS_STR_IgnoreShorterSessions="IgnoreShorterSessions";
|
||||
const char * IS_STR_Multithreading="EnableMultithreading";
|
||||
const char * IS_STR_TrashDayCache="TrashDayCache";
|
||||
const char * IS_STR_ShowSerialNumbers="ShowSerialNumbers";
|
||||
|
||||
// AppearanceSettings Strings
|
||||
const char * AS_STR_GraphHeight="GraphHeight";
|
||||
const char * AS_STR_AntiAliasing="UseAntiAliasing";
|
||||
const char * AS_STR_HighResPrinting="HighResPrinting";
|
||||
@ -599,10 +608,10 @@ const char * AS_STR_Animations="AnimationsAndTransitions";
|
||||
const char * AS_STR_SquareWave="SquareWavePlots";
|
||||
const char * AS_STR_OverlayType="OverlayType";
|
||||
|
||||
// UserSettings Strings
|
||||
const char * US_STR_UnitSystem="UnitSystem";
|
||||
const char * US_STR_EventWindowSize="EventWindowSize";
|
||||
const char * US_STR_SkipEmptyDays="SkipEmptyDays";
|
||||
const char * US_STR_RebuildCache="RebuildCache";
|
||||
const char * US_STR_TrashDayCache="TrashDayCache";
|
||||
const char * US_STR_ShowDebug="ShowDebug";
|
||||
const char * US_STR_LinkGroups="LinkGroups";
|
||||
|
@ -16,6 +16,7 @@ License: GPL
|
||||
#include "machine.h"
|
||||
#include "machine_loader.h"
|
||||
#include "preferences.h"
|
||||
#include "common.h"
|
||||
|
||||
class Machine;
|
||||
|
||||
@ -29,7 +30,7 @@ class UserSettings;
|
||||
class OxiSettings;
|
||||
class CPAPSettings;
|
||||
class AppearanceSettings;
|
||||
class ImportSettings;
|
||||
class SessionSettings;
|
||||
|
||||
|
||||
|
||||
@ -109,8 +110,8 @@ public:
|
||||
OxiSettings *oxi;
|
||||
DoctorInfo *doctor;
|
||||
AppearanceSettings *appearance;
|
||||
UserSettings *settings;
|
||||
ImportSettings *import;
|
||||
UserSettings *general;
|
||||
SessionSettings *session;
|
||||
|
||||
|
||||
protected:
|
||||
@ -132,6 +133,7 @@ extern Profile * p_profile;
|
||||
|
||||
extern const char * DI_STR_Name;
|
||||
extern const char * DI_STR_Phone;
|
||||
extern const char * DI_STR_Email;
|
||||
extern const char * DI_STR_Practice;
|
||||
extern const char * DI_STR_Address;
|
||||
extern const char * DI_STR_PatientID;
|
||||
@ -143,6 +145,7 @@ public:
|
||||
{
|
||||
if (!m_profile->contains(DI_STR_Name)) (*m_profile)[DI_STR_Name]=QString();
|
||||
if (!m_profile->contains(DI_STR_Phone)) (*m_profile)[DI_STR_Phone]=QString();
|
||||
if (!m_profile->contains(DI_STR_Email)) (*m_profile)[DI_STR_Email]=QString();
|
||||
if (!m_profile->contains(DI_STR_Practice)) (*m_profile)[DI_STR_Practice]=QString();
|
||||
if (!m_profile->contains(DI_STR_Address)) (*m_profile)[DI_STR_Address]=QString();
|
||||
if (!m_profile->contains(DI_STR_PatientID)) (*m_profile)[DI_STR_PatientID]=QString();
|
||||
@ -152,12 +155,14 @@ public:
|
||||
|
||||
const QString name() { return (*m_profile)[DI_STR_Name].toString(); }
|
||||
const QString phone() { return (*m_profile)[DI_STR_Phone].toString(); }
|
||||
const QString email() { return (*m_profile)[DI_STR_Email].toString(); }
|
||||
const QString practiceName() { return (*m_profile)[DI_STR_Practice].toString(); }
|
||||
const QString address() { return (*m_profile)[DI_STR_Address].toString(); }
|
||||
const QString patiendID() { return (*m_profile)[DI_STR_PatientID].toString(); }
|
||||
|
||||
void setName(QString name) { (*m_profile)[DI_STR_Name]=name; }
|
||||
void setPhone(QString phone) { (*m_profile)[DI_STR_Phone]=phone; }
|
||||
void setEmail(QString phone) { (*m_profile)[DI_STR_Email]=phone; }
|
||||
void setPracticeName(QString practice) { (*m_profile)[DI_STR_Practice]=practice; }
|
||||
void setAddress(QString address) { (*m_profile)[DI_STR_Address]=address; }
|
||||
void setPatiendID(QString pid) { (*m_profile)[DI_STR_PatientID]=pid; }
|
||||
@ -377,23 +382,27 @@ extern const char * IS_STR_CacheSessions;
|
||||
extern const char * IS_STR_CombineCloseSessions;
|
||||
extern const char * IS_STR_IgnoreShorterSessions;
|
||||
extern const char * IS_STR_Multithreading;
|
||||
extern const char * IS_STR_TrashDayCache;
|
||||
extern const char * IS_STR_ShowSerialNumbers;
|
||||
|
||||
/*! \class ImportSettings
|
||||
\brief Profile Options relating to the Import process
|
||||
*/
|
||||
class ImportSettings
|
||||
class SessionSettings
|
||||
{
|
||||
public:
|
||||
//! \brief Create ImportSettings object given Profile *p, and initialize the defaults
|
||||
ImportSettings(Profile *p) :m_profile(p)
|
||||
SessionSettings(Profile *p) :m_profile(p)
|
||||
{
|
||||
if (m_profile->contains(IS_STR_DaySplitTime)) (*m_profile)[IS_STR_DaySplitTime]=QTime(12,0,0);
|
||||
if (m_profile->contains(IS_STR_CacheSessions)) (*m_profile)[IS_STR_CacheSessions]=false;
|
||||
if (m_profile->contains(IS_STR_CombineCloseSessions)) (*m_profile)[IS_STR_CombineCloseSessions]=240;
|
||||
if (m_profile->contains(IS_STR_IgnoreShorterSessions)) (*m_profile)[IS_STR_IgnoreShorterSessions]=5;
|
||||
if (m_profile->contains(IS_STR_Multithreading)) (*m_profile)[IS_STR_Multithreading]=QThread::idealThreadCount() > 1;
|
||||
if (m_profile->contains(IS_STR_TrashDayCache)) (*m_profile)[IS_STR_TrashDayCache]=false; // can't remember..
|
||||
if (m_profile->contains(IS_STR_ShowSerialNumbers)) (*m_profile)[IS_STR_ShowSerialNumbers]=false;
|
||||
}
|
||||
~ImportSettings() {}
|
||||
~SessionSettings() {}
|
||||
|
||||
void setProfile(Profile *p) { m_profile=p; }
|
||||
|
||||
@ -402,12 +411,16 @@ public:
|
||||
double combineCloseSessions() { return (*m_profile)[IS_STR_CombineCloseSessions].toDouble(); }
|
||||
double ignoreShortSessions() { return (*m_profile)[IS_STR_IgnoreShorterSessions].toDouble(); }
|
||||
bool multithreading() { return (*m_profile)[IS_STR_Multithreading].toBool(); }
|
||||
bool trashDayCache() { return (*m_profile)[IS_STR_TrashDayCache].toBool(); }
|
||||
bool showSerialNumbers() { return (*m_profile)[IS_STR_ShowSerialNumbers].toBool(); }
|
||||
|
||||
void setDaySplitTime(QTime time) { (*m_profile)[IS_STR_DaySplitTime]=time; }
|
||||
void setCacheSessions(bool c) { (*m_profile)[IS_STR_CacheSessions]=c; }
|
||||
void setCombineCloseSessions(double val) { (*m_profile)[IS_STR_CombineCloseSessions]=val; }
|
||||
void setIgnoreShortSessions(double val) { (*m_profile)[IS_STR_IgnoreShorterSessions]=val; }
|
||||
void setMultithreading(bool enabled) { (*m_profile)[IS_STR_Multithreading]=enabled; }
|
||||
void setTrashDayCache(bool trash) { (*m_profile)[IS_STR_TrashDayCache]=trash; }
|
||||
void setShowSerialNumbers(bool trash) { (*m_profile)[IS_STR_ShowSerialNumbers]=trash; }
|
||||
|
||||
Profile *m_profile;
|
||||
};
|
||||
@ -479,7 +492,6 @@ extern const char * US_STR_UnitSystem;
|
||||
extern const char * US_STR_EventWindowSize;
|
||||
extern const char * US_STR_SkipEmptyDays;
|
||||
extern const char * US_STR_RebuildCache;
|
||||
extern const char * US_STR_TrashDayCache;
|
||||
extern const char * US_STR_ShowDebug;
|
||||
extern const char * US_STR_LinkGroups;
|
||||
|
||||
@ -496,7 +508,6 @@ public:
|
||||
if (m_profile->contains(US_STR_EventWindowSize)) (*m_profile)[US_STR_EventWindowSize]=4.0;
|
||||
if (m_profile->contains(US_STR_SkipEmptyDays)) (*m_profile)[US_STR_SkipEmptyDays]=true;
|
||||
if (m_profile->contains(US_STR_RebuildCache)) (*m_profile)[US_STR_RebuildCache]=false; // can't remember..
|
||||
if (m_profile->contains(US_STR_TrashDayCache)) (*m_profile)[US_STR_TrashDayCache]=false; // can't remember..
|
||||
if (m_profile->contains(US_STR_ShowDebug)) (*m_profile)[US_STR_ShowDebug]=false;
|
||||
if (m_profile->contains(US_STR_LinkGroups)) (*m_profile)[US_STR_LinkGroups]=true; // can't remember..
|
||||
}
|
||||
@ -508,7 +519,6 @@ public:
|
||||
double eventWindowSize() { return (*m_profile)[US_STR_EventWindowSize].toDouble(); }
|
||||
bool skipEmptyDays() { return (*m_profile)[US_STR_SkipEmptyDays].toBool(); }
|
||||
bool rebuildCache() { return (*m_profile)[US_STR_RebuildCache].toBool(); }
|
||||
bool trashDayCache() { return (*m_profile)[US_STR_TrashDayCache].toBool(); }
|
||||
bool showDebug() { return (*m_profile)[US_STR_ShowDebug].toBool(); }
|
||||
bool linkGroups() { return (*m_profile)[US_STR_LinkGroups].toBool(); }
|
||||
|
||||
@ -516,7 +526,6 @@ public:
|
||||
void setEventWindowSize(double size) { (*m_profile)[US_STR_EventWindowSize]=size; }
|
||||
void setSkipEmptyDays(bool skip) { (*m_profile)[US_STR_SkipEmptyDays]=skip; }
|
||||
void setRebuildCache(bool rebuild) { (*m_profile)[US_STR_RebuildCache]=rebuild; }
|
||||
void setTrashDayCache(bool trash) { (*m_profile)[US_STR_TrashDayCache]=trash; }
|
||||
void setShowDebug(bool b) { (*m_profile)[US_STR_ShowDebug]=b; }
|
||||
void setLinkGroups(bool link) { (*m_profile)[US_STR_LinkGroups]=link; }
|
||||
|
||||
|
74
daily.cpp
74
daily.cpp
@ -88,7 +88,7 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
||||
layout->addWidget(GraphView,1);
|
||||
layout->addWidget(scrollbar,0);
|
||||
|
||||
int default_height=PROFILE["GraphHeight"].toInt();
|
||||
int default_height=PROFILE.appearance->graphHeight();
|
||||
SF=new gGraph(GraphView,tr("Event Flags"),tr("Event Flags"),default_height);
|
||||
FRW=new gGraph(GraphView,tr("Flow Rate"),schema::channel[CPAP_FlowRate].description()+"\n("+schema::channel[CPAP_FlowRate].units()+")",default_height);
|
||||
AHI=new gGraph(GraphView,tr("AHI"),schema::channel[CPAP_AHI].description()+"\n("+schema::channel[CPAP_AHI].units()+")",default_height);
|
||||
@ -106,8 +106,6 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
||||
TE=new gGraph(GraphView,tr("Te"),schema::channel[CPAP_Te].description()+"\n("+schema::channel[CPAP_Te].units()+")",default_height);
|
||||
TI=new gGraph(GraphView,tr("Ti"),schema::channel[CPAP_Ti].description()+"\n("+schema::channel[CPAP_Ti].units()+")",default_height);
|
||||
TgMV=new gGraph(GraphView,tr("Tgt. Min. Vent"),schema::channel[CPAP_TgMV].description()+"\n("+schema::channel[CPAP_TgMV].units()+")",default_height);
|
||||
//INTPULSE=new gGraph(GraphView,"R-Pulse",schema::channel[CPAP_Te].units(),default_height);
|
||||
//INTSPO2=new gGraph(GraphView,"R-SPO2",default_height);
|
||||
|
||||
int oxigrp=PROFILE.ExistsAndTrue("SyncOximetry") ? 0 : 1;
|
||||
PULSE=new gGraph(GraphView,tr("Pulse"),schema::channel[OXI_Pulse].description()+"\n("+schema::channel[OXI_Pulse].units()+")",default_height,oxigrp);
|
||||
@ -149,8 +147,8 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
||||
fg->AddLayer((new gFlagsLine(CPAP_FlowLimit,QColor("black"),tr("FL"))));
|
||||
fg->AddLayer((new gFlagsLine(CPAP_RERA,QColor("gold"),tr("RE"))));
|
||||
fg->AddLayer((new gFlagsLine(CPAP_VSnore,QColor("red"),tr("VS"))));
|
||||
fg->AddLayer((new gFlagsLine("UserFlag1",QColor("yellow"),tr("UF1"))));
|
||||
fg->AddLayer((new gFlagsLine("UserFlag2",QColor("green"),tr("UF2"))));
|
||||
fg->AddLayer((new gFlagsLine(CPAP_UserFlag1,QColor("yellow"),tr("UF1"))));
|
||||
fg->AddLayer((new gFlagsLine(CPAP_UserFlag2,QColor("green"),tr("UF2"))));
|
||||
//fg->AddLayer((new gFlagsLine(PRS1_0B,QColor("dark green"),tr("U0B"))));
|
||||
//fg->AddLayer((new gFlagsLine(CPAP_VSnore2,QColor("red"),tr("VS2"))));
|
||||
SF->setBlockZoom(true);
|
||||
@ -181,8 +179,8 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
||||
FRW->AddLayer(AddCPAP(new gLineOverlayBar(CPAP_FlowLimit,QColor("black"),tr("FL"))));
|
||||
FRW->AddLayer(AddCPAP(los->add(new gLineOverlayBar(CPAP_Obstructive,QColor("#40c0ff"),tr("OA")))));
|
||||
FRW->AddLayer(AddCPAP(los->add(new gLineOverlayBar(CPAP_ClearAirway,QColor("purple"),tr("CA")))));
|
||||
FRW->AddLayer(AddCPAP(new gLineOverlayBar("UserFlag1",QColor("yellow"),tr("U1"),FT_Bar)));
|
||||
FRW->AddLayer(AddCPAP(new gLineOverlayBar("UserFlag2",QColor("orange"),tr("U2"),FT_Bar)));
|
||||
FRW->AddLayer(AddCPAP(new gLineOverlayBar(CPAP_UserFlag1,QColor("yellow"),tr("U1"),FT_Bar)));
|
||||
FRW->AddLayer(AddCPAP(new gLineOverlayBar(CPAP_UserFlag2,QColor("orange"),tr("U2"),FT_Bar)));
|
||||
FRW->AddLayer(AddOXI(new gLineOverlayBar(OXI_SPO2Drop,QColor("red"),tr("O2"))));
|
||||
FRW->AddLayer(AddOXI(new gLineOverlayBar(OXI_PulseChange,QColor("blue"),tr("PC"),FT_Dot)));
|
||||
|
||||
@ -209,7 +207,7 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
||||
TI->AddLayer(AddCPAP(new gStatsLine(CPAP_Ti)),LayerBottom,0,20,1); */
|
||||
|
||||
|
||||
bool square=PROFILE["SquareWavePlots"].toBool();
|
||||
bool square=PROFILE.appearance->squareWavePlots();
|
||||
PRD->AddLayer(AddCPAP(new gLineChart(CPAP_EPAP,Qt::blue,square)));
|
||||
PRD->AddLayer(AddCPAP(new gLineChart(CPAP_IPAPLo,Qt::darkRed,square)));
|
||||
PRD->AddLayer(AddCPAP(new gLineChart(CPAP_IPAP,Qt::red,square)));
|
||||
@ -282,8 +280,7 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
||||
ui->webView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
|
||||
connect(ui->webView,SIGNAL(linkClicked(QUrl)),this,SLOT(Link_clicked(QUrl)));
|
||||
|
||||
if (!PROFILE.Exists("EventViewSize")) PROFILE["EventViewSize"]=4;
|
||||
int ews=PROFILE["EventViewSize"].toInt();
|
||||
int ews=PROFILE.general->eventWindowSize();
|
||||
ui->evViewSlider->setValue(ews);
|
||||
ui->evViewLCD->display(ews);
|
||||
|
||||
@ -306,15 +303,15 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
||||
// TODO: Add preference to hide do this for Widget Haters..
|
||||
//ui->calNavWidget->hide();
|
||||
|
||||
if (unitSystem()==US_Archiac) {
|
||||
ui->weightSpinBox->setSuffix(tr("lb"));
|
||||
if (PROFILE.general->unitSystem()==US_Archiac) {
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_POUND);
|
||||
ui->weightSpinBox->setDecimals(0);
|
||||
ui->ouncesSpinBox->setVisible(true);
|
||||
ui->ouncesSpinBox->setSuffix(tr("oz"));
|
||||
ui->ouncesSpinBox->setSuffix(STR_UNIT_OUNCE);
|
||||
} else {
|
||||
ui->ouncesSpinBox->setVisible(false);
|
||||
ui->weightSpinBox->setDecimals(3);
|
||||
ui->weightSpinBox->setSuffix(tr("Kg"));
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_KG);
|
||||
}
|
||||
}
|
||||
|
||||
@ -540,15 +537,15 @@ void Daily::on_calendar_selectionChanged()
|
||||
ui->calButton->setText(ui->calendar->selectedDate().toString(Qt::TextDate));
|
||||
ui->calendar->setFocus(Qt::ActiveWindowFocusReason);
|
||||
|
||||
if (unitSystem()==US_Archiac) {
|
||||
ui->weightSpinBox->setSuffix(tr("lb"));
|
||||
if (PROFILE.general->unitSystem()==US_Archiac) {
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_POUND);
|
||||
ui->weightSpinBox->setDecimals(0);
|
||||
ui->ouncesSpinBox->setVisible(true);
|
||||
ui->ouncesSpinBox->setSuffix(tr("oz"));
|
||||
ui->ouncesSpinBox->setSuffix(STR_UNIT_OUNCE);
|
||||
} else {
|
||||
ui->ouncesSpinBox->setVisible(false);
|
||||
ui->weightSpinBox->setDecimals(3);
|
||||
ui->weightSpinBox->setSuffix(tr("Kg"));
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_KG);
|
||||
}
|
||||
}
|
||||
void Daily::ResetGraphLayout()
|
||||
@ -575,7 +572,7 @@ void Daily::Load(QDate date)
|
||||
Day *oxi=PROFILE.GetDay(date,MT_OXIMETER);
|
||||
// Day *sleepstage=profile->GetDay(date,MT_SLEEPSTAGE);
|
||||
|
||||
if (!PROFILE["MemoryHog"].toBool()) {
|
||||
if (!PROFILE.session->cacheSessions()) {
|
||||
if (lastcpapday && (lastcpapday!=cpap)) {
|
||||
for (QVector<Session *>::iterator s=lastcpapday->begin();s!=lastcpapday->end();s++) {
|
||||
(*s)->TrashEvents();
|
||||
@ -647,7 +644,6 @@ void Daily::Load(QDate date)
|
||||
QString epr,modestr;
|
||||
//float iap90,eap90;
|
||||
CPAPMode mode=MODE_UNKNOWN;
|
||||
PRTypes pr;
|
||||
QString a;
|
||||
bool isBrick=false;
|
||||
|
||||
@ -686,7 +682,7 @@ void Daily::Load(QDate date)
|
||||
if (cpap->machine->properties.find("SubModel")!=cpap->machine->properties.end())
|
||||
submodel=" <br/>"+cpap->machine->properties["SubModel"];
|
||||
html+="<tr><td colspan=4 align=center><b>"+cpap->machine->properties["Brand"]+"</b> <br>"+cpap->machine->properties["Model"]+" "+cpap->machine->properties["ModelNumber"]+submodel+"</td></tr>\n";
|
||||
if (PROFILE.Exists("ShowSerialNumbers") && PROFILE["ShowSerialNumbers"].toBool()) {
|
||||
if (PROFILE.session->showSerialNumbers()) {
|
||||
html+="<tr><td colspan=4 align=center>"+cpap->machine->properties["Serial"]+"</td></tr>\n";
|
||||
}
|
||||
CPAPMode mode=(CPAPMode)(int)cpap->settings_max(CPAP_Mode);
|
||||
@ -754,7 +750,7 @@ void Daily::Load(QDate date)
|
||||
// as it only relates to text drawing, which the Pie chart does not do
|
||||
// ^^ Scratch that.. pie now includes text..
|
||||
|
||||
if (PROFILE["EnableGraphSnapshots"].toBool()) { // AHI Pie Chart
|
||||
if (PROFILE.appearance->graphSnapshots()) { // AHI Pie Chart
|
||||
if (ahi+rei+fli>0) {
|
||||
html+="</tr>\n"; //<tr><td colspan=4 align=center><i>"+tr("Event Breakdown")+"</i></td></tr>\n";
|
||||
//G_AHI->setFixedSize(gwwidth,120);
|
||||
@ -791,7 +787,7 @@ void Daily::Load(QDate date)
|
||||
|
||||
ChannelID code=chans[i];
|
||||
if (cpap && cpap->channelHasData(code)) {
|
||||
//if (code==CPAP_LeakTotal) suboffset=PROFILE["IntentionalLeak"].toDouble(); else suboffset=0;
|
||||
//if (code==CPAP_LeakTotal) suboffset=PROFILEIntentionalLeak"].toDouble(); else suboffset=0;
|
||||
QString tooltip=schema::channel[code].description();
|
||||
if (!schema::channel[code].units().isEmpty()) tooltip+=" ("+schema::channel[code].units()+")";
|
||||
html+="<tr><td align=left><a href='graph="+code+"' title='"+tooltip+"'>"+schema::channel[code].label()+"</a>";
|
||||
@ -965,13 +961,13 @@ void Daily::Load(QDate date)
|
||||
if (journal->settings.contains(Journal_Weight)) {
|
||||
double kg=journal->settings[Journal_Weight].toDouble(&ok);
|
||||
|
||||
if (unitSystem()==US_Metric) {
|
||||
if (PROFILE.general->unitSystem()==US_Metric) {
|
||||
ui->weightSpinBox->setDecimals(3);
|
||||
ui->weightSpinBox->blockSignals(true);
|
||||
ui->weightSpinBox->setValue(kg);
|
||||
ui->weightSpinBox->blockSignals(false);
|
||||
ui->ouncesSpinBox->setVisible(false);
|
||||
ui->weightSpinBox->setSuffix(tr("Kg"));
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_KG);
|
||||
} else {
|
||||
float ounces=(kg*1000.0)/ounce_convert;
|
||||
int pounds=ounces/16.0;
|
||||
@ -985,12 +981,12 @@ void Daily::Load(QDate date)
|
||||
ui->ouncesSpinBox->blockSignals(false);
|
||||
ui->weightSpinBox->blockSignals(false);
|
||||
|
||||
ui->weightSpinBox->setSuffix(tr("lb"));
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_POUND);
|
||||
ui->weightSpinBox->setDecimals(0);
|
||||
ui->ouncesSpinBox->setVisible(true);
|
||||
ui->ouncesSpinBox->setSuffix(tr("oz"));
|
||||
ui->ouncesSpinBox->setSuffix(STR_UNIT_OUNCE);
|
||||
}
|
||||
double height=PROFILE["Height"].toDouble(&ok)/100.0;
|
||||
double height=PROFILE.user->height()/100.0;
|
||||
if (height>0 && kg>0) {
|
||||
double bmi=kg/(height*height);
|
||||
ui->BMI->setVisible(true);
|
||||
@ -1038,7 +1034,7 @@ void Daily::Load(QDate date)
|
||||
void Daily::UnitsChanged()
|
||||
{
|
||||
double kg;
|
||||
if (unitSystem(true)==US_Metric) {
|
||||
if (PROFILE.general->unitSystem()==US_Metric) {
|
||||
kg=ui->weightSpinBox->value();
|
||||
float ounces=(kg*1000.0)/ounce_convert;
|
||||
int pounds=ounces/16;
|
||||
@ -1047,16 +1043,16 @@ void Daily::UnitsChanged()
|
||||
ui->ouncesSpinBox->setValue(oz);
|
||||
|
||||
ui->weightSpinBox->setDecimals(0);
|
||||
ui->weightSpinBox->setSuffix("lb");
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_POUND);
|
||||
ui->ouncesSpinBox->setVisible(true);
|
||||
ui->ouncesSpinBox->setSuffix("oz");
|
||||
ui->ouncesSpinBox->setSuffix(STR_UNIT_OUNCE);
|
||||
} else {
|
||||
kg=(ui->weightSpinBox->value()*(ounce_convert*16.0))+(ui->ouncesSpinBox->value()*ounce_convert);
|
||||
kg/=1000.0;
|
||||
ui->weightSpinBox->setDecimals(3);
|
||||
ui->weightSpinBox->setValue(kg);
|
||||
ui->ouncesSpinBox->setVisible(false);
|
||||
ui->weightSpinBox->setSuffix("Kg");
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_KG);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1239,7 +1235,7 @@ void Daily::on_treeWidget_itemClicked(QTreeWidgetItem *item, int column)
|
||||
QDateTime d;
|
||||
if (!item->text(1).isEmpty()) {
|
||||
d=d.fromString(item->text(1),"yyyy-MM-dd HH:mm:ss");
|
||||
int winsize=PROFILE["EventViewSize"].toInt()*60;
|
||||
int winsize=PROFILE.general->eventWindowSize()*60;
|
||||
|
||||
double st=qint64((d.addSecs(-(winsize/2))).toTime_t())*1000L;
|
||||
double et=qint64((d.addSecs(winsize/2)).toTime_t())*1000L;
|
||||
@ -1331,9 +1327,9 @@ void Daily::on_todayButton_clicked()
|
||||
void Daily::on_evViewSlider_valueChanged(int value)
|
||||
{
|
||||
ui->evViewLCD->display(value);
|
||||
PROFILE["EventViewSize"]=value;
|
||||
PROFILE.general->setEventWindowSize(value);
|
||||
|
||||
int winsize=PROFILE["EventViewSize"].toInt()*60;
|
||||
int winsize=value*60;
|
||||
|
||||
gGraph *g=GraphView->findGraph("Event Flags");
|
||||
if (!g) return;
|
||||
@ -1451,15 +1447,14 @@ void Daily::on_bookmarkTable_itemChanged(QTableWidgetItem *item)
|
||||
}
|
||||
void Daily::on_weightSpinBox_valueChanged(double arg1)
|
||||
{
|
||||
bool ok;
|
||||
double height=PROFILE["Height"].toDouble(&ok)/100.0;
|
||||
double height=PROFILE.user->height()/100.0;
|
||||
Session *journal=GetJournalSession(previous_date);
|
||||
if (!journal) {
|
||||
journal=CreateJournalSession(previous_date);
|
||||
}
|
||||
|
||||
double kg;
|
||||
if (unitSystem()==US_Archiac) {
|
||||
if (PROFILE.general->unitSystem()==US_Archiac) {
|
||||
kg=(arg1*pound_convert) + (ui->ouncesSpinBox->value()*ounce_convert);
|
||||
} else {
|
||||
kg=arg1;
|
||||
@ -1485,12 +1480,11 @@ void Daily::on_weightSpinBox_valueChanged(double arg1)
|
||||
}
|
||||
void Daily::on_ouncesSpinBox_valueChanged(int arg1)
|
||||
{
|
||||
bool ok;
|
||||
Session *journal=GetJournalSession(previous_date);
|
||||
if (!journal) {
|
||||
journal=CreateJournalSession(previous_date);
|
||||
}
|
||||
double height=PROFILE["Height"].toDouble(&ok)/100.0;
|
||||
double height=PROFILE.user->height()/100.0;
|
||||
double kg=(ui->weightSpinBox->value()*pound_convert) + (arg1*ounce_convert);
|
||||
journal->settings[Journal_Weight]=kg;
|
||||
|
||||
|
@ -21,7 +21,8 @@ One id code per item
|
||||
<channel id="0x100a" class="data" name="LeakFlag" details="Leak Event" label="L" unit="events/hour" color="dark blue"/>
|
||||
<channel id="0x100b" class="data" name="NRI" details="Non-Responding Event" label="NRI" unit="events/hour" color="orange"/>
|
||||
<channel id="0x100c" class="data" name="EP" details="Exhale Puff" label="EP" unit="events/hour" color="dark magenta"/>
|
||||
<channel id="0x101f" class="data" name="UserFlag1" details="User Flag 1" label="UF1" unit="events/hour" color="dark cyan"/>
|
||||
<channel id="0x101e" class="data" name="UserFlag1" details="User Flag 1" label="UF1" unit="events/hour" color="dark cyan"/>
|
||||
<channel id="0x101f" class="data" name="UserFlag2" details="User Flag 2" label="UF2" unit="events/hour" color="dark cyan"/>
|
||||
|
||||
<channel id="0x1020" class="data" name="PressureMin" details="Min Therapy Pressure" label="PMin" color="black"/>
|
||||
<channel id="0x1021" class="data" name="PressureMax" details="Max Therapy Pressure" label="PMax" color="black"/>
|
||||
|
@ -100,45 +100,13 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
ui->statusbar->addPermanentWidget(qprogress,1);
|
||||
ui->statusbar->addPermanentWidget(qstatus2,0);
|
||||
|
||||
ui->actionDebug->setChecked(PROFILE.general->showDebug());
|
||||
|
||||
// This next section is a mess..
|
||||
// Preferences & Profile variables really need to initialize somewhere else
|
||||
// The General object in PreferencesDialog kinda defines where I want to go with the profile default stuff
|
||||
|
||||
if (!PROFILE.Exists("ShowDebug")) PROFILE["ShowDebug"]=false;
|
||||
ui->actionDebug->setChecked(PROFILE["ShowDebug"].toBool());
|
||||
|
||||
if (!PROFILE["ShowDebug"].toBool()) {
|
||||
if (!PROFILE.general->showDebug()) {
|
||||
ui->logText->hide();
|
||||
}
|
||||
|
||||
// This speeds up the second part of importing craploads.. later it will speed up the first part too.
|
||||
if (!PROFILE.Exists("EnableMultithreading")) PROFILE["EnableMultithreading"]=QThread::idealThreadCount()>1;
|
||||
|
||||
if (!PROFILE.Exists("MemoryHog")) PROFILE["MemoryHog"]=false;
|
||||
if (!PROFILE.Exists("EnableGraphSnapshots")) PROFILE["EnableGraphSnapshots"]=true;
|
||||
if (!PROFILE.Exists("SquareWavePlots")) PROFILE["SquareWavePlots"]=false;
|
||||
if (!PROFILE.Exists("EnableOximetry")) PROFILE["EnableOximetry"]=false;
|
||||
if (!PROFILE.Exists("LinkGroups")) PROFILE["LinkGroups"]=false;
|
||||
if (!PROFILE.Exists("AlwaysShowOverlayBars")) PROFILE["AlwaysShowOverlayBars"]=0;
|
||||
if (!PROFILE.Exists("UseAntiAliasing")) PROFILE["UseAntiAliasing"]=false;
|
||||
if (!PROFILE.Exists("IntentionalLeak")) PROFILE["IntentionalLeak"]=(double)0.0;
|
||||
if (!PROFILE.Exists("IgnoreShorterSessions")) PROFILE["IgnoreShorterSessions"]=0;
|
||||
if (!PROFILE.Exists("CombineCloserSessions")) PROFILE["CombineCloserSessions"]=0;
|
||||
if (!PROFILE.Exists("DaySplitTime")) PROFILE["DaySplitTime"]=QTime(12,0,0,0);
|
||||
if (!PROFILE.Exists("EventWindowSize")) PROFILE["EventWindowSize"]=4;
|
||||
if (!PROFILE.Exists("SPO2DropPercentage")) PROFILE["PulseChangeDuration"]=4;
|
||||
if (!PROFILE.Exists("SPO2DropDuration")) PROFILE["PulseChangeDuration"]=5;
|
||||
if (!PROFILE.Exists("PulseChangeBPM")) PROFILE["PulseChangeDuration"]=5;
|
||||
if (!PROFILE.Exists("PulseChangeDuration")) PROFILE["PulseChangeDuration"]=8;
|
||||
if (!PROFILE.Exists("GraphHeight")) PROFILE["GraphHeight"]=180;
|
||||
if (!PROFILE.Exists("OxiDiscardThreshold")) PROFILE["OxiDiscardThreshold"]=10;
|
||||
if (!PROFILE.Exists("ComplianceHours")) PROFILE["ComplianceHours"]=4;
|
||||
if (!PROFILE.Exists("ShowCompliance")) PROFILE["ShowCompliance"]=true;
|
||||
if (!PROFILE.Exists("AnimationsAndTransitions")) PROFILE["AnimationsAndTransitions"]=true;
|
||||
|
||||
//ui->actionUse_AntiAliasing->setChecked(PROFILE["UseAntiAliasing"].toBool());
|
||||
ui->action_Link_Graph_Groups->setChecked(PROFILE["LinkGroups"].toBool());
|
||||
ui->action_Link_Graph_Groups->setChecked(PROFILE.general->linkGroups());
|
||||
|
||||
first_load=true;
|
||||
|
||||
@ -160,10 +128,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
QAction *a=systraymenu->addAction("SleepyHead v"+VersionString());
|
||||
a->setEnabled(false);
|
||||
systraymenu->addSeparator();
|
||||
systraymenu->addAction("About",this,SLOT(on_action_About_triggered()));
|
||||
systraymenu->addAction("Check for Updates",this,SLOT(on_actionCheck_for_Updates_triggered()));
|
||||
systraymenu->addAction("&About",this,SLOT(on_action_About_triggered()));
|
||||
systraymenu->addAction("Check for &Updates",this,SLOT(on_actionCheck_for_Updates_triggered()));
|
||||
systraymenu->addSeparator();
|
||||
systraymenu->addAction("Exit",this,SLOT(close()));
|
||||
systraymenu->addAction("E&xit",this,SLOT(close()));
|
||||
} else { // if not available, the messages will popup in the taskbar
|
||||
systray=NULL;
|
||||
systraymenu=NULL;
|
||||
@ -231,7 +199,7 @@ void MainWindow::Startup()
|
||||
|
||||
overview=new Overview(ui->tabWidget,daily->graphView());
|
||||
ui->tabWidget->insertTab(2,overview,tr("Overview"));
|
||||
if (PROFILE["EnableOximetry"].toBool()) {
|
||||
if (PROFILE.oxi->oximetryEnabled()) {
|
||||
oximetry=new Oximetry(ui->tabWidget,daily->graphView());
|
||||
ui->tabWidget->insertTab(3,oximetry,tr("Oximetry"));
|
||||
}
|
||||
@ -574,16 +542,16 @@ void MainWindow::updatestatusBarMessage (const QString & text)
|
||||
void MainWindow::on_actionPrint_Report_triggered()
|
||||
{
|
||||
if (ui->tabWidget->currentWidget()==overview) {
|
||||
PrintReport(overview->graphView(),"Overview");
|
||||
PrintReport(overview->graphView(),tr("Overview"));
|
||||
} else if (ui->tabWidget->currentWidget()==daily) {
|
||||
PrintReport(daily->graphView(),"Daily",daily->getDate());
|
||||
PrintReport(daily->graphView(),tr("Daily"),daily->getDate());
|
||||
} else if (ui->tabWidget->currentWidget()==oximetry) {
|
||||
if (oximetry)
|
||||
PrintReport(oximetry->graphView(),"Oximetry");
|
||||
PrintReport(oximetry->graphView(),tr("Oximetry"));
|
||||
} else {
|
||||
//QPrinter printer();
|
||||
//ui->webView->print(printer)
|
||||
QMessageBox::information(this,"Not supported Yet","Sorry, printing from this page is not supported yet",QMessageBox::Ok);
|
||||
QMessageBox::information(this,tr("Not supported Yet"),tr("Sorry, printing from this page is not supported yet"),QMessageBox::Ok);
|
||||
}
|
||||
}
|
||||
|
||||
@ -597,7 +565,7 @@ void MainWindow::on_action_Edit_Profile_triggered()
|
||||
|
||||
void MainWindow::on_action_Link_Graph_Groups_toggled(bool arg1)
|
||||
{
|
||||
PROFILE["LinkGroups"]=arg1;
|
||||
PROFILE.general->setLinkGroups(arg1);
|
||||
if (daily) daily->RedrawGraphs();
|
||||
}
|
||||
|
||||
|
160
newprofile.cpp
160
newprofile.cpp
@ -16,6 +16,7 @@
|
||||
|
||||
extern MainWindow *mainwin;
|
||||
|
||||
|
||||
NewProfile::NewProfile(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::NewProfile)
|
||||
@ -38,7 +39,7 @@ NewProfile::NewProfile(QWidget *parent) :
|
||||
m_passwordHashed=false;
|
||||
ui->heightEdit2->setVisible(false);
|
||||
ui->heightEdit->setDecimals(2);
|
||||
ui->heightEdit->setSuffix(tr("cm"));
|
||||
ui->heightEdit->setSuffix(STR_UNIT_CM);
|
||||
|
||||
{ // process countries list
|
||||
QFile f(":/docs/countries.txt");
|
||||
@ -88,7 +89,7 @@ void NewProfile::on_nextButton_clicked()
|
||||
switch(index) {
|
||||
case 1:
|
||||
if (ui->userNameEdit->text().isEmpty()) {
|
||||
QMessageBox::information(this,tr("Error"),tr("Empty Username"),QMessageBox::Ok);
|
||||
QMessageBox::information(this,STR_MESSAGE_ERROR,tr("Empty Username"),QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
if (ui->genderCombo->currentIndex()==0) {
|
||||
@ -96,7 +97,7 @@ void NewProfile::on_nextButton_clicked()
|
||||
}
|
||||
if (ui->passwordGroupBox->isChecked()) {
|
||||
if (ui->passwordEdit1->text()!=ui->passwordEdit2->text()) {
|
||||
QMessageBox::information(this,tr("Error"),tr("Passwords don't match"),QMessageBox::Ok);
|
||||
QMessageBox::information(this,STR_MESSAGE_ERROR,tr("Passwords don't match"),QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
if (ui->passwordEdit1->text().isEmpty())
|
||||
@ -124,57 +125,60 @@ void NewProfile::on_nextButton_clicked()
|
||||
profile=Profiles::Create(ui->userNameEdit->text());
|
||||
}
|
||||
Profile &prof=*profile;
|
||||
prof["FirstName"]=ui->firstNameEdit->text();
|
||||
prof["LastName"]=ui->lastNameEdit->text();
|
||||
prof["DOB"]=ui->dobEdit->date();
|
||||
prof["EmailAddress"]=ui->emailEdit->text();
|
||||
prof["Phone"]=ui->phoneEdit->text();
|
||||
prof["Address"]=ui->addressEdit->toPlainText();
|
||||
profile->user->setFirstName(ui->firstNameEdit->text());
|
||||
profile->user->setLastName(ui->lastNameEdit->text());
|
||||
profile->user->setDOB(ui->dobEdit->date());
|
||||
profile->user->setEmail(ui->emailEdit->text());
|
||||
profile->user->setPhone(ui->phoneEdit->text());
|
||||
profile->user->setAddress(ui->addressEdit->toPlainText());
|
||||
if (ui->passwordGroupBox->isChecked()) {
|
||||
if (!m_passwordHashed) {
|
||||
QByteArray ba=ui->passwordEdit1->text().toUtf8();
|
||||
prof["Password"]=QString(QCryptographicHash::hash(ba,QCryptographicHash::Sha1).toHex());
|
||||
profile->user->setPassword(ui->passwordEdit1->text().toUtf8());
|
||||
}
|
||||
} else {
|
||||
prof.Erase("Password");
|
||||
}
|
||||
//prof["Password"]="";
|
||||
if (ui->genderCombo->currentIndex()==1) {
|
||||
prof["Gender"]=tr("Male");
|
||||
} else if (ui->genderCombo->currentIndex()==2) {
|
||||
prof["Gender"]=tr("Female");
|
||||
}
|
||||
prof["DateDiagnosed"]=ui->dateDiagnosedEdit->date();
|
||||
prof["UntreatedAHI"]=ui->untreatedAHIEdit->value();
|
||||
prof["CPAPPrescribedMode"]=ui->cpapModeCombo->currentIndex();
|
||||
prof["CPAPPrescribedMinPressure"]=ui->minPressureEdit->value();
|
||||
prof["CPAPPrescribedMaxPressure"]=ui->minPressureEdit->value();
|
||||
prof["CPAPNotes"]=ui->cpapNotes->toPlainText();
|
||||
prof["DoctorName"]=ui->doctorNameEdit->text();
|
||||
prof["DoctorPractice"]=ui->doctorPracticeEdit->text();
|
||||
prof["DoctorAddress"]=ui->doctorAddressEdit->toPlainText();
|
||||
prof["DoctorPhone"]=ui->doctorPhoneEdit->text();
|
||||
prof["DoctorEmail"]=ui->doctorEmailEdit->text();
|
||||
prof["DoctorPatientID"]=ui->doctorPatientIDEdit->text();
|
||||
prof["Language"]=ui->languageCombo->currentText();
|
||||
prof["TimeZone"]=ui->timezoneCombo->itemData(ui->timezoneCombo->currentIndex()).toString();
|
||||
prof["Country"]=ui->countryCombo->currentText();
|
||||
prof["DST"]=ui->DSTcheckbox->isChecked();
|
||||
if (prof["Units"].toString()!=ui->heightCombo->currentText()) {
|
||||
|
||||
prof["Units"]=ui->heightCombo->currentText();
|
||||
prof.Erase(UI_STR_Password);
|
||||
}
|
||||
|
||||
profile->user->setGender((Gender)ui->genderCombo->currentIndex());
|
||||
|
||||
profile->cpap->setDateDiagnosed(ui->dateDiagnosedEdit->date());
|
||||
profile->cpap->setUntreatedAHI(ui->untreatedAHIEdit->value());
|
||||
profile->cpap->setMode((CPAPMode)ui->cpapModeCombo->currentIndex());
|
||||
profile->cpap->setMinPressure(ui->minPressureEdit->value());
|
||||
profile->cpap->setMaxPressure(ui->maxPressureEdit->value());
|
||||
profile->cpap->setNotes(ui->cpapNotes->toPlainText());
|
||||
profile->doctor->setName(ui->doctorNameEdit->text());
|
||||
profile->doctor->setPracticeName(ui->doctorPracticeEdit->text());
|
||||
profile->doctor->setAddress(ui->doctorAddressEdit->toPlainText());
|
||||
profile->doctor->setPhone(ui->doctorPhoneEdit->text());
|
||||
profile->doctor->setEmail(ui->doctorEmailEdit->text());
|
||||
profile->doctor->setPatiendID(ui->doctorPatientIDEdit->text());
|
||||
profile->user->setLanguage(ui->languageCombo->currentText());
|
||||
profile->user->setTimeZone(ui->timezoneCombo->itemData(ui->timezoneCombo->currentIndex()).toString());
|
||||
profile->user->setCountry(ui->countryCombo->currentText());
|
||||
profile->user->setDaylightSaving(ui->DSTcheckbox->isChecked());
|
||||
UnitSystem us;
|
||||
if (ui->heightCombo->currentIndex()==0) us=US_Metric;
|
||||
else if (ui->heightCombo->currentIndex()==1) us=US_Archiac;
|
||||
else us=US_Metric;
|
||||
|
||||
if (profile->general->unitSystem() != us) {
|
||||
profile->general->setUnitSystem(us);
|
||||
if (mainwin && mainwin->getDaily()) mainwin->getDaily()->UnitsChanged();
|
||||
}
|
||||
|
||||
double v=0;
|
||||
if (ui->heightCombo->currentIndex()==1) {
|
||||
if (us==US_Archiac) {
|
||||
// convert to metric
|
||||
v=(ui->heightEdit->value()*30.48);
|
||||
v+=ui->heightEdit2->value()*2.54;
|
||||
} else {
|
||||
v=ui->heightEdit->value();
|
||||
}
|
||||
prof["Height"]=v;
|
||||
profile->user->setHeight(v);
|
||||
|
||||
//profile->user->setUserName(ui->userNameEdit->text());??
|
||||
PREF["Profile"]=ui->userNameEdit->text();
|
||||
|
||||
|
||||
@ -234,60 +238,58 @@ void NewProfile::edit(const QString name)
|
||||
Profile *profile=Profiles::Get(name);
|
||||
if (!profile) {
|
||||
profile=Profiles::Create(name);
|
||||
(*profile)["FirstName"]="";
|
||||
(*profile)["LastName"]="";
|
||||
}
|
||||
ui->userNameEdit->setText(name);
|
||||
ui->userNameEdit->setReadOnly(true);
|
||||
ui->firstNameEdit->setText((*profile)["FirstName"].toString());
|
||||
ui->lastNameEdit->setText((*profile)["LastName"].toString());
|
||||
if (profile->Exists("Password")) {
|
||||
ui->firstNameEdit->setText(profile->user->firstName());
|
||||
ui->lastNameEdit->setText(profile->user->lastName());
|
||||
if (profile->Exists(UI_STR_Password)) {
|
||||
// leave the password box blank..
|
||||
ui->passwordEdit1->setText("");
|
||||
ui->passwordEdit2->setText("");
|
||||
QString a="******";
|
||||
ui->passwordEdit1->setText(a);
|
||||
ui->passwordEdit2->setText(a);
|
||||
ui->passwordGroupBox->setChecked(true);
|
||||
m_passwordHashed=true;
|
||||
}
|
||||
ui->dobEdit->setDate((*profile)["DOB"].toDate());
|
||||
if (profile->Get("Gender").toLower()=="male") {
|
||||
ui->dobEdit->setDate(profile->user->DOB());
|
||||
if (profile->user->gender()==Male) {
|
||||
ui->genderCombo->setCurrentIndex(1);
|
||||
} else if (profile->Get("Gender").toLower()=="female") {
|
||||
} else if (profile->user->gender()==Female) {
|
||||
ui->genderCombo->setCurrentIndex(2);
|
||||
} else ui->genderCombo->setCurrentIndex(0);
|
||||
ui->heightEdit->setValue((*profile)["Height"].toDouble());
|
||||
ui->addressEdit->setText(profile->Get("Address"));
|
||||
ui->emailEdit->setText(profile->Get("EmailAddress"));
|
||||
ui->phoneEdit->setText(profile->Get("Phone"));
|
||||
ui->dateDiagnosedEdit->setDate((*profile)["DateDiagnosed"].toDate());
|
||||
ui->heightEdit->setValue(profile->user->height());
|
||||
ui->addressEdit->setText(profile->user->address());
|
||||
ui->emailEdit->setText(profile->user->email());
|
||||
ui->phoneEdit->setText(profile->user->phone());
|
||||
ui->dateDiagnosedEdit->setDate(profile->cpap->dateDiagnosed());
|
||||
ui->cpapNotes->clear();
|
||||
ui->cpapNotes->appendPlainText(profile->Get("CPAPNotes"));
|
||||
ui->minPressureEdit->setValue((*profile)["CPAPPrescribedMinPressure"].toDouble());
|
||||
ui->maxPressureEdit->setValue((*profile)["CPAPPrescribedMaxPressure"].toDouble());
|
||||
ui->untreatedAHIEdit->setValue((*profile)["UntreatedAHI"].toDouble());
|
||||
ui->cpapModeCombo->setCurrentIndex((*profile)["CPAPPrescribedMode"].toInt());
|
||||
ui->cpapNotes->appendPlainText(profile->cpap->notes());
|
||||
ui->minPressureEdit->setValue(profile->cpap->minPressure());
|
||||
ui->maxPressureEdit->setValue(profile->cpap->maxPressure());
|
||||
ui->untreatedAHIEdit->setValue(profile->cpap->untreatedAHI());
|
||||
ui->cpapModeCombo->setCurrentIndex((int)profile->cpap->mode());
|
||||
|
||||
ui->doctorNameEdit->setText(profile->Get("DoctorName"));
|
||||
ui->doctorPracticeEdit->setText(profile->Get("DoctorPractice"));
|
||||
ui->doctorPhoneEdit->setText(profile->Get("DoctorPhone"));
|
||||
ui->doctorEmailEdit->setText(profile->Get("DoctorEmail"));
|
||||
ui->doctorAddressEdit->setText(profile->Get("DoctorAddress"));
|
||||
ui->doctorPatientIDEdit->setText(profile->Get("DoctorPatientID"));
|
||||
ui->doctorNameEdit->setText(profile->doctor->name());
|
||||
ui->doctorPracticeEdit->setText(profile->doctor->practiceName());
|
||||
ui->doctorPhoneEdit->setText(profile->doctor->phone());
|
||||
ui->doctorEmailEdit->setText(profile->doctor->email());
|
||||
ui->doctorAddressEdit->setText(profile->doctor->address());
|
||||
ui->doctorPatientIDEdit->setText(profile->doctor->patiendID());
|
||||
|
||||
ui->DSTcheckbox->setChecked((*profile)["DST"].toBool());
|
||||
int i=ui->timezoneCombo->findData(profile->Get("TimeZone"));
|
||||
ui->DSTcheckbox->setChecked(profile->user->daylightSaving());
|
||||
int i=ui->timezoneCombo->findData(profile->user->timeZone());
|
||||
ui->timezoneCombo->setCurrentIndex(i);
|
||||
i=ui->countryCombo->findText(profile->Get("Country"));
|
||||
i=ui->countryCombo->findText(profile->user->country());
|
||||
ui->countryCombo->setCurrentIndex(i);
|
||||
|
||||
i=ui->heightCombo->findText(profile->Get("Units"));
|
||||
UnitSystem us=profile->general->unitSystem();
|
||||
i=(int)us - 1;
|
||||
if (i<0) i=0;
|
||||
ui->heightCombo->setCurrentIndex(i);
|
||||
|
||||
bool ok;
|
||||
double v=(*profile)["Height"].toDouble(&ok);
|
||||
if (!ok) v=0;
|
||||
double v=profile->user->height();
|
||||
|
||||
if (i==1) { // evil non-metric
|
||||
if (us==US_Archiac) { // evil non-metric
|
||||
int ti=v/2.54;
|
||||
int feet=ti / 12;
|
||||
int inches=ti % 12;
|
||||
@ -296,13 +298,13 @@ void NewProfile::edit(const QString name)
|
||||
ui->heightEdit2->setVisible(true);
|
||||
ui->heightEdit->setDecimals(0);
|
||||
ui->heightEdit2->setDecimals(0);
|
||||
ui->heightEdit->setSuffix(tr("ft")); // foot
|
||||
ui->heightEdit2->setSuffix(tr("\"")); // inches
|
||||
ui->heightEdit->setSuffix(STR_UNIT_FOOT); // foot
|
||||
ui->heightEdit2->setSuffix(STR_UNIT_INCH); // inches
|
||||
} else { // good wholesome metric
|
||||
ui->heightEdit->setValue(v);
|
||||
ui->heightEdit2->setVisible(false);
|
||||
ui->heightEdit->setDecimals(2);
|
||||
ui->heightEdit->setSuffix(tr("cm"));
|
||||
ui->heightEdit->setSuffix(STR_UNIT_CM);
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,16 +325,16 @@ void NewProfile::on_heightCombo_currentIndexChanged(int index)
|
||||
//metric
|
||||
ui->heightEdit2->setVisible(false);
|
||||
ui->heightEdit->setDecimals(2);
|
||||
ui->heightEdit->setSuffix(tr("cm"));
|
||||
ui->heightEdit->setSuffix(STR_UNIT_CM);
|
||||
double v=ui->heightEdit->value()*30.48;
|
||||
v+=ui->heightEdit2->value()*2.54;
|
||||
ui->heightEdit->setValue(v);
|
||||
} else { //evil
|
||||
ui->heightEdit->setDecimals(0);
|
||||
ui->heightEdit2->setDecimals(0);
|
||||
ui->heightEdit->setSuffix(tr("ft"));
|
||||
ui->heightEdit->setSuffix(STR_UNIT_FOOT);
|
||||
ui->heightEdit2->setVisible(true);
|
||||
ui->heightEdit2->setSuffix(tr("\""));
|
||||
ui->heightEdit2->setSuffix(STR_UNIT_INCH);
|
||||
int v=ui->heightEdit->value()/2.54;
|
||||
int feet=v / 12;
|
||||
int inches=v % 12;
|
||||
|
@ -24,7 +24,7 @@
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="welcomePage">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
|
10
overview.cpp
10
overview.cpp
@ -108,7 +108,7 @@ Overview::Overview(QWidget *parent,gGraphView * shared) :
|
||||
PULSE=createGraph(tr("Pulse Rate"),tr("Pulse Rate\n(bpm)"));
|
||||
SPO2=createGraph(tr("SpO2"),tr("Oxygen Saturation\n(%)"));
|
||||
|
||||
WEIGHT=createGraph(tr("Weight"),tr("Weight\n(kg)"),YT_Weight);
|
||||
WEIGHT=createGraph(tr("Weight"),tr("Weight"),YT_Weight);
|
||||
BMI=createGraph(tr("BMI"),tr("Body\nMass\nIndex"));
|
||||
ZOMBIE=createGraph(tr("Zombie"),tr("How you felt\n(0-10)"));
|
||||
|
||||
@ -234,7 +234,7 @@ Overview::~Overview()
|
||||
}
|
||||
gGraph * Overview::createGraph(QString name,QString units, YTickerType yttype)
|
||||
{
|
||||
int default_height=PROFILE["GraphHeight"].toInt();
|
||||
int default_height=PROFILE.appearance->graphHeight();
|
||||
gGraph *g=new gGraph(GraphView,name,units,default_height,0);
|
||||
|
||||
gYAxis *yt;
|
||||
@ -243,7 +243,7 @@ gGraph * Overview::createGraph(QString name,QString units, YTickerType yttype)
|
||||
yt=new gYAxisTime(true); // Time scale
|
||||
break;
|
||||
case YT_Weight:
|
||||
yt=new gYAxisWeight(unitSystem());
|
||||
yt=new gYAxisWeight(PROFILE.general->unitSystem());
|
||||
break;
|
||||
default:
|
||||
yt=new gYAxis(); // Plain numeric scale
|
||||
@ -263,8 +263,8 @@ void Overview::ReloadGraphs()
|
||||
ui->dateStart->setDate(p_profile->FirstDay());
|
||||
ui->dateEnd->setDate(p_profile->LastDay());
|
||||
GraphView->setDay(NULL);
|
||||
if (PROFILE.ExistsAndTrue("RebuildCache")) {
|
||||
PROFILE["RebuildCache"]=false;
|
||||
if (PROFILE.general->rebuildCache()) {
|
||||
PROFILE.general->setRebuildCache(false);
|
||||
mainwin->Notify(tr("Cache rebuild complete"));
|
||||
}
|
||||
}
|
||||
|
@ -22,11 +22,11 @@ extern QFont * bigfont;
|
||||
extern MainWindow * mainwin;
|
||||
|
||||
MaskProfile masks[]={
|
||||
{QObject::tr("Unspecified"),{{4,25},{8,25},{12,25},{16,25},{20,25}}},
|
||||
{QObject::tr("Nasal Pillows"),{{4,20},{8,29},{12,37},{16,43},{20,49}}},
|
||||
{QObject::tr("Hybrid F/F Mask"),{{4,20},{8,29},{12,37},{16,43},{20,49}}},
|
||||
{QObject::tr("Nasal Interface"),{{4,20},{8,29},{12,37},{16,43},{20,49}}},
|
||||
{QObject::tr("Full-Face Mask"),{{4,20},{8,29},{12,37},{16,43},{20,49}}},
|
||||
{Mask_Unknown,QObject::tr("Unspecified"),{{4,25},{8,25},{12,25},{16,25},{20,25}}},
|
||||
{Mask_NasalPillows,QObject::tr("Nasal Pillows"),{{4,20},{8,29},{12,37},{16,43},{20,49}}},
|
||||
{Mask_Hybrid,QObject::tr("Hybrid F/F Mask"),{{4,20},{8,29},{12,37},{16,43},{20,49}}},
|
||||
{Mask_StandardNasal,QObject::tr("Nasal Interface"),{{4,20},{8,29},{12,37},{16,43},{20,49}}},
|
||||
{Mask_FullFace,QObject::tr("Full-Face Mask"),{{4,20},{8,29},{12,37},{16,43},{20,49}}},
|
||||
};
|
||||
const int num_masks=sizeof(masks)/sizeof(MaskProfile);
|
||||
|
||||
@ -47,7 +47,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent,Profile * _profile) :
|
||||
ui->customEventGroupbox->setEnabled(false);
|
||||
|
||||
QString masktype=tr("Nasal Pillows");
|
||||
//masktype=PROFILE["MaskType"].toString();
|
||||
//masktype=PROFILEMaskType
|
||||
for (int i=0;i<num_masks;i++) {
|
||||
ui->maskTypeCombo->addItem(masks[i].name);
|
||||
|
||||
@ -104,34 +104,24 @@ PreferencesDialog::PreferencesDialog(QWidget *parent,Profile * _profile) :
|
||||
|
||||
bool ok;
|
||||
double v;
|
||||
v=(*profile)["SPO2DropPercentage"].toDouble(&ok);
|
||||
if (!ok) v=3;
|
||||
ui->spo2Drop->setValue(v);
|
||||
v=(*profile)["SPO2DropDuration"].toDouble(&ok);
|
||||
if (!ok) v=10;
|
||||
ui->spo2DropTime->setValue(v);
|
||||
v=(*profile)["PulseChangeBPM"].toDouble(&ok);
|
||||
if (!ok) v=8;
|
||||
ui->pulseChange->setValue(v);
|
||||
v=(*profile)["PulseChangeDuration"].toDouble(&ok);
|
||||
if (!ok) v=5;
|
||||
ui->pulseChangeTime->setValue(v);
|
||||
v=(*profile)["OxiDiscardThreshold"].toDouble(&ok);
|
||||
if (!ok) v=10;
|
||||
ui->oxiDiscardThreshold->setValue(v);
|
||||
ui->spo2Drop->setValue(profile->oxi->spO2DropPercentage());
|
||||
ui->spo2DropTime->setValue(profile->oxi->spO2DropDuration());
|
||||
ui->pulseChange->setValue(profile->oxi->pulseChangeBPM());
|
||||
ui->pulseChangeTime->setValue(profile->oxi->pulseChangeDuration());
|
||||
ui->oxiDiscardThreshold->setValue(profile->oxi->oxiDiscardThreshold());
|
||||
|
||||
QTime t=(*profile)["DaySplitTime"].toTime();
|
||||
ui->timeEdit->setTime(t);
|
||||
int val;
|
||||
|
||||
val=(*profile)["CombineCloserSessions"].toInt();
|
||||
ui->timeEdit->setTime(profile->session->daySplitTime());
|
||||
int val=profile->session->combineCloseSessions();
|
||||
ui->combineSlider->setValue(val);
|
||||
if (val>0) {
|
||||
ui->combineLCD->display(val);
|
||||
} else ui->combineLCD->display(tr("OFF"));
|
||||
|
||||
val=(*profile)["IgnoreShorterSessions"].toInt();
|
||||
val=profile->session->ignoreShortSessions();
|
||||
ui->IgnoreSlider->setValue(val);
|
||||
if (val>0) {
|
||||
ui->IgnoreLCD->display(val);
|
||||
} else ui->IgnoreLCD->display(tr("OFF"));
|
||||
|
||||
ui->applicationFont->setCurrentFont(QApplication::font());
|
||||
//ui->applicationFont->setFont(QApplication::font());
|
||||
@ -157,63 +147,37 @@ PreferencesDialog::PreferencesDialog(QWidget *parent,Profile * _profile) :
|
||||
ui->bigFontBold->setChecked(bigfont->weight()==QFont::Bold);
|
||||
ui->bigFontItalic->setChecked(bigfont->italic());
|
||||
|
||||
//if (!(*profile).Exists("SkipEmptyDays")) (*profile)["SkipEmptyDays"]=true;
|
||||
//ui->skipEmptyDays->setChecked((*profile)["SkipEmptyDays"].toBool());
|
||||
ui->startedUsingMask->setDate(profile->cpap->maskStartDate());
|
||||
|
||||
general.clear();
|
||||
general["UseAntiAliasing"]=Preference(p_profile,"UseAntiAliasing",PT_Checkbox,tr("Use Anti-Aliasing"),tr("Enable Graphical smoothing. Doesn't always look pretty."),false);
|
||||
general["SquareWavePlots"]=Preference(p_profile,"SquareWavePlots",PT_Checkbox,tr("Square Wave Plots"),tr("Try to use Square Wave plots where possible"),true);
|
||||
general["EnableGraphSnapshots"]=Preference(p_profile,"EnableGraphSnapshots",PT_Checkbox,tr("Event Breakdown Piechart"),tr("Shows Event Breakdown in Daily view. This may cause problems on older computers."),true);
|
||||
general["SkipLoginScreen"]=Preference(p_pref,"SkipLoginScreen",PT_Checkbox,tr("Skip Login Screen"),tr("Bypass the login screen at startup"),false);
|
||||
general["SkipEmptyDays"]=Preference(p_profile,"SkipEmptyDays",PT_Checkbox,tr("Skip Empty Days"),tr("Skip over calendar days that don't have any data"),true);
|
||||
general["EnableMultithreading"]=Preference(p_profile,"EnableMultithreading",PT_Checkbox,tr("Enable Multithreading"),tr("Try to use extra processor cores where possible"),false);
|
||||
general["MemoryHog"]=Preference(p_profile,"MemoryHog",PT_Checkbox,tr("Cache Session Data"),tr("Keep session data in memory to improve load speed revisiting the date."),false);
|
||||
general["GraphHeight"]=Preference(p_profile,"GraphHeight",PT_Spinbox,tr("Graph Height"),tr("Default Graph Height"),160);
|
||||
general["MaskDescription"]=Preference(p_profile,"MaskDescription",PT_LineEdit,tr("Mask Description"),tr("Whatever you want to record about your mask."),QString());
|
||||
general["HighResPrinting"]=Preference(p_profile,"HighResPrinting",PT_Checkbox,tr("High Resolution Printing"),tr("Use much slower but better quality high resolution printing."),true);
|
||||
general["AnimationsAndTransitions"]=Preference(p_profile,"AnimationsAndTransitions",PT_Checkbox,tr("Animations and Transitions"),tr("Make empty graph pages, and switching days more attractive."),false);
|
||||
general["ShowCompliance"]=Preference(p_profile,"ShowCompliance",PT_Checkbox,tr("Show Compliance Information"),tr("Allow compliance information to be shown."),true);
|
||||
general["ComplianceHours"]=Preference(p_profile,"ComplianceHours",PT_Spinbox,tr("Compliance Hours"),tr("Regard days over this combined session length as compliant."),4.0);
|
||||
ui->leakModeCombo->setCurrentIndex(profile->cpap->leakMode());
|
||||
|
||||
if (!(p_profile)->Exists("MaskStartDate")) {
|
||||
(PROFILE["MaskStartDate"]=PROFILE.FirstDay());
|
||||
}
|
||||
ui->startedUsingMask->setDate((*profile)["MaskStartDate"].toDate());
|
||||
|
||||
if (!(p_profile)->Exists("ShowLeaksMode")) {
|
||||
PROFILE["ShowLeaksMode"]=0;
|
||||
}
|
||||
ui->leakModeCombo->setCurrentIndex((*profile)["ShowLeaksMode"].toInt());
|
||||
if (!(p_profile)->Exists("MaskType")) {
|
||||
PROFILE["MaskType"]=0;
|
||||
}
|
||||
int mt=(*profile)["MaskType"].toInt();
|
||||
int mt=(int)profile->cpap->maskType();
|
||||
ui->maskTypeCombo->setCurrentIndex(mt);
|
||||
on_maskTypeCombo_activated(mt);
|
||||
|
||||
|
||||
ui->maskDescription->setText(general["MaskDescription"].value().toString());
|
||||
ui->maskDescription->setText(profile->cpap->maskDescription());
|
||||
ui->useAntiAliasing->setChecked(profile->appearance->antiAliasing());
|
||||
ui->useSquareWavePlots->setChecked(profile->appearance->squareWavePlots());
|
||||
ui->enableGraphSnapshots->setChecked(profile->appearance->graphSnapshots());
|
||||
ui->skipLoginScreen->setChecked(PREF["SkipLoginScreen"].toBool());
|
||||
|
||||
ui->useAntiAliasing->setChecked(general["UseAntiAliasing"].value().toBool());
|
||||
ui->useSquareWavePlots->setChecked(general["SquareWavePlots"].value().toBool());
|
||||
ui->enableGraphSnapshots->setChecked(general["EnableGraphSnapshots"].value().toBool());
|
||||
ui->skipLoginScreen->setChecked(general["SkipLoginScreen"].value().toBool());
|
||||
ui->skipEmptyDays->setChecked(general["SkipEmptyDays"].value().toBool());
|
||||
ui->enableMultithreading->setChecked(general["EnableMultithreading"].value().toBool());
|
||||
ui->cacheSessionData->setChecked(general["MemoryHog"].value().toBool());
|
||||
ui->animationsAndTransitionsCheckbox->setChecked(general["AnimationsAndTransitions"].value().toBool());
|
||||
ui->complianceGroupbox->setChecked(general["ShowCompliance"].value().toBool());
|
||||
ui->complianceHours->setValue(general["ComplianceHours"].value().toDouble());
|
||||
ui->skipEmptyDays->setChecked(profile->general->skipEmptyDays());
|
||||
ui->enableMultithreading->setChecked(profile->session->multithreading());
|
||||
ui->cacheSessionData->setChecked(profile->session->cacheSessions());
|
||||
ui->animationsAndTransitionsCheckbox->setChecked(profile->appearance->animations());
|
||||
ui->complianceGroupbox->setChecked(profile->cpap->showComplianceInfo());
|
||||
ui->complianceHours->setValue(profile->cpap->complianceHours());
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
general["HighResPrinting"].setValue(true);
|
||||
profile->appearance->setHighResPrinting(true);
|
||||
ui->highResolutionPrinting->setChecked(true);
|
||||
ui->highResolutionPrinting->setEnabled(false);
|
||||
#else
|
||||
ui->highResolutionPrinting->setChecked(general["HighResPrinting"].value().toBool());
|
||||
ui->highResolutionPrinting->setChecked(profile->appearance->highResPrinting());
|
||||
#endif
|
||||
|
||||
ui->graphHeight->setValue(general["GraphHeight"].value().toInt());
|
||||
ui->graphHeight->setValue(profile->appearance->graphHeight());
|
||||
|
||||
if (!PREF.Exists("Updates_AutoCheck")) PREF["Updates_AutoCheck"]=true;
|
||||
ui->automaticallyCheckUpdates->setChecked(PREF["Updates_AutoCheck"].toBool());
|
||||
@ -224,20 +188,12 @@ PreferencesDialog::PreferencesDialog(QWidget *parent,Profile * _profile) :
|
||||
RefreshLastChecked();
|
||||
} else ui->updateLastChecked->setText("Never");
|
||||
|
||||
if (val>0) {
|
||||
ui->IgnoreLCD->display(val);
|
||||
} else ui->IgnoreLCD->display(tr("OFF"));
|
||||
|
||||
ui->overlayFlagsCombo->setCurrentIndex((*profile)["AlwaysShowOverlayBars"].toInt());
|
||||
ui->overlayFlagsCombo->setCurrentIndex(profile->appearance->overlayType());
|
||||
|
||||
//ui->memoryHogCheckbox->setChecked((*profile)["MemoryHog"].toBool());
|
||||
|
||||
//ui->intentionalLeakEdit->setValue((*profile)["IntentionalLeak"].toDouble());
|
||||
//ui->useMultithreading->setChecked((*profile)["EnableMultithreading"].toBool());
|
||||
|
||||
ui->oximetryGroupBox->setChecked((*profile)["EnableOximetry"].toBool());
|
||||
ui->oximetrySync->setChecked((*profile)["SyncOximetry"].toBool());
|
||||
int ot=ui->oximetryType->findText((*profile)["OximeterType"].toString(),Qt::MatchExactly);
|
||||
ui->oximetryGroupBox->setChecked(profile->oxi->oximetryEnabled());
|
||||
ui->oximetrySync->setChecked(profile->oxi->syncOximetry());
|
||||
int ot=ui->oximetryType->findText(profile->oxi->oximeterType(),Qt::MatchExactly);
|
||||
if (ot<0) ot=0;
|
||||
ui->oximetryType->setCurrentIndex(ot);
|
||||
|
||||
@ -320,81 +276,67 @@ void PreferencesDialog::Save()
|
||||
{
|
||||
bool needs_restart=false;
|
||||
|
||||
general["UseAntiAliasing"].setValue(ui->useAntiAliasing->isChecked());
|
||||
if (ui->useSquareWavePlots->isChecked()!=general["SquareWavePlots"].value().toBool()) {
|
||||
general["SquareWavePlots"].setValue(ui->useSquareWavePlots->isChecked());
|
||||
profile->appearance->setAnimations(ui->useAntiAliasing->isChecked());
|
||||
if (ui->useSquareWavePlots->isChecked()!=profile->appearance->squareWavePlots()) {
|
||||
profile->appearance->setSquareWavePlots(ui->useSquareWavePlots->isChecked());
|
||||
needs_restart=true;
|
||||
}
|
||||
general["EnableGraphSnapshots"].setValue(ui->enableGraphSnapshots->isChecked());
|
||||
general["SkipLoginScreen"].setValue(ui->skipLoginScreen->isChecked());
|
||||
general["SkipEmptyDays"].setValue(ui->skipEmptyDays->isChecked());
|
||||
general["EnableMultithreading"].setValue(ui->enableMultithreading->isChecked());
|
||||
general["MemoryHog"].setValue(ui->cacheSessionData->isChecked());
|
||||
general["MaskDescription"].setValue(ui->maskDescription->text());
|
||||
general["HighResPrinting"].setValue(ui->highResolutionPrinting->isChecked());
|
||||
general["AnimationsAndTransitions"].setValue(ui->animationsAndTransitionsCheckbox->isChecked());
|
||||
profile->appearance->setGraphSnapshots(ui->enableGraphSnapshots->isChecked());
|
||||
profile->general->setSkipEmptyDays(ui->skipEmptyDays->isChecked());
|
||||
profile->session->setMultithreading(ui->enableMultithreading->isChecked());
|
||||
profile->session->setCacheSessions(ui->cacheSessionData->isChecked());
|
||||
profile->cpap->setMaskDescription(ui->maskDescription->text());
|
||||
profile->appearance->setHighResPrinting(ui->highResolutionPrinting->isChecked());
|
||||
profile->appearance->setAnimations(ui->animationsAndTransitionsCheckbox->isChecked());
|
||||
|
||||
general["ShowCompliance"].setValue(ui->complianceGroupbox->isChecked());
|
||||
general["ComplianceHours"].setValue(ui->complianceHours->value());
|
||||
profile->cpap->setShowComplianceInfo(ui->complianceGroupbox->isChecked());
|
||||
profile->cpap->setComplianceHours(ui->complianceHours->value());
|
||||
|
||||
(*profile)["MaskStartDate"]=ui->startedUsingMask->date();
|
||||
(*profile)["GraphHeight"]=ui->graphHeight->value();
|
||||
profile->cpap->setMaskStartDate(ui->startedUsingMask->date());
|
||||
profile->appearance->setGraphHeight(ui->graphHeight->value());
|
||||
|
||||
if (((*profile)["DaySplitTime"].toTime()!=ui->timeEdit->time()) ||
|
||||
((*profile)["CombineCloserSessions"].toInt()!=ui->combineSlider->value()) ||
|
||||
((*profile)["IgnoreShorterSessions"].toInt()!=ui->IgnoreSlider->value())) {
|
||||
PROFILE["TrashDayCache"]=true;
|
||||
if ((profile->session->daySplitTime()!=ui->timeEdit->time()) ||
|
||||
(profile->session->combineCloseSessions()!=ui->combineSlider->value()) ||
|
||||
(profile->session->ignoreShortSessions()!=ui->IgnoreSlider->value())) {
|
||||
profile->session->setTrashDayCache(true);
|
||||
needs_restart=true;
|
||||
} else PROFILE["TrashDayCache"]=false;
|
||||
} else profile->session->setTrashDayCache(false);
|
||||
|
||||
(*profile)["CombineCloserSessions"]=ui->combineSlider->value();
|
||||
(*profile)["IgnoreShorterSessions"]=ui->IgnoreSlider->value();
|
||||
(*profile)["DaySplitTime"]=ui->timeEdit->time();
|
||||
profile->session->setCombineCloseSessions(ui->combineSlider->value());
|
||||
profile->session->setIgnoreShortSessions(ui->IgnoreSlider->value());
|
||||
profile->session->setDaySplitTime(ui->timeEdit->time());
|
||||
|
||||
(*profile)["AlwaysShowOverlayBars"]=ui->overlayFlagsCombo->currentIndex();
|
||||
(*profile)["ShowLeaksMode"]=ui->leakModeCombo->currentIndex();
|
||||
(*profile)["MaskType"]=ui->maskTypeCombo->currentIndex();
|
||||
//(*profile)["UseAntiAliasing"]=ui->genOpWidget->item(0)->checkState()==Qt::Checked;
|
||||
//(*profile)["MemoryHog"]=ui->memoryHogCheckbox->isChecked();
|
||||
//(*profile)["EnableGraphSnapshots"]=ui->genOpWidget->item(2)->checkState()==Qt::Checked;
|
||||
profile->appearance->setOverlayType((OverlayDisplayType)ui->overlayFlagsCombo->currentIndex());
|
||||
profile->cpap->setLeakMode(ui->leakModeCombo->currentIndex());
|
||||
profile->cpap->setMaskType((MaskType)ui->maskTypeCombo->currentIndex());
|
||||
|
||||
|
||||
//(*profile)["IntentionalLeak"]=ui->intentionalLeakEdit->value();
|
||||
//(*profile)["EnableMultithreading"]=ui->useMultithreading->isChecked();
|
||||
(*profile)["EnableOximetry"]=ui->oximetryGroupBox->isChecked();
|
||||
(*profile)["SyncOximetry"]=ui->oximetrySync->isChecked();
|
||||
profile->oxi->setOximetryEnabled(ui->oximetryGroupBox->isChecked());
|
||||
profile->oxi->setSyncOximetry(ui->oximetrySync->isChecked());
|
||||
int oxigrp=ui->oximetrySync->isChecked() ? 0 : 1;
|
||||
gGraphView *gv=mainwin->getDaily()->graphView();
|
||||
gGraph *g=gv->findGraph("Pulse");
|
||||
gGraph *g=gv->findGraph(tr("Pulse"));
|
||||
if (g) {
|
||||
g->setGroup(oxigrp);
|
||||
}
|
||||
g=gv->findGraph("SpO2");
|
||||
g=gv->findGraph(tr("SpO2"));
|
||||
if (g) {
|
||||
g->setGroup(oxigrp);
|
||||
}
|
||||
g=gv->findGraph("Plethy");
|
||||
g=gv->findGraph(tr("Plethy"));
|
||||
if (g) {
|
||||
g->setGroup(oxigrp);
|
||||
}
|
||||
|
||||
(*profile)["OximeterType"]=ui->oximetryType->currentText();
|
||||
profile->oxi->setOximeterType(ui->oximetryType->currentText());
|
||||
|
||||
(*profile)["SPO2DropPercentage"]=ui->spo2Drop->value();
|
||||
(*profile)["SPO2DropDuration"]=ui->spo2DropTime->value();
|
||||
(*profile)["PulseChangeBPM"]=ui->pulseChange->value();
|
||||
(*profile)["PulseChangeDuration"]=ui->pulseChangeTime->value();
|
||||
(*profile)["OxiDiscardThreshold"]=ui->oxiDiscardThreshold->value();
|
||||
profile->oxi->setSpO2DropPercentage(ui->spo2Drop->value());
|
||||
profile->oxi->setSpO2DropDuration(ui->spo2DropTime->value());
|
||||
profile->oxi->setPulseChangeBPM(ui->pulseChange->value());
|
||||
profile->oxi->setPulseChangeDuration(ui->pulseChangeTime->value());
|
||||
profile->oxi->setOxiDiscardThreshold(ui->oxiDiscardThreshold->value());
|
||||
|
||||
//PREF["SkipLoginScreen"]=ui->skipLoginScreen->isChecked();
|
||||
PREF["SkipLoginScreen"]=ui->skipLoginScreen->isChecked();
|
||||
|
||||
//ui->genOpWidget->item(1)->checkState()==Qt::Checked ? true : false;
|
||||
//if ((ui->genOpWidget->item(1)->checkState()==Qt::Checked) != (*profile)["SquareWavePlots"].toBool()) {
|
||||
//needs_restart=true;
|
||||
//}
|
||||
//(*profile)["SquareWavePlots"]=ui->genOpWidget->item(1)->checkState()==Qt::Checked;
|
||||
|
||||
//(*profile)["SkipEmptyDays"]=ui->skipEmptyDays->isChecked();
|
||||
PREF["Updates_AutoCheck"]=ui->automaticallyCheckUpdates->isChecked();
|
||||
PREF["Updates_CheckFrequency"]=ui->updateCheckEvery->value();
|
||||
|
||||
|
@ -39,6 +39,7 @@ protected:
|
||||
\brief This in still a work in progress, and may be used in Unintentional leaks calculations.
|
||||
*/
|
||||
struct MaskProfile {
|
||||
MaskType type;
|
||||
QString name;
|
||||
EventDataType pflow[5][2];
|
||||
};
|
||||
@ -97,7 +98,6 @@ private:
|
||||
QStringListModel *importModel;
|
||||
MySortFilterProxyModel *graphFilterModel;
|
||||
QStandardItemModel *graphModel;
|
||||
QHash<QString,Preference> general;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user