Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 5ffe4bb5 authored by Frédéric Larue's avatar Frédéric Larue
Browse files

FunctionGraphWidget display now modified when disabled.

parent 322efecf
......@@ -48,6 +48,8 @@ void FunctionGraphWidget::paintEvent( QPaintEvent *evt )
{
if( !m_FuncValues.empty() )
{
QColor color = this->palette().windowText().color();
QPolygonF polyPoints( m_FuncValues.size()+2 );
for( int i=0; i<m_FuncValues.size(); ++i )
{
......@@ -66,6 +68,7 @@ void FunctionGraphWidget::paintEvent( QPaintEvent *evt )
painter.begin( this );
// Background grid.
painter.setOpacity( 0.1f );
painter.setPen( QPen(QBrush(color),1.0f) );
for( int i=0; i<4; ++i )
{
float y = 0.25f*i * (height()-1);
......@@ -76,15 +79,15 @@ void FunctionGraphWidget::paintEvent( QPaintEvent *evt )
// Function curve.
painter.setOpacity( 0.1f );
painter.fillPath( polyPath, QBrush(QColor("black")) );
painter.fillPath( polyPath, QBrush(color) );
painter.setOpacity( 0.5f );
painter.setPen( QPen(QBrush(QColor("black")),1.0f) );
painter.setPen( QPen(QBrush(color),1.0f) );
painter.drawPolyline( &polyPoints[0], m_FuncValues.size() );
// Axis.
painter.setOpacity( 1.0f );
painter.setPen( QPen(QBrush(QColor("black")),1.0f) );
painter.setPen( QPen(QBrush(color),1.0f) );
painter.drawLine( 0, 0, 0, height()-1 );
painter.drawLine( 0, height()-1, width()-1, height()-1 );
......@@ -101,7 +104,7 @@ void FunctionGraphWidget::paintEvent( QPaintEvent *evt )
QFontMetrics fm( font() );
int labelW = fm.width( m_Label );
painter.setPen( QPen(QBrush(QColor("black")),1.0f) );
painter.setPen( QPen(QBrush(color),1.0f) );
painter.drawText( (width()-labelW)>>1, 2+fm.height(), m_Label );
painter.end();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment