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

update to qwt verion 6.1.1 to fix build with newer Qt5

File:
1 edited

Legend:

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

    r8127 r9383  
    109109/*!
    110110  Assign a series of samples
    111    
     111
    112112  setSamples() is just a wrapper for setData() without any additional
    113113  value - beside that it is easier to find for the developer.
    114    
     114
    115115  \param data Data
    116116  \warning The item takes ownership of the data object, deleting
    117117           it when its not used anymore.
    118 */ 
    119 void QwtPlotMultiBarChart::setSamples( 
     118*/
     119void QwtPlotMultiBarChart::setSamples(
    120120    QwtSeriesData<QwtSetSample> *data )
    121 {       
     121{
    122122    setData( data );
    123 }       
     123}
    124124
    125125/*!
     
    138138}
    139139
    140 /*! 
     140/*!
    141141  \return Bar titles
    142142  \sa setBarTitles(), legendData()
     
    163163        return;
    164164
    165     QMap<int, QwtColumnSymbol *>::iterator it = 
     165    QMap<int, QwtColumnSymbol *>::iterator it =
    166166        d_data->symbolMap.find(valueIndex);
    167167    if ( it == d_data->symbolMap.end() )
     
    207207{
    208208    QMap<int, QwtColumnSymbol *>::const_iterator it =
    209         d_data->symbolMap.find( valueIndex );
    210 
    211     return ( it == d_data->symbolMap.end() ) ? NULL : it.value();
     209        d_data->symbolMap.constFind( valueIndex );
     210
     211    return ( it == d_data->symbolMap.constEnd() ) ? NULL : it.value();
    212212}
    213213
     
    220220  \sa setSymbol(), specialSymbol(), drawBar()
    221221*/
    222 QwtColumnSymbol *QwtPlotMultiBarChart::symbol( int valueIndex ) 
    223 {
    224     QMap<int, QwtColumnSymbol *>::iterator it =
    225         d_data->symbolMap.find( valueIndex );
    226 
    227     return ( it == d_data->symbolMap.end() ) ? NULL : it.value();
     222QwtColumnSymbol *QwtPlotMultiBarChart::symbol( int valueIndex )
     223{
     224    QMap<int, QwtColumnSymbol *>::const_iterator it =
     225        d_data->symbolMap.constFind( valueIndex );
     226
     227    return ( it == d_data->symbolMap.constEnd() ) ? NULL : it.value();
    228228}
    229229
     
    233233void QwtPlotMultiBarChart::resetSymbolMap()
    234234{
    235     for ( QMap<int, QwtColumnSymbol *>::iterator it
    236         = d_data->symbolMap.begin(); it != d_data->symbolMap.end(); ++it )
    237     {
    238         delete it.value();
    239     }
    240 
     235    qDeleteAll( d_data->symbolMap );
    241236    d_data->symbolMap.clear();
    242237}
     
    253248
    254249  When no symbol ( NULL ) is returned, the value will be displayed
    255   with the standard symbol that is used for all symbols with the same 
     250  with the standard symbol that is used for all symbols with the same
    256251  valueIndex.
    257252
     
    260255
    261256  \return NULL, meaning that the value is not special
    262    
     257
    263258 */
    264 QwtColumnSymbol *QwtPlotMultiBarChart::specialSymbol( 
     259QwtColumnSymbol *QwtPlotMultiBarChart::specialSymbol(
    265260    int sampleIndex, int valueIndex ) const
    266261{
     
    456451  \param index Index of the sample to be painted
    457452  \param sampleWidth Boundng width for all bars of the smaple
    458   \param sample Sample 
     453  \param sample Sample
    459454
    460455  \sa drawSeries(), sampleWidth()
     
    536531  \param index Index of the sample to be painted
    537532  \param sampleWidth Width of the bars
    538   \param sample Sample 
     533  \param sample Sample
    539534
    540535  \sa drawSeries(), sampleWidth()
     
    542537void QwtPlotMultiBarChart::drawStackedBars( QPainter *painter,
    543538    const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    544     const QRectF &canvasRect, int index, 
     539    const QRectF &canvasRect, int index,
    545540    double sampleWidth, const QwtSetSample& sample ) const
    546541{
     
    568563        double sum = baseline();
    569564
    570         const int numBars = sample.set.size();
    571565        for ( int i = 0; i < numBars; i++ )
    572566        {
     
    670664    {
    671665        // we build a temporary default symbol
    672         QwtColumnSymbol sym( QwtColumnSymbol::Box );
    673         sym.setLineWidth( 1 );
    674         sym.setFrameStyle( QwtColumnSymbol::Plain );
    675         sym.draw( painter, rect );
     666        QwtColumnSymbol columnSymbol( QwtColumnSymbol::Box );
     667        columnSymbol.setLineWidth( 1 );
     668        columnSymbol.setFrameStyle( QwtColumnSymbol::Plain );
     669        columnSymbol.draw( painter, rect );
    676670    }
    677671
     
    702696        {
    703697            QVariant iconValue;
    704             qVariantSetValue( iconValue, 
     698            qVariantSetValue( iconValue,
    705699                legendIcon( i, legendIconSize() ) );
    706700
     
    719713  \param index Index of the bar
    720714  \param size Icon size
    721  
     715
    722716  \return An icon showing a bar
    723717  \sa drawBar(), legendData()
Note: See TracChangeset for help on using the changeset viewer.