Skip to content

Commit

Permalink
Update qgsgpsinformationwidget.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
bettellam authored Aug 10, 2024
1 parent fb0514c commit d834f26
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app/gps/qgsgpsinformationwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ void QgsGpsInformationWidget::displayGPSInformation( const QgsGpsInformation &in
QColor bg( Qt::white ); // moved several items outside of the following if block to minimize loop time
bg.setAlpha( 200 );
QColor myColor;
QColor penColor;

// Add a marker to the polar plot
if ( currentInfo.id > 0 ) // don't show satellite if id=0 (no satellite indication)
Expand Down Expand Up @@ -446,20 +447,21 @@ void QgsGpsInformationWidget::displayGPSInformation( const QgsGpsInformation &in
symbolStyle = QwtSymbol::Ellipse; // N, S;
myColor = Qt::gray;
}
penColor = myColor;
symbolBrush = QBrush( myColor );

if ( currentInfo.signal < 30 ) //weak signal
{
myColor = Qt::red;
penColor = Qt::red; // red border
}
if ( currentInfo.inUse )
{
myColor = Qt::black;
penColor = Qt::black; // black border
}

#if (QWT_POLAR_VERSION<0x010000)
mypMarker->setSymbol( QwtSymbol( symbolStyle,
symbolBrush, QPen( myColor ), markerSize ) );
symbolBrush, QPen( penColor ), markerSize ) );
#else
mypMarker->setSymbol( new QwtSymbol( symbolStyle,
symbolBrush, QPen( myColor ), markerSize ) );
Expand Down

0 comments on commit d834f26

Please sign in to comment.