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


C++ QwtPlotCanvas::plot方法代码示例

本文整理汇总了C++中QwtPlotCanvas::plot方法的典型用法代码示例。如果您正苦于以下问题:C++ QwtPlotCanvas::plot方法的具体用法?C++ QwtPlotCanvas::plot怎么用?C++ QwtPlotCanvas::plot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QwtPlotCanvas的用法示例。


在下文中一共展示了QwtPlotCanvas::plot方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: canvas

//! Return plot widget, containing the observed plot canvas
QwtPlot *QwtPlotPicker::plot()
{
    QwtPlotCanvas *w = canvas();
    if ( w )
        return w->plot();

    return NULL;
}
开发者ID:PrincetonPAVE,项目名称:old_igvc,代码行数:9,代码来源:qwt_plot_picker.cpp

示例2: canvas

//! Return plot widget, containing the observed plot canvas
QwtPlot *QwtPlotMagnifier::plot()
{
    QwtPlotCanvas *w = canvas();
    if ( w )
        return w->plot();

    return NULL;
}
开发者ID:PrincetonPAVE,项目名称:old_igvc,代码行数:9,代码来源:qwt_plot_magnifier.cpp

示例3: QWidget

SelectionMoveResizer::SelectionMoveResizer(QWidget *target)
	: QWidget(target->parentWidget())
{
	QwtPlotCanvas *canvas = qobject_cast<QwtPlotCanvas *>(target);
	if (canvas)
		setParent(canvas->plot()->parentWidget());

	init();
	add(target);
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:10,代码来源:SelectionMoveResizer.cpp

示例4: appendData

void IncrementalPlot::appendData(double *x, double *y, int size) {
	if (d_data == NULL) d_data = new CurveData;

	if (d_curve == NULL) {
		d_curve = new QwtPlotCurve("Data");
		d_curve->setStyle(QwtPlotCurve::NoCurve);
		d_curve->setPaintAttribute(QwtPlotCurve::FilterPoints, true);
		const QColor &c = Qt::white;
		QwtSymbol *symbol = new QwtSymbol(QwtSymbol::Ellipse);
		symbol->setBrush(QBrush(c));
		symbol->setPen(QPen(c));
		symbol->setSize(QSize(6, 6));
		d_curve->setSymbol(symbol);
		d_curve->attach(this);
	}

	d_data->append(x, y, size);
	d_curve->setRawSamples(d_data->x(), d_data->y(), d_data->count());
#ifdef __GNUC__
#warning better use QwtData
#endif

	const bool cacheMode = qobject_cast<QwtPlotCanvas *>(canvas())->testPaintAttribute(QwtPlotCanvas::BackingStore);

#if QT_VERSION >= 0x040000 && defined(Q_WS_X11)
  // Even if not recommended by TrollTech, Qt::WA_PaintOutsidePaintEvent
  // works on X11. This has an tremendous effect on the performance..

	canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, true);
#endif

	QwtPlotCanvas *plotCanvas = qobject_cast<QwtPlotCanvas *>(canvas());
	plotCanvas->setPaintAttribute(QwtPlotCanvas::BackingStore, false);
	QPainter painter;
	QwtScaleMap xMap = plotCanvas->plot()->canvasMap(d_curve->xAxis());
	QwtScaleMap yMap = plotCanvas->plot()->canvasMap(d_curve->yAxis());
	d_curve->drawSeries(&painter, xMap, yMap, (d_curve->paintRect(xMap, yMap)), d_curve->dataSize() - size, d_curve->dataSize() -1);
	plotCanvas->setPaintAttribute(QwtPlotCanvas::BackingStore, cacheMode);

#if QT_VERSION >= 0x040000 && defined(Q_WS_X11)
	canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, false);
#endif
}
开发者ID:misterboyle,项目名称:rtxi,代码行数:43,代码来源:incrementalplot.cpp


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