mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 11:10:44 +00:00
More consistant legend marker, Added Te & Ti definitions to channels.xml
This commit is contained in:
parent
431cbadb1f
commit
9635b991cf
@ -131,6 +131,12 @@ void GetTextExtent(QString text, int & width, int & height, QFont *font)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int GetXHeight(QFont *font)
|
||||||
|
{
|
||||||
|
QFontMetrics fm(*font);
|
||||||
|
return fm.xHeight();
|
||||||
|
}
|
||||||
|
|
||||||
GLBuffer::GLBuffer(int max,int type, bool stippled)
|
GLBuffer::GLBuffer(int max,int type, bool stippled)
|
||||||
:m_max(max), m_type(type), m_stippled(stippled)
|
:m_max(max), m_type(type), m_stippled(stippled)
|
||||||
{
|
{
|
||||||
|
@ -45,6 +45,9 @@ extern QHash<QString, QImage *> images;
|
|||||||
*/
|
*/
|
||||||
void GetTextExtent(QString text, int & width, int & height, QFont *font=defaultfont);
|
void GetTextExtent(QString text, int & width, int & height, QFont *font=defaultfont);
|
||||||
|
|
||||||
|
//! \brief Return the height of the letter x for the selected font.
|
||||||
|
int GetXHeight(QFont *font=defaultfont);
|
||||||
|
|
||||||
class gGraphView;
|
class gGraphView;
|
||||||
class gGraph;
|
class gGraph;
|
||||||
|
|
||||||
|
@ -510,11 +510,12 @@ void gLineChart::paint(gGraph & w,int left, int top, int width, int height)
|
|||||||
GetTextExtent(text,wid,hi);
|
GetTextExtent(text,wid,hi);
|
||||||
legendx-=wid;
|
legendx-=wid;
|
||||||
w.renderText(text,legendx,top-4);
|
w.renderText(text,legendx,top-4);
|
||||||
int bw=hi;
|
int bw=GetXHeight();
|
||||||
legendx-=hi/2;
|
legendx-=bw/2;
|
||||||
|
|
||||||
w.quads()->add(legendx-bw,top-4,legendx,top-4,legendx,top-bw,legendx-bw,top-bw,m_line_color);
|
int tp=top-5-bw/2;
|
||||||
legendx-=hi+hi/2;
|
w.quads()->add(legendx-bw,tp+bw/2,legendx,tp+bw/2,legendx,tp-bw/2,legendx-bw,tp-bw/2,m_line_color);
|
||||||
|
legendx-=hi+bw/2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!total_points) { // No Data?
|
if (!total_points) { // No Data?
|
||||||
|
@ -39,8 +39,8 @@ Important: One id code per item, DO NOT CHANGE ID NUMBERS!!!
|
|||||||
<channel id="0x1107" class="data" name="PTB" details="Patient Triggered Breaths" label="Pat. Trig. Breaths" unit="%" color="dark grey"/>
|
<channel id="0x1107" class="data" name="PTB" details="Patient Triggered Breaths" label="Pat. Trig. Breaths" unit="%" color="dark grey"/>
|
||||||
<channel id="0x1108" class="data" name="Leak" details="Leak Rate" label="Leaks" unit="L/min" color="dark green"/>
|
<channel id="0x1108" class="data" name="Leak" details="Leak Rate" label="Leaks" unit="L/min" color="dark green"/>
|
||||||
<channel id="0x1109" class="data" name="IE" details="Inspiratory:Expiratory" label="I:E" unit="ratio" color="dark red"/>
|
<channel id="0x1109" class="data" name="IE" details="Inspiratory:Expiratory" label="I:E" unit="ratio" color="dark red"/>
|
||||||
<channel id="0x110a" class="data" name="Te" details="Te" label="Te" unit="" color="dark green"/>
|
<channel id="0x110a" class="data" name="Te" details="Expiratory Time" label="Te" unit="" color="dark green"/>
|
||||||
<channel id="0x110b" class="data" name="Ti" details="Ti" label="Ti" unit="" color="dark blue"/>
|
<channel id="0x110b" class="data" name="Ti" details="Inspiratory Time" label="Ti" unit="" color="dark blue"/>
|
||||||
<channel id="0x110c" class="data" name="Pressure" details="Pressure" label="Pressure" unit="cmH20" color="dark green"/>
|
<channel id="0x110c" class="data" name="Pressure" details="Pressure" label="Pressure" unit="cmH20" color="dark green"/>
|
||||||
<channel id="0x110d" class="data" name="IPAP" details="Inspiratory Pressure" label="IPAP" unit="cmH20" color="orange"/>
|
<channel id="0x110d" class="data" name="IPAP" details="Inspiratory Pressure" label="IPAP" unit="cmH20" color="orange"/>
|
||||||
<channel id="0x110e" class="data" name="EPAP" details="Expiratory Pressure" label="EPAP" unit="cmH20" color="light blue"/>
|
<channel id="0x110e" class="data" name="EPAP" details="Expiratory Pressure" label="EPAP" unit="cmH20" color="light blue"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user