当前位置: 首页>>代码示例>>C++>>正文


C++ CurveData::size方法代码示例

本文整理汇总了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 );
}
开发者ID:pasteur90,项目名称:GaitAnalysis,代码行数:33,代码来源:incrementalplot.cpp

示例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 );
}
开发者ID:cogitoergobum,项目名称:eeg,代码行数:11,代码来源:brainplot.cpp

示例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();
}
开发者ID:Feng-Yin,项目名称:widgetcontaineroverview,代码行数:35,代码来源:oscilloscopeplot.cpp

示例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();
}
开发者ID:Feng-Yin,项目名称:widgetcontaineroverview,代码行数:10,代码来源:oscilloscopeplot.cpp

示例5: replot

void Plot::replot()
{
    CurveData *data = (CurveData *)d_curve->data();
    data->values().lock();

    QwtPlot::replot();
    d_paintedPoints = data->size();

    data->values().unlock();
}
开发者ID:PrincetonPAVE,项目名称:old_igvc,代码行数:10,代码来源:plot.cpp

示例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;
    }
}
开发者ID:d2mitry,项目名称:d2m_reno,代码行数:38,代码来源:plot.cpp


注:本文中的CurveData::size方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。