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


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

update to qwt verion 6.1.1 to fix build with newer Qt5

File:
1 edited

Legend:

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

    r8127 r9383  
    164164    // canvas
    165165
    166     plot->canvas()->getContentsMargins( 
    167         &canvas.contentsMargins[ QwtPlot::yLeft ], 
     166    plot->canvas()->getContentsMargins(
     167        &canvas.contentsMargins[ QwtPlot::yLeft ],
    168168        &canvas.contentsMargins[ QwtPlot::xTop ],
    169169        &canvas.contentsMargins[ QwtPlot::yRight ],
     
    845845  \param dimTitle Expanded height of the title widget
    846846  \param dimFooter Expanded height of the footer widget
    847   \param dimAxis Expanded heights of the axis in axis orientation.
     847  \param dimAxes Expanded heights of the axis in axis orientation.
    848848
    849849  \sa Options
    850850*/
    851851void QwtPlotLayout::expandLineBreaks( Options options, const QRectF &rect,
    852     int &dimTitle, int &dimFooter, int dimAxis[QwtPlot::axisCnt] ) const
     852    int &dimTitle, int &dimFooter, int dimAxes[QwtPlot::axisCnt] ) const
    853853{
    854854    dimTitle = dimFooter = 0;
    855855    for ( int axis = 0; axis < QwtPlot::axisCnt; axis++ )
    856         dimAxis[axis] = 0;
     856        dimAxes[axis] = 0;
    857857
    858858    int backboneOffset[QwtPlot::axisCnt];
     
    889889            {
    890890                // center to the canvas
    891                 w -= dimAxis[QwtPlot::yLeft] + dimAxis[QwtPlot::yRight];
     891                w -= dimAxes[QwtPlot::yLeft] + dimAxes[QwtPlot::yRight];
    892892            }
    893893
     
    912912            {
    913913                // center to the canvas
    914                 w -= dimAxis[QwtPlot::yLeft] + dimAxis[QwtPlot::yRight];
     914                w -= dimAxes[QwtPlot::yLeft] + dimAxes[QwtPlot::yRight];
    915915            }
    916916
     
    936936                if ( axis == QwtPlot::xTop || axis == QwtPlot::xBottom )
    937937                {
    938                     length = rect.width() - dimAxis[QwtPlot::yLeft]
    939                         - dimAxis[QwtPlot::yRight];
     938                    length = rect.width() - dimAxes[QwtPlot::yLeft]
     939                        - dimAxes[QwtPlot::yRight];
    940940                    length -= scaleData.start + scaleData.end;
    941941
    942                     if ( dimAxis[QwtPlot::yRight] > 0 )
     942                    if ( dimAxes[QwtPlot::yRight] > 0 )
    943943                        length -= 1;
    944944
    945                     length += qMin( dimAxis[QwtPlot::yLeft],
     945                    length += qMin( dimAxes[QwtPlot::yLeft],
    946946                        scaleData.start - backboneOffset[QwtPlot::yLeft] );
    947                     length += qMin( dimAxis[QwtPlot::yRight],
     947                    length += qMin( dimAxes[QwtPlot::yRight],
    948948                        scaleData.end - backboneOffset[QwtPlot::yRight] );
    949949                }
    950950                else // QwtPlot::yLeft, QwtPlot::yRight
    951951                {
    952                     length = rect.height() - dimAxis[QwtPlot::xTop]
    953                         - dimAxis[QwtPlot::xBottom];
     952                    length = rect.height() - dimAxes[QwtPlot::xTop]
     953                        - dimAxes[QwtPlot::xBottom];
    954954                    length -= scaleData.start + scaleData.end;
    955955                    length -= 1;
    956956
    957                     if ( dimAxis[QwtPlot::xBottom] <= 0 )
     957                    if ( dimAxes[QwtPlot::xBottom] <= 0 )
    958958                        length -= 1;
    959                     if ( dimAxis[QwtPlot::xTop] <= 0 )
     959                    if ( dimAxes[QwtPlot::xTop] <= 0 )
    960960                        length -= 1;
    961961
    962                     if ( dimAxis[QwtPlot::xBottom] > 0 )
     962                    if ( dimAxes[QwtPlot::xBottom] > 0 )
    963963                    {
    964964                        length += qMin(
     
    966966                            double( scaleData.start - backboneOffset[QwtPlot::xBottom] ) );
    967967                    }
    968                     if ( dimAxis[QwtPlot::xTop] > 0 )
     968                    if ( dimAxes[QwtPlot::xTop] > 0 )
    969969                    {
    970970                        length += qMin(
     
    984984
    985985
    986                 if ( d > dimAxis[axis] )
    987                 {
    988                     dimAxis[axis] = d;
     986                if ( d > dimAxes[axis] )
     987                {
     988                    dimAxes[axis] = d;
    989989                    done = false;
    990990                }
     
    10201020        if ( !( options & IgnoreFrames ) )
    10211021        {
    1022             backboneOffset[axis] += 
     1022            backboneOffset[axis] +=
    10231023                d_data->layoutData.canvas.contentsMargins[axis];
    10241024        }
     
    10891089                    const double cRight = canvasRect.right(); // qreal -> double
    10901090                    canvasRect.setRight( qMin( cRight, axisRect.right() + dx ) );
    1091                 }   
     1091                }
    10921092
    10931093                const double maxRight = rightScaleRect.right();
Note: See TracChangeset for help on using the changeset viewer.