本文整理汇总了C++中QwtPlotMarker::setRenderHint方法的典型用法代码示例。如果您正苦于以下问题:C++ QwtPlotMarker::setRenderHint方法的具体用法?C++ QwtPlotMarker::setRenderHint怎么用?C++ QwtPlotMarker::setRenderHint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QwtPlotMarker
的用法示例。
在下文中一共展示了QwtPlotMarker::setRenderHint方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: enableZeroLineY
void Grid::enableZeroLineY(bool enable) {
Plot *d_plot = dynamic_cast<Plot *>(plot());
if (!d_plot)
return;
if (mrkY < 0 && enable) {
QwtPlotMarker *m = new QwtPlotMarker();
mrkY = d_plot->insertMarker(m);
m->setRenderHint(QwtPlotItem::RenderAntialiased, false);
m->setAxis(xAxis(), yAxis());
m->setLineStyle(QwtPlotMarker::HLine);
m->setValue(0.0, 0.0);
double width = 1;
if (d_plot->canvas()->lineWidth())
width = d_plot->canvas()->lineWidth();
else if (d_plot->axisEnabled(QwtPlot::xBottom) ||
d_plot->axisEnabled(QwtPlot::xTop))
width = d_plot->axesLinewidth();
m->setLinePen(QPen(Qt::black, width, Qt::SolidLine));
} else if (mrkY >= 0 && !enable) {
d_plot->removeMarker(mrkY);
mrkY = -1;
}
}
示例2: enableZeroLineX
void Grid::enableZeroLineX(bool enable)
{
Plot *d_plot = (Plot *)plot();
if (!d_plot)
return;
if (mrkX<0 && enable) {
QwtPlotMarker *m = new QwtPlotMarker();
mrkX = d_plot->insertMarker(m);
m->setRenderHint(QwtPlotItem::RenderAntialiased, false);
m->setAxis(xAxis(), yAxis());
m->setLineStyle(QwtPlotMarker::VLine);
m->setValue(0.0, 0.0);
double width = 1;
if (d_plot->canvas()->lineWidth())
width = d_plot->canvas()->lineWidth();
else if (d_plot->axisEnabled (QwtPlot::yLeft) || d_plot->axisEnabled (QwtPlot::yRight))
width = d_plot->axesLinewidth();
m->setLinePen(QPen(Qt::black, width, Qt::SolidLine));
} else if (mrkX >= 0 && !enable) {
d_plot->removeMarker(mrkX);
mrkX=-1;
}
}
示例3: addPlotMarker
void QgsCurveEditorWidget::addPlotMarker( double x, double y, bool isSelected )
{
QColor borderColor( 0, 0, 0 );
QColor brushColor = isSelected ? borderColor : QColor( 255, 255, 255, 0 );
QwtPlotMarker *marker = new QwtPlotMarker();
marker->setSymbol( new QwtSymbol( QwtSymbol::Ellipse, QBrush( brushColor ), QPen( borderColor, isSelected ? 2 : 1 ), QSize( 8, 8 ) ) );
marker->setValue( x, y );
marker->attach( mPlot );
marker->setRenderHint( QwtPlotItem::RenderAntialiased, true );
mMarkers << marker;
}
示例4: addPlotMarker
void QgsGradientColorRampDialog::addPlotMarker( double x, double y, const QColor &color, bool isSelected )
{
QColor borderColor = color.darker( 200 );
borderColor.setAlpha( 255 );
QColor brushColor = color;
brushColor.setAlpha( 255 );
QwtPlotMarker *marker = new QwtPlotMarker();
marker->setSymbol( new QwtSymbol( QwtSymbol::Ellipse, QBrush( brushColor ), QPen( borderColor, isSelected ? 2 : 1 ), QSize( 8, 8 ) ) );
marker->setValue( x, y );
marker->attach( mPlot );
marker->setRenderHint( QwtPlotItem::RenderAntialiased, true );
mMarkers << marker;
}
示例5: QwtPlotMarker
void QgsVectorGradientColorRampV2Dialog::addPlotMarker( double x, double y, const QColor& color, bool isSelected )
{
QColor borderColor = color.darker( 200 );
borderColor.setAlpha( 255 );
QColor brushColor = color;
brushColor.setAlpha( 255 );
QwtPlotMarker *marker = new QwtPlotMarker();
#if defined(QWT_VERSION) && QWT_VERSION>=0x060000
marker->setSymbol( new QwtSymbol( QwtSymbol::Ellipse, QBrush( brushColor ), QPen( borderColor, isSelected ? 2 : 1 ), QSize( 10, 10 ) ) );
#else
marker->setSymbol( QwtSymbol( QwtSymbol::Ellipse, QBrush( brushColor ), QPen( borderColor, isSelected ? 2 : 1 ), QSize( 10, 10 ) ) );
#endif
marker->setValue( x, y );
marker->attach( mPlot );
marker->setRenderHint( QwtPlotItem::RenderAntialiased, true );
mMarkers << marker;
}