mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 19:20:45 +00:00
XTicker alignment fix attemp #1
This commit is contained in:
parent
fb9143ef8f
commit
83de75c3df
@ -388,6 +388,7 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event)
|
|||||||
|
|
||||||
day=m_days[zd];
|
day=m_days[zd];
|
||||||
|
|
||||||
|
QString z=dt.toString(Qt::SystemLocaleShortDate);
|
||||||
|
|
||||||
// Day * day=m_days[hl_day];
|
// Day * day=m_days[hl_day];
|
||||||
//EventDataType val;
|
//EventDataType val;
|
||||||
@ -399,12 +400,34 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event)
|
|||||||
int m=(t / 60) % 60;
|
int m=(t / 60) % 60;
|
||||||
int s=t % 60;
|
int s=t % 60;
|
||||||
val.sprintf("%02i:%02i",h,m);
|
val.sprintf("%02i:%02i",h,m);
|
||||||
} else val=QString::number(d.value()[0],'f',2);
|
} else
|
||||||
|
val=QString::number(d.value()[0],'f',2);
|
||||||
|
z+="\r\n"+m_label+"="+val;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
val=QString::number(d.value()[1],'f',2);
|
QString a;
|
||||||
|
for (int i=0;i<m_type.size();i++) {
|
||||||
|
switch(m_type[i]) {
|
||||||
|
case ST_WAVG: a="W-avg"; break;
|
||||||
|
case ST_AVG: a="Avg"; break;
|
||||||
|
case ST_90P: a="90%"; break;
|
||||||
|
case ST_MIN: a="Min"; break;
|
||||||
|
case ST_MAX: a="Max"; break;
|
||||||
|
case ST_CPH: a=""; break;
|
||||||
|
case ST_SPH: a="%"; break;
|
||||||
|
case ST_HOURS: a="Hours"; break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (day && day->channelExists(m_codes[i])) {
|
||||||
|
schema::Channel & chan=schema::channel[m_codes[i]];
|
||||||
|
val=QString::number(d.value()[i+1],'f',2);
|
||||||
|
z+="\r\n"+chan.label()+" "+a+"="+val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString z=dt.toString(Qt::SystemLocaleShortDate)+"\r\n"+m_label+"="+val;//+"\nAHI="+QString::number(day->cph(CPAP_AHI));
|
|
||||||
graph->ToolTip(z,x,y,2200);
|
graph->ToolTip(z,x,y,2200);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -168,7 +168,7 @@ void gXAxis::paint(gGraph & w,int left,int top, int width, int height)
|
|||||||
if (!m_utcfix) j+=tz_offset;
|
if (!m_utcfix) j+=tz_offset;
|
||||||
int ms=j % 1000;
|
int ms=j % 1000;
|
||||||
int m=(j/60000L) % 60L;
|
int m=(j/60000L) % 60L;
|
||||||
int h=((j/3600000L)-utcoff) % 24L;
|
int h=(j/3600000L) % 24L;
|
||||||
int s=(j/1000L) % 60L;
|
int s=(j/1000L) % 60L;
|
||||||
static QString dow[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
|
static QString dow[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
|
||||||
int d=(j/86400000) % 7;
|
int d=(j/86400000) % 7;
|
||||||
|
@ -338,14 +338,12 @@ bool Day::channelExists(ChannelID id)
|
|||||||
}
|
}
|
||||||
bool Day::channelHasData(ChannelID id)
|
bool Day::channelHasData(ChannelID id)
|
||||||
{
|
{
|
||||||
bool r=false;
|
|
||||||
for (int i=0;i<sessions.size();i++) {
|
for (int i=0;i<sessions.size();i++) {
|
||||||
if (sessions[i]->channelExists(id)) {
|
if (!sessions[i]->channelExists(id)) {
|
||||||
r=true;
|
return false;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return r;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Day::OpenEvents()
|
void Day::OpenEvents()
|
||||||
|
Loading…
Reference in New Issue
Block a user