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


C++ QwtPlotMarker::setRenderHint方法代码示例

本文整理汇总了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;
  }
}
开发者ID:liyulun,项目名称:mantid,代码行数:26,代码来源:Grid.cpp

示例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;
    }
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:26,代码来源:Grid.cpp

示例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;
}
开发者ID:ndavid,项目名称:QGIS,代码行数:13,代码来源:qgscurveeditorwidget.cpp

示例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;
}
开发者ID:exlimit,项目名称:QGIS,代码行数:15,代码来源:qgsgradientcolorrampdialog.cpp

示例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;
}
开发者ID:NyakudyaA,项目名称:QGIS,代码行数:19,代码来源:qgsvectorgradientcolorrampv2dialog.cpp


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