本文整理汇总了C++中CurveData::size方法的典型用法代码示例。如果您正苦于以下问题:C++ CurveData::size方法的具体用法?C++ CurveData::size怎么用?C++ CurveData::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CurveData
的用法示例。
在下文中一共展示了CurveData::size方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: appendPoint
void IncrementalPlot::appendPoint( const QPointF &point )
{
CurveData *data = static_cast<CurveData *>( d_curve->data() );
data->append( point );
const bool doClip = !canvas()->testAttribute( Qt::WA_PaintOnScreen );
// if ( doClip )
// {
// /*
// Depending on the platform setting a clip might be an important
// performance issue. F.e. for Qt Embedded this reduces the
// part of the backing store that has to be copied out - maybe
// to an unaccelerated frame buffer device.
// */
// const QwtScaleMap xMap = canvasMap( d_curve->xAxis() );
// const QwtScaleMap yMap = canvasMap( d_curve->yAxis() );
// QRegion clipRegion;
// const QSize symbolSize = d_curve->symbol()->size();
// QRect r( 0, 0, symbolSize.width() + 2, symbolSize.height() + 2 );
// const QPointF center =
// QwtScaleMap::transform( xMap, yMap, point );
// r.moveCenter( center.toPoint() );
// clipRegion += r;
// d_directPainter->setClipRegion( clipRegion );
// }
d_directPainter->drawSeries( d_curve,
data->size() - 1, data->size() - 1 );
}
示例2: appendPoint
void BrainPlot::appendPoint( QPointF point, int Channel )
{
/*Adds new point - with proper index and offset - to the data series*/
CurveData *data = static_cast<CurveData *>( d_curves[Channel]->data() );
point.setY(minusExpectedAmplitude*(2*Channel+1)+point.y());
data->replace(sample%plotLength, point);
setClipRegion(d_curves[Channel], point);
d_directPainter->drawSeries( d_curves[Channel],
data->size() - 1, data->size() - 1 );
}
示例3: updateCurve
void OscilloscopePlot::updateCurve()
{
CurveData *data = static_cast<CurveData *>( d_curve->data() );
data->values().lock();
const int numPoints = data->size();
if ( numPoints > d_paintedPoints )
{
const bool doClip = !canvas()->testAttribute( Qt::WA_PaintOnScreen );
if ( doClip )
{
/*
Depending on the platform setting a clip might be an important
performance issue. F.e. for Qt Embedded this reduces the
part of the backing store that has to be copied out - maybe
to an unaccelerated frame buffer device.
*/
const QwtScaleMap xMap = canvasMap( d_curve->xAxis() );
const QwtScaleMap yMap = canvasMap( d_curve->yAxis() );
QRectF br = qwtBoundingRect( *data,
d_paintedPoints - 1, numPoints - 1 );
const QRect clipRect = QwtScaleMap::transform( xMap, yMap, br ).toRect();
d_directPainter->setClipRegion( clipRect );
}
d_directPainter->drawSeries( d_curve,
d_paintedPoints - 1, numPoints - 1 );
d_paintedPoints = numPoints;
}
data->values().unlock();
}
示例4: replot
void OscilloscopePlot::replot()
{
CurveData *data = static_cast<CurveData *>( d_curve->data() );
data->values().lock();
QwtPlot::replot();
d_paintedPoints = data->size();
data->values().unlock();
}
示例5: replot
void Plot::replot()
{
CurveData *data = (CurveData *)d_curve->data();
data->values().lock();
QwtPlot::replot();
d_paintedPoints = data->size();
data->values().unlock();
}
示例6: point
void Plot::appendPoint1(double u)
{
double elapsed = d_clock.elapsed() / 1000.0;
qDebug() << "d_clock1: " << elapsed;
qDebug() << "udouble1: " << u;
QPointF point(elapsed,(u*5/1024));
CurveData *data = static_cast<CurveData *>( d_curve1->data() );
data->append(point);
RecToFile1(elapsed,u);
const int numPoints = data->size();
if ( numPoints > d_paintedPoints1 )
{
const bool doClip = !canvas()->testAttribute( Qt::WA_PaintOnScreen );
if ( doClip )
{
/*
Depending on the platform setting a clip might be an important
performance issue. F.e. for Qt Embedded this reduces the
part of the backing store that has to be copied out - maybe
to an unaccelerated frame buffer device.
*/
const QwtScaleMap xMap = canvasMap( d_curve1->xAxis() );
const QwtScaleMap yMap = canvasMap( d_curve1->yAxis() );
QRectF br = qwtBoundingRect( *data,
d_paintedPoints1 - 1, numPoints - 1 );
const QRect clipRect = QwtScaleMap::transform( xMap, yMap, br ).toRect();
d_directPainter0->setClipRegion( clipRect );
}
d_directPainter0->drawSeries(d_curve1,
d_paintedPoints1 - 1, numPoints - 1);
d_paintedPoints1 = numPoints;
}
}