Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_knob.cpp


Ignore:
Timestamp:
Mar 19, 2021, 9:15:03 AM (3 years ago)
Author:
stoecker
Message:

update to qwt verion 6.1.1 to fix build with newer Qt5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_knob.cpp

    r8127 r9383  
    120120    setValue( 0.0 );
    121121
    122     setSizePolicy( QSizePolicy::MinimumExpanding, 
     122    setSizePolicy( QSizePolicy::MinimumExpanding,
    123123        QSizePolicy::MinimumExpanding );
    124124}
     
    131131
    132132/*!
    133   \brief Set the knob type 
     133  \brief Set the knob type
    134134
    135135  \param knobStyle Knob type
     
    186186  have to be set using setNumTurns().
    187187
    188   The default angle is 270 degrees. 
     188  The default angle is 270 degrees.
    189189
    190190  \sa totalAngle(), setNumTurns()
     
    206206}
    207207
    208 /*! 
     208/*!
    209209  \return the total angle
    210210  \sa setTotalAngle(), setNumTurns(), numTurns()
     
    223223  \sa numTurns(), totalAngle(), setTotalAngle()
    224224*/
    225  
     225
    226226void QwtKnob::setNumTurns( int numTurns )
    227227{
     
    245245
    246246/*!
    247   \return Number of turns. 
     247  \return Number of turns.
    248248
    249249  When the total angle is below 360° numTurns() is ceiled to 1.
     
    336336        r.moveBottom( cr.bottom() - d );
    337337    }
    338     else 
     338    else
    339339    {
    340340        r.moveCenter( QPoint( r.center().x(), cr.center().y() ) );
     
    401401        if ( !wrapping() )
    402402        {
    403             const double boundedAngle = 
     403            const double boundedAngle =
    404404                qBound( scaleMap().p1(), angle, scaleMap().p2() );
    405405
     
    432432}
    433433
    434 /*! 
     434/*!
    435435  Handle QEvent::StyleChange and QEvent::FontChange;
    436436  \param event Change event
     
    479479    drawKnob( &painter, knobRect );
    480480
    481     drawMarker( &painter, knobRect, 
     481    drawMarker( &painter, knobRect,
    482482        qwtNormalizeDegrees( scaleMap().transform( value() ) ) );
    483483
     
    514514        gradient.setColorAt( 1.0, c2 );
    515515
    516         pen = QPen( gradient, d_data->borderWidth ); 
     516        pen = QPen( gradient, d_data->borderWidth );
    517517    }
    518518
     
    525525            QRadialGradient gradient( knobRect.center(),
    526526                knobRect.width(), knobRect.topLeft() + QPointF( off, off ) );
    527            
     527
    528528            gradient.setColorAt( 0.0, palette().color( QPalette::Midlight ) );
    529529            gradient.setColorAt( 1.0, palette().color( QPalette::Button ) );
     
    553553        case QwtKnob::Sunken:
    554554        {
    555             QLinearGradient gradient( 
     555            QLinearGradient gradient(
    556556                knobRect.topLeft(), knobRect.bottomRight() );
    557557            gradient.setColorAt( 0.0, palette().color( QPalette::Mid ) );
     
    578578  \param painter Painter
    579579  \param rect Bounding rectangle of the knob without scale
    580   \param angle Angle of the marker in degrees 
     580  \param angle Angle of the marker in degrees
    581581               ( clockwise, 0 at the 12 o'clock position )
    582582*/
    583 void QwtKnob::drawMarker( QPainter *painter, 
     583void QwtKnob::drawMarker( QPainter *painter,
    584584    const QRectF &rect, double angle ) const
    585585{
     
    608608        case Nub:
    609609        {
    610             const double dotWidth = 
     610            const double dotWidth =
    611611                qMin( double( markerSize ), radius);
    612612
     
    614614            if ( dotCenterDist > 0.0 )
    615615            {
    616                 const QPointF center( xm - sinA * dotCenterDist, 
     616                const QPointF center( xm - sinA * dotCenterDist,
    617617                    ym - cosA * dotCenterDist );
    618618
     
    626626                    qSwap( c1, c2 );
    627627
    628                 QLinearGradient gradient( 
     628                QLinearGradient gradient(
    629629                    ellipse.topLeft(), ellipse.bottomRight() );
    630630                gradient.setColorAt( 0.0, c1 );
     
    640640        case Dot:
    641641        {
    642             const double dotWidth = 
     642            const double dotWidth =
    643643                qMin( double( markerSize ), radius);
    644644
     
    646646            if ( dotCenterDist > 0.0 )
    647647            {
    648                 const QPointF center( xm - sinA * dotCenterDist, 
     648                const QPointF center( xm - sinA * dotCenterDist,
    649649                    ym - cosA * dotCenterDist );
    650650
     
    681681            painter->translate( rect.center() );
    682682            painter->rotate( angle - 90.0 );
    683            
     683
    684684            QPolygonF polygon;
    685685            polygon += QPointF( re, 0.0 );
     
    705705*/
    706706void QwtKnob::drawFocusIndicator( QPainter *painter ) const
    707 {       
     707{
    708708    const QRect cr = contentsRect();
    709709
     
    723723
    724724    QwtPainter::drawFocusRect( painter, this, focusRect );
    725 } 
     725}
    726726
    727727/*!
     
    729729
    730730  Similar to a QLabel::alignment() the flags decide how
    731   to align the knob inside of contentsRect(). 
     731  to align the knob inside of contentsRect().
    732732
    733733  The default setting is Qt::AlignCenter
     
    758758  \brief Change the knob's width.
    759759
    760   Setting a fixed value for the diameter of the knob 
     760  Setting a fixed value for the diameter of the knob
    761761  is helpful for aligning several knobs in a row.
    762762
     
    764764
    765765  \sa knobWidth(), setAlignment()
    766   \note Modifies the sizePolicy() 
     766  \note Modifies the sizePolicy()
    767767*/
    768768void QwtKnob::setKnobWidth( int width )
     
    828828}
    829829
    830 /*! 
     830/*!
    831831  \return Marker size
    832832  \sa setMarkerSize()
Note: See TracChangeset for help on using the changeset viewer.