mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
Change all mixed size_t variables to int to avoid cross-compiler hell
This commit is contained in:
parent
3da6ff63d2
commit
01fb3210cf
@ -112,9 +112,9 @@ static double qwtRoundedIntervalWidth(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int qwtStepCount( int intervalSize, int maxSteps,
|
static inline int qwtStepCount( int intervalSize, int maxSteps,
|
||||||
const int limits[], size_t numLimits )
|
const int limits[], int numLimits )
|
||||||
{
|
{
|
||||||
for ( uint i = 0; i < numLimits; i++ )
|
for ( int i = 0; i < numLimits; i++ )
|
||||||
{
|
{
|
||||||
const int numSteps = intervalSize / limits[ i ];
|
const int numSteps = intervalSize / limits[ i ];
|
||||||
|
|
||||||
@ -160,11 +160,11 @@ static int qwtStepSize( int intervalSize, int maxSteps, uint base )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int qwtDivideInterval( double intervalSize, int numSteps,
|
static int qwtDivideInterval( double intervalSize, int numSteps,
|
||||||
const int limits[], size_t numLimits )
|
const int limits[], int numLimits )
|
||||||
{
|
{
|
||||||
const int v = qwtCeil( intervalSize / double( numSteps ) );
|
const int v = qwtCeil( intervalSize / double( numSteps ) );
|
||||||
|
|
||||||
for ( uint i = 0; i < numLimits - 1; i++ )
|
for ( int i = 0; i < numLimits - 1; i++ )
|
||||||
{
|
{
|
||||||
if ( v <= limits[i] )
|
if ( v <= limits[i] )
|
||||||
return limits[i];
|
return limits[i];
|
||||||
|
@ -247,7 +247,7 @@ double QwtPlotAbstractBarChart::sampleWidth( const QwtScaleMap& map,
|
|||||||
case AutoAdjustSamples:
|
case AutoAdjustSamples:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
const size_t numSamples = dataSize();
|
const int numSamples = dataSize();
|
||||||
|
|
||||||
double w = 1.0;
|
double w = 1.0;
|
||||||
if ( numSamples > 1 )
|
if ( numSamples > 1 )
|
||||||
@ -312,7 +312,7 @@ void QwtPlotAbstractBarChart::getCanvasMarginHint( const QwtScaleMap& xMap,
|
|||||||
case ScaleSamplesToAxes:
|
case ScaleSamplesToAxes:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
const size_t numSamples = dataSize();
|
const int numSamples = dataSize();
|
||||||
if ( numSamples <= 0 )
|
if ( numSamples <= 0 )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ QwtPlotBarChart::LegendMode QwtPlotBarChart::legendMode() const
|
|||||||
*/
|
*/
|
||||||
QRectF QwtPlotBarChart::boundingRect() const
|
QRectF QwtPlotBarChart::boundingRect() const
|
||||||
{
|
{
|
||||||
const size_t numSamples = dataSize();
|
const int numSamples = dataSize();
|
||||||
if ( numSamples == 0 )
|
if ( numSamples == 0 )
|
||||||
return QwtPlotSeriesItem::boundingRect();
|
return QwtPlotSeriesItem::boundingRect();
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ QRectF QwtPlotBarChart::boundingRect() const
|
|||||||
*/
|
*/
|
||||||
void QwtPlotBarChart::drawSeries(QPainter* painter,
|
void QwtPlotBarChart::drawSeries(QPainter* painter,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const
|
const QRectF& canvasRect, int from, int to ) const
|
||||||
{
|
{
|
||||||
if ( to < 0 )
|
if ( to < 0 )
|
||||||
to = dataSize() - 1;
|
to = dataSize() - 1;
|
||||||
@ -239,7 +239,7 @@ void QwtPlotBarChart::drawSeries(QPainter* painter,
|
|||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
|
|
||||||
for ( size_t i = from; i <= to; i++ )
|
for ( int i = from; i <= to; i++ )
|
||||||
{
|
{
|
||||||
drawSample( painter, xMap, yMap,
|
drawSample( painter, xMap, yMap,
|
||||||
canvasRect, interval, i, sample( i ) );
|
canvasRect, interval, i, sample( i ) );
|
||||||
@ -419,10 +419,10 @@ QList< QwtLegendData > QwtPlotBarChart::legendData() const
|
|||||||
|
|
||||||
if ( m_data->legendMode == LegendBarTitles )
|
if ( m_data->legendMode == LegendBarTitles )
|
||||||
{
|
{
|
||||||
const size_t numSamples = dataSize();
|
const int numSamples = dataSize();
|
||||||
list.reserve( numSamples );
|
list.reserve( numSamples );
|
||||||
|
|
||||||
for ( size_t i = 0; i < numSamples; i++ )
|
for ( int i = 0; i < numSamples; i++ )
|
||||||
{
|
{
|
||||||
QwtLegendData data;
|
QwtLegendData data;
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ class QWT_EXPORT QwtPlotBarChart
|
|||||||
|
|
||||||
virtual void drawSeries( QPainter*,
|
virtual void drawSeries( QPainter*,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const QWT_OVERRIDE;
|
const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
||||||
|
|
||||||
|
@ -55,13 +55,13 @@ static void qwtUpdateLegendIconSize( QwtPlotCurve* curve )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qwtVerifyRange( size_t size, size_t& i1, size_t& i2 )
|
static int qwtVerifyRange( int size, int& i1, int& i2 )
|
||||||
{
|
{
|
||||||
if ( size < 1 )
|
if ( size < 1 )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
i1 = qBound<size_t>( 0, i1, size - 1 );
|
i1 = qBound<int>( 0, i1, size - 1 );
|
||||||
i2 = qBound<size_t>( 0, i2, size - 1 );
|
i2 = qBound<int>( 0, i2, size - 1 );
|
||||||
|
|
||||||
if ( i1 > i2 )
|
if ( i1 > i2 )
|
||||||
qSwap( i1, i2 );
|
qSwap( i1, i2 );
|
||||||
@ -380,9 +380,9 @@ const QBrush& QwtPlotCurve::brush() const
|
|||||||
*/
|
*/
|
||||||
void QwtPlotCurve::drawSeries( QPainter* painter,
|
void QwtPlotCurve::drawSeries( QPainter* painter,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const
|
const QRectF& canvasRect, int from, int to ) const
|
||||||
{
|
{
|
||||||
const size_t numSamples = dataSize();
|
const int numSamples = dataSize();
|
||||||
|
|
||||||
if ( !painter || numSamples <= 0 )
|
if ( !painter || numSamples <= 0 )
|
||||||
return;
|
return;
|
||||||
@ -1050,7 +1050,7 @@ double QwtPlotCurve::baseline() const
|
|||||||
*/
|
*/
|
||||||
int QwtPlotCurve::closestPoint( const QPointF& pos, double* dist ) const
|
int QwtPlotCurve::closestPoint( const QPointF& pos, double* dist ) const
|
||||||
{
|
{
|
||||||
const size_t numSamples = dataSize();
|
const int numSamples = dataSize();
|
||||||
|
|
||||||
if ( plot() == NULL || numSamples <= 0 )
|
if ( plot() == NULL || numSamples <= 0 )
|
||||||
return -1;
|
return -1;
|
||||||
@ -1063,7 +1063,7 @@ int QwtPlotCurve::closestPoint( const QPointF& pos, double* dist ) const
|
|||||||
int index = -1;
|
int index = -1;
|
||||||
double dmin = 1.0e10;
|
double dmin = 1.0e10;
|
||||||
|
|
||||||
for ( uint i = 0; i < numSamples; i++ )
|
for ( int i = 0; i < numSamples; i++ )
|
||||||
{
|
{
|
||||||
const QPointF sample = series->sample( i );
|
const QPointF sample = series->sample( i );
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ class QWT_EXPORT QwtPlotCurve
|
|||||||
|
|
||||||
virtual void drawSeries(QPainter*,
|
virtual void drawSeries(QPainter*,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const QWT_OVERRIDE;
|
const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
virtual QwtGraphic legendIcon( int index, const QSizeF& ) const QWT_OVERRIDE;
|
virtual QwtGraphic legendIcon( int index, const QSizeF& ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ void QwtPlotHistogram::setSamples(
|
|||||||
*/
|
*/
|
||||||
void QwtPlotHistogram::drawSeries(QPainter* painter,
|
void QwtPlotHistogram::drawSeries(QPainter* painter,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const
|
const QRectF& canvasRect, int from, int to ) const
|
||||||
{
|
{
|
||||||
Q_UNUSED( canvasRect )
|
Q_UNUSED( canvasRect )
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ class QWT_EXPORT QwtPlotHistogram
|
|||||||
|
|
||||||
virtual void drawSeries( QPainter*,
|
virtual void drawSeries( QPainter*,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const QWT_OVERRIDE;
|
const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ QRectF QwtPlotIntervalCurve::boundingRect() const
|
|||||||
*/
|
*/
|
||||||
void QwtPlotIntervalCurve::drawSeries(QPainter* painter,
|
void QwtPlotIntervalCurve::drawSeries(QPainter* painter,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const
|
const QRectF& canvasRect, int from, int to ) const
|
||||||
{
|
{
|
||||||
if ( to < 0 )
|
if ( to < 0 )
|
||||||
to = dataSize() - 1;
|
to = dataSize() - 1;
|
||||||
@ -376,11 +376,11 @@ void QwtPlotIntervalCurve::drawTube( QPainter* painter,
|
|||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
|
|
||||||
const size_t size = to - from + 1;
|
const int size = to - from + 1;
|
||||||
QPolygonF polygon( 2 * size );
|
QPolygonF polygon( 2 * size );
|
||||||
QPointF* points = polygon.data();
|
QPointF* points = polygon.data();
|
||||||
|
|
||||||
for ( uint i = 0; i < size; i++ )
|
for ( int i = 0; i < size; i++ )
|
||||||
{
|
{
|
||||||
QPointF& minValue = points[i];
|
QPointF& minValue = points[i];
|
||||||
QPointF& maxValue = points[2 * size - 1 - i];
|
QPointF& maxValue = points[2 * size - 1 - i];
|
||||||
|
@ -106,7 +106,7 @@ class QWT_EXPORT QwtPlotIntervalCurve
|
|||||||
|
|
||||||
virtual void drawSeries( QPainter*,
|
virtual void drawSeries( QPainter*,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const QWT_OVERRIDE;
|
const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ QwtPlotMultiBarChart::ChartStyle QwtPlotMultiBarChart::style() const
|
|||||||
*/
|
*/
|
||||||
QRectF QwtPlotMultiBarChart::boundingRect() const
|
QRectF QwtPlotMultiBarChart::boundingRect() const
|
||||||
{
|
{
|
||||||
const size_t numSamples = dataSize();
|
const int numSamples = dataSize();
|
||||||
|
|
||||||
if ( numSamples == 0 )
|
if ( numSamples == 0 )
|
||||||
return QwtPlotSeriesItem::boundingRect();
|
return QwtPlotSeriesItem::boundingRect();
|
||||||
@ -331,7 +331,7 @@ QRectF QwtPlotMultiBarChart::boundingRect() const
|
|||||||
|
|
||||||
const QwtSeriesData< QwtSetSample >* series = data();
|
const QwtSeriesData< QwtSetSample >* series = data();
|
||||||
|
|
||||||
for ( size_t i = 0; i < numSamples; i++ )
|
for ( int i = 0; i < numSamples; i++ )
|
||||||
{
|
{
|
||||||
const QwtSetSample sample = series->sample( i );
|
const QwtSetSample sample = series->sample( i );
|
||||||
if ( i == 0 )
|
if ( i == 0 )
|
||||||
@ -373,7 +373,7 @@ QRectF QwtPlotMultiBarChart::boundingRect() const
|
|||||||
*/
|
*/
|
||||||
void QwtPlotMultiBarChart::drawSeries(QPainter* painter,
|
void QwtPlotMultiBarChart::drawSeries(QPainter* painter,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const
|
const QRectF& canvasRect, int from, int to ) const
|
||||||
{
|
{
|
||||||
if ( to < 0 )
|
if ( to < 0 )
|
||||||
to = dataSize() - 1;
|
to = dataSize() - 1;
|
||||||
@ -390,7 +390,7 @@ void QwtPlotMultiBarChart::drawSeries(QPainter* painter,
|
|||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
|
|
||||||
for ( size_t i = from; i <= to; i++ )
|
for ( int i = from; i <= to; i++ )
|
||||||
{
|
{
|
||||||
drawSample( painter, xMap, yMap,
|
drawSample( painter, xMap, yMap,
|
||||||
canvasRect, interval, i, sample( i ) );
|
canvasRect, interval, i, sample( i ) );
|
||||||
|
@ -86,7 +86,7 @@ class QWT_EXPORT QwtPlotMultiBarChart
|
|||||||
|
|
||||||
virtual void drawSeries( QPainter*,
|
virtual void drawSeries( QPainter*,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const QWT_OVERRIDE;
|
const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class QWT_EXPORT QwtPlotSeriesItem : public QwtPlotItem,
|
|||||||
*/
|
*/
|
||||||
virtual void drawSeries( QPainter* painter,
|
virtual void drawSeries( QPainter* painter,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const = 0;
|
const QRectF& canvasRect, int from, int to ) const = 0;
|
||||||
|
|
||||||
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ double QwtPlotSpectroCurve::penWidth() const
|
|||||||
*/
|
*/
|
||||||
void QwtPlotSpectroCurve::drawSeries(QPainter* painter,
|
void QwtPlotSpectroCurve::drawSeries(QPainter* painter,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const
|
const QRectF& canvasRect, int from, int to ) const
|
||||||
{
|
{
|
||||||
if ( !painter || dataSize() <= 0 )
|
if ( !painter || dataSize() <= 0 )
|
||||||
return;
|
return;
|
||||||
|
@ -55,7 +55,7 @@ class QWT_EXPORT QwtPlotSpectroCurve
|
|||||||
|
|
||||||
virtual void drawSeries( QPainter*,
|
virtual void drawSeries( QPainter*,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const QWT_OVERRIDE;
|
const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
void setPenWidth( double );
|
void setPenWidth( double );
|
||||||
double penWidth() const;
|
double penWidth() const;
|
||||||
|
@ -386,7 +386,7 @@ QRectF QwtPlotTradingCurve::boundingRect() const
|
|||||||
*/
|
*/
|
||||||
void QwtPlotTradingCurve::drawSeries(QPainter* painter,
|
void QwtPlotTradingCurve::drawSeries(QPainter* painter,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const
|
const QRectF& canvasRect, int from, int to ) const
|
||||||
{
|
{
|
||||||
if ( to < 0 )
|
if ( to < 0 )
|
||||||
to = dataSize() - 1;
|
to = dataSize() - 1;
|
||||||
|
@ -135,7 +135,7 @@ class QWT_EXPORT QwtPlotTradingCurve
|
|||||||
|
|
||||||
virtual void drawSeries( QPainter*,
|
virtual void drawSeries( QPainter*,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const QWT_OVERRIDE;
|
const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ static QwtInterval qwtMagnitudeRange(
|
|||||||
double min = s0.vx * s0.vx + s0.vy * s0.vy;
|
double min = s0.vx * s0.vx + s0.vy * s0.vy;
|
||||||
double max = min;
|
double max = min;
|
||||||
|
|
||||||
for ( uint i = 1; i < series->size(); i++ )
|
for ( int i = 1; i < series->size(); i++ )
|
||||||
{
|
{
|
||||||
const QwtVectorFieldSample s = series->sample( i );
|
const QwtVectorFieldSample s = series->sample( i );
|
||||||
const double l = s.vx * s.vx + s.vy * s.vy;
|
const double l = s.vx * s.vx + s.vy * s.vy;
|
||||||
@ -806,7 +806,7 @@ QwtGraphic QwtPlotVectorField::legendIcon(
|
|||||||
*/
|
*/
|
||||||
void QwtPlotVectorField::drawSeries(QPainter* painter,
|
void QwtPlotVectorField::drawSeries(QPainter* painter,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const
|
const QRectF& canvasRect, int from, int to ) const
|
||||||
{
|
{
|
||||||
if ( !painter || dataSize() <= 0 )
|
if ( !painter || dataSize() <= 0 )
|
||||||
return;
|
return;
|
||||||
|
@ -136,7 +136,7 @@ class QWT_EXPORT QwtPlotVectorField
|
|||||||
|
|
||||||
virtual void drawSeries( QPainter*,
|
virtual void drawSeries( QPainter*,
|
||||||
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
|
||||||
const QRectF& canvasRect, size_t from, size_t to ) const QWT_OVERRIDE;
|
const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
virtual int rtti() const QWT_OVERRIDE;
|
virtual int rtti() const QWT_OVERRIDE;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
\sa setInterval(), setSize()
|
\sa setInterval(), setSize()
|
||||||
*/
|
*/
|
||||||
QwtSyntheticPointData::QwtSyntheticPointData(
|
QwtSyntheticPointData::QwtSyntheticPointData(
|
||||||
size_t size, const QwtInterval& interval )
|
int size, const QwtInterval& interval )
|
||||||
: m_size( size )
|
: m_size( size )
|
||||||
, m_interval( interval )
|
, m_interval( interval )
|
||||||
{
|
{
|
||||||
@ -30,7 +30,7 @@ QwtSyntheticPointData::QwtSyntheticPointData(
|
|||||||
\param size Number of points
|
\param size Number of points
|
||||||
\sa size(), setInterval()
|
\sa size(), setInterval()
|
||||||
*/
|
*/
|
||||||
void QwtSyntheticPointData::setSize( size_t size )
|
void QwtSyntheticPointData::setSize( int size )
|
||||||
{
|
{
|
||||||
m_size = size;
|
m_size = size;
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ void QwtSyntheticPointData::setSize( size_t size )
|
|||||||
\return Number of points
|
\return Number of points
|
||||||
\sa setSize(), interval()
|
\sa setSize(), interval()
|
||||||
*/
|
*/
|
||||||
size_t QwtSyntheticPointData::size() const
|
int QwtSyntheticPointData::size() const
|
||||||
{
|
{
|
||||||
return m_size;
|
return m_size;
|
||||||
}
|
}
|
||||||
@ -122,7 +122,7 @@ QRectF QwtSyntheticPointData::boundingRect() const
|
|||||||
\warning For invalid indices ( index < 0 || index >= size() )
|
\warning For invalid indices ( index < 0 || index >= size() )
|
||||||
(0, 0) is returned.
|
(0, 0) is returned.
|
||||||
*/
|
*/
|
||||||
QPointF QwtSyntheticPointData::sample( size_t index ) const
|
QPointF QwtSyntheticPointData::sample( int index ) const
|
||||||
{
|
{
|
||||||
if ( index >= m_size )
|
if ( index >= m_size )
|
||||||
return QPointF( 0, 0 );
|
return QPointF( 0, 0 );
|
||||||
|
@ -23,10 +23,10 @@ class QwtPointArrayData : public QwtPointSeriesData
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QwtPointArrayData( const QVector< T >& x, const QVector< T >& y );
|
QwtPointArrayData( const QVector< T >& x, const QVector< T >& y );
|
||||||
QwtPointArrayData( const T* x, const T* y, size_t size );
|
QwtPointArrayData( const T* x, const T* y, int size );
|
||||||
|
|
||||||
virtual size_t size() const QWT_OVERRIDE;
|
virtual int size() const QWT_OVERRIDE;
|
||||||
virtual QPointF sample( size_t index ) const QWT_OVERRIDE;
|
virtual QPointF sample( int index ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
const QVector< T >& xData() const;
|
const QVector< T >& xData() const;
|
||||||
const QVector< T >& yData() const;
|
const QVector< T >& yData() const;
|
||||||
@ -43,10 +43,10 @@ template< typename T >
|
|||||||
class QwtCPointerData : public QwtPointSeriesData
|
class QwtCPointerData : public QwtPointSeriesData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QwtCPointerData( const T* x, const T* y, size_t size );
|
QwtCPointerData( const T* x, const T* y, int size );
|
||||||
|
|
||||||
virtual size_t size() const QWT_OVERRIDE;
|
virtual int size() const QWT_OVERRIDE;
|
||||||
virtual QPointF sample( size_t index ) const QWT_OVERRIDE;
|
virtual QPointF sample( int index ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
const T* xData() const;
|
const T* xData() const;
|
||||||
const T* yData() const;
|
const T* yData() const;
|
||||||
@ -54,7 +54,7 @@ class QwtCPointerData : public QwtPointSeriesData
|
|||||||
private:
|
private:
|
||||||
const T* m_x;
|
const T* m_x;
|
||||||
const T* m_y;
|
const T* m_y;
|
||||||
size_t m_size;
|
int m_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -68,10 +68,10 @@ class QwtValuePointData : public QwtPointSeriesData
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QwtValuePointData( const QVector< T >& y );
|
QwtValuePointData( const QVector< T >& y );
|
||||||
QwtValuePointData( const T* y, size_t size );
|
QwtValuePointData( const T* y, int size );
|
||||||
|
|
||||||
virtual size_t size() const QWT_OVERRIDE;
|
virtual int size() const QWT_OVERRIDE;
|
||||||
virtual QPointF sample( size_t index ) const QWT_OVERRIDE;
|
virtual QPointF sample( int index ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
const QVector< T >& yData() const;
|
const QVector< T >& yData() const;
|
||||||
|
|
||||||
@ -89,16 +89,16 @@ template< typename T >
|
|||||||
class QwtCPointerValueData : public QwtPointSeriesData
|
class QwtCPointerValueData : public QwtPointSeriesData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QwtCPointerValueData( const T* y, size_t size );
|
QwtCPointerValueData( const T* y, int size );
|
||||||
|
|
||||||
virtual size_t size() const QWT_OVERRIDE;
|
virtual int size() const QWT_OVERRIDE;
|
||||||
virtual QPointF sample( size_t index ) const QWT_OVERRIDE;
|
virtual QPointF sample( int index ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
const T* yData() const;
|
const T* yData() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const T* m_y;
|
const T* m_y;
|
||||||
size_t m_size;
|
int m_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -157,17 +157,17 @@ class QwtCPointerValueData : public QwtPointSeriesData
|
|||||||
class QWT_EXPORT QwtSyntheticPointData : public QwtPointSeriesData
|
class QWT_EXPORT QwtSyntheticPointData : public QwtPointSeriesData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QwtSyntheticPointData( size_t size,
|
QwtSyntheticPointData( int size,
|
||||||
const QwtInterval& = QwtInterval() );
|
const QwtInterval& = QwtInterval() );
|
||||||
|
|
||||||
void setSize( size_t size );
|
void setSize( int size );
|
||||||
virtual size_t size() const QWT_OVERRIDE;
|
virtual int size() const QWT_OVERRIDE;
|
||||||
|
|
||||||
void setInterval( const QwtInterval& );
|
void setInterval( const QwtInterval& );
|
||||||
QwtInterval interval() const;
|
QwtInterval interval() const;
|
||||||
|
|
||||||
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
virtual QRectF boundingRect() const QWT_OVERRIDE;
|
||||||
virtual QPointF sample( size_t index ) const QWT_OVERRIDE;
|
virtual QPointF sample( int index ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Calculate a y value for a x value
|
Calculate a y value for a x value
|
||||||
@ -182,7 +182,7 @@ class QWT_EXPORT QwtSyntheticPointData : public QwtPointSeriesData
|
|||||||
QRectF rectOfInterest() const;
|
QRectF rectOfInterest() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t m_size;
|
int m_size;
|
||||||
QwtInterval m_interval;
|
QwtInterval m_interval;
|
||||||
QRectF m_rectOfInterest;
|
QRectF m_rectOfInterest;
|
||||||
QwtInterval m_intervalOfInterest;
|
QwtInterval m_intervalOfInterest;
|
||||||
@ -213,7 +213,7 @@ QwtPointArrayData< T >::QwtPointArrayData(
|
|||||||
\sa QwtPlotCurve::setData(), QwtPlotCurve::setSamples()
|
\sa QwtPlotCurve::setData(), QwtPlotCurve::setSamples()
|
||||||
*/
|
*/
|
||||||
template< typename T >
|
template< typename T >
|
||||||
QwtPointArrayData< T >::QwtPointArrayData( const T* x, const T* y, size_t size )
|
QwtPointArrayData< T >::QwtPointArrayData( const T* x, const T* y, int size )
|
||||||
{
|
{
|
||||||
m_x.resize( size );
|
m_x.resize( size );
|
||||||
std::memcpy( m_x.data(), x, size * sizeof( T ) );
|
std::memcpy( m_x.data(), x, size * sizeof( T ) );
|
||||||
@ -224,7 +224,7 @@ QwtPointArrayData< T >::QwtPointArrayData( const T* x, const T* y, size_t size )
|
|||||||
|
|
||||||
//! \return Size of the data set
|
//! \return Size of the data set
|
||||||
template< typename T >
|
template< typename T >
|
||||||
size_t QwtPointArrayData< T >::size() const
|
int QwtPointArrayData< T >::size() const
|
||||||
{
|
{
|
||||||
return qMin( m_x.size(), m_y.size() );
|
return qMin( m_x.size(), m_y.size() );
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ size_t QwtPointArrayData< T >::size() const
|
|||||||
\return Sample at position i
|
\return Sample at position i
|
||||||
*/
|
*/
|
||||||
template< typename T >
|
template< typename T >
|
||||||
QPointF QwtPointArrayData< T >::sample( size_t index ) const
|
QPointF QwtPointArrayData< T >::sample( int index ) const
|
||||||
{
|
{
|
||||||
return QPointF( m_x[int( index )], m_y[int( index )] );
|
return QPointF( m_x[int( index )], m_y[int( index )] );
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ QwtValuePointData< T >::QwtValuePointData( const QVector< T >& y )
|
|||||||
\sa QwtPlotCurve::setData(), QwtPlotCurve::setSamples()
|
\sa QwtPlotCurve::setData(), QwtPlotCurve::setSamples()
|
||||||
*/
|
*/
|
||||||
template< typename T >
|
template< typename T >
|
||||||
QwtValuePointData< T >::QwtValuePointData( const T* y, size_t size )
|
QwtValuePointData< T >::QwtValuePointData( const T* y, int size )
|
||||||
{
|
{
|
||||||
m_y.resize( size );
|
m_y.resize( size );
|
||||||
std::memcpy( m_y.data(), y, size * sizeof( T ) );
|
std::memcpy( m_y.data(), y, size * sizeof( T ) );
|
||||||
@ -284,7 +284,7 @@ QwtValuePointData< T >::QwtValuePointData( const T* y, size_t size )
|
|||||||
|
|
||||||
//! \return Size of the data set
|
//! \return Size of the data set
|
||||||
template< typename T >
|
template< typename T >
|
||||||
size_t QwtValuePointData< T >::size() const
|
int QwtValuePointData< T >::size() const
|
||||||
{
|
{
|
||||||
return m_y.size();
|
return m_y.size();
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ size_t QwtValuePointData< T >::size() const
|
|||||||
\return Sample at position i
|
\return Sample at position i
|
||||||
*/
|
*/
|
||||||
template< typename T >
|
template< typename T >
|
||||||
QPointF QwtValuePointData< T >::sample( size_t index ) const
|
QPointF QwtValuePointData< T >::sample( int index ) const
|
||||||
{
|
{
|
||||||
return QPointF( index, m_y[int( index )] );
|
return QPointF( index, m_y[int( index )] );
|
||||||
}
|
}
|
||||||
@ -323,7 +323,7 @@ const QVector< T >& QwtValuePointData< T >::yData() const
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
QwtCPointerData< T >::QwtCPointerData( const T* x, const T* y, size_t size )
|
QwtCPointerData< T >::QwtCPointerData( const T* x, const T* y, int size )
|
||||||
: m_x( x )
|
: m_x( x )
|
||||||
, m_y( y )
|
, m_y( y )
|
||||||
, m_size( size )
|
, m_size( size )
|
||||||
@ -332,7 +332,7 @@ QwtCPointerData< T >::QwtCPointerData( const T* x, const T* y, size_t size )
|
|||||||
|
|
||||||
//! \return Size of the data set
|
//! \return Size of the data set
|
||||||
template< typename T >
|
template< typename T >
|
||||||
size_t QwtCPointerData< T >::size() const
|
int QwtCPointerData< T >::size() const
|
||||||
{
|
{
|
||||||
return m_size;
|
return m_size;
|
||||||
}
|
}
|
||||||
@ -344,7 +344,7 @@ size_t QwtCPointerData< T >::size() const
|
|||||||
\return Sample at position i
|
\return Sample at position i
|
||||||
*/
|
*/
|
||||||
template< typename T >
|
template< typename T >
|
||||||
QPointF QwtCPointerData< T >::sample( size_t index ) const
|
QPointF QwtCPointerData< T >::sample( int index ) const
|
||||||
{
|
{
|
||||||
return QPointF( m_x[int( index )], m_y[int( index )] );
|
return QPointF( m_x[int( index )], m_y[int( index )] );
|
||||||
}
|
}
|
||||||
@ -377,7 +377,7 @@ const T* QwtCPointerData< T >::yData() const
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
QwtCPointerValueData< T >::QwtCPointerValueData( const T* y, size_t size )
|
QwtCPointerValueData< T >::QwtCPointerValueData( const T* y, int size )
|
||||||
: m_y( y )
|
: m_y( y )
|
||||||
, m_size( size )
|
, m_size( size )
|
||||||
{
|
{
|
||||||
@ -385,7 +385,7 @@ QwtCPointerValueData< T >::QwtCPointerValueData( const T* y, size_t size )
|
|||||||
|
|
||||||
//! \return Size of the data set
|
//! \return Size of the data set
|
||||||
template< typename T >
|
template< typename T >
|
||||||
size_t QwtCPointerValueData< T >::size() const
|
int QwtCPointerValueData< T >::size() const
|
||||||
{
|
{
|
||||||
return m_size;
|
return m_size;
|
||||||
}
|
}
|
||||||
@ -397,7 +397,7 @@ size_t QwtCPointerValueData< T >::size() const
|
|||||||
\return Sample at position i
|
\return Sample at position i
|
||||||
*/
|
*/
|
||||||
template< typename T >
|
template< typename T >
|
||||||
QPointF QwtCPointerValueData< T >::sample( size_t index ) const
|
QPointF QwtCPointerValueData< T >::sample( int index ) const
|
||||||
{
|
{
|
||||||
return QPointF( index, m_y[ int( index ) ] );
|
return QPointF( index, m_y[ int( index ) ] );
|
||||||
}
|
}
|
||||||
|
@ -496,7 +496,7 @@ void QwtPolarCurve::drawSymbols( QPainter* painter, const QwtSymbol& symbol,
|
|||||||
\return Number of points
|
\return Number of points
|
||||||
\sa setData()
|
\sa setData()
|
||||||
*/
|
*/
|
||||||
size_t QwtPolarCurve::dataSize() const
|
int QwtPolarCurve::dataSize() const
|
||||||
{
|
{
|
||||||
return m_series->size();
|
return m_series->size();
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ class QWT_EXPORT QwtPolarCurve : public QwtPolarItem
|
|||||||
void setData( QwtSeriesData< QwtPointPolar >* data );
|
void setData( QwtSeriesData< QwtPointPolar >* data );
|
||||||
const QwtSeriesData< QwtPointPolar >* data() const;
|
const QwtSeriesData< QwtPointPolar >* data() const;
|
||||||
|
|
||||||
size_t dataSize() const;
|
int dataSize() const;
|
||||||
QwtPointPolar sample( int i ) const;
|
QwtPointPolar sample( int i ) const;
|
||||||
|
|
||||||
void setPen( const QPen& );
|
void setPen( const QPen& );
|
||||||
|
@ -58,14 +58,14 @@ class QwtSeriesData
|
|||||||
#ifndef QWT_PYTHON_WRAPPER
|
#ifndef QWT_PYTHON_WRAPPER
|
||||||
|
|
||||||
//! \return Number of samples
|
//! \return Number of samples
|
||||||
virtual size_t size() const = 0;
|
virtual int size() const = 0;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Return a sample
|
Return a sample
|
||||||
\param i Index
|
\param i Index
|
||||||
\return Sample at position i
|
\return Sample at position i
|
||||||
*/
|
*/
|
||||||
virtual T sample( size_t i ) const = 0;
|
virtual T sample( int i ) const = 0;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Calculate the bounding rect of all samples
|
Calculate the bounding rect of all samples
|
||||||
@ -83,8 +83,8 @@ class QwtSeriesData
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
// Needed for generating the python bindings, but not for using them !
|
// Needed for generating the python bindings, but not for using them !
|
||||||
virtual size_t size() const { return 0; }
|
virtual int size() const { return 0; }
|
||||||
virtual T sample( size_t i ) const { return T(); }
|
virtual T sample( int i ) const { return T(); }
|
||||||
virtual QRectF boundingRect() const { return cachedBoundingRect; }
|
virtual QRectF boundingRect() const { return cachedBoundingRect; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ class QwtArraySeriesData : public QwtSeriesData< T >
|
|||||||
const QVector< T > samples() const;
|
const QVector< T > samples() const;
|
||||||
|
|
||||||
//! \return Number of samples
|
//! \return Number of samples
|
||||||
virtual size_t size() const QWT_OVERRIDE;
|
virtual int size() const QWT_OVERRIDE;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return Sample at a specific position
|
\return Sample at a specific position
|
||||||
@ -162,7 +162,7 @@ class QwtArraySeriesData : public QwtSeriesData< T >
|
|||||||
\param index Index
|
\param index Index
|
||||||
\return Sample at position index
|
\return Sample at position index
|
||||||
*/
|
*/
|
||||||
virtual T sample( size_t index ) const QWT_OVERRIDE;
|
virtual T sample( int index ) const QWT_OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! Vector of samples
|
//! Vector of samples
|
||||||
@ -194,13 +194,13 @@ const QVector< T > QwtArraySeriesData< T >::samples() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
size_t QwtArraySeriesData< T >::size() const
|
int QwtArraySeriesData< T >::size() const
|
||||||
{
|
{
|
||||||
return m_samples.size();
|
return m_samples.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
T QwtArraySeriesData< T >::sample( size_t i ) const
|
T QwtArraySeriesData< T >::sample( int i ) const
|
||||||
{
|
{
|
||||||
return m_samples[ static_cast< int >( i ) ];
|
return m_samples[ static_cast< int >( i ) ];
|
||||||
}
|
}
|
||||||
|
@ -42,13 +42,13 @@ class QwtAbstractSeriesStore
|
|||||||
virtual QRectF dataRect() const = 0;
|
virtual QRectF dataRect() const = 0;
|
||||||
|
|
||||||
//! \return Number of samples
|
//! \return Number of samples
|
||||||
virtual size_t dataSize() const = 0;
|
virtual int dataSize() const = 0;
|
||||||
#else
|
#else
|
||||||
// Needed for generating the python bindings, but not for using them !
|
// Needed for generating the python bindings, but not for using them !
|
||||||
virtual void dataChanged() {}
|
virtual void dataChanged() {}
|
||||||
virtual void setRectOfInterest( const QRectF& ) {}
|
virtual void setRectOfInterest( const QRectF& ) {}
|
||||||
virtual QRectF dataRect() const { return QRectF( 0.0, 0.0, -1.0, -1.0 ); }
|
virtual QRectF dataRect() const { return QRectF( 0.0, 0.0, -1.0, -1.0 ); }
|
||||||
virtual size_t dataSize() const { return 0; }
|
virtual int dataSize() const { return 0; }
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ class QwtSeriesStore : public virtual QwtAbstractSeriesStore
|
|||||||
\return Number of samples of the series
|
\return Number of samples of the series
|
||||||
\sa setData(), QwtSeriesData<T>::size()
|
\sa setData(), QwtSeriesData<T>::size()
|
||||||
*/
|
*/
|
||||||
virtual size_t dataSize() const QWT_OVERRIDE;
|
virtual int dataSize() const QWT_OVERRIDE;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\return Bounding rectangle of the series
|
\return Bounding rectangle of the series
|
||||||
@ -172,7 +172,7 @@ void QwtSeriesStore< T >::setData( QwtSeriesData< T >* series )
|
|||||||
}
|
}
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
size_t QwtSeriesStore< T >::dataSize() const
|
int QwtSeriesStore< T >::dataSize() const
|
||||||
{
|
{
|
||||||
if ( m_series == NULL )
|
if ( m_series == NULL )
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user