Changeset 9383 in ntrip for trunk/BNC/qwt/qwt_plot_layout.cpp
- Timestamp:
- Mar 19, 2021, 9:15:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_plot_layout.cpp
r8127 r9383 164 164 // canvas 165 165 166 plot->canvas()->getContentsMargins( 167 &canvas.contentsMargins[ QwtPlot::yLeft ], 166 plot->canvas()->getContentsMargins( 167 &canvas.contentsMargins[ QwtPlot::yLeft ], 168 168 &canvas.contentsMargins[ QwtPlot::xTop ], 169 169 &canvas.contentsMargins[ QwtPlot::yRight ], … … 845 845 \param dimTitle Expanded height of the title widget 846 846 \param dimFooter Expanded height of the footer widget 847 \param dimAx is Expanded heights of the axis in axis orientation.847 \param dimAxes Expanded heights of the axis in axis orientation. 848 848 849 849 \sa Options 850 850 */ 851 851 void QwtPlotLayout::expandLineBreaks( Options options, const QRectF &rect, 852 int &dimTitle, int &dimFooter, int dimAx is[QwtPlot::axisCnt] ) const852 int &dimTitle, int &dimFooter, int dimAxes[QwtPlot::axisCnt] ) const 853 853 { 854 854 dimTitle = dimFooter = 0; 855 855 for ( int axis = 0; axis < QwtPlot::axisCnt; axis++ ) 856 dimAx is[axis] = 0;856 dimAxes[axis] = 0; 857 857 858 858 int backboneOffset[QwtPlot::axisCnt]; … … 889 889 { 890 890 // center to the canvas 891 w -= dimAx is[QwtPlot::yLeft] + dimAxis[QwtPlot::yRight];891 w -= dimAxes[QwtPlot::yLeft] + dimAxes[QwtPlot::yRight]; 892 892 } 893 893 … … 912 912 { 913 913 // center to the canvas 914 w -= dimAx is[QwtPlot::yLeft] + dimAxis[QwtPlot::yRight];914 w -= dimAxes[QwtPlot::yLeft] + dimAxes[QwtPlot::yRight]; 915 915 } 916 916 … … 936 936 if ( axis == QwtPlot::xTop || axis == QwtPlot::xBottom ) 937 937 { 938 length = rect.width() - dimAx is[QwtPlot::yLeft]939 - dimAx is[QwtPlot::yRight];938 length = rect.width() - dimAxes[QwtPlot::yLeft] 939 - dimAxes[QwtPlot::yRight]; 940 940 length -= scaleData.start + scaleData.end; 941 941 942 if ( dimAx is[QwtPlot::yRight] > 0 )942 if ( dimAxes[QwtPlot::yRight] > 0 ) 943 943 length -= 1; 944 944 945 length += qMin( dimAx is[QwtPlot::yLeft],945 length += qMin( dimAxes[QwtPlot::yLeft], 946 946 scaleData.start - backboneOffset[QwtPlot::yLeft] ); 947 length += qMin( dimAx is[QwtPlot::yRight],947 length += qMin( dimAxes[QwtPlot::yRight], 948 948 scaleData.end - backboneOffset[QwtPlot::yRight] ); 949 949 } 950 950 else // QwtPlot::yLeft, QwtPlot::yRight 951 951 { 952 length = rect.height() - dimAx is[QwtPlot::xTop]953 - dimAx is[QwtPlot::xBottom];952 length = rect.height() - dimAxes[QwtPlot::xTop] 953 - dimAxes[QwtPlot::xBottom]; 954 954 length -= scaleData.start + scaleData.end; 955 955 length -= 1; 956 956 957 if ( dimAx is[QwtPlot::xBottom] <= 0 )957 if ( dimAxes[QwtPlot::xBottom] <= 0 ) 958 958 length -= 1; 959 if ( dimAx is[QwtPlot::xTop] <= 0 )959 if ( dimAxes[QwtPlot::xTop] <= 0 ) 960 960 length -= 1; 961 961 962 if ( dimAx is[QwtPlot::xBottom] > 0 )962 if ( dimAxes[QwtPlot::xBottom] > 0 ) 963 963 { 964 964 length += qMin( … … 966 966 double( scaleData.start - backboneOffset[QwtPlot::xBottom] ) ); 967 967 } 968 if ( dimAx is[QwtPlot::xTop] > 0 )968 if ( dimAxes[QwtPlot::xTop] > 0 ) 969 969 { 970 970 length += qMin( … … 984 984 985 985 986 if ( d > dimAx is[axis] )987 { 988 dimAx is[axis] = d;986 if ( d > dimAxes[axis] ) 987 { 988 dimAxes[axis] = d; 989 989 done = false; 990 990 } … … 1020 1020 if ( !( options & IgnoreFrames ) ) 1021 1021 { 1022 backboneOffset[axis] += 1022 backboneOffset[axis] += 1023 1023 d_data->layoutData.canvas.contentsMargins[axis]; 1024 1024 } … … 1089 1089 const double cRight = canvasRect.right(); // qreal -> double 1090 1090 canvasRect.setRight( qMin( cRight, axisRect.right() + dx ) ); 1091 } 1091 } 1092 1092 1093 1093 const double maxRight = rightScaleRect.right();
Note:
See TracChangeset
for help on using the changeset viewer.