mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 12:10:43 +00:00
Fix Overview SummaryChart glitch showing bad codes, icon update
This commit is contained in:
parent
6f5ac14bd3
commit
f4600395c9
@ -44,6 +44,7 @@ void SummaryChart::SetDay(Day * nullday)
|
||||
m_times.clear();
|
||||
m_days.clear();
|
||||
m_hours.clear();
|
||||
m_badcodes.clear();
|
||||
m_miny=999999999;
|
||||
m_maxy=-999999999;
|
||||
m_minx=0;
|
||||
@ -105,7 +106,8 @@ void SummaryChart::SetDay(Day * nullday)
|
||||
for (int i=0;i<d.value().size();i++) { // for each day
|
||||
day=d.value()[i];
|
||||
if (day->machine_type()!=m_machinetype) continue;
|
||||
if (type==ST_HOURS || type==ST_SESSIONS || day->channelHasData(code) || day->settingExists(code)) { // too many lookups happening here.. stop the crap..
|
||||
bool hascode=day->channelHasData(code) || day->settingExists(code);
|
||||
if (type==ST_HOURS || type==ST_SESSIONS || hascode) { // too many lookups happening here.. stop the crap..
|
||||
m_days[dn]=day;
|
||||
switch(m_type[j]) {
|
||||
case ST_AVG: tmp=day->avg(code); break;
|
||||
@ -139,6 +141,8 @@ void SummaryChart::SetDay(Day * nullday)
|
||||
break;
|
||||
// }
|
||||
|
||||
} else {
|
||||
m_badcodes[code]=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -430,6 +434,7 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
|
||||
|
||||
for (int j=0;j<m_codes.size();j++) {
|
||||
if (totalcounts[j]==0) continue;
|
||||
if (m_badcodes.contains(m_codes[j])) continue;
|
||||
a=schema::channel[m_codes[j]].label();
|
||||
a+=" ";
|
||||
switch(m_type[j]) {
|
||||
|
@ -33,6 +33,7 @@ class SummaryChart:public Layer
|
||||
|
||||
QVector<QColor> m_colors;
|
||||
QVector<ChannelID> m_codes;
|
||||
QHash<ChannelID,char> m_badcodes;
|
||||
QVector<SummaryType> m_type;
|
||||
QHash<int,QHash<short,EventDataType> > m_values;
|
||||
QHash<int,QHash<short,EventDataType> > m_times;
|
||||
|
@ -201,8 +201,8 @@ Daily::Daily(QWidget *parent,gGraphView * shared, MainWindow *mw)
|
||||
MP->AddLayer(AddCPAP(new gLineChart(CPAP_MaskPressure,Qt::blue,false)));
|
||||
RR->AddLayer(AddCPAP(new gLineChart(CPAP_RespRate,Qt::darkMagenta,square)));
|
||||
MV->AddLayer(AddCPAP(new gLineChart(CPAP_MinuteVent,Qt::darkCyan,square)));
|
||||
TV->AddLayer(AddCPAP(new gLineChart(CPAP_TidalVolume,Qt::yellow,square)));
|
||||
TV->AddLayer(AddCPAP(new gLineChart("TidalVolume2",Qt::magenta,square)));
|
||||
TV->AddLayer(AddCPAP(new gLineChart(CPAP_TidalVolume,Qt::magenta,square)));
|
||||
//TV->AddLayer(AddCPAP(new gLineChart("TidalVolume2",Qt::magenta,square)));
|
||||
FLG->AddLayer(AddCPAP(new gLineChart(CPAP_FLG,Qt::darkBlue,true)));
|
||||
//RE->AddLayer(AddCPAP(new gLineChart(CPAP_RespiratoryEvent,Qt::magenta,true)));
|
||||
IE->AddLayer(AddCPAP(new gLineChart(CPAP_IE,Qt::darkRed,square)));
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.8 KiB |
Loading…
Reference in New Issue
Block a user