Changeset 9383 in ntrip


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

Location:
trunk/BNC
Files:
172 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_abstract_legend.h

    r8127 r9383  
    2222
    2323  Legends, that need to be under control of the QwtPlot layout system
    24   need to be derived from QwtAbstractLegend. 
     24  need to be derived from QwtAbstractLegend.
    2525
    2626  \note Other type of legends can be implemented by connecting to
     
    4545      \param painter Painter
    4646      \param rect Bounding rectangle
    47       \param fillBackground When true, fill rect with the widget background 
     47      \param fillBackground When true, fill rect with the widget background
    4848
    4949      \sa renderLegend() is used by QwtPlotRenderer
    5050    */
    51     virtual void renderLegend( QPainter *painter, 
     51    virtual void renderLegend( QPainter *painter,
    5252        const QRectF &rect, bool fillBackground ) const = 0;
    5353
     
    6565      \param data List of legend entry attributes for the  item
    6666     */
    67     virtual void updateLegend( const QVariant &itemInfo, 
     67    virtual void updateLegend( const QVariant &itemInfo,
    6868        const QList<QwtLegendData> &data ) = 0;
    6969};
    7070
    71 #endif 
     71#endif
  • trunk/BNC/qwt/qwt_abstract_scale.cpp

    r8127 r9383  
    7272
    7373  \sa lowerBound(), setScale(), setUpperBound()
    74   \note For inverted scales the lower bound 
     74  \note For inverted scales the lower bound
    7575        is greater than the upper bound
    7676*/
     
    9595
    9696  \sa upperBound(), setScale(), setLowerBound()
    97   \note For inverted scales the lower bound 
     97  \note For inverted scales the lower bound
    9898        is greater than the upper bound
    9999*/
     
    115115  \brief Specify a scale.
    116116
    117   Define a scale by an interval 
    118 
    119   The ticks are calculated using scaleMaxMinor(), 
     117  Define a scale by an interval
     118
     119  The ticks are calculated using scaleMaxMinor(),
    120120  scaleMaxMajor() and scaleStepSize().
    121121
     
    123123  \param upperBound upper limit of the scale interval
    124124
    125   \note For inverted scales the lower bound 
     125  \note For inverted scales the lower bound
    126126        is greater than the upper bound
    127127*/
     
    136136  Define a scale by an interval
    137137
    138   The ticks are calculated using scaleMaxMinor(), 
     138  The ticks are calculated using scaleMaxMinor(),
    139139  scaleMaxMajor() and scaleStepSize().
    140140
     
    343343
    344344  The scale division might have been assigned explicitly
    345   or calculated implicitly by rescale(). 
     345  or calculated implicitly by rescale().
    346346 */
    347347const QwtScaleDiv &QwtAbstractScale::scaleDiv() const
     
    361361  Translate a scale value into a widget coordinate
    362362
    363   \param value Scale value 
     363  \param value Scale value
    364364  \return Corresponding widget coordinate for value
    365365  \sa scaleMap(), invTransform()
     
    425425  \sa scaleChange()
    426426*/
    427 void QwtAbstractScale::rescale( 
     427void QwtAbstractScale::rescale(
    428428    double lowerBound, double upperBound, double stepSize )
    429429{
  • trunk/BNC/qwt/qwt_abstract_scale.h

    r8127 r9383  
    2828
    2929  The scale division might be assigned explicitly - but usually
    30   it is calculated from the boundaries using a QwtScaleEngine. 
     30  it is calculated from the boundaries using a QwtScaleEngine.
    3131
    32   The scale engine also decides the type of transformation of the scale 
     32  The scale engine also decides the type of transformation of the scale
    3333  ( linear, logarithmic ... ).
    3434*/
     
    8686
    8787protected:
    88     void rescale( double lowerBound, 
     88    void rescale( double lowerBound,
    8989        double upperBound, double stepSize );
    9090
  • trunk/BNC/qwt/qwt_abstract_scale_draw.cpp

    r8127 r9383  
    2626        minExtent( 0.0 )
    2727    {
    28         components = QwtAbstractScaleDraw::Backbone 
    29             | QwtAbstractScaleDraw::Ticks 
     28        components = QwtAbstractScaleDraw::Backbone
     29            | QwtAbstractScaleDraw::Ticks
    3030            | QwtAbstractScaleDraw::Labels;
    3131
     
    198198        painter->save();
    199199
    200         QPen pen = painter->pen();
     200        pen = painter->pen();
    201201        pen.setColor( palette.color( QPalette::WindowText ) );
    202202        pen.setCapStyle( Qt::FlatCap );
     
    227227        painter->save();
    228228
    229         QPen pen = painter->pen();
     229        pen = painter->pen();
    230230        pen.setColor( palette.color( QPalette::WindowText ) );
    231231        pen.setCapStyle( Qt::FlatCap );
     
    393393    const QFont &font, double value ) const
    394394{
    395     QMap<double, QwtText>::const_iterator it = d_data->labelCache.find( value );
    396     if ( it == d_data->labelCache.end() )
    397     {
    398         QwtText lbl = label( value );
    399         lbl.setRenderFlags( 0 );
    400         lbl.setLayoutAttribute( QwtText::MinimumLayout );
    401 
    402         ( void )lbl.textSize( font ); // initialize the internal cache
    403 
    404         it = d_data->labelCache.insert( value, lbl );
    405     }
    406 
    407     return ( *it );
     395    QMap<double, QwtText>::const_iterator it1 = d_data->labelCache.constFind( value );
     396    if ( it1 != d_data->labelCache.constEnd() )
     397        return *it1;
     398
     399    QwtText lbl = label( value );
     400    lbl.setRenderFlags( 0 );
     401    lbl.setLayoutAttribute( QwtText::MinimumLayout );
     402
     403    ( void )lbl.textSize( font ); // initialize the internal cache
     404
     405    QMap<double, QwtText>::iterator it2 = d_data->labelCache.insert( value, lbl );
     406    return *it2;
    408407}
    409408
  • trunk/BNC/qwt/qwt_abstract_scale_draw.h

    r8127 r9383  
    5555    virtual ~QwtAbstractScaleDraw();
    5656
    57     void setScaleDiv( const QwtScaleDiv &s );
     57    void setScaleDiv( const QwtScaleDiv & );
    5858    const QwtScaleDiv& scaleDiv() const;
    5959
     
    6969    double maxTickLength() const;
    7070
    71     void setSpacing( double margin );
     71    void setSpacing( double );
    7272    double spacing() const;
    7373
  • trunk/BNC/qwt/qwt_abstract_slider.cpp

    r8127 r9383  
    1818#endif
    1919
    20 static double qwtAlignToScaleDiv( 
     20static double qwtAlignToScaleDiv(
    2121    const QwtAbstractSlider *slider, double value )
    2222{
     
    2828        return sd.lowerBound();
    2929
    30     if ( tValue == slider->transform( sd.lowerBound() ) )
     30    if ( tValue == slider->transform( sd.upperBound() ) )
    3131        return sd.upperBound();
    3232
     
    107107}
    108108
    109 /*! 
     109/*!
    110110  Set the value to be valid/invalid
    111111
     
    122122
    123123        Q_EMIT valueChanged( d_data->value );
    124     }   
    125 }   
     124    }
     125}
    126126
    127127//! \return True, when the value is invalid
     
    129129{
    130130    return d_data->isValid;
    131 }   
     131}
    132132
    133133/*!
     
    168168  \brief Enables or disables tracking.
    169169
    170   If tracking is enabled, the slider emits the valueChanged() 
    171   signal while the movable part of the slider is being dragged. 
    172   If tracking is disabled, the slider emits the valueChanged() signal 
     170  If tracking is enabled, the slider emits the valueChanged()
     171  signal while the movable part of the slider is being dragged.
     172  If tracking is disabled, the slider emits the valueChanged() signal
    173173  only when the user releases the slider.
    174174
     
    288288   Wheel Event handler
    289289
    290    In/decreases the value by s number of steps. The direction 
     290   In/decreases the value by s number of steps. The direction
    291291   depends on the invertedControls() property.
    292292
     
    459459
    460460  The range of the slider is divided into a number of steps from
    461   which the value increments according to user inputs depend. 
     461  which the value increments according to user inputs depend.
    462462
    463463  The default setting is 100.
     
    485485
    486486  The range of the slider is divided into a number of steps from
    487   which the value increments according to user inputs depend. 
     487  which the value increments according to user inputs depend.
    488488
    489489  \param stepCount Number of steps
     
    495495{
    496496    d_data->singleSteps = stepCount;
    497 }   
     497}
    498498
    499499/*!
     
    504504{
    505505    return d_data->singleSteps;
    506 }   
    507 
    508 /*! 
     506}
     507
     508/*!
    509509  \brief Set the number of steps for a page increment
    510    
     510
    511511  The range of the slider is divided into a number of steps from
    512   which the value increments according to user inputs depend. 
     512  which the value increments according to user inputs depend.
    513513
    514514  \param stepCount Number of steps
     
    541541*/
    542542void QwtAbstractSlider::setStepAlignment( bool on )
    543 {   
     543{
    544544    if ( on != d_data->stepAlignment )
    545545    {
    546546        d_data->stepAlignment = on;
    547547    }
    548 }   
    549    
     548}
     549
    550550/*!
    551551  \return True, when step alignment is enabled
     
    586586
    587587/*!
    588   If wrapping is true stepping up from upperBound() value will 
    589   take you to the minimum() value and vice versa. 
     588  If wrapping is true stepping up from upperBound() value will
     589  take you to the minimum() value and vice versa.
    590590
    591591  \param on En/Disable wrapping
     
    595595{
    596596    d_data->wrapping = on;
    597 }   
     597}
    598598
    599599/*!
    600600  \return True, when wrapping is set
    601601  \sa setWrapping()
    602  */ 
     602 */
    603603bool QwtAbstractSlider::wrapping() const
    604604{
     
    609609  Invert wheel and key events
    610610
    611   Usually scrolling the mouse wheel "up" and using keys like page 
    612   up will increase the slider's value towards its maximum. 
     611  Usually scrolling the mouse wheel "up" and using keys like page
     612  up will increase the slider's value towards its maximum.
    613613  When invertedControls() is enabled the value is scrolled
    614614  towards its minimum.
     
    645645void QwtAbstractSlider::incrementValue( int stepCount )
    646646{
    647     const double value = incrementedValue( 
     647    const double value = incrementedValue(
    648648        d_data->value, stepCount );
    649649
     
    656656
    657657/*!
    658   Increment a value 
    659 
    660   \param value Value 
     658  Increment a value
     659
     660  \param value Value
    661661  \param stepCount Number of steps
    662662
    663663  \return Incremented value
    664664 */
    665 double QwtAbstractSlider::incrementedValue( 
     665double QwtAbstractSlider::incrementedValue(
    666666    double value, int stepCount ) const
    667667{
     
    684684        // we need equidant steps according to
    685685        // paint device coordinates
    686         const double range = transformation->transform( maximum() ) 
     686        const double range = transformation->transform( maximum() )
    687687            - transformation->transform( minimum() );
    688688
     
    691691        double v = transformation->transform( value );
    692692
    693         v = qRound( v / stepSize ) * stepSize; 
     693        v = qRound( v / stepSize ) * stepSize;
    694694        v += stepCount * range / d_data->totalSteps;
    695695
     
    757757        if ( stepSize > 0.0 )
    758758        {
    759             value = lowerBound() + 
     759            value = lowerBound() +
    760760                qRound( ( value - lowerBound() ) / stepSize ) * stepSize;
    761761        }
  • trunk/BNC/qwt/qwt_abstract_slider.h

    r8127 r9383  
    1818
    1919  A slider widget displays a value according to a scale.
    20   The class is designed as a common super class for widgets like 
     20  The class is designed as a common super class for widgets like
    2121  QwtKnob, QwtDial and QwtSlider.
    2222
    23   When the slider is nor readOnly() its value can be modified 
    24   by keyboard, mouse and wheel inputs. 
     23  When the slider is nor readOnly() its value can be modified
     24  by keyboard, mouse and wheel inputs.
    2525
    2626  The range of the slider is divided into a number of steps from
    27   which the value increments according to user inputs depend. 
     27  which the value increments according to user inputs depend.
    2828  Only for linear scales the number of steps correspond with
    2929  a fixed step size.
     
    6868    uint pageSteps() const;
    6969
    70     void setStepAlignment( bool ); 
     70    void setStepAlignment( bool );
    7171    bool stepAlignment() const;
    7272
     
    8181
    8282public Q_SLOTS:
    83     void setValue( double val );
     83    void setValue( double value );
    8484
    8585Q_SIGNALS:
     
    8888      \brief Notify a change of value.
    8989
    90       When tracking is enabled (default setting), 
    91       this signal will be emitted every time the value changes. 
     90      When tracking is enabled (default setting),
     91      this signal will be emitted every time the value changes.
    9292
    9393      \param value New value
     
    147147    virtual double scrolledTo( const QPoint &pos ) const = 0;
    148148
    149     void incrementValue( int numSteps );
     149    void incrementValue( int stepCount );
    150150
    151151    virtual void scaleChange();
     
    154154    virtual void sliderChange();
    155155
    156     double incrementedValue( 
     156    double incrementedValue(
    157157        double value, int stepCount ) const;
    158158
  • trunk/BNC/qwt/qwt_analog_clock.cpp

    r8127 r9383  
    5353    setTotalSteps( 60 );
    5454
    55     const int secondsPerHour = 60.0 * 60.0; 
     55    const int secondsPerHour = 60.0 * 60.0;
    5656
    5757    QList<double> majorTicks;
     
    7373
    7474    QColor knobColor = palette().color( QPalette::Active, QPalette::Text );
    75     knobColor = knobColor.dark( 120 );
     75    knobColor = knobColor.darker( 120 );
    7676
    7777    QColor handColor;
     
    8383        {
    8484            width = 2;
    85             handColor = knobColor.dark( 120 );
     85            handColor = knobColor.darker( 120 );
    8686        }
    8787        else
     
    201201    {
    202202        const double hours = value() / ( 60.0 * 60.0 );
    203         const double minutes = 
     203        const double minutes =
    204204            ( value() - qFloor(hours) * 60.0 * 60.0 ) / 60.0;
    205205        const double seconds = value() - qFloor(hours) * 60.0 * 60.0
     
    214214        {
    215215            const double d = 360.0 - angle[hand] - origin();
    216             drawHand( painter, static_cast<Hand>( hand ), 
     216            drawHand( painter, static_cast<Hand>( hand ),
    217217                center, radius, d, colorGroup );
    218218        }
  • trunk/BNC/qwt/qwt_analog_clock.h

    r8127 r9383  
    2222
    2323  \par Example
    24   \code 
     24  \code
    2525  #include <qwt_analog_clock.h>
    2626
  • trunk/BNC/qwt/qwt_arrow_button.h

    r8127 r9383  
    3636    virtual void paintEvent( QPaintEvent *event );
    3737
    38     virtual void drawButtonLabel( QPainter *p );
     38    virtual void drawButtonLabel( QPainter * );
    3939    virtual void drawArrow( QPainter *,
    4040        const QRect &, Qt::ArrowType ) const;
  • trunk/BNC/qwt/qwt_clipper.cpp

    r8127 r9383  
    151151    }
    152152
    153     inline void reset() 
    154     { 
    155         m_size = 0; 
    156     }
    157 
    158     inline int size() const 
    159     { 
    160         return m_size; 
    161     }
    162 
    163     inline Point *data() const 
    164     { 
    165         return m_buffer; 
    166     }
    167 
    168     inline Point &operator[]( int i ) 
    169     { 
    170         return m_buffer[i]; 
    171     }
    172 
    173     inline const Point &operator[]( int i ) const 
    174     { 
    175         return m_buffer[i]; 
     153    inline void reset()
     154    {
     155        m_size = 0;
     156    }
     157
     158    inline int size() const
     159    {
     160        return m_size;
     161    }
     162
     163    inline Point *data() const
     164    {
     165        return m_buffer;
     166    }
     167
     168    inline Point &operator[]( int i )
     169    {
     170        return m_buffer[i];
     171    }
     172
     173    inline const Point &operator[]( int i ) const
     174    {
     175        return m_buffer[i];
    176176    }
    177177
     
    193193            m_capacity *= 2;
    194194
    195         m_buffer = static_cast<Point *>( 
     195        m_buffer = static_cast<Point *>(
    196196            ::realloc( m_buffer, m_capacity * sizeof( Point ) ) );
    197197    }
  • trunk/BNC/qwt/qwt_clipper.h

    r8127 r9383  
    2626{
    2727public:
    28     static QPolygon clipPolygon( const QRect &, 
     28    static QPolygon clipPolygon( const QRect &,
    2929        const QPolygon &, bool closePolygon = false );
    30     static QPolygon clipPolygon( const QRectF &, 
     30    static QPolygon clipPolygon( const QRectF &,
    3131        const QPolygon &, bool closePolygon = false );
    3232
    33     static QPolygonF clipPolygonF( const QRectF &, 
     33    static QPolygonF clipPolygonF( const QRectF &,
    3434        const QPolygonF &, bool closePolygon = false );
    3535
  • trunk/BNC/qwt/qwt_color_map.cpp

    r8127 r9383  
    4747            a = qAlpha( rgb );
    4848
    49             /* 
    50                 when mapping a value to rgb we will have to calcualate: 
     49            /*
     50                when mapping a value to rgb we will have to calcualate:
    5151                   - const int v = int( ( s1.v0 + ratio * s1.vStep ) + 0.5 );
    5252
     
    346346QColor QwtLinearColorMap::color1() const
    347347{
    348     return QColor( d_data->colorStops.rgb( d_data->mode, 0.0 ) );
     348    return QColor::fromRgba( d_data->colorStops.rgb( d_data->mode, 0.0 ) );
    349349}
    350350
     
    355355QColor QwtLinearColorMap::color2() const
    356356{
    357     return QColor( d_data->colorStops.rgb( d_data->mode, 1.0 ) );
     357    return QColor::fromRgba( d_data->colorStops.rgb( d_data->mode, 1.0 ) );
    358358}
    359359
  • trunk/BNC/qwt/qwt_color_map.h

    r8127 r9383  
    107107
    108108    QwtLinearColorMap( QwtColorMap::Format = QwtColorMap::RGB );
    109     QwtLinearColorMap( const QColor &from, const QColor &to,
     109    QwtLinearColorMap( const QColor &color1, const QColor &color2,
    110110        QwtColorMap::Format = QwtColorMap::RGB );
    111111
     
    185185    {
    186186        const unsigned int index = colorIndex( interval, value );
    187         return colorTable( interval )[index]; // slow
     187
     188        const QVector<QRgb> rgbTable = colorTable( interval );
     189        return rgbTable[index]; // slow
    188190    }
    189191}
  • trunk/BNC/qwt/qwt_column_symbol.cpp

    r8127 r9383  
    115115        style( QwtColumnSymbol::Box ),
    116116        frameStyle( QwtColumnSymbol::Raised ),
     117        palette( Qt::gray ),
    117118        lineWidth( 2 )
    118119    {
    119         palette = QPalette( Qt::gray );
    120120    }
    121121
     
    288288        default:
    289289        {
    290             painter->fillRect( r, d_data->palette.window() );
    291         }
    292     }
    293 }
     290            painter->fillRect( r.adjusted( 0, 0, 1, 1 ), d_data->palette.window() );
     291        }
     292    }
     293}
  • trunk/BNC/qwt/qwt_column_symbol.h

    r8127 r9383  
    137137    virtual ~QwtColumnSymbol();
    138138
    139     void setFrameStyle( FrameStyle style );
     139    void setFrameStyle( FrameStyle );
    140140    FrameStyle frameStyle() const;
    141141
  • trunk/BNC/qwt/qwt_compass.cpp

    r8127 r9383  
    1818#include <qevent.h>
    1919
    20 /*! 
     20/*!
    2121  \brief Constructor
    2222
     
    4949}
    5050
    51 /*! 
     51/*!
    5252  \brief Constructor
    5353
     
    9696  or returns an null text.
    9797
    98   \return Label, or QString::null
     98  \return Label
    9999  \sa labelMap(), setLabelMap()
    100100*/
  • trunk/BNC/qwt/qwt_compass_rose.cpp

    r8127 r9383  
    1212#include "qwt_painter.h"
    1313#include <qpainter.h>
    14 
    15 static QPointF qwtIntersection(
     14#include <qpainterpath.h>
     15
     16static QPointF qwtIntersection(
    1617    QPointF p11, QPointF p12, QPointF p21, QPointF p22 )
    1718{
     
    213214}
    214215
    215 /*! 
     216/*!
    216217  \return Width of the rose
    217218  \sa setWidth()
  • trunk/BNC/qwt/qwt_compass_rose.h

    r8127 r9383  
    4646        \param colorGroup Color group
    4747     */
    48     virtual void draw( QPainter *painter, 
     48    virtual void draw( QPainter *painter,
    4949        const QPointF &center, double radius, double north,
    5050        QPalette::ColorGroup colorGroup = QPalette::Active ) const = 0;
     
    6363    virtual ~QwtSimpleCompassRose();
    6464
    65     void setWidth( double w );
     65    void setWidth( double );
    6666    double width() const;
    6767
    68     void setNumThorns( int count );
     68    void setNumThorns( int );
    6969    int numThorns() const;
    7070
    71     void setNumThornLevels( int count );
     71    void setNumThornLevels( int );
    7272    int numThornLevels() const;
    7373
     
    7979
    8080    static void drawRose( QPainter *, const QPalette &,
    81         const QPointF &center, double radius, double origin, double width,
     81        const QPointF &center, double radius, double north, double width,
    8282        int numThorns, int numThornLevels, double shrinkFactor );
    8383
     
    8787};
    8888
    89 #endif 
     89#endif
  • trunk/BNC/qwt/qwt_counter.cpp

    r8127 r9383  
    5151
    5252/*!
    53   The counter is initialized with a range is set to [0.0, 1.0] with 
     53  The counter is initialized with a range is set to [0.0, 1.0] with
    5454  0.01 as single step size. The value is invalid.
    5555
     
    8383        layout->addWidget( btn );
    8484
    85         connect( btn, SIGNAL( released() ), SLOT( btnReleased() ) );
    86         connect( btn, SIGNAL( clicked() ), SLOT( btnClicked() ) );
     85        connect( btn, SIGNAL(released()), SLOT(btnReleased()) );
     86        connect( btn, SIGNAL(clicked()), SLOT(btnClicked()) );
    8787
    8888        d_data->buttonDown[i] = btn;
     
    9494    layout->addWidget( d_data->valueEdit );
    9595
    96     connect( d_data->valueEdit, SIGNAL( editingFinished() ),
    97          SLOT( textChanged() ) );
     96    connect( d_data->valueEdit, SIGNAL(editingFinished()), SLOT(textChanged()) );
    9897
    9998    layout->setStretchFactor( d_data->valueEdit, 10 );
     
    107106        layout->addWidget( btn );
    108107
    109         connect( btn, SIGNAL( released() ), SLOT( btnReleased() ) );
    110         connect( btn, SIGNAL( clicked() ), SLOT( btnClicked() ) );
     108        connect( btn, SIGNAL(released()), SLOT(btnReleased()) );
     109        connect( btn, SIGNAL(clicked()), SLOT(btnClicked()) );
    111110
    112111        d_data->buttonUp[i] = btn;
     
    131130}
    132131
    133 /*! 
     132/*!
    134133  Set the counter to be in valid/invalid state
    135134
     
    137136  the buttons are disabled.
    138137
    139   \param on If true the counter will be set as valid 
     138  \param on If true the counter will be set as valid
    140139
    141140  \sa setValue(), isValid()
     
    156155        else
    157156        {
    158             d_data->valueEdit->setText( QString::null );
    159         }
    160     }   
    161 }   
    162 
    163 /*! 
     157            d_data->valueEdit->setText( QString() );
     158        }
     159    }
     160}
     161
     162/*!
    164163  \return True, if the value is valid
    165164  \sa setValid(), setValue()
     
    168167{
    169168    return d_data->isValid;
    170 }   
     169}
    171170
    172171/*!
     
    181180}
    182181
    183 /*! 
     182/*!
    184183   \return True, when the line line edit is read only. (default is no)
    185184  \sa setReadOnly()
     
    335334  \brief En/Disable wrapping
    336335
    337   If wrapping is true stepping up from maximum() value will take 
    338   you to the minimum() value and vice versa. 
     336  If wrapping is true stepping up from maximum() value will take
     337  you to the minimum() value and vice versa.
    339338
    340339  \param on En/Disable wrapping
  • trunk/BNC/qwt/qwt_counter.h

    r8127 r9383  
    2525  and a step size. When the wrapping property is set
    2626  the counter is circular.
    27  
    28   The number of steps by which a button increments or decrements the value 
    29   can be specified using setIncSteps(). The number of buttons can be 
     27
     28  The number of steps by which a button increments or decrements the value
     29  can be specified using setIncSteps(). The number of buttons can be
    3030  changed with setNumButtons().
    3131
     
    9292    void setReadOnly( bool );
    9393
    94     void setNumButtons( int n );
     94    void setNumButtons( int );
    9595    int numButtons() const;
    9696
    97     void setIncSteps( QwtCounter::Button btn, int nSteps );
    98     int incSteps( QwtCounter::Button btn ) const;
     97    void setIncSteps( QwtCounter::Button, int numSteps );
     98    int incSteps( QwtCounter::Button ) const;
    9999
    100100    virtual QSize sizeHint() const;
    101101
    102102    double singleStep() const;
    103     void setSingleStep( double s );
     103    void setSingleStep( double stepSize );
    104104
    105105    void setRange( double min, double max );
    106    
     106
    107107    double minimum() const;
    108     void setMinimum( double min );
     108    void setMinimum( double );
    109109
    110110    double maximum() const;
    111     void setMaximum( double max );
     111    void setMaximum( double );
    112112
    113113    void setStepButton1( int nSteps );
  • trunk/BNC/qwt/qwt_curve_fitter.cpp

    r8127 r9383  
    334334
    335335/*!
    336  
    337   \return Maximum for the number of points passed to a run
     336  \return Maximum for the number of points passed to a run
    338337          of the algorithm - or 0, when unlimited
    339338  \sa setChunkSize()
     
    350349QPolygonF QwtWeedingCurveFitter::fitCurve( const QPolygonF &points ) const
    351350{
     351    if ( points.isEmpty() )
     352        return points;
     353
    352354    QPolygonF fittedPoints;
    353 
    354355    if ( d_data->chunkSize == 0 )
    355356    {
  • trunk/BNC/qwt/qwt_curve_fitter.h

    r8127 r9383  
    7878    QwtSpline &spline();
    7979
    80     void setSplineSize( int size );
     80    void setSplineSize( int );
    8181    int splineSize() const;
    8282
  • trunk/BNC/qwt/qwt_date.cpp

    r8127 r9383  
    3232#endif
    3333
    34 static QString qwtExpandedFormat( const QString & format, 
     34static QString qwtExpandedFormat( const QString & format,
    3535    const QDateTime &dateTime, QwtDate::Week0Type week0Type )
    3636{
     
    195195}
    196196
    197 static inline void qwtFloorTime( 
     197static inline void qwtFloorTime(
    198198    QwtDate::IntervalType intervalType, QDateTime &dt )
    199199{
     
    224224            dt.setTime( QTime( t.hour(), 0, 0 ) );
    225225            break;
    226         }   
     226        }
    227227        default:
    228228            break;
     
    233233}
    234234
    235 static inline QDateTime qwtToTimeSpec( 
     235static inline QDateTime qwtToTimeSpec(
    236236    const QDateTime &dt, Qt::TimeSpec spec )
    237237{
     
    255255}
    256256
     257#if 0
     258
    257259static inline double qwtToJulianDay( int year, int month, int day )
    258260{
     
    280282    if ( a < 0 )
    281283        a -= b - 1;
    282        
     284
    283285    return a / b;
    284 }   
     286}
     287
     288#endif
    285289
    286290static inline QDate qwtToDate( int year, int month = 1, int day = 1 )
     
    319323  Translate from double to QDateTime
    320324
    321   \param value Number of milliseconds since the epoch, 
     325  \param value Number of milliseconds since the epoch,
    322326               1970-01-01T00:00:00 UTC
    323327  \param timeSpec Time specification
     
    373377
    374378    const QTime time = dt.time();
    375     const double secs = 3600.0 * time.hour() + 
     379    const double secs = 3600.0 * time.hour() +
    376380        60.0 * time.minute() + time.second();
    377381
     
    383387
    384388  \param dateTime Datetime value
    385   \param intervalType Interval type, how to ceil. 
     389  \param intervalType Interval type, how to ceil.
    386390                      F.e. when intervalType = QwtDate::Months, the result
    387391                      will be ceiled to the next beginning of a month
     
    451455        {
    452456            dt.setTime( QTime( 0, 0 ) );
    453             dt.setDate( qwtToDate( dateTime.date().year(), 
     457            dt.setDate( qwtToDate( dateTime.date().year(),
    454458                dateTime.date().month() ) );
    455459
     
    484488
    485489  \param dateTime Datetime value
    486   \param intervalType Interval type, how to ceil. 
     490  \param intervalType Interval type, how to ceil.
    487491                      F.e. when intervalType = QwtDate::Months,
    488                       the result will be ceiled to the next 
     492                      the result will be ceiled to the next
    489493                      beginning of a month
    490494  \return Floored datetime
    491495  \sa floor()
    492496 */
    493 QDateTime QwtDate::floor( const QDateTime &dateTime, 
     497QDateTime QwtDate::floor( const QDateTime &dateTime,
    494498    IntervalType intervalType )
    495499{
     
    533537            dt.setTime( QTime( 0, 0 ) );
    534538
    535             const QDate date = qwtToDate( dt.date().year(), 
     539            const QDate date = qwtToDate( dt.date().year(),
    536540                dt.date().month() );
    537541            dt.setDate( date );
     
    556560  Minimum for the supported date range
    557561
    558   The range of valid dates depends on how QDate stores the 
     562  The range of valid dates depends on how QDate stores the
    559563  Julian day internally.
    560564
     
    577581  Maximum for the supported date range
    578582
    579   The range of valid dates depends on how QDate stores the 
     583  The range of valid dates depends on how QDate stores the
    580584  Julian day internally.
    581585
     
    600604
    601605  The first day of a week depends on the current locale
    602   ( QLocale::firstDayOfWeek() ). 
     606  ( QLocale::firstDayOfWeek() ).
    603607
    604608  \param year Year
     
    607611
    608612  \sa QLocale::firstDayOfWeek(), weekNumber()
    609  */ 
     613 */
    610614QDate QwtDate::dateOfWeek0( int year, Week0Type type )
    611615{
     
    624628    {
    625629        // according to ISO 8601 the first week is defined
    626         // by the first thursday. 
     630        // by the first thursday.
    627631
    628632        int d = Qt::Thursday - firstDayOfWeek;
     
    641645
    642646  - QwtDate::FirstThursday\n
    643     Corresponding to ISO 8601 ( see QDate::weekNumber() ). 
     647    Corresponding to ISO 8601 ( see QDate::weekNumber() ).
    644648
    645649  - QwtDate::FirstDay\n
     
    737741    week number with a leading zero ( 01 - 53 )
    738742
    739   As week 1 usually starts in the previous year a special rule 
     743  As week 1 usually starts in the previous year a special rule
    740744  is applied for formats, where the year is expected to match the
    741745  week number - even if the date belongs to the previous year.
  • trunk/BNC/qwt/qwt_date.h

    r8127 r9383  
    2323  A double is interpreted as the number of milliseconds since
    2424  1970-01-01T00:00:00 Universal Coordinated Time - also known
    25   as "The Epoch". 
     25  as "The Epoch".
    2626
    27   While the range of the Julian day in Qt4 is limited to [0, MAX_INT], 
    28   Qt5 stores it as qint64 offering a huge range of valid dates. 
    29   As the significance of a double is below this ( assuming a 
    30   fraction of 52 bits ) the translation is not 
    31   bijective with rounding errors for dates very far from Epoch. 
    32   For a resolution of 1 ms those start to happen for dates above the 
    33   year 144683. 
     27  While the range of the Julian day in Qt4 is limited to [0, MAX_INT],
     28  Qt5 stores it as qint64 offering a huge range of valid dates.
     29  As the significance of a double is below this ( assuming a
     30  fraction of 52 bits ) the translation is not
     31  bijective with rounding errors for dates very far from Epoch.
     32  For a resolution of 1 ms those start to happen for dates above the
     33  year 144683.
    3434
    3535  An axis for a date/time interval is expected to be aligned
     
    4343{
    4444public:
    45     /*! 
     45    /*!
    4646       How to identify the first week of year differs between
    47        countries. 
     47       countries.
    4848     */
    4949    enum Week0Type
     
    6060        /*!
    6161            "The week with January 1.1 in it."
    62            
     62
    6363            In the U.S. this definition is more common than
    6464            FirstThursday.
     
    6767    };
    6868
    69     /*! 
     69    /*!
    7070      Classification of an time interval
    7171
     
    109109    static QDate maxDate();
    110110
    111     static QDateTime toDateTime( double value, 
     111    static QDateTime toDateTime( double value,
    112112        Qt::TimeSpec = Qt::UTC );
    113113
     
    122122    static int utcOffset( const QDateTime & );
    123123
    124     static QString toString( const QDateTime &, 
     124    static QString toString( const QDateTime &,
    125125        const QString & format, Week0Type );
    126126};
  • trunk/BNC/qwt/qwt_date_scale_draw.cpp

    r8127 r9383  
    3737  \brief Constructor
    3838
    39   The default setting is to display tick labels for the 
     39  The default setting is to display tick labels for the
    4040  given time specification. The first week of a year is defined like
    4141  for QwtDate::FirstThursday.
     
    110110  \sa week0Type().
    111111  \note week0Type has no effect beside for intervals classified as
    112         QwtDate::Week. 
     112        QwtDate::Week.
    113113 */
    114114void QwtDateScaleDraw::setWeek0Type( QwtDate::Week0Type week0Type )
     
    118118
    119119/*!
    120   \return Setting how to identify the first week of a year. 
     120  \return Setting how to identify the first week of a year.
    121121  \sa setWeek0Type()
    122122 */
     
    134134  \sa dateFormat(), dateFormatOfDate(), QwtDate::toString()
    135135 */
    136 void QwtDateScaleDraw::setDateFormat( 
     136void QwtDateScaleDraw::setDateFormat(
    137137    QwtDate::IntervalType intervalType, const QString &format )
    138138{
    139     if ( intervalType >= QwtDate::Millisecond && 
     139    if ( intervalType >= QwtDate::Millisecond &&
    140140        intervalType <= QwtDate::Year )
    141141    {
     
    149149  \sa setDateFormat(), dateFormatOfDate()
    150150 */
    151 QString QwtDateScaleDraw::dateFormat( 
     151QString QwtDateScaleDraw::dateFormat(
    152152    QwtDate::IntervalType intervalType ) const
    153153{
    154     if ( intervalType >= QwtDate::Millisecond && 
     154    if ( intervalType >= QwtDate::Millisecond &&
    155155        intervalType <= QwtDate::Year )
    156156    {
     
    158158    }
    159159
    160     return QString::null;
     160    return QString();
    161161}
    162162
     
    182182    Q_UNUSED( dateTime )
    183183
    184     if ( intervalType >= QwtDate::Millisecond && 
     184    if ( intervalType >= QwtDate::Millisecond &&
    185185        intervalType <= QwtDate::Year )
    186186    {
     
    205205{
    206206    const QDateTime dt = toDateTime( value );
    207     const QString fmt = dateFormatOfDate( 
     207    const QString fmt = dateFormatOfDate(
    208208        dt, intervalType( scaleDiv() ) );
    209209
     
    220220  \sa dateFormatOfDate()
    221221 */
    222 QwtDate::IntervalType QwtDateScaleDraw::intervalType( 
     222QwtDate::IntervalType QwtDateScaleDraw::intervalType(
    223223    const QwtScaleDiv &scaleDiv ) const
    224224{
     
    233233        for ( int j = QwtDate::Second; j <= intvType; j++ )
    234234        {
    235             const QDateTime dt0 = QwtDate::floor( dt, 
     235            const QDateTime dt0 = QwtDate::floor( dt,
    236236                static_cast<QwtDate::IntervalType>( j ) );
    237237
  • trunk/BNC/qwt/qwt_date_scale_draw.h

    r8127 r9383  
    7373
    7474protected:
    75     virtual QwtDate::IntervalType 
     75    virtual QwtDate::IntervalType
    7676        intervalType( const QwtScaleDiv & ) const;
    7777
  • trunk/BNC/qwt/qwt_date_scale_engine.cpp

    r8127 r9383  
    1414#include <limits.h>
    1515
    16 static inline double qwtMsecsForType( QwtDate::IntervalType type )
     16static inline double qwtMsecsForType( int type )
    1717{
    1818    static const double msecs[] =
     
    4444
    4545static double qwtIntervalWidth( const QDateTime &minDate,
    46     const QDateTime &maxDate, QwtDate::IntervalType intervalType ) 
     46    const QDateTime &maxDate, QwtDate::IntervalType intervalType )
    4747{
    4848    switch( intervalType )
     
    8080        case QwtDate::Month:
    8181        {
    82             const double years = 
     82            const double years =
    8383                double( maxDate.date().year() ) - minDate.date().year();
    8484
     
    9191        case QwtDate::Year:
    9292        {
    93             double years = 
     93            double years =
    9494                double( maxDate.date().year() ) - minDate.date().year();
    9595
     
    104104}
    105105
    106 static double qwtRoundedIntervalWidth( 
    107     const QDateTime &minDate, const QDateTime &maxDate, 
    108     QwtDate::IntervalType intervalType ) 
     106static double qwtRoundedIntervalWidth(
     107    const QDateTime &minDate, const QDateTime &maxDate,
     108    QwtDate::IntervalType intervalType )
    109109{
    110110    const QDateTime minD = QwtDate::floor( minDate, intervalType );
     
    131131}
    132132
    133 static int qwtStepSize( int intervalSize, int maxSteps, uint base ) 
     133static int qwtStepSize( int intervalSize, int maxSteps, uint base )
    134134{
    135135    if ( maxSteps <= 0 )
     
    162162}
    163163
    164 static int qwtDivideInterval( double intervalSize, int numSteps, 
     164static int qwtDivideInterval( double intervalSize, int numSteps,
    165165    const int limits[], size_t numLimits )
    166166{
     
    181181    if ( intervalType != QwtDate::Day )
    182182    {
    183         if ( ( intervalSize > numSteps ) && 
     183        if ( ( intervalSize > numSteps ) &&
    184184            ( intervalSize <= 2 * numSteps ) )
    185185        {
     
    196196        {
    197197            static int limits[] = { 1, 2, 5, 10, 15, 20, 30, 60 };
    198    
     198
    199199            stepSize = qwtDivideInterval( intervalSize, numSteps,
    200200                limits, sizeof( limits ) / sizeof( int ) );
     
    205205        {
    206206            static int limits[] = { 1, 2, 3, 4, 6, 12, 24 };
    207    
     207
    208208            stepSize = qwtDivideInterval( intervalSize, numSteps,
    209209                limits, sizeof( limits ) / sizeof( int ) );
     
    274274            if ( stepSize > maxMinSteps )
    275275            {
    276                 numSteps = qwtStepCount( stepSize, maxMinSteps, 
     276                numSteps = qwtStepCount( stepSize, maxMinSteps,
    277277                    limits, sizeof( limits ) / sizeof( int ) );
    278278
     
    280280            else
    281281            {
    282                 numSteps = qwtStepCount( stepSize * 60, maxMinSteps, 
     282                numSteps = qwtStepCount( stepSize * 60, maxMinSteps,
    283283                    limits, sizeof( limits ) / sizeof( int ) );
    284284            }
     
    359359                else
    360360                {
    361                     minStepSize = QwtScaleArithmetic::divideInterval( 
     361                    minStepSize = QwtScaleArithmetic::divideInterval(
    362362                        stepSizeInWeeks, maxMinSteps, 10 );
    363363                }
     
    401401                    minStepSize = double( stepSize ) / numSteps;
    402402            }
    403                
     403
    404404            break;
    405405        }
     
    445445}
    446446
    447 static QwtScaleDiv qwtDivideToSeconds( 
     447static QwtScaleDiv qwtDivideToSeconds(
    448448    const QDateTime &minDate, const QDateTime &maxDate,
    449449    double stepSize, int maxMinSteps,
    450     QwtDate::IntervalType intervalType ) 
     450    QwtDate::IntervalType intervalType )
    451451{
    452452    // calculate the min step size
    453453    double minStepSize = 0;
    454454
    455     if ( maxMinSteps > 1 ) 
    456     {
    457         minStepSize = qwtDivideMajorStep( stepSize, 
     455    if ( maxMinSteps > 1 )
     456    {
     457        minStepSize = qwtDivideMajorStep( stepSize,
    458458            maxMinSteps, intervalType );
    459459    }
     
    472472    const int secondsMajor = static_cast<int>( stepSize * s );
    473473    const double secondsMinor = minStepSize * s;
    474    
     474
    475475    // UTC excludes daylight savings. So from the difference
    476476    // of a date and its UTC counterpart we can find out
     
    484484    QList<double> minorTicks;
    485485
    486     for ( QDateTime dt = minDate; dt <= maxDate; 
     486    for ( QDateTime dt = minDate; dt <= maxDate;
    487487        dt = dt.addSecs( secondsMajor ) )
    488488    {
     
    501501                // we add some minor ticks for the DST hour,
    502502                // otherwise the ticks will be unaligned: 0, 2, 3, 5 ...
    503                 minorTicks += qwtDstTicks( 
     503                minorTicks += qwtDstTicks(
    504504                    dt, secondsMajor, qRound( secondsMinor ) );
    505505            }
     
    517517            for ( int i = 1; i < numMinorSteps; i++ )
    518518            {
    519                 const QDateTime mt = dt.addMSecs( 
     519                const QDateTime mt = dt.addMSecs(
    520520                    qRound64( i * secondsMinor * 1000 ) );
    521521
     
    529529                if ( minorTicks.isEmpty() || minorTicks.last() != minorValue )
    530530                {
    531                     const bool isMedium = ( numMinorSteps % 2 == 0 ) 
     531                    const bool isMedium = ( numMinorSteps % 2 == 0 )
    532532                        && ( i != 1 ) && ( i == numMinorSteps / 2 );
    533533
     
    553553}
    554554
    555 static QwtScaleDiv qwtDivideToMonths( 
     555static QwtScaleDiv qwtDivideToMonths(
    556556    QDateTime &minDate, const QDateTime &maxDate,
    557     double stepSize, int maxMinSteps ) 
    558 {
    559     // months are intervals with non 
    560     // equidistant ( in ms ) steps: we have to build the 
     557    double stepSize, int maxMinSteps )
     558{
     559    // months are intervals with non
     560    // equidistant ( in ms ) steps: we have to build the
    561561    // scale division manually
    562562
    563563    int minStepDays = 0;
    564     int minStepSize = 0.0; 
     564    int minStepSize = 0.0;
    565565
    566566    if ( maxMinSteps > 1 )
     
    579579        else
    580580        {
    581             minStepSize = qwtDivideMajorStep( 
     581            minStepSize = qwtDivideMajorStep(
    582582                stepSize, maxMinSteps, QwtDate::Month );
    583583        }
     
    588588    QList<double> minorTicks;
    589589
    590     for ( QDateTime dt = minDate; 
     590    for ( QDateTime dt = minDate;
    591591        dt <= maxDate; dt = dt.addMonths( stepSize ) )
    592592    {
     
    598598        if ( minStepDays > 0 )
    599599        {
    600             for ( int days = minStepDays; 
     600            for ( int days = minStepDays;
    601601                days < 30; days += minStepDays )
    602602            {
     
    637637}
    638638
    639 static QwtScaleDiv qwtDivideToYears( 
     639static QwtScaleDiv qwtDivideToYears(
    640640    const QDateTime &minDate, const QDateTime &maxDate,
    641     double stepSize, int maxMinSteps ) 
     641    double stepSize, int maxMinSteps )
    642642{
    643643    QList<double> majorTicks;
     
    649649    if ( maxMinSteps > 1 )
    650650    {
    651         minStepSize = qwtDivideMajorStep( 
     651        minStepSize = qwtDivideMajorStep(
    652652            stepSize, maxMinSteps, QwtDate::Year );
    653653    }
     
    702702            break;
    703703        }
    704     }   
     704    }
    705705
    706706    QwtScaleDiv scaleDiv;
     
    730730    QwtDate::Week0Type week0Type;
    731731    int maxWeeks;
    732 };     
     732};
    733733
    734734
     
    736736  \brief Constructor
    737737
    738   The engine is initialized to build scales for the 
     738  The engine is initialized to build scales for the
    739739  given time specification. It classifies intervals > 4 weeks
    740740  as >= Qt::Month. The first week of a year is defined like
     
    811811  \sa week0Type(), setMaxWeeks()
    812812  \note week0Type has no effect beside for intervals classified as
    813         QwtDate::Week. 
     813        QwtDate::Week.
    814814 */
    815815void QwtDateScaleEngine::setWeek0Type( QwtDate::Week0Type week0Type )
     
    819819
    820820/*!
    821   \return Setting how to identify the first week of a year. 
     821  \return Setting how to identify the first week of a year.
    822822  \sa setWeek0Type(), maxWeeks()
    823823 */
     
    835835  \param weeks Upper limit for the number of weeks
    836836
    837   \note In business charts a year is often devided
     837  \note In business charts a year is often divided
    838838        into weeks [1-52]
    839   \sa maxWeeks(), setWeek0Type() 
     839  \sa maxWeeks(), setWeek0Type()
    840840 */
    841841void QwtDateScaleEngine::setMaxWeeks( int weeks )
     
    863863  \return Interval classification
    864864 */
    865 QwtDate::IntervalType QwtDateScaleEngine::intervalType( 
    866     const QDateTime &minDate, const QDateTime &maxDate, 
     865QwtDate::IntervalType QwtDateScaleEngine::intervalType(
     866    const QDateTime &minDate, const QDateTime &maxDate,
    867867    int maxSteps ) const
    868868{
     
    910910  Align and divide an interval
    911911
    912   The algorithm aligns and divides the interval into steps. 
     912  The algorithm aligns and divides the interval into steps.
    913913
    914914  Datetime interval divisions are usually not equidistant and the
    915915  calculated stepSize can only be used as an approximation
    916   for the steps calculated by divideScale(). 
     916  for the steps calculated by divideScale().
    917917
    918918  \param maxNumSteps Max. number of steps
     
    951951            maxNumSteps = 1;
    952952
    953         const QwtDate::IntervalType intvType = 
     953        const QwtDate::IntervalType intvType =
    954954            intervalType( from, to, maxNumSteps );
    955955
     
    10151015    }
    10161016
    1017     const QwtDate::IntervalType intvType = 
     1017    const QwtDate::IntervalType intvType =
    10181018        intervalType( from, to, maxMajorSteps );
    10191019
     
    10311031        const QDateTime maxDate = QwtDate::ceil( to, intvType );
    10321032
    1033         scaleDiv = buildScaleDiv( minDate, maxDate, 
     1033        scaleDiv = buildScaleDiv( minDate, maxDate,
    10341034            maxMajorSteps, maxMinorSteps, intvType );
    10351035
     
    10461046}
    10471047
    1048 QwtScaleDiv QwtDateScaleEngine::buildScaleDiv( 
     1048QwtScaleDiv QwtDateScaleEngine::buildScaleDiv(
    10491049    const QDateTime &minDate, const QDateTime &maxDate,
    10501050    int maxMajorSteps, int maxMinorSteps,
     
    10521052{
    10531053    // calculate the step size
    1054     const double stepSize = qwtDivideScale( 
    1055         qwtIntervalWidth( minDate, maxDate, intervalType ), 
     1054    const double stepSize = qwtDivideScale(
     1055        qwtIntervalWidth( minDate, maxDate, intervalType ),
    10561056        maxMajorSteps, intervalType );
    10571057
     
    10601060    if ( !dt0.isValid() )
    10611061    {
    1062         // the floored date is out of the range of a 
     1062        // the floored date is out of the range of a
    10631063        // QDateTime - we ceil instead.
    10641064        dt0 = alignDate( minDate, stepSize, intervalType, true );
     
    10691069    if ( intervalType <= QwtDate::Week )
    10701070    {
    1071         scaleDiv = qwtDivideToSeconds( dt0, maxDate, 
     1071        scaleDiv = qwtDivideToSeconds( dt0, maxDate,
    10721072            stepSize, maxMinorSteps, intervalType );
    10731073    }
     
    10941094
    10951095  For Qt::Day alignments there is no "natural day 0" -
    1096   instead the first day of the year is used to avoid jumping 
     1096  instead the first day of the year is used to avoid jumping
    10971097  major ticks positions when panning a scale. For other alignments
    10981098  ( f.e according to the first day of the month ) alignDate()
     
    11061106  \return Aligned date/time value
    11071107 */
    1108 QDateTime QwtDateScaleEngine::alignDate( 
    1109     const QDateTime &dateTime, double stepSize, 
     1108QDateTime QwtDateScaleEngine::alignDate(
     1109    const QDateTime &dateTime, double stepSize,
    11101110    QwtDate::IntervalType intervalType, bool up ) const
    11111111{
     
    11231123        case QwtDate::Millisecond:
    11241124        {
    1125             const int ms = qwtAlignValue( 
     1125            const int ms = qwtAlignValue(
    11261126                dt.time().msec(), stepSize, up ) ;
    11271127
     
    12931293    if ( !dt.isValid() )
    12941294    {
    1295         const QDate date = ( value <= 0.0 ) 
     1295        const QDate date = ( value <= 0.0 )
    12961296            ? QwtDate::minDate() : QwtDate::maxDate();
    12971297
  • trunk/BNC/qwt/qwt_date_scale_engine.h

    r8127 r9383  
    2828  QwtDateScaleEngine supports representations depending
    2929  on Qt::TimeSpec specifications. The valid range for scales
    30   is limited by the range of QDateTime, that differs 
     30  is limited by the range of QDateTime, that differs
    3131  between Qt4 and Qt5.
    32  
     32
    3333  Datetime values are expected as the number of milliseconds since
    3434  1970-01-01T00:00:00 Universal Coordinated Time - also known
    35   as "The Epoch", that can be converted to QDateTime using 
     35  as "The Epoch", that can be converted to QDateTime using
    3636  QwtDate::toDateTime().
    3737
     
    5353    void setWeek0Type( QwtDate::Week0Type );
    5454    QwtDate::Week0Type week0Type() const;
    55    
     55
    5656    void setMaxWeeks( int );
    5757    int maxWeeks() const;
     
    6060        double &x1, double &x2, double &stepSize ) const;
    6161
    62     virtual QwtScaleDiv divideScale( 
     62    virtual QwtScaleDiv divideScale(
    6363        double x1, double x2,
    6464        int maxMajorSteps, int maxMinorSteps,
    6565        double stepSize = 0.0 ) const;
    6666
    67     virtual QwtDate::IntervalType intervalType( 
     67    virtual QwtDate::IntervalType intervalType(
    6868        const QDateTime &, const QDateTime &, int maxSteps ) const;
    6969
     
    7676private:
    7777    QwtScaleDiv buildScaleDiv( const QDateTime &, const QDateTime &,
    78         int maxMajorSteps, int maxMinorSteps, 
     78        int maxMajorSteps, int maxMinorSteps,
    7979        QwtDate::IntervalType ) const;
    8080
  • trunk/BNC/qwt/qwt_dial.cpp

    r8127 r9383  
    238238    const QRect cr = contentsRect();
    239239
    240     const double dim = qMin( cr.width(), cr.height() );
     240    const int dim = qMin( cr.width(), cr.height() );
    241241
    242242    QRect inner( 0, 0, dim, dim );
     
    338338        p.setRenderHint( QPainter::Antialiasing, true );
    339339        p.translate( -r.topLeft() );
    340            
     340
    341341        if ( d_data->mode != QwtDial::RotateScale )
    342342            drawContents( &p );
     
    475475  \param radius Radius of the scale
    476476*/
    477 void QwtDial::drawScale( QPainter *painter, 
     477void QwtDial::drawScale( QPainter *painter,
    478478    const QPointF &center, double radius ) const
    479479{
     
    568568
    569569  The motivation for setting a scale draw is often
    570   to overload QwtRoundScaleDraw::label() to return 
     570  to overload QwtRoundScaleDraw::label() to return
    571571  individual tick labels.
    572  
     572
    573573  \param scaleDraw Scale draw
    574574  \warning The previous scale draw is deleted
     
    601601        maxScaleArc = minScaleArc + 360.0;
    602602
    603     if ( ( minScaleArc != d_data->minScaleArc ) || 
     603    if ( ( minScaleArc != d_data->minScaleArc ) ||
    604604        ( maxScaleArc != d_data->maxScaleArc ) )
    605605    {
     
    612612}
    613613
    614 /*! 
     614/*!
    615615  Set the lower limit for the scale arc
    616616
     
    623623}
    624624
    625 /*! 
     625/*!
    626626  \return Lower limit of the scale arc
    627627  \sa setScaleArc()
     
    632632}
    633633
    634 /*! 
     634/*!
    635635  Set the upper limit for the scale arc
    636636
     
    643643}
    644644
    645 /*! 
     645/*!
    646646  \return Upper limit of the scale arc
    647647  \sa setScaleArc()
     
    691691    const int d = 6 * sh + 2 * lineWidth();
    692692
    693     QSize hint( d, d ); 
     693    QSize hint( d, d );
    694694    if ( !isReadOnly() )
    695695        hint = hint.expandedTo( QApplication::globalStrut() );
     
    718718  \param pos Mouse position
    719719
    720   \retval True, when the inner circle contains pos 
     720  \retval True, when the inner circle contains pos
    721721  \sa scrolledTo()
    722722*/
     
    730730            angle = 360.0 - angle;
    731731
    732         double valueAngle = 
     732        double valueAngle =
    733733            qwtNormalizeDegrees( 90.0 - scaleMap().transform( value() ) );
    734734
     
    775775            if ( qAbs( arc ) > 180.0 )
    776776            {
    777                 boundedAngle = ( arc > 0 ) 
     777                boundedAngle = ( arc > 0 )
    778778                    ? scaleMap().p1() : scaleMap().p2();
    779779            }
     
    821821            break;
    822822    }
    823    
     823
    824824    QwtAbstractSlider::changeEvent( event );
    825825}
     
    847847
    848848/*!
    849   Invalidate the internal caches and call 
     849  Invalidate the internal caches and call
    850850  QwtAbstractSlider::scaleChange()
    851851 */
  • trunk/BNC/qwt/qwt_dial.h

    r8127 r9383  
    104104    Mode mode() const;
    105105
    106     void setScaleArc( double min, double max );
     106    void setScaleArc( double minArc, double maxArc );
    107107
    108     void setMinScaleArc( double min );
     108    void setMinScaleArc( double );
    109109    double minScaleArc() const;
    110110
    111     void setMaxScaleArc( double min );
     111    void setMaxScaleArc( double );
    112112    double maxScaleArc() const;
    113113
     
    137137    virtual void changeEvent( QEvent * );
    138138
    139     virtual void drawFrame( QPainter *p );
     139    virtual void drawFrame( QPainter * );
    140140    virtual void drawContents( QPainter * ) const;
    141141    virtual void drawFocusIndicator( QPainter * ) const;
     
    143143    void invalidateCache();
    144144
    145     virtual void drawScale( QPainter *, 
     145    virtual void drawScale( QPainter *,
    146146        const QPointF &center, double radius ) const;
    147147
    148     virtual void drawScaleContents( QPainter *painter, 
     148    virtual void drawScaleContents( QPainter *painter,
    149149        const QPointF &center, double radius ) const;
    150150
  • trunk/BNC/qwt/qwt_dial_needle.cpp

    r8127 r9383  
    1414#include <qapplication.h>
    1515#include <qpainter.h>
     16#include <qpainterpath.h>
    1617
    1718#if QT_VERSION < 0x040601
     
    6768}
    6869
    69 static void qwtDrawShadedPointer( QPainter *painter, 
     70static void qwtDrawShadedPointer( QPainter *painter,
    7071    const QColor &lightColor, const QColor &darkColor,
    7172    double length, double width )
     
    171172
    172173    QColor color[4];
    173     color[0] = darkColor.light( 100 + colorOffset );
    174     color[1] = darkColor.dark( 100 + colorOffset );
    175     color[2] = lightColor.light( 100 + colorOffset );
    176     color[3] = lightColor.dark( 100 + colorOffset );
     174    color[0] = darkColor.lighter( 100 + colorOffset );
     175    color[1] = darkColor.darker( 100 + colorOffset );
     176    color[2] = lightColor.lighter( 100 + colorOffset );
     177    color[3] = lightColor.darker( 100 + colorOffset );
    177178
    178179    painter->setPen( Qt::NoPen );
     
    223224  \param colorGroup Color group, used for painting
    224225*/
    225 void QwtDialNeedle::draw( QPainter *painter, 
    226     const QPointF &center, double length, double direction, 
     226void QwtDialNeedle::draw( QPainter *painter,
     227    const QPointF &center, double length, double direction,
    227228    QPalette::ColorGroup colorGroup ) const
    228229{
     
    316317 \param colorGroup Color group, used for painting
    317318*/
    318 void QwtDialSimpleNeedle::drawNeedle( QPainter *painter, 
     319void QwtDialSimpleNeedle::drawNeedle( QPainter *painter,
    319320    double length, QPalette::ColorGroup colorGroup ) const
    320321{
     
    327328            width = qMax(length * 0.06, 6.0);
    328329
    329         qwtDrawArrowNeedle( painter, 
     330        qwtDrawArrowNeedle( painter,
    330331            palette(), colorGroup, length, width );
    331332
     
    336337        if ( width <= 0.0 )
    337338            width = 5.0;
    338        
     339
    339340        QPen pen ( palette().brush( colorGroup, QPalette::Mid ), width );
    340341        pen.setCapStyle( Qt::FlatCap );
    341    
     342
    342343        painter->setPen( pen );
    343344        painter->drawLine( QPointF( 0.0, 0.0 ), QPointF( length, 0.0 ) );
     
    373374    \param colorGroup Color group, used for painting
    374375*/
    375 void QwtCompassMagnetNeedle::drawNeedle( QPainter *painter, 
     376void QwtCompassMagnetNeedle::drawNeedle( QPainter *painter,
    376377    double length, QPalette::ColorGroup colorGroup ) const
    377378{
     
    386387
    387388        qwtDrawShadedPointer( painter,
    388             dark.light( 100 + colorOffset ),
    389             dark.dark( 100 + colorOffset ),
     389            dark.lighter( 100 + colorOffset ),
     390            dark.darker( 100 + colorOffset ),
    390391            length, width );
    391        
     392
    392393        painter->rotate( 180.0 );
    393    
     394
    394395        qwtDrawShadedPointer( painter,
    395             light.light( 100 + colorOffset ),
    396             light.dark( 100 + colorOffset ),
     396            light.lighter( 100 + colorOffset ),
     397            light.darker( 100 + colorOffset ),
    397398            length, width );
    398        
     399
    399400        const QBrush baseBrush = palette().brush( colorGroup, QPalette::Base );
    400401        drawKnob( painter, width, baseBrush, true );
     
    431432 \param colorGroup Color group, used for painting
    432433*/
    433 void QwtCompassWindArrow::drawNeedle( QPainter *painter, 
     434void QwtCompassWindArrow::drawNeedle( QPainter *painter,
    434435    double length, QPalette::ColorGroup colorGroup ) const
    435436{
  • trunk/BNC/qwt/qwt_dial_needle.h

    r8127 r9383  
    3636
    3737    virtual void draw( QPainter *painter, const QPointF &center,
    38         double length, double direction, 
     38        double length, double direction,
    3939        QPalette::ColorGroup = QPalette::Active ) const;
    4040
     
    4444
    4545      The origin of the needle is at position (0.0, 0.0 )
    46       pointing in direction 0.0 ( = east ). 
     46      pointing in direction 0.0 ( = east ).
    4747
    48       The painter is already initialized with translation and 
     48      The painter is already initialized with translation and
    4949      rotation.
    5050
     
    5555      \sa setPalette(), palette()
    5656    */
    57     virtual void drawNeedle( QPainter *painter, 
     57    virtual void drawNeedle( QPainter *painter,
    5858        double length, QPalette::ColorGroup colorGroup ) const = 0;
    5959
    60     virtual void drawKnob( QPainter *, double width, 
     60    virtual void drawKnob( QPainter *, double width,
    6161        const QBrush &, bool sunken ) const;
    6262
     
    133133        TriangleStyle,
    134134
    135         //! A thin needle 
     135        //! A thin needle
    136136        ThinStyle
    137137    };
     
    141141
    142142protected:
    143     virtual void drawNeedle( QPainter *, 
     143    virtual void drawNeedle( QPainter *,
    144144        double length, QPalette::ColorGroup ) const;
    145145
     
    178178
    179179protected:
    180     virtual void drawNeedle( QPainter *, 
     180    virtual void drawNeedle( QPainter *,
    181181        double length, QPalette::ColorGroup ) const;
    182182
     
    185185};
    186186
    187 #endif 
     187#endif
  • trunk/BNC/qwt/qwt_dyngrid_layout.cpp

    r8127 r9383  
    126126}
    127127
    128 /*! 
     128/*!
    129129  \brief Add an item to the next free position.
    130130  \param item Layout item
     
    248248
    249249/*!
    250   \brief Calculate the number of columns for a given width. 
    251 
    252   The calculation tries to use as many columns as possible 
     250  \brief Calculate the number of columns for a given width.
     251
     252  The calculation tries to use as many columns as possible
    253253  ( limited by maxColumns() )
    254254
     
    264264
    265265    uint maxColumns = itemCount();
    266     if ( d_data->maxColumns > 0 ) 
     266    if ( d_data->maxColumns > 0 )
    267267        maxColumns = qMin( d_data->maxColumns, maxColumns );
    268268
  • trunk/BNC/qwt/qwt_dyngrid_layout.h

    r8127 r9383  
    2929    Q_OBJECT
    3030public:
    31     explicit QwtDynGridLayout( QWidget *, int margin = 0, int space = -1 );
    32     explicit QwtDynGridLayout( int space = -1 );
     31    explicit QwtDynGridLayout( QWidget *, int margin = 0, int spacing = -1 );
     32    explicit QwtDynGridLayout( int spacing = -1 );
    3333
    3434    virtual ~QwtDynGridLayout();
     
    3636    virtual void invalidate();
    3737
    38     void setMaxColumns( uint maxCols );
     38    void setMaxColumns( uint maxColumns );
    3939    uint maxColumns() const;
    4040
     
    5050    void setExpandingDirections( Qt::Orientations );
    5151    virtual Qt::Orientations expandingDirections() const;
    52     QList<QRect> layoutItems( const QRect &, uint numCols ) const;
     52    QList<QRect> layoutItems( const QRect &, uint numColumns ) const;
    5353
    5454    virtual int maxItemWidth() const;
     
    6868protected:
    6969
    70     void layoutGrid( uint numCols,
     70    void layoutGrid( uint numColumns,
    7171        QVector<int>& rowHeight, QVector<int>& colWidth ) const;
    72     void stretchGrid( const QRect &rect, uint numCols,
     72    void stretchGrid( const QRect &rect, uint numColumns,
    7373        QVector<int>& rowHeight, QVector<int>& colWidth ) const;
    7474
    7575private:
    7676    void init();
    77     int maxRowWidth( int numCols ) const;
     77    int maxRowWidth( int numColumns ) const;
    7878
    7979    class PrivateData;
  • trunk/BNC/qwt/qwt_event_pattern.cpp

    r8127 r9383  
    106106  \sa QMouseEvent
    107107*/
    108 void QwtEventPattern::setMousePattern( MousePatternCode pattern, 
     108void QwtEventPattern::setMousePattern( MousePatternCode pattern,
    109109    Qt::MouseButton button, Qt::KeyboardModifiers modifiers )
    110110{
     
    125125  \sa QKeyEvent
    126126*/
    127 void QwtEventPattern::setKeyPattern( KeyPatternCode pattern, 
     127void QwtEventPattern::setKeyPattern( KeyPatternCode pattern,
    128128    int key, Qt::KeyboardModifiers modifiers )
    129129{
     
    186186  \sa keyMatch()
    187187*/
    188 bool QwtEventPattern::mouseMatch( MousePatternCode code, 
     188bool QwtEventPattern::mouseMatch( MousePatternCode code,
    189189    const QMouseEvent *event ) const
    190190{
     
    232232  \sa mouseMatch()
    233233*/
    234 bool QwtEventPattern::keyMatch( KeyPatternCode code, 
     234bool QwtEventPattern::keyMatch( KeyPatternCode code,
    235235    const QKeyEvent *event ) const
    236236{
  • trunk/BNC/qwt/qwt_event_pattern.h

    r8127 r9383  
    4444    enum MousePatternCode
    4545    {
    46         /*! 
    47           The default setting for 1, 2 and 3 button mice is:
    48 
    49           - Qt::LeftButton 
    50           - Qt::LeftButton 
    51           - Qt::LeftButton 
     46        /*!
     47          The default setting for 1, 2 and 3 button mice is:
     48
     49          - Qt::LeftButton
     50          - Qt::LeftButton
     51          - Qt::LeftButton
    5252         */
    5353        MouseSelect1,
     
    150150    public:
    151151        //! Constructor
    152         MousePattern( Qt::MouseButton btn = Qt::NoButton, 
     152        MousePattern( Qt::MouseButton btn = Qt::NoButton,
    153153                Qt::KeyboardModifiers modifierCodes = Qt::NoModifier ):
    154154            button( btn ),
     
    157157        }
    158158
    159         //! Button 
     159        //! Button
    160160        Qt::MouseButton button;
    161161
     
    169169    public:
    170170        //! Constructor
    171         KeyPattern( int keyCode = Qt::Key_unknown, 
     171        KeyPattern( int keyCode = Qt::Key_unknown,
    172172                Qt::KeyboardModifiers modifierCodes = Qt::NoModifier ):
    173173            key( keyCode ),
     
    189189    void initKeyPattern();
    190190
    191     void setMousePattern( MousePatternCode, Qt::MouseButton button, 
     191    void setMousePattern( MousePatternCode, Qt::MouseButton button,
    192192        Qt::KeyboardModifiers = Qt::NoModifier );
    193193
    194     void setKeyPattern( KeyPatternCode, int keyCode,
    195         Qt::KeyboardModifiers modifierCodes = Qt::NoModifier );
     194    void setKeyPattern( KeyPatternCode, int key,
     195        Qt::KeyboardModifiers modifiers = Qt::NoModifier );
    196196
    197197    void setMousePattern( const QVector<MousePattern> & );
  • trunk/BNC/qwt/qwt_global.h

    r8127 r9383  
    1515// QWT_VERSION is (major << 16) + (minor << 8) + patch.
    1616
    17 #define QWT_VERSION       0x060104
    18 #define QWT_VERSION_STR   "6.1.4"
     17#define QWT_VERSION       0x060106
     18#define QWT_VERSION_STR   "6.1.6"
    1919
    2020#if defined(_MSC_VER) /* MSVC Compiler */
     
    2727#ifdef QWT_DLL
    2828
    29 #if defined(QWT_MAKEDLL)     // create a Qwt DLL library 
     29#if defined(QWT_MAKEDLL)     // create a Qwt DLL library
    3030#define QWT_EXPORT Q_DECL_EXPORT
    3131#else                        // use a Qwt DLL library
    32 #define QWT_EXPORT Q_DECL_IMPORT 
     32#define QWT_EXPORT Q_DECL_IMPORT
    3333#endif
    3434
     
    3939#endif
    4040
    41 #endif 
     41#endif
  • trunk/BNC/qwt/qwt_graphic.cpp

    r8127 r9383  
    3838}
    3939
    40 static QRectF qwtStrokedPathRect( 
     40static QRectF qwtStrokedPathRect(
    4141    const QPainter *painter, const QPainterPath &path )
    4242{
     
    6464}
    6565
    66 static inline void qwtExecCommand( 
    67     QPainter *painter, const QwtPainterCommand &cmd, 
     66static inline void qwtExecCommand(
     67    QPainter *painter, const QwtPainterCommand &cmd,
    6868    QwtGraphic::RenderHints renderHints,
    6969    const QTransform &transform,
     
    122122        {
    123123            const QwtPainterCommand::ImageData *data = cmd.imageData();
    124             painter->drawImage( data->rect, data->image, 
     124            painter->drawImage( data->rect, data->image,
    125125                data->subRect, data->flags );
    126126            break;
     
    130130            const QwtPainterCommand::StateData *data = cmd.stateData();
    131131
    132             if ( data->flags & QPaintEngine::DirtyPen ) 
     132            if ( data->flags & QPaintEngine::DirtyPen )
    133133                painter->setPen( data->pen );
    134134
    135             if ( data->flags & QPaintEngine::DirtyBrush ) 
     135            if ( data->flags & QPaintEngine::DirtyBrush )
    136136                painter->setBrush( data->brush );
    137137
    138             if ( data->flags & QPaintEngine::DirtyBrushOrigin ) 
     138            if ( data->flags & QPaintEngine::DirtyBrushOrigin )
    139139                painter->setBrushOrigin( data->brushOrigin );
    140140
    141             if ( data->flags & QPaintEngine::DirtyFont ) 
     141            if ( data->flags & QPaintEngine::DirtyFont )
    142142                painter->setFont( data->font );
    143143
    144             if ( data->flags & QPaintEngine::DirtyBackground ) 
     144            if ( data->flags & QPaintEngine::DirtyBackground )
    145145            {
    146146                painter->setBackgroundMode( data->backgroundMode );
     
    148148            }
    149149
    150             if ( data->flags & QPaintEngine::DirtyTransform ) 
     150            if ( data->flags & QPaintEngine::DirtyTransform )
    151151            {
    152152                painter->setTransform( data->transform * transform );
    153153            }
    154154
    155             if ( data->flags & QPaintEngine::DirtyClipEnabled ) 
     155            if ( data->flags & QPaintEngine::DirtyClipEnabled )
    156156                painter->setClipping( data->isClipEnabled );
    157157
    158             if ( data->flags & QPaintEngine::DirtyClipRegion) 
     158            if ( data->flags & QPaintEngine::DirtyClipRegion)
    159159            {
    160                 painter->setClipRegion( data->clipRegion, 
     160                painter->setClipRegion( data->clipRegion,
    161161                    data->clipOperation );
    162162            }
    163163
    164             if ( data->flags & QPaintEngine::DirtyClipPath ) 
     164            if ( data->flags & QPaintEngine::DirtyClipPath )
    165165            {
    166166                painter->setClipPath( data->clipPath, data->clipOperation );
    167167            }
    168168
    169             if ( data->flags & QPaintEngine::DirtyHints) 
     169            if ( data->flags & QPaintEngine::DirtyHints)
    170170            {
    171171                const QPainter::RenderHints hints = data->renderHints;
     
    187187            }
    188188
    189             if ( data->flags & QPaintEngine::DirtyCompositionMode) 
     189            if ( data->flags & QPaintEngine::DirtyCompositionMode)
    190190                painter->setCompositionMode( data->compositionMode );
    191191
    192             if ( data->flags & QPaintEngine::DirtyOpacity) 
     192            if ( data->flags & QPaintEngine::DirtyOpacity)
    193193                painter->setOpacity( data->opacity );
    194194
     
    210210    }
    211211
    212     PathInfo( const QRectF &pointRect, 
     212    PathInfo( const QRectF &pointRect,
    213213            const QRectF &boundingRect, bool scalablePen ):
    214214        d_pointRect( pointRect ),
     
    247247    }
    248248
    249     inline double scaleFactorX( const QRectF& pathRect, 
     249    inline double scaleFactorX( const QRectF& pathRect,
    250250        const QRectF &targetRect, bool scalePens ) const
    251251    {
     
    258258        const double r = qAbs( pathRect.right() - p0.x() );
    259259
    260         const double w = 2.0 * qMin( l, r ) 
     260        const double w = 2.0 * qMin( l, r )
    261261            * targetRect.width() / pathRect.width();
    262262
     
    268268        else
    269269        {
    270             const double pw = qMax( 
     270            const double pw = qMax(
    271271                qAbs( d_boundingRect.left() - d_pointRect.left() ),
    272272                qAbs( d_boundingRect.right() - d_pointRect.right() ) );
     
    278278    }
    279279
    280     inline double scaleFactorY( const QRectF& pathRect, 
     280    inline double scaleFactorY( const QRectF& pathRect,
    281281        const QRectF &targetRect, bool scalePens ) const
    282282    {
     
    289289        const double b = qAbs( pathRect.bottom() - p0.y() );
    290290
    291         const double h = 2.0 * qMin( t, b ) 
     291        const double h = 2.0 * qMin( t, b )
    292292            * targetRect.height() / pathRect.height();
    293293
     
    299299        else
    300300        {
    301             const double pw = 
     301            const double pw =
    302302                qMax( qAbs( d_boundingRect.top() - d_pointRect.top() ),
    303303                qAbs( d_boundingRect.bottom() - d_pointRect.bottom() ) );
     
    352352  \brief Copy constructor
    353353
    354   \param other Source 
     354  \param other Source
    355355  \sa operator=()
    356356 */
     
    371371  \brief Assignment operator
    372372
    373   \param other Source 
     373  \param other Source
    374374  \return A reference of this object
    375375 */
     
    383383
    384384/*!
    385   \brief Clear all stored commands 
     385  \brief Clear all stored commands
    386386  \sa isNull()
    387387 */
    388 void QwtGraphic::reset() 
     388void QwtGraphic::reset()
    389389{
    390390    d_data->commands.clear();
     
    460460
    461461/*!
    462   The control point rectangle is the bounding rectangle 
     462  The control point rectangle is the bounding rectangle
    463463  of all control points of the paths and the target
    464464  rectangles of the images/pixmaps.
     
    478478  \brief Calculate the target rectangle for scaling the graphic
    479479
    480   \param sx Horizontal scaling factor 
    481   \param sy Vertical scaling factor 
    482 
    483   \note In case of paths that are painted with a cosmetic pen 
     480  \param sx Horizontal scaling factor
     481  \param sy Vertical scaling factor
     482
     483  \note In case of paths that are painted with a cosmetic pen
    484484        ( see QPen::isCosmetic() ) the target rectangle is different to
    485485        multiplying the bounding rectangle.
     
    500500    for ( int i = 0; i < d_data->pathInfos.size(); i++ )
    501501    {
    502         rect |= d_data->pathInfos[i].scaledBoundingRect( sx, sy, 
     502        rect |= d_data->pathInfos[i].scaledBoundingRect( sx, sy,
    503503            !d_data->renderHints.testFlag( RenderPensUnscaled ) );
    504504    }
     
    519519  The default size is used in all methods rendering the graphic,
    520520  where no size is explicitly specified. Assigning an empty size
    521   means, that the default size will be calculated from the bounding 
     521  means, that the default size will be calculated from the bounding
    522522  rectangle.
    523523
    524524  The default setting is an empty size.
    525    
     525
    526526  \param size Default size
    527527
     
    544544
    545545  The default size is used in all methods rendering the graphic,
    546   where no size is explicitly specified. 
     546  where no size is explicitly specified.
    547547
    548548  \return Default size
     
    575575    for ( int i = 0; i < numCommands; i++ )
    576576    {
    577         qwtExecCommand( painter, commands[i], 
     577        qwtExecCommand( painter, commands[i],
    578578            d_data->renderHints, transform, d_data->initialTransform );
    579579    }
     
    592592  \param aspectRatioMode Mode how to scale - See Qt::AspectRatioMode
    593593 */
    594 void QwtGraphic::render( QPainter *painter, const QSizeF &size, 
     594void QwtGraphic::render( QPainter *painter, const QSizeF &size,
    595595    Qt::AspectRatioMode aspectRatioMode ) const
    596596{
     
    608608  \param aspectRatioMode Mode how to scale - See Qt::AspectRatioMode
    609609 */
    610 void QwtGraphic::render( QPainter *painter, const QRectF &rect, 
     610void QwtGraphic::render( QPainter *painter, const QRectF &rect,
    611611    Qt::AspectRatioMode aspectRatioMode ) const
    612612{
     
    614614        return;
    615615
    616     double sx = 1.0; 
     616    double sx = 1.0;
    617617    double sy = 1.0;
    618618
     
    623623        sy = rect.height() / d_data->pointRect.height();
    624624
    625     const bool scalePens = 
     625    const bool scalePens =
    626626        !d_data->renderHints.testFlag( RenderPensUnscaled );
    627627
     
    630630        const PathInfo info = d_data->pathInfos[i];
    631631
    632         const double ssx = info.scaleFactorX( 
     632        const double ssx = info.scaleFactorX(
    633633            d_data->pointRect, rect, scalePens );
    634634
     
    636636            sx = qMin( sx, ssx );
    637637
    638         const double ssy = info.scaleFactorY( 
     638        const double ssy = info.scaleFactorY(
    639639            d_data->pointRect, rect, scalePens );
    640640
     
    666666    {
    667667        // we don't want to scale pens according to sx/sy,
    668         // but we want to apply the scaling from the 
     668        // but we want to apply the scaling from the
    669669        // painter transformation later
    670670
     
    690690  \param painter Qt painter
    691691  \param pos Reference point, where to render
    692   \param alignment Flags how to align the target rectangle 
     692  \param alignment Flags how to align the target rectangle
    693693                   to pos.
    694694 */
    695 void QwtGraphic::render( QPainter *painter, 
     695void QwtGraphic::render( QPainter *painter,
    696696    const QPointF &pos, Qt::Alignment alignment ) const
    697697{
     
    729729/*!
    730730  \brief Convert the graphic to a QPixmap
    731    
     731
    732732  All pixels of the pixmap get initialized by Qt::transparent
    733733  before the graphic is scaled and rendered on it.
    734    
     734
    735735  The size of the pixmap is the default size ( ceiled to integers )
    736736  of the graphic.
     
    738738  \return The graphic as pixmap in default size
    739739  \sa defaultSize(), toImage(), render()
    740  */ 
     740 */
    741741QPixmap QwtGraphic::toPixmap() const
    742742{
     
    819819/*!
    820820  \brief Convert the graphic to a QImage
    821    
     821
    822822  All pixels of the image get initialized by 0 ( transparent )
    823823  before the graphic is scaled and rendered on it.
     
    827827  The size of the image is the default size ( ceiled to integers )
    828828  of the graphic.
    829    
     829
    830830  \return The graphic as image in default size
    831831  \sa defaultSize(), toPixmap(), render()
     
    874874        QRectF boundingRect = pointRect;
    875875
    876         if ( painter->pen().style() != Qt::NoPen 
     876        if ( painter->pen().style() != Qt::NoPen
    877877            && painter->pen().brush().style() != Qt::NoBrush )
    878878        {
     
    883883        updateBoundingRect( boundingRect );
    884884
    885         d_data->pathInfos += PathInfo( pointRect, 
     885        d_data->pathInfos += PathInfo( pointRect,
    886886            boundingRect, qwtHasScalablePen( painter ) );
    887887    }
     
    897897  \sa QPaintEngine::drawPixmap()
    898898*/
    899 void QwtGraphic::drawPixmap( const QRectF &rect, 
     899void QwtGraphic::drawPixmap( const QRectF &rect,
    900900    const QPixmap &pixmap, const QRectF &subRect )
    901901{
     
    997997        return;
    998998
    999     // to calculate a proper bounding rectangle we don't simply copy 
    1000     // the commands. 
     999    // to calculate a proper bounding rectangle we don't simply copy
     1000    // the commands.
    10011001
    10021002    const QwtPainterCommand *cmds = commands.constData();
  • trunk/BNC/qwt/qwt_graphic.h

    r8127 r9383  
    3737    - QSvgRenderer/QSvgGenerator\n
    3838      Unfortunately QSvgRenderer hides to much information about
    39       its nodes in internal APIs, that are necessary for proper 
    40       layout calculations. Also it is derived from QObject and 
     39      its nodes in internal APIs, that are necessary for proper
     40      layout calculations. Also it is derived from QObject and
    4141      can't be copied like QImage/QPixmap.
    4242
    4343    QwtGraphic maps all scalable drawing primitives to a QPainterPath
    44     and stores them together with the painter state changes 
    45     ( pen, brush, transformation ... ) in a list of QwtPaintCommands. 
    46     For being a complete QPaintDevice it also stores pixmaps or images, 
    47     what is somehow against the idea of the class, because these objects 
     44    and stores them together with the painter state changes
     45    ( pen, brush, transformation ... ) in a list of QwtPaintCommands.
     46    For being a complete QPaintDevice it also stores pixmaps or images,
     47    what is somehow against the idea of the class, because these objects
    4848    can't be scaled without a loss in quality.
    4949
    5050    The main issue about scaling a QwtGraphic object are the pens used for
    51     drawing the outlines of the painter paths. While non cosmetic pens 
    52     ( QPen::isCosmetic() ) are scaled with the same ratio as the path, 
    53     cosmetic pens have a fixed width. A graphic might have paths with 
     51    drawing the outlines of the painter paths. While non cosmetic pens
     52    ( QPen::isCosmetic() ) are scaled with the same ratio as the path,
     53    cosmetic pens have a fixed width. A graphic might have paths with
    5454    different pens - cosmetic and non-cosmetic.
    5555
     
    5858    - control point rectangle\n
    5959      The control point rectangle is the bounding rectangle of all
    60       control point rectangles of the painter paths, or the target 
     60      control point rectangles of the painter paths, or the target
    6161      rectangle of the pixmaps/images.
    6262
     
    6565      what is needed for rendering the outline with an unscaled pen.
    6666
    67     Because the offset for drawing the outline depends on the shape 
    68     of the painter path ( the peak of a triangle is different than the flat side ) 
    69     scaling with a fixed aspect ratio always needs to be calculated from the 
     67    Because the offset for drawing the outline depends on the shape
     68    of the painter path ( the peak of a triangle is different than the flat side )
     69    scaling with a fixed aspect ratio always needs to be calculated from the
    7070    control point rectangle.
    7171
     
    7575{
    7676public:
    77     /*! 
     77    /*!
    7878        Hint how to render a graphic
    7979        \sa setRenderHint(), testRenderHint()
     
    8282    {
    8383        /*!
    84            When rendering a QwtGraphic a specific scaling between 
     84           When rendering a QwtGraphic a specific scaling between
    8585           the controlPointRect() and the coordinates of the target rectangle
    8686           is set up internally in render().
     
    9696    };
    9797
    98     /*! 
     98    /*!
    9999        \brief Render hints
    100100
     
    117117    void render( QPainter * ) const;
    118118
    119     void render( QPainter *, const QSizeF &, 
     119    void render( QPainter *, const QSizeF &,
    120120            Qt::AspectRatioMode = Qt::IgnoreAspectRatio  ) const;
    121121
    122     void render( QPainter *, const QRectF &, 
     122    void render( QPainter *, const QRectF &,
    123123            Qt::AspectRatioMode = Qt::IgnoreAspectRatio  ) const;
    124124
     
    126126        Qt::Alignment = Qt::AlignTop | Qt::AlignLeft ) const;
    127127
    128     QPixmap toPixmap() const; 
    129     QPixmap toPixmap( const QSize &, 
     128    QPixmap toPixmap() const;
     129    QPixmap toPixmap( const QSize &,
    130130        Qt::AspectRatioMode = Qt::IgnoreAspectRatio  ) const;
    131131
    132     QImage toImage() const; 
    133     QImage toImage( const QSize &, 
     132    QImage toImage() const;
     133    QImage toImage( const QSize &,
    134134        Qt::AspectRatioMode = Qt::IgnoreAspectRatio  ) const;
    135135
     
    144144    void setDefaultSize( const QSizeF & );
    145145    QSizeF defaultSize() const;
    146    
     146
    147147    void setRenderHint( RenderHint, bool on = true );
    148148    bool testRenderHint( RenderHint ) const;
  • trunk/BNC/qwt/qwt_interval.cpp

    r8127 r9383  
    131131}
    132132
    133 /*! 
     133/*!
    134134  \brief Intersect 2 intervals
    135  
     135
    136136  \param other Interval to be intersect with
    137137  \return Intersection
     
    198198}
    199199
    200 /*! 
     200/*!
    201201  \brief Unite this interval with the given interval.
    202202
     
    210210}
    211211
    212 /*! 
     212/*!
    213213  \brief Intersect this interval with the given interval.
    214214
  • trunk/BNC/qwt/qwt_interval.h

    r8127 r9383  
    2828public:
    2929    /*!
    30       Flag indicating if a border is included or excluded 
     30      Flag indicating if a border is included or excluded
    3131      \sa setBorderFlags(), borderFlags()
    3232    */
     
    5858    QwtInterval normalized() const;
    5959    QwtInterval inverted() const;
    60     QwtInterval limited( double minValue, double maxValue ) const;
     60    QwtInterval limited( double lowerBound, double upperBound ) const;
    6161
    6262    bool operator==( const QwtInterval & ) const;
     
    232232/*!
    233233   \brief Intersection of two intervals
    234  
     234
    235235   \param other Interval to intersect with
    236236   \return Intersection of this and other
     
    258258}
    259259
    260 /*! 
     260/*!
    261261   \brief Compare two intervals
    262262
     
    270270           ( d_borderFlags == other.d_borderFlags );
    271271}
    272 /*! 
     272/*!
    273273   \brief Compare two intervals
    274274
  • trunk/BNC/qwt/qwt_interval_symbol.cpp

    r8127 r9383  
    6969
    7070//! \brief Assignment operator
    71 QwtIntervalSymbol &QwtIntervalSymbol::operator=( 
     71QwtIntervalSymbol &QwtIntervalSymbol::operator=(
    7272    const QwtIntervalSymbol &other )
    7373{
     
    7777
    7878//! \brief Compare two symbols
    79 bool QwtIntervalSymbol::operator==( 
     79bool QwtIntervalSymbol::operator==(
    8080    const QwtIntervalSymbol &other ) const
    8181{
     
    8484
    8585//! \brief Compare two symbols
    86 bool QwtIntervalSymbol::operator!=( 
     86bool QwtIntervalSymbol::operator!=(
    8787    const QwtIntervalSymbol &other ) const
    8888{
     
    153153}
    154154
    155 /*! 
     155/*!
    156156  Build and assign a pen
    157    
     157
    158158  In Qt5 the default pen width is 1.0 ( 0.0 in Qt4 ) what makes it
    159159  non cosmetic ( see QPen::isCosmetic() ). This method has been introduced
     
    163163  \param width Pen width
    164164  \param style Pen style
    165    
     165
    166166  \sa pen(), brush()
    167  */ 
    168 void QwtIntervalSymbol::setPen( const QColor &color, 
     167 */
     168void QwtIntervalSymbol::setPen( const QColor &color,
    169169    qreal width, Qt::PenStyle style )
    170 {   
     170{
    171171    setPen( QPen( color, width, style ) );
    172172}
     
    222222            if ( d_data->width > pw )
    223223            {
    224                 if ( ( orientation == Qt::Horizontal ) 
     224                if ( ( orientation == Qt::Horizontal )
    225225                    && ( p1.y() == p2.y() ) )
    226226                {
     
    233233                        p2.x(), y, p2.x(), y + sw );
    234234                }
    235                 else if ( ( orientation == Qt::Vertical ) 
     235                else if ( ( orientation == Qt::Vertical )
    236236                    && ( p1.x() == p2.x() ) )
    237237                {
     
    274274            else
    275275            {
    276                 if ( ( orientation == Qt::Horizontal ) 
     276                if ( ( orientation == Qt::Horizontal )
    277277                    && ( p1.y() == p2.y() ) )
    278278                {
  • trunk/BNC/qwt/qwt_interval_symbol.h

    r8127 r9383  
    6666    int width() const;
    6767
    68     void setBrush( const QBrush& b );
     68    void setBrush( const QBrush & );
    6969    const QBrush& brush() const;
    7070
     
    8080
    8181private:
    82 
    8382    class PrivateData;
    8483    PrivateData* d_data;
  • 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()
  • trunk/BNC/qwt/qwt_knob.h

    r8127 r9383  
    2626  The layout of the knob depends on the knobWidth().
    2727
    28   - width > 0 
     28  - width > 0
    2929    The diameter of the knob is fixed and the knob is aligned
    30     according to the alignment() flags inside of the contentsRect(). 
     30    according to the alignment() flags inside of the contentsRect().
    3131
    3232  - width <= 0
     
    3636  Setting a fixed knobWidth() is helpful to align several knobs with different
    3737  scale labels.
    38  
     38
    3939  \image html knob.png
    4040*/
     
    5656
    5757public:
    58     /*! 
     58    /*!
    5959       \brief Style of the knob surface
    6060
     
    7272        Raised,
    7373
    74         /*! 
     74        /*!
    7575          Build a gradient from QPalette::Midlight, QPalette::Button
    7676          and QPalette::Midlight
     
    7878        Sunken,
    7979
    80         /*! 
     80        /*!
    8181          Build a radial gradient from QPalette::Button
    8282          like it is used for QDial in various Qt styles.
     
    8787    /*!
    8888        \brief Marker type
    89  
     89
    9090        The marker indicates the current value on the knob
    9191        The default setting is a Notch marker.
     
    9393        \sa setMarkerStyle(), setMarkerSize()
    9494    */
    95     enum MarkerStyle 
    96     { 
     95    enum MarkerStyle
     96    {
    9797        //! Don't paint any marker
    9898        NoMarker = -1,
    9999
    100100        //! Paint a single tick in QPalette::ButtonText color
    101         Tick, 
     101        Tick,
    102102
    103103        //! Paint a triangle in QPalette::ButtonText color
    104         Triangle, 
     104        Triangle,
    105105
    106106        //! Paint a circle in QPalette::ButtonText color
    107         Dot, 
     107        Dot,
    108108
    109         /*! 
     109        /*!
    110110          Draw a raised ellipse with a gradient build from
    111111          QPalette::Light and QPalette::Mid
    112          */ 
    113         Nub, 
     112         */
     113        Nub,
    114114
    115         /*! 
     115        /*!
    116116          Draw a sunken ellipse with a gradient build from
    117117          QPalette::Light and QPalette::Mid
    118          */ 
    119         Notch 
     118         */
     119        Notch
    120120    };
    121121
     
    138138    KnobStyle knobStyle() const;
    139139
    140     void setBorderWidth( int bw );
     140    void setBorderWidth( int );
    141141    int borderWidth() const;
    142142
     
    165165    virtual void drawFocusIndicator( QPainter * ) const;
    166166
    167     virtual void drawMarker( QPainter *, 
    168         const QRectF &, double arc ) const;
     167    virtual void drawMarker( QPainter *,
     168        const QRectF &, double angle ) const;
    169169
    170170    virtual double scrolledTo( const QPoint & ) const;
  • trunk/BNC/qwt/qwt_legend.cpp

    r8127 r9383  
    5050};
    5151
    52 void QwtLegendMap::insert( const QVariant &itemInfo, 
     52void QwtLegendMap::insert( const QVariant &itemInfo,
    5353    const QList<QWidget *> &widgets )
    5454{
     
    142142{
    143143public:
    144     LegendView( QWidget *parent ):
     144    explicit LegendView( QWidget *parent ):
    145145        QScrollArea( parent )
    146146    {
     
    296296    if ( tl )
    297297        tl->setMaxColumns( numColums );
     298
     299    updateGeometry();
    298300}
    299301
     
    342344
    343345/*!
    344   The contents widget is the only child of the viewport of 
     346  The contents widget is the only child of the viewport of
    345347  the internal QScrollArea and the parent widget of all legend items.
    346348
     
    371373
    372374/*!
    373   The contents widget is the only child of the viewport of 
     375  The contents widget is the only child of the viewport of
    374376  the internal QScrollArea and the parent widget of all legend items.
    375377
     
    386388
    387389  \param itemInfo Info for an item
    388   \param data List of legend entry attributes for the item
     390  \param legendData List of legend entry attributes for the item
    389391 */
    390 void QwtLegend::updateLegend( const QVariant &itemInfo, 
    391     const QList<QwtLegendData> &data )
     392void QwtLegend::updateLegend( const QVariant &itemInfo,
     393    const QList<QwtLegendData> &legendData )
    392394{
    393395    QList<QWidget *> widgetList = legendWidgets( itemInfo );
    394396
    395     if ( widgetList.size() != data.size() )
     397    if ( widgetList.size() != legendData.size() )
    396398    {
    397399        QLayout *contentsLayout = d_data->view->contentsWidget->layout();
    398400
    399         while ( widgetList.size() > data.size() )
     401        while ( widgetList.size() > legendData.size() )
    400402        {
    401403            QWidget *w = widgetList.takeLast();
     
    410412        }
    411413
    412         for ( int i = widgetList.size(); i < data.size(); i++ )
    413         {
    414             QWidget *widget = createWidget( data[i] );
     414#if QT_VERSION >= 0x040700
     415        widgetList.reserve( legendData.size() );
     416#endif
     417
     418        for ( int i = widgetList.size(); i < legendData.size(); i++ )
     419        {
     420            QWidget *widget = createWidget( legendData[i] );
    415421
    416422            if ( contentsLayout )
     
    441447        updateTabOrder();
    442448    }
    443    
    444     for ( int i = 0; i < data.size(); i++ )
    445         updateWidget( widgetList[i], data[i] );
     449
     450    for ( int i = 0; i < legendData.size(); i++ )
     451        updateWidget( widgetList[i], legendData[i] );
    446452}
    447453
     
    451457  The default implementation returns a QwtLegendLabel.
    452458
    453   \param data Attributes of the legend entry
     459  \param legendData Attributes of the legend entry
    454460  \return Widget representing data on the legend
    455  
     461
    456462  \note updateWidget() will called soon after createWidget()
    457463        with the same attributes.
    458464 */
    459 QWidget *QwtLegend::createWidget( const QwtLegendData &data ) const
    460 {
    461     Q_UNUSED( data );
     465QWidget *QwtLegend::createWidget( const QwtLegendData &legendData ) const
     466{
     467    Q_UNUSED( legendData );
    462468
    463469    QwtLegendLabel *label = new QwtLegendLabel();
    464470    label->setItemMode( defaultItemMode() );
    465471
    466     connect( label, SIGNAL( clicked() ), SLOT( itemClicked() ) );
    467     connect( label, SIGNAL( checked( bool ) ), SLOT( itemChecked( bool ) ) );
     472    connect( label, SIGNAL(clicked()), SLOT(itemClicked()) );
     473    connect( label, SIGNAL(checked(bool)), SLOT(itemChecked(bool)) );
    468474
    469475    return label;
     
    471477
    472478/*!
    473   \brief Update the widget 
     479  \brief Update the widget
    474480
    475481  \param widget Usually a QwtLegendLabel
    476   \param data Attributes to be displayed
     482  \param legendData Attributes to be displayed
    477483
    478484  \sa createWidget()
    479485  \note When widget is no QwtLegendLabel updateWidget() does nothing.
    480486 */
    481 void QwtLegend::updateWidget( QWidget *widget, const QwtLegendData &data )
     487void QwtLegend::updateWidget( QWidget *widget, const QwtLegendData &legendData )
    482488{
    483489    QwtLegendLabel *label = qobject_cast<QwtLegendLabel *>( widget );
    484490    if ( label )
    485491    {
    486         label->setData( data );
    487         if ( !data.value( QwtLegendData::ModeRole ).isValid() )
     492        label->setData( legendData );
     493        if ( !legendData.value( QwtLegendData::ModeRole ).isValid() )
    488494        {
    489495            // use the default mode, when there is no specific
     
    541547
    542548/*!
    543   Handle QEvent::ChildRemoved andQEvent::LayoutRequest events 
     549  Handle QEvent::ChildRemoved andQEvent::LayoutRequest events
    544550  for the contentsWidget().
    545551
     
    557563            case QEvent::ChildRemoved:
    558564            {
    559                 const QChildEvent *ce = 
     565                const QChildEvent *ce =
    560566                    static_cast<const QChildEvent *>(event);
     567
    561568                if ( ce->child()->isWidgetType() )
    562569                {
    563                     QWidget *w = static_cast< QWidget * >( ce->child() );
     570                    /*
     571                        We are called from the ~QObject and ce->child() is
     572                        no widget anymore. But all we need is the address
     573                        to remove it from the map.
     574                     */
     575                    QWidget *w = reinterpret_cast< QWidget * >( ce->child() );
    564576                    d_data->itemMap.removeWidget( w );
    565577                }
     
    585597                    QApplication::postEvent( parentWidget(),
    586598                        new QEvent( QEvent::LayoutRequest ) );
    587                 }               
     599                }
    588600                break;
    589601            }
     
    645657  \param painter Painter
    646658  \param rect Bounding rectangle
    647   \param fillBackground When true, fill rect with the widget background 
     659  \param fillBackground When true, fill rect with the widget background
    648660
    649661  \sa renderLegend() is used by QwtPlotRenderer - not by QwtLegend itself
    650662*/
    651 void QwtLegend::renderLegend( QPainter *painter, 
     663void QwtLegend::renderLegend( QPainter *painter,
    652664    const QRectF &rect, bool fillBackground ) const
    653665{
     
    664676    }
    665677
    666     const QwtDynGridLayout *legendLayout = 
     678    const QwtDynGridLayout *legendLayout =
    667679        qobject_cast<QwtDynGridLayout *>( contentsWidget()->layout() );
    668680    if ( legendLayout == NULL )
     
    672684    getContentsMargins( &left, &top, &right, &bottom );
    673685
    674     QRect layoutRect; 
     686    QRect layoutRect;
    675687    layoutRect.setLeft( qCeil( rect.left() ) + left );
    676688    layoutRect.setTop( qCeil( rect.top() ) + top );
     
    679691
    680692    uint numCols = legendLayout->columnsForWidth( layoutRect.width() );
    681     QList<QRect> itemRects =
     693    const QList<QRect> itemRects =
    682694        legendLayout->layoutItems( layoutRect, numCols );
    683695
     
    707719  \param widget Widget representing a legend entry
    708720  \param rect Bounding rectangle
    709   \param fillBackground When true, fill rect with the widget background 
     721  \param fillBackground When true, fill rect with the widget background
    710722
    711723  \note When widget is not derived from QwtLegendLabel renderItem
    712724        does nothing beside the background
    713725*/
    714 void QwtLegend::renderItem( QPainter *painter, 
     726void QwtLegend::renderItem( QPainter *painter,
    715727    const QWidget *widget, const QRectF &rect, bool fillBackground ) const
    716728{
     
    733745
    734746        const QRectF iconRect( rect.x() + label->margin(),
    735             rect.center().y() - 0.5 * sz.height(), 
     747            rect.center().y() - 0.5 * sz.height(),
    736748            sz.width(), sz.height() );
    737749
     
    743755        titleRect.setX( iconRect.right() + 2 * label->spacing() );
    744756
    745         painter->setFont( label->font() );
     757        QFont labelFont = label->font();
     758        labelFont.resolve( QFont::AllPropertiesResolved );
     759
     760        painter->setFont( labelFont );
    746761        painter->setPen( label->palette().color( QPalette::Text ) );
     762
    747763        const_cast< QwtLegendLabel *>( label )->drawText( painter, titleRect );
    748764    }
     
    795811    Return the extent, that is needed for the scrollbars
    796812
    797     \param orientation Orientation (
     813    \param orientation Orientation
    798814    \return The width of the vertical scrollbar for Qt::Horizontal and v.v.
    799815 */
  • trunk/BNC/qwt/qwt_legend.h

    r8127 r9383  
    5252
    5353    virtual QSize sizeHint() const;
    54     virtual int heightForWidth( int w ) const;
     54    virtual int heightForWidth( int width ) const;
    5555
    5656    QScrollBar *horizontalScrollBar() const;
    5757    QScrollBar *verticalScrollBar() const;
    5858
    59     virtual void renderLegend( QPainter *, 
     59    virtual void renderLegend( QPainter *,
    6060        const QRectF &, bool fillBackground ) const;
    6161
    62     virtual void renderItem( QPainter *, 
     62    virtual void renderItem( QPainter *,
    6363        const QWidget *, const QRectF &, bool fillBackground ) const;
    6464
     
    106106protected:
    107107    virtual QWidget *createWidget( const QwtLegendData & ) const;
    108     virtual void updateWidget( QWidget *widget, const QwtLegendData &data );
     108    virtual void updateWidget( QWidget *widget, const QwtLegendData & );
    109109
    110110private:
     
    115115};
    116116
    117 #endif 
     117#endif
  • trunk/BNC/qwt/qwt_legend_data.cpp

    r8127 r9383  
    124124        return static_cast<QwtLegendData::Mode>( mode );
    125125    }
    126    
     126
    127127    return QwtLegendData::ReadOnly;
    128128}
  • trunk/BNC/qwt/qwt_legend_data.h

    r8127 r9383  
    2222
    2323  QwtLegendData is an abstract container ( like QAbstractModel )
    24   to exchange attributes, that are only known between to 
    25   the plot item and the legend. 
    26  
     24  to exchange attributes, that are only known between to
     25  the plot item and the legend.
     26
    2727  By overloading QwtPlotItem::legendData() any other set of attributes
    28   could be used, that can be handled by a modified ( or completely 
     28  could be used, that can be handled by a modified ( or completely
    2929  different ) implementation of a legend.
    3030
     
    5353    {
    5454        // The value is a Mode
    55         ModeRole, 
     55        ModeRole,
    5656
    5757        // The value is a title
    58         TitleRole, 
     58        TitleRole,
    5959
    6060        // The value is an icon
    61         IconRole, 
     61        IconRole,
    6262
    6363        // Values < UserRole are reserved for internal use
  • trunk/BNC/qwt/qwt_legend_label.cpp

    r8127 r9383  
    140140        d_data->isDown = false;
    141141
    142         setFocusPolicy( ( mode != QwtLegendData::ReadOnly ) 
     142        setFocusPolicy( ( mode != QwtLegendData::ReadOnly )
    143143            ? Qt::TabFocus : Qt::NoFocus );
    144144        setMargin( ButtonFrame + Margin );
  • trunk/BNC/qwt/qwt_legend_label.h

    r8127 r9383  
    7878};
    7979
    80 #endif 
     80#endif
  • trunk/BNC/qwt/qwt_magnifier.cpp

    r8127 r9383  
    191191   \sa getMouseButton()
    192192*/
    193 void QwtMagnifier::setMouseButton( 
     193void QwtMagnifier::setMouseButton(
    194194    Qt::MouseButton button, Qt::KeyboardModifiers modifiers )
    195195{
     
    239239   \sa getZoomInKey(), setZoomOutKey()
    240240*/
    241 void QwtMagnifier::setZoomInKey( int key, 
     241void QwtMagnifier::setZoomInKey( int key,
    242242    Qt::KeyboardModifiers modifiers )
    243243{
     
    246246}
    247247
    248 /*! 
     248/*!
    249249   \brief Retrieve the settings of the zoom in key
    250250
     
    254254   \sa setZoomInKey()
    255255*/
    256 void QwtMagnifier::getZoomInKey( int &key, 
     256void QwtMagnifier::getZoomInKey( int &key,
    257257    Qt::KeyboardModifiers &modifiers ) const
    258258{
     
    269269   \sa getZoomOutKey(), setZoomOutKey()
    270270*/
    271 void QwtMagnifier::setZoomOutKey( int key, 
     271void QwtMagnifier::setZoomOutKey( int key,
    272272    Qt::KeyboardModifiers modifiers )
    273273{
     
    276276}
    277277
    278 /*! 
     278/*!
    279279   \brief Retrieve the settings of the zoom out key
    280280
     
    284284   \sa setZoomOutKey()
    285285*/
    286 void QwtMagnifier::getZoomOutKey( int &key, 
     286void QwtMagnifier::getZoomOutKey( int &key,
    287287    Qt::KeyboardModifiers &modifiers ) const
    288288{
     
    438438            of 120 (== 15 * 8).
    439439         */
    440         double f = qPow( d_data->wheelFactor, 
     440        double f = qPow( d_data->wheelFactor,
    441441            qAbs( wheelEvent->delta() / 120.0 ) );
    442442
  • trunk/BNC/qwt/qwt_math.h

    r8127 r9383  
    2828
    2929#ifndef M_PI_2
    30 // For Qt <= 4.8.4 M_PI_2 is not known by MinGW-w64 
     30// For Qt <= 4.8.4 M_PI_2 is not known by MinGW-w64
    3131// when compiling with -std=c++11
    3232#define M_PI_2 (1.57079632679489661923)
  • trunk/BNC/qwt/qwt_matrix_raster_data.cpp

    r8127 r9383  
    8282   \param axis X, Y or Z axis
    8383   \param interval Interval
    84    
     84
    8585   \sa QwtRasterData::interval(), setValueMatrix()
    8686*/
    87 void QwtMatrixRasterData::setInterval( 
     87void QwtMatrixRasterData::setInterval(
    8888    Qt::Axis axis, const QwtInterval &interval )
    8989{
     
    9797   The positions of the values are calculated by dividing
    9898   the bounding rectangle of the X/Y intervals into equidistant
    99    rectangles ( pixels ). Each value corresponds to the center of 
     99   rectangles ( pixels ). Each value corresponds to the center of
    100100   a pixel.
    101101
     
    105105   \sa valueMatrix(), numColumns(), numRows(), setInterval()()
    106106*/
    107 void QwtMatrixRasterData::setValueMatrix( 
     107void QwtMatrixRasterData::setValueMatrix(
    108108    const QVector<double> &values, int numColumns )
    109109{
     
    162162   \brief Calculate the pixel hint
    163163
    164    pixelHint() returns the geometry of a pixel, that can be used 
     164   pixelHint() returns the geometry of a pixel, that can be used
    165165   to calculate the resolution and alignment of the plot item, that is
    166    representing the data. 
     166   representing the data.
    167167
    168168   - NearestNeighbour\n
    169      pixelHint() returns the surrounding pixel of the top left value 
     169     pixelHint() returns the surrounding pixel of the top left value
    170170     in the matrix.
    171171
    172172   - BilinearInterpolation\n
    173173     Returns an empty rectangle recommending
    174      to render in target device ( f.e. screen ) resolution. 
     174     to render in target device ( f.e. screen ) resolution.
    175175
    176176   \param area Requested area, ignored
     
    240240            const double v22 = d_data->value( row2, col2 );
    241241
    242             const double x2 = xInterval.minValue() + 
     242            const double x2 = xInterval.minValue() +
    243243                ( col2 + 0.5 ) * d_data->dx;
    244             const double y2 = yInterval.minValue() + 
     244            const double y2 = yInterval.minValue() +
    245245                ( row2 + 0.5 ) * d_data->dy;
    246                
     246
    247247            const double rx = ( x2 - x ) / d_data->dx;
    248248            const double ry = ( y2 - y ) / d_data->dy;
  • trunk/BNC/qwt/qwt_matrix_raster_data.h

    r8127 r9383  
    1919
    2020  QwtMatrixRasterData implements an interface for a matrix of
    21   equidistant values, that can be used by a QwtPlotRasterItem. 
     21  equidistant values, that can be used by a QwtPlotRasterItem.
    2222  It implements a couple of resampling algorithms, to provide
    2323  values for positions, that or not on the value matrix.
     
    3939
    4040        /*!
    41           Interpolate the value from the distances and values of the 
     41          Interpolate the value from the distances and values of the
    4242          4 surrounding values in the matrix,
    4343         */
  • trunk/BNC/qwt/qwt_null_paintdevice.cpp

    r8127 r9383  
    1010#include "qwt_null_paintdevice.h"
    1111#include <qpaintengine.h>
     12#include <qpainterpath.h>
    1213#include <qpixmap.h>
    1314
     
    5152    virtual void drawPolygon(const QPoint *, int , PolygonDrawMode );
    5253
    53     virtual void drawPixmap(const QRectF &, 
     54    virtual void drawPixmap(const QRectF &,
    5455        const QPixmap &, const QRectF &);
    5556
    5657    virtual void drawTextItem(const QPointF &, const QTextItem &);
    5758
    58     virtual void drawTiledPixmap(const QRectF &, 
     59    virtual void drawTiledPixmap(const QRectF &,
    5960        const QPixmap &, const QPointF &s);
    6061
    61     virtual void drawImage(const QRectF &, 
     62    virtual void drawImage(const QRectF &,
    6263        const QImage &, const QRectF &, Qt::ImageConversionFlags );
    6364
     
    6566    QwtNullPaintDevice *nullDevice();
    6667};
    67    
     68
    6869QwtNullPaintDevice::PaintEngine::PaintEngine():
    6970    QPaintEngine( QPaintEngine::AllFeatures )
     
    283284}
    284285
    285 void QwtNullPaintDevice::PaintEngine::drawPixmap( 
     286void QwtNullPaintDevice::PaintEngine::drawPixmap(
    286287    const QRectF &rect, const QPixmap &pm, const QRectF &subRect )
    287288{
     
    310311
    311312void QwtNullPaintDevice::PaintEngine::drawTiledPixmap(
    312     const QRectF &rect, const QPixmap &pixmap, 
     313    const QRectF &rect, const QPixmap &pixmap,
    313314    const QPointF &subRect)
    314315{
     
    321322        QPaintEngine::drawTiledPixmap( rect, pixmap, subRect );
    322323        return;
    323     }   
     324    }
    324325
    325326    device->drawTiledPixmap( rect, pixmap, subRect );
     
    327328
    328329void QwtNullPaintDevice::PaintEngine::drawImage(
    329     const QRectF &rect, const QImage &image, 
     330    const QRectF &rect, const QImage &image,
    330331    const QRectF &subRect, Qt::ImageConversionFlags flags)
    331332{
     
    338339
    339340void QwtNullPaintDevice::PaintEngine::updateState(
    340     const QPaintEngineState &state)
    341 {
    342     QwtNullPaintDevice *device = nullDevice();
    343     if ( device == NULL )
    344         return;
    345 
    346     device->updateState( state );
     341    const QPaintEngineState &engineState)
     342{
     343    QwtNullPaintDevice *device = nullDevice();
     344    if ( device == NULL )
     345        return;
     346
     347    device->updateState( engineState );
    347348}
    348349
     
    380381}
    381382
    382 /*! 
     383/*!
    383384    \return Render mode
    384385    \sa setMode()
     
    394395    if ( d_engine == NULL )
    395396    {
    396         QwtNullPaintDevice *that = 
     397        QwtNullPaintDevice *that =
    397398            const_cast< QwtNullPaintDevice * >( this );
    398399
     
    403404}
    404405
    405 /*! 
     406/*!
    406407    See QPaintDevice::metric()
    407408
     
    415416    int value;
    416417
    417     switch ( deviceMetric ) 
     418    switch ( deviceMetric )
    418419    {
    419420        case PdmWidth:
     
    530531//! See QPaintEngine::drawPolygon()
    531532void QwtNullPaintDevice::drawPolygon(
    532     const QPointF *points, int pointCount, 
     533    const QPointF *points, int pointCount,
    533534    QPaintEngine::PolygonDrawMode mode)
    534535{
     
    540541//! See QPaintEngine::drawPolygon()
    541542void QwtNullPaintDevice::drawPolygon(
    542     const QPoint *points, int pointCount, 
     543    const QPoint *points, int pointCount,
    543544    QPaintEngine::PolygonDrawMode mode)
    544545{
     
    549550
    550551//! See QPaintEngine::drawPixmap()
    551 void QwtNullPaintDevice::drawPixmap( const QRectF &rect, 
     552void QwtNullPaintDevice::drawPixmap( const QRectF &rect,
    552553    const QPixmap &pm, const QRectF &subRect )
    553554{
     
    567568//! See QPaintEngine::drawTiledPixmap()
    568569void QwtNullPaintDevice::drawTiledPixmap(
    569     const QRectF &rect, const QPixmap &pixmap, 
     570    const QRectF &rect, const QPixmap &pixmap,
    570571    const QPointF &subRect)
    571572{
     
    577578//! See QPaintEngine::drawImage()
    578579void QwtNullPaintDevice::drawImage(
    579     const QRectF &rect, const QImage &image, 
     580    const QRectF &rect, const QImage &image,
    580581    const QRectF &subRect, Qt::ImageConversionFlags flags)
    581582{
     
    587588
    588589//! See QPaintEngine::updateState()
    589 void QwtNullPaintDevice::updateState( 
     590void QwtNullPaintDevice::updateState(
    590591    const QPaintEngineState &state )
    591592{
  • trunk/BNC/qwt/qwt_null_paintdevice.h

    r8127 r9383  
    1818  \brief A null paint device doing nothing
    1919
    20   Sometimes important layout/rendering geometries are not 
    21   available or changeable from the public Qt class interface. 
     20  Sometimes important layout/rendering geometries are not
     21  available or changeable from the public Qt class interface.
    2222  ( f.e hidden in the style implementation ).
    2323
    24   QwtNullPaintDevice can be used to manipulate or filter out 
     24  QwtNullPaintDevice can be used to manipulate or filter out
    2525  this information by analyzing the stream of paint primitives.
    2626
     
    4343           the corresponding draw methods
    4444         */
    45         NormalMode, 
     45        NormalMode,
    4646
    4747        /*!
     
    7777    virtual QPaintEngine *paintEngine() const;
    7878
    79     virtual int metric( PaintDeviceMetric metric ) const;
     79    virtual int metric( PaintDeviceMetric ) const;
    8080
    8181    virtual void drawRects(const QRect *, int );
     
    105105
    106106    virtual void drawTiledPixmap(const QRectF &,
    107         const QPixmap &, const QPointF &s);
     107        const QPixmap &, const QPointF & );
    108108
    109109    virtual void drawImage(const QRectF &,
    110110        const QImage &, const QRectF &, Qt::ImageConversionFlags );
    111111
    112     virtual void updateState( const QPaintEngineState &state );
     112    virtual void updateState( const QPaintEngineState & );
    113113
    114114protected:
  • trunk/BNC/qwt/qwt_painter.cpp

    r8127 r9383  
    2020#include <qpalette.h>
    2121#include <qpaintdevice.h>
     22#include <qpainterpath.h>
    2223#include <qpixmap.h>
    2324#include <qstyle.h>
     
    3334#endif
    3435
    35 #if QT_VERSION < 0x050000 
     36#if QT_VERSION < 0x050000
    3637
    3738#ifdef Q_WS_X11
     
    4445bool QwtPainter::d_roundingAlignment = true;
    4546
    46 static inline bool qwtIsClippingNeeded( 
     47static inline bool qwtIsClippingNeeded(
    4748    const QPainter *painter, QRectF &clipRect )
    4849{
     
    142143bool QwtPainter::isX11GraphicsSystem()
    143144{
     145    /*
     146        The X11 paint engine has been removed with Qt 5.0, but
     147        reintroduced with Qt 5.10. It can be enabled with
     148        "export QT_XCB_NATIVE_PAINTING=1".
     149     */
     150
    144151    static int onX11 = -1;
    145152    if ( onX11 < 0 )
     
    181188        }
    182189
    183         const QTransform tr = painter->transform();
     190        const QTransform &tr = painter->transform();
    184191        if ( tr.isRotating() || tr.isScaling() )
    185192        {
     
    196203  to a paint engine that floors to integer values. For other paint engines
    197204  ( PDF, SVG ) this flag has no effect.
    198   QwtPainter stores this flag only, the rounding itself is done in 
     205  QwtPainter stores this flag only, the rounding itself is done in
    199206  the painting code ( f.e the plot items ).
    200207
    201   The default setting is true. 
     208  The default setting is true.
    202209
    203210  \sa roundingAlignment(), isAligning()
     
    214221  much faster when they are split in smaller chunks: f.e all supported Qt versions
    215222  >= Qt 5.0 when drawing an antialiased polyline with a pen width >=2.
     223
     224  Also the raster paint engine has a nasty bug in many versions ( Qt 4.8 - ... )
     225  for short lines ( https://codereview.qt-project.org/#/c/99456 ), that is worked
     226  around in this mode.
    216227
    217228  The default setting is true.
     
    397408            unscaledRect = transform.inverted().mapRect(rect);
    398409        }
    399     } 
     410    }
    400411
    401412    txt->setDefaultFont( painter->font() );
     
    452463    QPolygonF cpa = polygon;
    453464    if ( deviceClipping )
    454         cpa = QwtClipper::clipPolygonF( clipRect, polygon );
     465        cpa = QwtClipper::clipPolygonF( clipRect, polygon, true );
    455466
    456467    painter->drawPolygon( cpa );
     
    501512    QPolygon cpa = polygon;
    502513    if ( deviceClipping )
    503         cpa = QwtClipper::clipPolygon( clipRect, polygon );
     514        cpa = QwtClipper::clipPolygon( clipRect, polygon, true );
    504515
    505516    painter->drawPolygon( cpa );
     
    537548    }
    538549    else
     550    {
    539551        qwtDrawPolyline<QPoint>( painter, points, pointCount, d_polylineSplitting );
     552    }
    540553}
    541554
     
    565578        const int maxY = qFloor( clipRect.bottom() );
    566579
    567         if ( pos.x() < minX || pos.x() > maxX 
     580        if ( pos.x() < minX || pos.x() > maxX
    568581            || pos.y() < minY || pos.y() > maxY )
    569582        {
     
    576589
    577590//! Wrapper for QPainter::drawPoints()
    578 void QwtPainter::drawPoints( QPainter *painter, 
     591void QwtPainter::drawPoints( QPainter *painter,
    579592    const QPoint *points, int pointCount )
    580593{
     
    609622
    610623//! Wrapper for QPainter::drawPoints()
    611 void QwtPainter::drawPoints( QPainter *painter, 
     624void QwtPainter::drawPoints( QPainter *painter,
    612625    const QPointF *points, int pointCount )
    613626{
     
    697710
    698711/*!
    699   Draw a round frame 
     712  Draw a round frame
    700713
    701714  \param painter Painter
     
    708721*/
    709722void QwtPainter::drawRoundFrame( QPainter *painter,
    710     const QRectF &rect, const QPalette &palette, 
     723    const QRectF &rect, const QPalette &palette,
    711724    int lineWidth, int frameStyle )
    712725{
     
    787800    {
    788801        const QRectF outerRect = rect.adjusted( 0.0, 0.0, -1.0, -1.0 );
    789         const QRectF innerRect = outerRect.adjusted( 
     802        const QRectF innerRect = outerRect.adjusted(
    790803            frameWidth, frameWidth, -frameWidth, -frameWidth );
    791804
     
    806819        {
    807820            const QRectF outerRect = rect.adjusted( 0.0, 0.0, -1.0, -1.0 );
    808             const QRectF midRect1 = outerRect.adjusted( 
     821            const QRectF midRect1 = outerRect.adjusted(
    809822                frameWidth, frameWidth, -frameWidth, -frameWidth );
    810             const QRectF midRect2 = midRect1.adjusted( 
     823            const QRectF midRect2 = midRect1.adjusted(
    811824                midLineWidth, midLineWidth, -midLineWidth, -midLineWidth );
    812825
    813             const QRectF innerRect = midRect2.adjusted( 
     826            const QRectF innerRect = midRect2.adjusted(
    814827                frameWidth, frameWidth, -frameWidth, -frameWidth );
    815828
     
    887900        {
    888901            const QRectF outerRect = rect.adjusted( 0.0, 0.0, -1.0, -1.0 );
    889             const QRectF innerRect = outerRect.adjusted( 
    890                 frameWidth - 1.0, frameWidth - 1.0, 
     902            const QRectF innerRect = outerRect.adjusted(
     903                frameWidth - 1.0, frameWidth - 1.0,
    891904                -( frameWidth - 1.0 ), -( frameWidth - 1.0 ) );
    892905
     
    942955*/
    943956
    944 void QwtPainter::drawRoundedFrame( QPainter *painter, 
    945     const QRectF &rect, double xRadius, double yRadius, 
     957void QwtPainter::drawRoundedFrame( QPainter *painter,
     958    const QRectF &rect, double xRadius, double yRadius,
    946959    const QPalette &palette, int lineWidth, int frameStyle )
    947960{
     
    951964
    952965    double lw2 = lineWidth * 0.5;
    953     QRectF r = rect.adjusted( lw2, lw2, -lw2, -lw2 );
     966    QRectF innerRect = rect.adjusted( lw2, lw2, -lw2, -lw2 );
    954967
    955968    QPainterPath path;
    956     path.addRoundedRect( r, xRadius, yRadius );
     969    path.addRoundedRect( innerRect, xRadius, yRadius );
    957970
    958971    enum Style
     
    973986        // move + 4 * ( cubicTo + lineTo )
    974987        QPainterPath pathList[8];
    975        
     988
    976989        for ( int i = 0; i < 4; i++ )
    977990        {
    978991            const int j = i * 4 + 1;
    979            
     992
    980993            pathList[ 2 * i ].moveTo(
    981994                path.elementAt(j - 1).x, path.elementAt( j - 1 ).y
    982             ); 
    983            
     995            );
     996
    984997            pathList[ 2 * i ].cubicTo(
    985998                path.elementAt(j + 0).x, path.elementAt(j + 0).y,
    986999                path.elementAt(j + 1).x, path.elementAt(j + 1).y,
    9871000                path.elementAt(j + 2).x, path.elementAt(j + 2).y );
    988                
     1001
    9891002            pathList[ 2 * i + 1 ].moveTo(
    9901003                path.elementAt(j + 2).x, path.elementAt(j + 2).y
    991             ); 
     1004            );
    9921005            pathList[ 2 * i + 1 ].lineTo(
    9931006                path.elementAt(j + 3).x, path.elementAt(j + 3).y
    994             ); 
    995         }   
     1007            );
     1008        }
    9961009
    9971010        QColor c1( palette.color( QPalette::Dark ) );
     
    10031016        for ( int i = 0; i < 4; i++ )
    10041017        {
    1005             QRectF r = pathList[2 * i].controlPointRect();
     1018            const QRectF r = pathList[2 * i].controlPointRect();
    10061019
    10071020            QPen arcPen;
     
    11471160}
    11481161
    1149 static inline void qwtFillRect( const QWidget *widget, QPainter *painter, 
     1162static inline void qwtFillRect( const QWidget *widget, QPainter *painter,
    11501163    const QRect &rect, const QBrush &brush)
    11511164{
    1152     if ( brush.style() == Qt::TexturePattern ) 
     1165    if ( brush.style() == Qt::TexturePattern )
    11531166    {
    11541167        painter->save();
     
    11581171
    11591172        painter->restore();
    1160     } 
     1173    }
    11611174    else if ( brush.gradient() )
    11621175    {
     
    11641177
    11651178        painter->setClipRect( rect );
    1166         painter->fillRect(0, 0, widget->width(), 
     1179        painter->fillRect(0, 0, widget->width(),
    11671180            widget->height(), brush);
    11681181
    11691182        painter->restore();
    1170     } 
    1171     else 
     1183    }
     1184    else
    11721185    {
    11731186        painter->fillRect(rect, brush);
     
    11791192
    11801193  In Qt >= 5.0 QPixmap::fill() is a nop, in Qt 4.x it is buggy
    1181   for backgrounds with gradients. Thus fillPixmap() offers 
     1194  for backgrounds with gradients. Thus fillPixmap() offers
    11821195  an alternative implementation.
    11831196
    11841197  \param widget Widget
    11851198  \param pixmap Pixmap to be filled
    1186   \param offset Offset 
     1199  \param offset Offset
    11871200
    11881201  \sa QPixmap::fill()
    11891202 */
    1190 void QwtPainter::fillPixmap( const QWidget *widget, 
     1203void QwtPainter::fillPixmap( const QWidget *widget,
    11911204    QPixmap &pixmap, const QPoint &offset )
    11921205{
     
    11961209    painter.translate( -offset );
    11971210
    1198     const QBrush autoFillBrush = 
     1211    const QBrush autoFillBrush =
    11991212        widget->palette().brush( widget->backgroundRole() );
    12001213
    1201     if ( !( widget->autoFillBackground() && autoFillBrush.isOpaque() ) ) 
     1214    if ( !( widget->autoFillBackground() && autoFillBrush.isOpaque() ) )
    12021215    {
    12031216        const QBrush bg = widget->palette().brush( QPalette::Window );
     
    12081221        qwtFillRect( widget, &painter, rect, autoFillBrush);
    12091222
    1210     if ( widget->testAttribute(Qt::WA_StyledBackground) ) 
     1223    if ( widget->testAttribute(Qt::WA_StyledBackground) )
    12111224    {
    12121225        painter.setClipRegion( rect );
     
    12141227        QStyleOption opt;
    12151228        opt.initFrom( widget );
    1216         widget->style()->drawPrimitive( QStyle::PE_Widget, 
     1229        widget->style()->drawPrimitive( QStyle::PE_Widget,
    12171230            &opt, &painter, widget );
    12181231    }
     
    12851298#endif
    12861299
    1287 #if QT_VERSION < 0x050000 
     1300#if QT_VERSION < 0x050000
    12881301#ifdef Q_WS_X11
    12891302    if ( widget && isX11GraphicsSystem() )
  • trunk/BNC/qwt/qwt_painter.h

    r8127 r9383  
    5151    static void drawText( QPainter *, double x, double y, double w, double h,
    5252        int flags, const QString & );
    53     static void drawText( QPainter *, const QRectF &, 
     53    static void drawText( QPainter *, const QRectF &,
    5454        int flags, const QString & );
    5555
     
    6464
    6565    static void drawEllipse( QPainter *, const QRectF & );
    66     static void drawPie( QPainter *, const QRectF & r, int a, int alen );
     66    static void drawPie( QPainter *, const QRectF &, int a, int alen );
    6767
    6868    static void drawLine( QPainter *, double x1, double y1, double x2, double y2 );
     
    9494        const QRectF &, const QPalette &, int lineWidth, int frameStyle );
    9595
    96     static void drawRoundedFrame( QPainter *, 
     96    static void drawRoundedFrame( QPainter *,
    9797        const QRectF &, double xRadius, double yRadius,
    9898        const QPalette &, int lineWidth, int frameStyle );
     
    100100    static void drawFrame( QPainter *, const QRectF &rect,
    101101        const QPalette &palette, QPalette::ColorRole foregroundRole,
    102         int lineWidth, int midLineWidth, int frameStyle );
     102        int frameWidth, int midLineWidth, int frameStyle );
    103103
    104104    static void drawFocusRect( QPainter *, const QWidget * );
     
    112112    static bool isX11GraphicsSystem();
    113113
    114     static void fillPixmap( const QWidget *, 
     114    static void fillPixmap( const QWidget *,
    115115        QPixmap &, const QPoint &offset = QPoint() );
    116116
  • trunk/BNC/qwt/qwt_painter_command.cpp

    r8127 r9383  
    6464}
    6565
    66 /*! 
     66/*!
    6767  Constructor for State paint operation
    6868  \param state Paint engine state
    69  */ 
     69 */
    7070QwtPainterCommand::QwtPainterCommand( const QPaintEngineState &state ):
    7171    d_type( State )
     
    7575    d_stateData->flags = state.state();
    7676
    77     if ( d_stateData->flags & QPaintEngine::DirtyPen ) 
     77    if ( d_stateData->flags & QPaintEngine::DirtyPen )
    7878        d_stateData->pen = state.pen();
    7979
    80     if ( d_stateData->flags & QPaintEngine::DirtyBrush ) 
     80    if ( d_stateData->flags & QPaintEngine::DirtyBrush )
    8181        d_stateData->brush = state.brush();
    8282
    83     if ( d_stateData->flags & QPaintEngine::DirtyBrushOrigin ) 
     83    if ( d_stateData->flags & QPaintEngine::DirtyBrushOrigin )
    8484        d_stateData->brushOrigin = state.brushOrigin();
    8585
    86     if ( d_stateData->flags & QPaintEngine::DirtyFont ) 
     86    if ( d_stateData->flags & QPaintEngine::DirtyFont )
    8787        d_stateData->font = state.font();
    8888
    89     if ( d_stateData->flags & QPaintEngine::DirtyBackground ) 
     89    if ( d_stateData->flags & QPaintEngine::DirtyBackground )
    9090    {
    9191        d_stateData->backgroundMode = state.backgroundMode();
     
    9393    }
    9494
    95     if ( d_stateData->flags & QPaintEngine::DirtyTransform ) 
     95    if ( d_stateData->flags & QPaintEngine::DirtyTransform )
    9696        d_stateData->transform = state.transform();
    9797
    98     if ( d_stateData->flags & QPaintEngine::DirtyClipEnabled ) 
     98    if ( d_stateData->flags & QPaintEngine::DirtyClipEnabled )
    9999        d_stateData->isClipEnabled = state.isClipEnabled();
    100100
    101     if ( d_stateData->flags & QPaintEngine::DirtyClipRegion ) 
     101    if ( d_stateData->flags & QPaintEngine::DirtyClipRegion )
    102102    {
    103103        d_stateData->clipRegion = state.clipRegion();
     
    105105    }
    106106
    107     if ( d_stateData->flags & QPaintEngine::DirtyClipPath ) 
     107    if ( d_stateData->flags & QPaintEngine::DirtyClipPath )
    108108    {
    109109        d_stateData->clipPath = state.clipPath();
     
    111111    }
    112112
    113     if ( d_stateData->flags & QPaintEngine::DirtyHints ) 
     113    if ( d_stateData->flags & QPaintEngine::DirtyHints )
    114114        d_stateData->renderHints = state.renderHints();
    115115
    116     if ( d_stateData->flags & QPaintEngine::DirtyCompositionMode ) 
     116    if ( d_stateData->flags & QPaintEngine::DirtyCompositionMode )
    117117        d_stateData->compositionMode = state.compositionMode();
    118118
    119     if ( d_stateData->flags & QPaintEngine::DirtyOpacity ) 
     119    if ( d_stateData->flags & QPaintEngine::DirtyOpacity )
    120120        d_stateData->opacity = state.opacity();
    121121}
     
    124124  Copy constructor
    125125  \param other Command to be copied
    126  
     126
    127127 */
    128128QwtPainterCommand::QwtPainterCommand(const QwtPainterCommand &other)
     
    214214
    215215//! \return Painter path to be painted
    216 QPainterPath *QwtPainterCommand::path() 
     216QPainterPath *QwtPainterCommand::path()
    217217{
    218218    return d_path;
     
    220220
    221221//! \return Attributes how to paint a QPixmap
    222 QwtPainterCommand::PixmapData* QwtPainterCommand::pixmapData() 
     222QwtPainterCommand::PixmapData* QwtPainterCommand::pixmapData()
    223223{
    224224    return d_pixmapData;
     
    226226
    227227//! \return Attributes how to paint a QImage
    228 QwtPainterCommand::ImageData* QwtPainterCommand::imageData() 
     228QwtPainterCommand::ImageData* QwtPainterCommand::imageData()
    229229{
    230230    return d_imageData;
     
    232232
    233233//! \return Attributes of a state change
    234 QwtPainterCommand::StateData* QwtPainterCommand::stateData() 
     234QwtPainterCommand::StateData* QwtPainterCommand::stateData()
    235235{
    236236    return d_stateData;
  • trunk/BNC/qwt/qwt_painter_command.h

    r8127 r9383  
    1616#include <qimage.h>
    1717#include <qpolygon.h>
     18#include <qpainterpath.h>
    1819
    1920class QPainterPath;
     
    2728  \sa QwtGraphic::commands()
    2829 */
    29  
     30
    3031class QWT_EXPORT QwtPainterCommand
    3132{
     
    5051    };
    5152
    52     //! Attributes how to paint a QPixmap 
     53    //! Attributes how to paint a QPixmap
    5354    struct PixmapData
    5455    {
     
    5859    };
    5960
    60     //! Attributes how to paint a QImage 
     61    //! Attributes how to paint a QImage
    6162    struct ImageData
    6263    {
     
    151152
    152153//! \return Attributes how to paint a QPixmap
    153 inline const QwtPainterCommand::PixmapData*
     154inline const QwtPainterCommand::PixmapData *
    154155QwtPainterCommand::pixmapData() const
    155156{
     
    158159
    159160//! \return Attributes how to paint a QImage
    160 inline const QwtPainterCommand::ImageData * 
     161inline const QwtPainterCommand::ImageData *
    161162QwtPainterCommand::imageData() const
    162163{
     
    165166
    166167//! \return Attributes of a state change
    167 inline const QwtPainterCommand::StateData * 
     168inline const QwtPainterCommand::StateData *
    168169QwtPainterCommand::stateData() const
    169170{
  • trunk/BNC/qwt/qwt_panner.cpp

    r8127 r9383  
    129129   \param modifiers Keyboard modifiers
    130130*/
    131 void QwtPanner::setAbortKey( int key, 
     131void QwtPanner::setAbortKey( int key,
    132132    Qt::KeyboardModifiers modifiers )
    133133{
     
    137137
    138138//! Get the abort key and modifiers
    139 void QwtPanner::getAbortKey( int &key, 
     139void QwtPanner::getAbortKey( int &key,
    140140    Qt::KeyboardModifiers &modifiers ) const
    141141{
     
    248248   fill the empty spaces by the background of the parent widget.
    249249
    250    \param pe Paint event
    251 */
    252 void QwtPanner::paintEvent( QPaintEvent *pe )
     250   \param event Paint event
     251*/
     252void QwtPanner::paintEvent( QPaintEvent *event )
    253253{
    254254    int dx = d_data->pos.x() - d_data->initialPos.x();
    255255    int dy = d_data->pos.y() - d_data->initialPos.y();
    256256
    257     QRect r( 0, 0, d_data->pixmap.width(), d_data->pixmap.height() );
    258     r.moveCenter( QPoint( r.center().x() + dx, r.center().y() + dy ) );
    259 
    260     QPixmap pm( size() );
     257    QRectF r;
     258    r.setSize( d_data->pixmap.size() );
     259#if QT_VERSION >= 0x050000
     260    r.setSize( r.size() / d_data->pixmap.devicePixelRatio() );
     261#endif
     262    r.moveCenter( QPointF( r.center().x() + dx, r.center().y() + dy ) );
     263
     264    QPixmap pm = QwtPainter::backingStore( this, size() );
    261265    QwtPainter::fillPixmap( parentWidget(), pm );
    262266
     
    267271        QPixmap masked = d_data->pixmap;
    268272        masked.setMask( d_data->contentsMask );
    269         painter.drawPixmap( r, masked );
     273        painter.drawPixmap( r.toRect(), masked );
    270274    }
    271275    else
    272276    {
    273         painter.drawPixmap( r, d_data->pixmap );
     277        painter.drawPixmap( r.toRect(), d_data->pixmap );
    274278    }
    275279
     
    280284
    281285    painter.begin( this );
    282     painter.setClipRegion( pe->region() );
     286    painter.setClipRegion( event->region() );
    283287    painter.drawPixmap( 0, 0, pm );
    284288}
  • trunk/BNC/qwt/qwt_panner.h

    r8127 r9383  
    4444    bool isEnabled() const;
    4545
    46     void setMouseButton( Qt::MouseButton, 
     46    void setMouseButton( Qt::MouseButton,
    4747        Qt::KeyboardModifiers = Qt::NoModifier );
    48     void getMouseButton( Qt::MouseButton &button, 
     48    void getMouseButton( Qt::MouseButton &button,
    4949        Qt::KeyboardModifiers & ) const;
    5050
  • trunk/BNC/qwt/qwt_picker.cpp

    r8127 r9383  
    5353    if ( l.x1() == l.x2() )
    5454    {
    55         region += QRect( l.x1() - pw2, l.y1(), 
     55        region += QRect( l.x1() - pw2, l.y1(),
    5656            pw, l.y2() ).normalized();
    5757    }
    5858    else if ( l.y1() == l.y2() )
    5959    {
    60         region += QRect( l.x1(), l.y1() - pw2, 
     60        region += QRect( l.x1(), l.y1() - pw2,
    6161            l.x2(), pw ).normalized();
    6262    }
     
    7878
    7979class QwtPickerTracker: public QwtWidgetOverlay
    80 {                                 
     80{
    8181public:
    8282    QwtPickerTracker( QwtPicker *, QWidget * );
    83    
     83
    8484protected:
    8585    virtual void drawOverlay( QPainter * ) const;
    8686    virtual QRegion maskHint() const;
    87    
     87
    8888    QwtPicker *d_picker;
    89 }; 
     89};
    9090
    9191
     
    105105    {
    106106    }
    107        
     107
    108108    bool enabled;
    109109
     
    558558                case VLineRubberBand:
    559559                {
    560                     mask += qwtMaskRegion( QLine( pos.x(), pRect.top(), 
     560                    mask += qwtMaskRegion( QLine( pos.x(), pRect.top(),
    561561                        pos.x(), pRect.bottom() ), pw );
    562562                    break;
     
    564564                case HLineRubberBand:
    565565                {
    566                     mask += qwtMaskRegion( QLine( pRect.left(), pos.y(), 
     566                    mask += qwtMaskRegion( QLine( pRect.left(), pos.y(),
    567567                        pRect.right(), pos.y() ), pw );
    568568                    break;
     
    570570                case CrossRubberBand:
    571571                {
    572                     mask += qwtMaskRegion( QLine( pos.x(), pRect.top(), 
     572                    mask += qwtMaskRegion( QLine( pos.x(), pRect.top(),
    573573                        pos.x(), pRect.bottom() ), pw );
    574                     mask += qwtMaskRegion( QLine( pRect.left(), pos.y(), 
     574                    mask += qwtMaskRegion( QLine( pRect.left(), pos.y(),
    575575                        pRect.right(), pos.y() ), pw );
    576576                    break;
     
    752752   depends on the application requirements. F.e. :
    753753
    754    - A rectangular selection might need to have a specific aspect ratio only.\n
    755    - A selection could accept non intersecting polygons only.\n
    756    - ...\n
     754     - A rectangular selection might need to have a specific aspect ratio only.
     755     - A selection could accept non intersecting polygons only.
     756     - ...
    757757
    758758   The example below is for a rectangular selection, where the first
    759759   point is the center of the selected rectangle.
     760
    760761  \par Example
    761   \verbatim QPolygon MyPicker::adjustedPoints(const QPolygon &points) const
    762 {
    763     QPolygon adjusted;
    764     if ( points.size() == 2 )
    765     {
    766         const int width = qAbs(points[1].x() - points[0].x());
    767         const int height = qAbs(points[1].y() - points[0].y());
    768 
    769         QRect rect(0, 0, 2 * width, 2 * height);
    770         rect.moveCenter(points[0]);
    771 
    772         adjusted += rect.topLeft();
    773         adjusted += rect.bottomRight();
    774     }
    775     return adjusted;
    776 }\endverbatim\n
     762  \code
     763    QPolygon MyPicker::adjustedPoints( const QPolygon &points ) const
     764    {
     765        QPolygon adjusted;
     766        if ( points.size() == 2 )
     767        {
     768            const int width = qAbs( points[1].x() - points[0].x() );
     769            const int height = qAbs( points[1].y() - points[0].y() );
     770
     771            QRect rect( 0, 0, 2 * width, 2 * height );
     772            rect.moveCenter( points[0] );
     773
     774            adjusted += rect.topLeft();
     775            adjusted += rect.bottomRight();
     776        }
     777        return adjusted;
     778    }
     779  \endcode
     780  \endpar
    777781
    778782  \param points Selected points
     
    833837    {
    834838        const QPoint last =
    835             d_data->pickedPoints[int( d_data->pickedPoints.count() ) - 2];
     839            d_data->pickedPoints[ d_data->pickedPoints.count() - 2 ];
    836840
    837841        alignment |= ( pos.x() >= last.x() ) ? Qt::AlignRight : Qt::AlignLeft;
     
    11831187        case QEvent::MouseMove:
    11841188        {
    1185             const QMouseEvent *me = 
     1189            const QMouseEvent *me =
    11861190                static_cast< const QMouseEvent * >( event );
    11871191            pos = me->pos();
     
    12351239        return;
    12361240
    1237     d_data->pickedPoints.resize( 0 );
     1241    d_data->pickedPoints.clear();
    12381242    d_data->isActive = true;
    12391243    Q_EMIT activated( true );
     
    12811285            Q_EMIT selected( d_data->pickedPoints );
    12821286        else
    1283             d_data->pickedPoints.resize( 0 );
     1287            d_data->pickedPoints.clear();
    12841288
    12851289        updateDisplay();
     
    13151319    if ( d_data->isActive )
    13161320    {
    1317         const int idx = d_data->pickedPoints.count();
    1318         d_data->pickedPoints.resize( idx + 1 );
    1319         d_data->pickedPoints[idx] = pos;
     1321        d_data->pickedPoints += pos;
    13201322
    13211323        updateDisplay();
     
    13331335void QwtPicker::move( const QPoint &pos )
    13341336{
    1335     if ( d_data->isActive )
    1336     {
    1337         const int idx = d_data->pickedPoints.count() - 1;
    1338         if ( idx >= 0 )
    1339         {
    1340             if ( d_data->pickedPoints[idx] != pos )
    1341             {
    1342                 d_data->pickedPoints[idx] = pos;
    1343 
    1344                 updateDisplay();
    1345                 Q_EMIT moved( pos );
    1346             }
     1337    if ( d_data->isActive && !d_data->pickedPoints.isEmpty() )
     1338    {
     1339        QPoint &point = d_data->pickedPoints.last();
     1340        if ( point != pos )
     1341        {
     1342            point = pos;
     1343
     1344            updateDisplay();
     1345            Q_EMIT moved( pos );
    13471346        }
    13481347    }
     
    13571356void QwtPicker::remove()
    13581357{
    1359     if ( d_data->isActive )
    1360     {
    1361         const int idx = d_data->pickedPoints.count() - 1;
    1362         if ( idx > 0 )
    1363         {
    1364             const int idx = d_data->pickedPoints.count();
    1365 
    1366             const QPoint pos = d_data->pickedPoints[idx - 1];
    1367             d_data->pickedPoints.resize( idx - 1 );
    1368 
    1369             updateDisplay();
    1370             Q_EMIT removed( pos );
    1371         }
     1358    if ( d_data->isActive && !d_data->pickedPoints.isEmpty() )
     1359    {
     1360#if QT_VERSION >= 0x050100
     1361        const QPoint pos = d_data->pickedPoints.takeLast();
     1362#else
     1363        const QPoint pos = d_data->pickedPoints.last();
     1364        d_data->pickedPoints.resize( d_data->pickedPoints.count() - 1 );
     1365#endif
     1366
     1367        updateDisplay();
     1368        Q_EMIT removed( pos );
    13721369    }
    13731370}
     
    14241421    }
    14251422
    1426     const double xRatio =
    1427         double( newSize.width() ) / double( oldSize.width() );
    1428     const double yRatio =
    1429         double( newSize.height() ) / double( oldSize.height() );
    1430 
    1431     for ( int i = 0; i < int( d_data->pickedPoints.count() ); i++ )
     1423    const double xRatio = double( newSize.width() ) / double( oldSize.width() );
     1424    const double yRatio = double( newSize.height() ) / double( oldSize.height() );
     1425
     1426    for ( int i = 0; i < d_data->pickedPoints.count(); i++ )
    14321427    {
    14331428        QPoint &p = d_data->pickedPoints[i];
     
    14721467  Find the area of the observed widget, where selection might happen.
    14731468
    1474   \return parentWidget()->contentsRect() 
     1469  \return parentWidget()->contentsRect()
    14751470*/
    14761471QPainterPath QwtPicker::pickArea() const
     
    15041499            ( trackerMode() == ActiveOnly && isActive() ) )
    15051500        {
    1506             if ( trackerPen() != Qt::NoPen 
     1501            if ( trackerPen() != Qt::NoPen
    15071502                && !trackerRect( QFont() ).isEmpty() )
    15081503            {
  • trunk/BNC/qwt/qwt_picker.h

    r8127 r9383  
    5959
    6060  \par Example
    61   \verbatim #include <qwt_picker.h>
    62 #include <qwt_picker_machine.h>
    63 
    64 QwtPicker *picker = new QwtPicker(widget);
    65 picker->setStateMachine(new QwtPickerDragRectMachine);
    66 picker->setTrackerMode(QwtPicker::ActiveOnly);
    67 picker->setRubberBand(QwtPicker::RectRubberBand); \endverbatim\n
     61  \code
     62    #include <qwt_picker.h>
     63    #include <qwt_picker_machine.h>
     64
     65    QwtPicker *picker = new QwtPicker(widget);
     66    picker->setStateMachine(new QwtPickerDragRectMachine);
     67    picker->setTrackerMode(QwtPicker::ActiveOnly);
     68    picker->setRubberBand(QwtPicker::RectRubberBand);
     69  \endcode
     70  \endpar
    6871
    6972  The state machine triggers the following commands:
     
    308311    virtual void widgetLeaveEvent( QEvent * );
    309312
    310     virtual void stretchSelection( const QSize &oldSize,
    311                                   const QSize &newSize );
     313    virtual void stretchSelection(
     314        const QSize &oldSize, const QSize &newSize );
    312315
    313316    virtual void updateDisplay();
  • trunk/BNC/qwt/qwt_picker_machine.cpp

    r8127 r9383  
    106106        case QEvent::MouseButtonPress:
    107107        {
    108             if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 
     108            if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1,
    109109                static_cast<const QMouseEvent *>( event ) ) )
    110110            {
     
    152152        case QEvent::MouseButtonPress:
    153153        {
    154             if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 
     154            if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1,
    155155                static_cast<const QMouseEvent *>( event ) ) )
    156156            {
     
    225225        case QEvent::MouseButtonPress:
    226226        {
    227             if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 
     227            if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1,
    228228                static_cast<const QMouseEvent *>( event ) ) )
    229229            {
     
    260260        case QEvent::MouseButtonRelease:
    261261        {
    262             if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 
     262            if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1,
    263263                static_cast<const QMouseEvent *>( event ) ) )
    264264            {
     
    324324        case QEvent::MouseButtonPress:
    325325        {
    326             if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 
     326            if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1,
    327327                static_cast<const QMouseEvent *>( event ) ) )
    328328            {
     
    355355        case QEvent::KeyPress:
    356356        {
    357             if ( eventPattern.keyMatch( QwtEventPattern::KeySelect1, 
     357            if ( eventPattern.keyMatch( QwtEventPattern::KeySelect1,
    358358                static_cast<const QKeyEvent *> ( event ) ) )
    359359            {
     
    396396        case QEvent::MouseButtonPress:
    397397        {
    398             if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 
     398            if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1,
    399399                static_cast<const QMouseEvent *>( event ) ) )
    400400            {
     
    411411                }
    412412            }
    413             if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect2, 
     413            if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect2,
    414414                static_cast<const QMouseEvent *>( event ) ) )
    415415            {
  • trunk/BNC/qwt/qwt_picker_machine.h

    r8127 r9383  
    170170/*!
    171171  \brief A state machine for line selections
    172    
     172
    173173  Pressing QwtEventPattern::MouseSelect1 selects
    174174  the first point, releasing it the second point.
     
    179179  A common use case of QwtPickerDragLineMachine are pickers for
    180180  distance measurements.
    181  
    182   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
    183 */             
    184                    
     181
     182  \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
     183*/
     184
    185185class QWT_EXPORT QwtPickerDragLineMachine: public QwtPickerMachine
    186186{
  • trunk/BNC/qwt/qwt_plot.cpp

    r8127 r9383  
    2828    if ( on )
    2929    {
    30         QObject::connect(
    31             plot, SIGNAL( legendDataChanged(
    32                 const QVariant &, const QList<QwtLegendData> & ) ),
    33             plot, SLOT( updateLegendItems(
    34                 const QVariant &, const QList<QwtLegendData> & ) ) );
     30        QObject::connect(
     31            plot, SIGNAL(legendDataChanged(QVariant,QList<QwtLegendData>)),
     32            plot, SLOT(updateLegendItems(QVariant,QList<QwtLegendData>))
     33        );
    3534    }
    3635    else
    3736    {
    38         QObject::disconnect(
    39             plot, SIGNAL( legendDataChanged(
    40                 const QVariant &, const QList<QwtLegendData> & ) ),
    41             plot, SLOT( updateLegendItems(
    42                 const QVariant &, const QList<QwtLegendData> & ) ) );
    43     }
    44 }
    45 
    46 static void qwtSetTabOrder(
     37        QObject::disconnect(
     38            plot, SIGNAL(legendDataChanged(QVariant,QList<QwtLegendData>) ),
     39            plot, SLOT( updateLegendItems(QVariant,QList<QwtLegendData>))
     40        );
     41    }
     42}
     43
     44static void qwtSetTabOrder(
    4745    QWidget *first, QWidget *second, bool withChildren )
    4846{
     
    196194  QwtPlot invokes methods of the canvas as meta methods ( see QMetaObject ).
    197195  In opposite to using conventional C++ techniques like virtual methods
    198   they allow to use canvas implementations that are derived from 
     196  they allow to use canvas implementations that are derived from
    199197  QWidget or QGLWidget.
    200198
     
    210208    it is o.k. not to implement this method.
    211209
    212   The default canvas is a QwtPlotCanvas 
     210  The default canvas is a QwtPlotCanvas
    213211
    214212  \param canvas Canvas Widget
     
    317315}
    318316
    319 /*! 
     317/*!
    320318  \return true if the autoReplot option is set.
    321319  \sa setAutoReplot()
     
    371369
    372370/*!
    373   Change the text the footer 
     371  Change the text the footer
    374372  \param text New text of the footer
    375373*/
     
    384382
    385383/*!
    386   Change the text the footer 
     384  Change the text the footer
    387385  \param text New text of the footer
    388386*/
     
    560558    if ( d_data->canvas )
    561559    {
    562         const bool ok = QMetaObject::invokeMethod( 
     560        const bool ok = QMetaObject::invokeMethod(
    563561            d_data->canvas, "replot", Qt::DirectConnection );
    564562        if ( !ok )
     
    724722    getCanvasMarginsHint( maps, canvas()->contentsRect(),
    725723        margins[yLeft], margins[xTop], margins[yRight], margins[xBottom] );
    726    
     724
    727725    bool doUpdate = false;
    728726    for ( int axisId = 0; axisId < axisCnt; axisId++ )
     
    766764
    767765  \note Usually canvasRect is contentsRect() of the plot canvas.
    768         Due to a bug in Qt this rectangle might be wrong for certain 
    769         frame styles ( f.e QFrame::Box ) and it might be necessary to 
     766        Due to a bug in Qt this rectangle might be wrong for certain
     767        frame styles ( f.e QFrame::Box ) and it might be necessary to
    770768        fix the margins manually using QWidget::setContentsMargins()
    771769*/
     
    914912
    915913  insertLegend() will set the plot widget as parent for the legend.
    916   The legend will be deleted in the destructor of the plot or when 
     914  The legend will be deleted in the destructor of the plot or when
    917915  another legend is inserted.
    918916
     
    952950        if ( d_data->legend )
    953951        {
    954             connect( this,
    955                 SIGNAL( legendDataChanged(
    956                     const QVariant &, const QList<QwtLegendData> & ) ),
    957                 d_data->legend,
    958                 SLOT( updateLegend(
    959                     const QVariant &, const QList<QwtLegendData> & ) )
     952            connect(
     953                this, SIGNAL(legendDataChanged(QVariant,QList<QwtLegendData>)),
     954                d_data->legend, SLOT(updateLegend(QVariant,QList<QwtLegendData>) )
    960955            );
    961956
     
    10881083
    10891084/*!
    1090   \brief Attach/Detach a plot item 
     1085  \brief Attach/Detach a plot item
    10911086
    10921087  \param plotItem Plot item
     
    11161111    if ( on )
    11171112        insertItem( plotItem );
    1118     else 
     1113    else
    11191114        removeItem( plotItem );
    11201115
     
    11681163         that has bee generated from itemToInfo().
    11691164
    1170   The default implementation simply tries to unwrap a QwtPlotItem 
     1165  The default implementation simply tries to unwrap a QwtPlotItem
    11711166  pointer:
    11721167
  • trunk/BNC/qwt/qwt_plot.h

    r8127 r9383  
    4141  can be configured separately for each axis.
    4242
    43   The simpleplot example is a good starting point to see how to set up a 
     43  The simpleplot example is a good starting point to see how to set up a
    4444  plot widget.
    4545
     
    4747
    4848  \par Example
    49   The following example shows (schematically) the most simple
    50   way to use QwtPlot. By default, only the left and bottom axes are
    51   visible and their scales are computed automatically.
    52   \verbatim
    53 #include <qwt_plot.h>
    54 #include <qwt_plot_curve.h>
    55 
    56 QwtPlot *myPlot = new QwtPlot("Two Curves", parent);
    57 
    58 // add curves
    59 QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
    60 QwtPlotCurve *curve2 = new QwtPlotCurve("Curve 2");
    61 
    62 // connect or copy the data to the curves
    63 curve1->setData(...);
    64 curve2->setData(...);
    65 
    66 curve1->attach(myPlot);
    67 curve2->attach(myPlot);
    68 
    69 // finally, refresh the plot
    70 myPlot->replot();
    71 \endverbatim
     49    The following example shows (schematically) the most simple
     50    way to use QwtPlot. By default, only the left and bottom axes are
     51    visible and their scales are computed automatically.
     52    \code
     53      #include <qwt_plot.h>
     54      #include <qwt_plot_curve.h>
     55
     56      QwtPlot *myPlot = new QwtPlot( "Two Curves", parent );
     57
     58      // add curves
     59      QwtPlotCurve *curve1 = new QwtPlotCurve( "Curve 1" );
     60      QwtPlotCurve *curve2 = new QwtPlotCurve( "Curve 2" );
     61
     62      // connect or copy the data to the curves
     63      curve1->setData( ... );
     64      curve2->setData( ... );
     65
     66      curve1->attach( myPlot );
     67      curve2->attach( myPlot );
     68
     69      // finally, refresh the plot
     70      myPlot->replot();
     71    \endcode
     72  \endpar
    7273*/
    7374
     
    7677    Q_OBJECT
    7778
    78     Q_PROPERTY( QBrush canvasBackground 
     79    Q_PROPERTY( QBrush canvasBackground
    7980        READ canvasBackground WRITE setCanvasBackground )
    8081    Q_PROPERTY( bool autoReplot READ autoReplot WRITE setAutoReplot )
     
    122123        RightLegend,
    123124
    124         //! The legend will be below the footer 
     125        //! The legend will be below the footer
    125126        BottomLegend,
    126127
     
    150151
    151152    void setTitle( const QString & );
    152     void setTitle( const QwtText &t );
     153    void setTitle( const QwtText & );
    153154    QwtText title() const;
    154155
     
    159160
    160161    void setFooter( const QString & );
    161     void setFooter( const QwtText &t );
     162    void setFooter( const QwtText & );
    162163    QwtText footer() const;
    163164
     
    192193    bool axisEnabled( int axisId ) const;
    193194
    194     void setAxisFont( int axisId, const QFont &f );
     195    void setAxisFont( int axisId, const QFont & );
    195196    QFont axisFont( int axisId ) const;
    196197
    197     void setAxisScale( int axisId, double min, double max, double step = 0 );
     198    void setAxisScale( int axisId, double min, double max, double stepSize = 0 );
    198199    void setAxisScaleDiv( int axisId, const QwtScaleDiv & );
    199200    void setAxisScaleDraw( int axisId, QwtScaleDraw * );
     
    225226    // Legend
    226227
    227     void insertLegend( QwtAbstractLegend *, 
     228    void insertLegend( QwtAbstractLegend *,
    228229        LegendPosition = QwtPlot::RightLegend, double ratio = -1.0 );
    229230
     
    245246    void updateCanvasMargins();
    246247
    247     virtual void getCanvasMarginsHint( 
     248    virtual void getCanvasMarginsHint(
    248249        const QwtScaleMap maps[], const QRectF &canvasRect,
    249250        double &left, double &top, double &right, double &bottom) const;
     
    268269
    269270    /*!
    270       A signal with the attributes how to update 
     271      A signal with the attributes how to update
    271272      the legend entries for a plot item.
    272273
     
    277278      \sa itemToInfo(), infoToItem(), QwtAbstractLegend::updateLegend()
    278279     */
    279     void legendDataChanged( const QVariant &itemInfo, 
     280    void legendDataChanged( const QVariant &itemInfo,
    280281        const QList<QwtLegendData> &data );
    281282
     
    291292private Q_SLOTS:
    292293    void updateLegendItems( const QVariant &itemInfo,
    293         const QList<QwtLegendData> &data );
     294        const QList<QwtLegendData> &legendData );
    294295
    295296private:
  • trunk/BNC/qwt/qwt_plot_abstract_barchart.cpp

    r8127 r9383  
    181181   \brief Set the baseline
    182182
    183    The baseline is the origin for the chart. Each bar is 
    184    painted from the baseline in the direction of the sample 
     183   The baseline is the origin for the chart. Each bar is
     184   painted from the baseline in the direction of the sample
    185185   value. In case of a horizontal orientation() the baseline
    186186   is interpreted as x - otherwise as y - value.
     
    201201}
    202202
    203 /*! 
     203/*!
    204204   \return Value for the origin of the bar chart
    205205   \sa setBaseline(), QwtPlotSeriesItem::orientation()
     
    286286       QwtPlot::getCanvasMarginsHint(), QwtPlot::updateCanvasMargins()
    287287 */
    288 void QwtPlotAbstractBarChart::getCanvasMarginHint( const QwtScaleMap &xMap, 
     288void QwtPlotAbstractBarChart::getCanvasMarginHint( const QwtScaleMap &xMap,
    289289    const QwtScaleMap &yMap, const QRectF &canvasRect,
    290290    double &left, double &top, double &right, double &bottom ) const
  • trunk/BNC/qwt/qwt_plot_abstract_barchart.h

    r8127 r9383  
    1818  \brief Abstract base class for bar chart items
    1919
    20   In opposite to almost all other plot items bar charts can't be 
     20  In opposite to almost all other plot items bar charts can't be
    2121  displayed inside of their bounding rectangle and need a special
    2222  API  how to calculate the width of the bars and how they affect
     
    7979    double baseline() const;
    8080
    81     virtual void getCanvasMarginHint( 
     81    virtual void getCanvasMarginHint(
    8282        const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    8383        const QRectF &canvasRect,
     
    8787protected:
    8888    double sampleWidth( const QwtScaleMap &map,
    89         double canvasSize, double dataSize,
     89        double canvasSize, double boundingSize,
    9090        double value ) const;
    9191
  • trunk/BNC/qwt/qwt_plot_axis.cpp

    r8127 r9383  
    6868        d.scaleEngine = new QwtLinearScaleEngine;
    6969
    70         d.scaleWidget->setTransformation( 
     70        d.scaleWidget->setTransformation(
    7171            d.scaleEngine->transformation() );
    7272
     
    148148        d.scaleEngine = scaleEngine;
    149149
    150         d_axisData[axisId]->scaleWidget->setTransformation( 
     150        d_axisData[axisId]->scaleWidget->setTransformation(
    151151            scaleEngine->transformation() );
    152152
     
    190190    else
    191191        return false;
    192 
    193192}
    194193
     
    289288
    290289/*!
    291   \brief Return the step size parameter that has been set in setAxisScale. 
     290  \brief Return the step size parameter that has been set in setAxisScale.
    292291
    293292  This doesn't need to be the step size of the current scale.
     
    310309
    311310  This is only a convenience function for axisScaleDiv( axisId )->interval();
    312  
     311
    313312  \param axisId Axis index
    314313  \return Scale interval
     
    434433  \brief Disable autoscaling and specify a fixed scale for a selected axis.
    435434
    436   In updateAxes() the scale engine calculates a scale division from the 
    437   specified parameters, that will be assigned to the scale widget. So 
     435  In updateAxes() the scale engine calculates a scale division from the
     436  specified parameters, that will be assigned to the scale widget. So
    438437  updates of the scale widget usually happen delayed with the next replot.
    439438
     
    467466
    468467  The scale division will be stored locally only until the next call
    469   of updateAxes(). So updates of the scale widget usually happen delayed with 
     468  of updateAxes(). So updates of the scale widget usually happen delayed with
    470469  the next replot.
    471470
     
    615614}
    616615
    617 /*! 
     616/*!
    618617  \brief Rebuild the axes scales
    619618
    620   In case of autoscaling the boundaries of a scale are calculated 
    621   from the bounding rectangles of all plot items, having the 
    622   QwtPlotItem::AutoScale flag enabled ( QwtScaleEngine::autoScale() ). 
    623   Then a scale division is calculated ( QwtScaleEngine::didvideScale() ) 
     619  In case of autoscaling the boundaries of a scale are calculated
     620  from the bounding rectangles of all plot items, having the
     621  QwtPlotItem::AutoScale flag enabled ( QwtScaleEngine::autoScale() ).
     622  Then a scale division is calculated ( QwtScaleEngine::didvideScale() )
    624623  and assigned to scale widget.
    625624
    626   When the scale boundaries have been assigned with setAxisScale() a 
     625  When the scale boundaries have been assigned with setAxisScale() a
    627626  scale division is calculated ( QwtScaleEngine::didvideScale() )
    628627  for this interval and assigned to the scale widget.
    629628
    630   When the scale has been set explicitly by setAxisScaleDiv() the 
     629  When the scale has been set explicitly by setAxisScaleDiv() the
    631630  locally stored scale division gets assigned to the scale widget.
    632631
    633   The scale widget indicates modifications by emitting a 
     632  The scale widget indicates modifications by emitting a
    634633  QwtScaleWidget::scaleDivChanged() signal.
    635634
    636   updateAxes() is usually called by replot(). 
     635  updateAxes() is usually called by replot().
    637636
    638637  \sa setAxisAutoScale(), setAxisScale(), setAxisScaleDiv(), replot()
  • trunk/BNC/qwt/qwt_plot_barchart.cpp

    r8127 r9383  
    2222    {
    2323    }
    24  
     24
    2525    ~PrivateData()
    2626    {
     
    121121
    122122  The bar chart will take the ownership of the symbol, hence the previously
    123   set symbol will be delete by setting a new one. If \p symbol is 
     123  set symbol will be delete by setting a new one. If \p symbol is
    124124  \c NULL no symbol will be drawn.
    125125
     
    305305
    306306/*!
    307   Draw a bar 
     307  Draw a bar
    308308
    309309  \param painter Painter
     
    313313 */
    314314void QwtPlotBarChart::drawBar( QPainter *painter,
    315     int sampleIndex, const QPointF &sample, 
     315    int sampleIndex, const QPointF &sample,
    316316    const QwtColumnRect &rect ) const
    317317{
    318     const QwtColumnSymbol *specialSym = 
     318    const QwtColumnSymbol *specialSym =
    319319        specialSymbol( sampleIndex, sample );
    320320
     
    330330    {
    331331        // we build a temporary default symbol
    332         QwtColumnSymbol sym( QwtColumnSymbol::Box );
    333         sym.setLineWidth( 1 );
    334         sym.setFrameStyle( QwtColumnSymbol::Plain );
    335         sym.draw( painter, rect );
     332        QwtColumnSymbol columnSymbol( QwtColumnSymbol::Box );
     333        columnSymbol.setLineWidth( 1 );
     334        columnSymbol.setFrameStyle( QwtColumnSymbol::Plain );
     335        columnSymbol.draw( painter, rect );
    336336    }
    337337
     
    340340
    341341/*!
    342   Needs to be overloaded to return a 
     342  Needs to be overloaded to return a
    343343  non default symbol for a specific sample
    344344
     
    348348  \return NULL, indicating to use the default symbol
    349349 */
    350 QwtColumnSymbol *QwtPlotBarChart::specialSymbol( 
     350QwtColumnSymbol *QwtPlotBarChart::specialSymbol(
    351351    int sampleIndex, const QPointF &sample ) const
    352352{
     
    429429   displays the default symbol.
    430430
    431    \param index Index of the legend entry 
     431   \param index Index of the legend entry
    432432   \param size Icon size
    433433
    434    \sa setLegendMode(), drawBar(), 
     434   \sa setLegendMode(), drawBar(),
    435435       QwtPlotItem::setLegendIconSize(), QwtPlotItem::legendData()
    436436 */
    437 QwtGraphic QwtPlotBarChart::legendIcon( 
     437QwtGraphic QwtPlotBarChart::legendIcon(
    438438    int index, const QSizeF &size ) const
    439439{
     
    453453    if ( d_data->legendMode == QwtPlotBarChart::LegendBarTitles )
    454454        barIndex = index;
    455        
     455
    456456    drawBar( &painter, barIndex, QPointF(), column );
    457457
  • trunk/BNC/qwt/qwt_plot_barchart.h

    r8127 r9383  
    2424  a specialSymbol(). Otherwise it is rendered using a default symbol.
    2525
    26   Depending on its orientation() the bars are displayed horizontally 
    27   or vertically. The bars cover the interval between the baseline() 
     26  Depending on its orientation() the bars are displayed horizontally
     27  or vertically. The bars cover the interval between the baseline()
    2828  and the value.
    2929
     
    5151    enum LegendMode
    5252    {
    53         /*! 
     53        /*!
    5454          One entry on the legend showing the default symbol
    5555          and the title() of the chart
     
    6868    };
    6969
    70     explicit QwtPlotBarChart( const QString &title = QString::null );
     70    explicit QwtPlotBarChart( const QString &title = QString() );
    7171    explicit QwtPlotBarChart( const QwtText &title );
    7272
     
    7777    void setSamples( const QVector<QPointF> & );
    7878    void setSamples( const QVector<double> & );
    79     void setSamples( QwtSeriesData<QPointF> *series );
     79    void setSamples( QwtSeriesData<QPointF> * );
    8080
    8181    void setSymbol( QwtColumnSymbol * );
     
    9191    virtual QRectF boundingRect() const;
    9292
    93     virtual QwtColumnSymbol *specialSymbol( 
     93    virtual QwtColumnSymbol *specialSymbol(
    9494        int sampleIndex, const QPointF& ) const;
    9595
     
    103103
    104104    virtual void drawBar( QPainter *,
    105         int sampleIndex, const QPointF& point,
     105        int sampleIndex, const QPointF& sample,
    106106        const QwtColumnRect & ) const;
    107107
  • trunk/BNC/qwt/qwt_plot_canvas.cpp

    r8127 r9383  
    4949    }
    5050
     51    virtual void drawRects(const QRect *rects, int count )
     52    {
     53        // to silence -Woverloaded-virtual
     54        QwtNullPaintDevice::drawRects( rects, count );
     55    }
     56
    51