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


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

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


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

示例1: clear

void Plot::clear()
{
    this->detachItems();
    pointsArr.clear();

    //  ...a horizontal line at y = 1...
    QwtPlotMarker *mY1 = new QwtPlotMarker();
    mY1->setLabel( QString::fromLatin1( "y = 1" ) );
    mY1->setLabelAlignment( Qt::AlignRight | Qt::AlignTop );
    mY1->setLineStyle( QwtPlotMarker::HLine );
    mY1->setYValue( 1.0 );
    mY1->setLinePen(Qt::black, 1, Qt::DashLine);
    mY1->attach( this );

    QwtPlotMarker *mY = new QwtPlotMarker();
    mY->setLabel( QString::fromLatin1( "y = 0" ) );
    mY->setLabelAlignment( Qt::AlignRight | Qt::AlignTop );
    mY->setLineStyle( QwtPlotMarker::HLine );
    mY->setYValue( 0.0 );
    mY->attach( this );

    //  ...a vertical line at x = 0
    QwtPlotMarker *mX = new QwtPlotMarker();
    mX->setLabel( QString::fromLatin1( "x = 0" ) );
    mX->setLabelAlignment( Qt::AlignLeft | Qt::AlignBottom );
    mX->setLabelOrientation( Qt::Vertical );
    mX->setLineStyle( QwtPlotMarker::VLine );
    mX->setLinePen( Qt::black, 0, Qt::DashDotLine );
    mX->setXValue( 0 );
    mX->attach( this );
}
开发者ID:kmi9work,项目名称:Fires,代码行数:31,代码来源:plot.cpp

示例2: setTitle

Plot::Plot()
{
    setTitle("A Simple QwtPlot Demonstration");
    insertLegend(new QwtLegend(), QwtPlot::RightLegend);

    // Set axis titles
    setAxisTitle(xBottom, "x -->");
    setAxisTitle(yLeft, "y -->");
    
    // Insert new curves
    QwtPlotCurve *cSin = new QwtPlotCurve("y = sin(x)");
#if QT_VERSION >= 0x040000
    cSin->setRenderHint(QwtPlotItem::RenderAntialiased);
#endif
    cSin->setPen(QPen(Qt::red));
    cSin->attach(this);

    QwtPlotCurve *cCos = new QwtPlotCurve("y = cos(x)");
#if QT_VERSION >= 0x040000
    cCos->setRenderHint(QwtPlotItem::RenderAntialiased);
#endif
    cCos->setPen(QPen(Qt::blue));
    cCos->attach(this);

    // Create sin and cos data
    const int nPoints = 100;
    cSin->setData(SimpleData(::sin, nPoints));
    cCos->setData(SimpleData(::cos, nPoints));

    // Insert markers
    
    //  ...a horizontal line at y = 0...
    QwtPlotMarker *mY = new QwtPlotMarker();
    mY->setLabel(QString::fromLatin1("y = 0"));
    mY->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);
    mY->setLineStyle(QwtPlotMarker::HLine);
    mY->setYValue(0.0);
    mY->attach(this);

    //  ...a vertical line at x = 2 * pi
    QwtPlotMarker *mX = new QwtPlotMarker();
    mX->setLabel(QString::fromLatin1("x = 2 pi"));
    mX->setLabelAlignment(Qt::AlignLeft | Qt::AlignBottom);
    mX->setLabelOrientation(Qt::Vertical);
    mX->setLineStyle(QwtPlotMarker::VLine);
    mX->setLinePen(QPen(Qt::black, 0, Qt::DashDotLine));
    mX->setXValue(2.0 * M_PI);
    mX->attach(this);
}
开发者ID:376473984,项目名称:pvb,代码行数:49,代码来源:simple.cpp

示例3: mouseReleaseEvent

void Variog_plot::mouseReleaseEvent(QMouseEvent * event)
{
  std::cerr << "show_pairs_count() called " << std::endl;
  if( event->button() != Qt::RightButton ) return;

  const float offset=1.02;
  QFont font;
  font.setPointSize( 7 );

  if( !pairs_shown_ ) {
    for( unsigned int i=0; i < pairs_.size(); i++ ) {
      QString label;
      label.setNum( pairs_[i] );
      QwtText T(label);
      
      QwtPlotMarker * marker = new QwtPlotMarker();
      marker->attach(this);

      T.setFont(font);
      marker->setValue(pairs_coord_x_[i], pairs_coord_y_[i]*offset);
      marker->setLabel(T);
    }
    pairs_shown_ = true;
  }
  else {
    detachItems(QwtPlotItem::Rtti_PlotMarker);
    pairs_shown_ = false;
  }
  replot();
}
开发者ID:DMachuca,项目名称:ar2tech-SGeMS-public,代码行数:30,代码来源:variog_plot.cpp

示例4: insertLineMarker

/*!
  This function is a shortcut to insert a horizontal or vertical
  line marker, dependent on the specified axis.
  \param label Label
  \param axis Axis to be attached
  \return New key if the marker could be inserted, 0 if not.
*/
long QwtPlot::insertLineMarker(const QString &label, int axis)
{
    QwtMarker::LineStyle lineStyle = QwtMarker::NoLine;
    int xAxis = QwtPlot::xBottom;
    int yAxis = QwtPlot::yLeft;

    switch(axis)
    {
        case yLeft:
        case yRight:
            yAxis = axis;
            lineStyle = QwtMarker::HLine;
            break;
        case xTop:
        case xBottom:
            xAxis = axis;
            lineStyle = QwtMarker::VLine;
            break;
    }

    QwtPlotMarker *marker = new QwtPlotMarker(this);
    if ( marker == 0 )
        return 0;

    marker->setAxis(xAxis, yAxis);
    marker->setLabel(label);
    marker->setLineStyle(lineStyle);
    marker->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);

    long key = insertMarker(marker);
    if ( key == 0 )
        delete marker;

    return key;
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:42,代码来源:qwt_plot_marker.cpp

示例5: loadSweep

void SweepInspector::loadSweep(int index) {
  //load in new sweep values from data
  if (data == NULL) return;
  if ( (index < 0)  || (index >= data->getNumSweeps())) return;

  //remove old data and get new
  if (d_curve) d_curve->attach(NULL);
  detachItems();
  fsweep sweep = data->getSweep(index);

  d_curve = new QwtPlotCurve( data->timestampFromIndex(index) ); //Qwt will delete() this when its done with it
  d_curve->setRenderHint( QwtPlotItem::RenderAntialiased );
  d_curve->setStyle( QwtPlotCurve::Lines );
  d_curve->setPen( QColor( Qt::yellow ), 2, Qt::SolidLine );
  d_curve->setSamples( sweep );
  d_curve->attach(this);

  QwtInterval frange = data->limits(FREQ);
  //setAxisScale(QwtPlot::xBottom, frange.minValue(), frange.maxValue(), (frange.maxValue() - frange.minValue())/ 5.0);
  //setAxisScale(QwtPlot::yLeft, -135, 20, 10.0);
  setTitle( QString("RF Sweep @ %1").arg(data->timestampFromIndex(index)) );
  //set maximum zoom out
  zoomer->setZoomBase(QRectF(QPointF(frange.minValue(), 40), QPointF(frange.maxValue(), -135)));
  zoomer->zoomBase();

  //find max, min, and average values and drop it on plot as well
  double max = sweep.first().y(), min = sweep.first().y(), avg=0;
  for(int i=0; i < sweep.size(); i++) {
    max = std::max(max, sweep.at(i).y());
    min = std::min(min, sweep.at(i).y());
    avg += sweep.at(i).y();
  } avg /= sweep.size();

  //add markers onto the plot
  QwtPlotMarker *one = new QwtPlotMarker(), *two = new QwtPlotMarker();
  one->attach(this); one->setAxes(QwtPlot::xTop, QwtPlot::yRight);
  two->attach(this); two->setAxes(QwtPlot::xTop, QwtPlot::yRight);

  QwtText tone = QwtText(QString("Max: %1 dBm\nMin: %2 dBm\nAvg: %3 dBm").arg(max).arg(min).arg(avg));
  tone.setFont( QFont( "Helvetica", 10, QFont::Bold ) );
  tone.setColor( Qt::green );
  tone.setRenderFlags(Qt::AlignTop | Qt::AlignLeft);

  one->setLabel(tone);
  one->setValue(0, 10);
  one->setLabelAlignment(Qt::AlignBottom | Qt::AlignRight);

  QwtText ttwo(data->plotText());
  ttwo.setFont( QFont( "Helvetica", 10, QFont::Bold ) );
  ttwo.setColor( Qt::white );
  ttwo.setRenderFlags(Qt::AlignBottom | Qt::AlignRight);

  two->setLabel(ttwo);
  two->setValue(10, 10);
  two->setLabelAlignment(Qt::AlignBottom | Qt::AlignLeft);

  replot();
  repaint();
}
开发者ID:npotts,项目名称:SpectralSignalHound-Viewer,代码行数:59,代码来源:SweepInspector.cpp

示例6: dodaj_naj

void wykres::dodaj_naj(double d) {
    QwtPlotMarker *mY = new QwtPlotMarker();
    mY->setLabel(QString::fromLatin1("Osobnik najlepszy = ")+QString::number(-d));
    mY->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);
    mY->setLineStyle(QwtPlotMarker::HLine);
    mY->setYValue(-d);
    mY->attach(this);
}
开发者ID:maxbog,项目名称:f1,代码行数:8,代码来源:wykres.cpp

示例7: setMarkerLabel

/*!
  \brief Set the marker label
  \param key Marker key
  \param text the label text
  \param font the font of the label text
  \param color the color of the label text
  \param pen the pen of the bounding box of the label text
  \param brush the brush of the bounding box of the label text
  \return \c TRUE if the specified marker exists
*/
bool QwtPlot::setMarkerLabel(long key, const QString &text, const QFont &font,
    const QColor &color, const QPen &pen, const QBrush &brush)
{
    QwtPlotMarker *m;
    if ((m = d_markers->find(key)))
    {
        m->setLabel(text, font, color, pen, brush);
        return TRUE;
    }
    return FALSE;
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:21,代码来源:qwt_plot_marker.cpp

示例8: setExtraCaption

/**
 * Dodaje dodatkowy opis wykresu.
 *
 * @param caption opis wykresu
 * @param x pozycja na wykresie w skali czasu
 * @param y pozycja na wykresie w skali pionowej (np. częstotliwości)
 */
void SpectrogramPlot::setExtraCaption(QString caption, double x, double y)
{
    QwtPlotMarker* marker = new QwtPlotMarker();
    QwtText label(caption);
    label.setColor(QColor::fromRgba(0x88FFFFFF));
    label.setFont(QFont("Arial", 10, QFont::Bold));
    marker->setLabel(label);
    marker->setLineStyle(QwtPlotMarker::NoLine);
    marker->setValue(x, y);
    marker->setLabelAlignment(Qt::AlignRight | Qt::AlignBottom);
    marker->attach(this);
}
开发者ID:akhmadzaki,项目名称:SimpleBird,代码行数:19,代码来源:SpectrogramPlot.cpp

示例9: populate

void Plot::populate()
{
    // Insert new curves
    QwtPlotCurve *cSin = new QwtPlotCurve("y = sin(x)");
    cSin->setRenderHint(QwtPlotItem::RenderAntialiased);
    cSin->setLegendAttribute(QwtPlotCurve::LegendShowLine, true);
    cSin->setPen(QPen(Qt::red));
    cSin->attach(this);

    QwtPlotCurve *cCos = new QwtPlotCurve("y = cos(x)");
    cCos->setRenderHint(QwtPlotItem::RenderAntialiased);
    cCos->setLegendAttribute(QwtPlotCurve::LegendShowLine, true);
    cCos->setPen(QPen(Qt::blue));
    cCos->attach(this);

    // Create sin and cos data
    cSin->setData(new FunctionData(::sin));
    cCos->setData(new FunctionData(::cos));

    // Insert markers
    
    //  ...a horizontal line at y = 0...
    QwtPlotMarker *mY = new QwtPlotMarker();
    mY->setLabel(QString::fromLatin1("y = 0"));
    mY->setLabelAlignment(Qt::AlignRight|Qt::AlignTop);
    mY->setLineStyle(QwtPlotMarker::HLine);
    mY->setYValue(0.0);
    mY->attach(this);

    //  ...a vertical line at x = 2 * pi
    QwtPlotMarker *mX = new QwtPlotMarker();
    mX->setLabel(QString::fromLatin1("x = 2 pi"));
    mX->setLabelAlignment(Qt::AlignLeft | Qt::AlignBottom);
    mX->setLabelOrientation(Qt::Vertical);
    mX->setLineStyle(QwtPlotMarker::VLine);
    mX->setLinePen(QPen(Qt::black, 0, Qt::DashDotLine));
    mX->setXValue(2.0 * M_PI);
    mX->attach(this);
}
开发者ID:albore,项目名称:pandora,代码行数:39,代码来源:sinusplot.cpp

示例10: addText

void caStripPlot::addText(double x, double y, char* text, QColor c, int fontsize)
{
    QwtPlotMarker *mY = new QwtPlotMarker();
    QwtText txt;
    txt.setText(text);
    txt.setFont(QFont("Helvetica",fontsize, QFont::Bold));
    txt.setColor(c);
    mY->setLabel(txt);
    mY->setLabelAlignment(Qt::AlignRight | Qt::AlignTop);
    mY->setXValue(x);
    mY->setYValue(y);
    mY->attach(this);
    replot();
}
开发者ID:boiarino17,项目名称:epics,代码行数:14,代码来源:castripplot.cpp

示例11: insertMarker

/*!
  \brief Insert a new marker
  \param label Label
  \param xAxis X axis to be attached
  \param yAxis Y axis to be attached
  \return New key if the marker could be inserted, 0 if not.
*/
long QwtPlot::insertMarker(const QString &label, int xAxis, int yAxis)
{
    QwtPlotMarker *marker = new QwtPlotMarker(this);
    if ( marker == 0 )
        return 0;

    marker->setAxis(xAxis, yAxis);
    marker->setLabel(label);

    long key = insertMarker(marker);
    if ( key == 0 )
        delete marker;

    return key;
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:22,代码来源:qwt_plot_marker.cpp

示例12: setInitialTimeDisplay

void MainWindow::setInitialTimeDisplay(int start)
{
    std::size_t ncols = _vm["file.ncols"].as<int>();
    std::size_t nrows = _vm["file.nrows"].as<int>();
    //TODO: move plotting to appropiate method
    std::size_t numofplottedsamples = _vm["plot.num.samples"].as<int>();
    _gridPlot->p->detachItems();
    _gridPlot->setoffset(start);

    double interrowoffset = _vm["inter.row.offset"].as<double>();

    for (std::size_t row=0; row<nrows; ++row){
//    for (std::size_t row=0; row<1; ++row){
        std::vector<double> xs(numofplottedsamples);
        std::vector<double> ys(numofplottedsamples);

        std::stringstream strst;
        std::string strTitle = "Row";
        strst << strTitle << "-" << row;
        strTitle = strst.str();
        QwtPlotCurve *tscurve = new QwtPlotCurve((char *)strTitle.c_str());

        for (std::size_t x = 0; x < numofplottedsamples; ++x)
        {
            if (x+start<ncols){
		    xs[x] = (x+start)/_gridPlot->gridXpixelsperunit; //position in seconds
		    if (_bf!=NULL) {
			    ys[x] = row*interrowoffset + (*_bf)(row,x+start)/_gridPlot->gridYpixelsperunit; //y value of that sample
		    } else if (_bfsi!=NULL) {
			    ys[x] = row*interrowoffset + (*_bfsi)(row,x+start)/_gridPlot->gridYpixelsperunit; //y value of that sample
		    }
            }
        }

        tscurve->setSamples(&xs[0],&ys[0],xs.size());
        tscurve->setPen(QPen(Qt::black));

        QwtPlotMarker *rowNameText = new QwtPlotMarker();
        rowNameText->setLabel(QString(strTitle.c_str()));
        rowNameText->setXValue(xs[0]+0.25);
        rowNameText->setYValue(row*interrowoffset-0.5);
        rowNameText->attach(_gridPlot->p);

        tscurve->attach(_gridPlot->p);
    }
    _gridPlot->resetzoom();
}
开发者ID:pepoviru,项目名称:bfviewer,代码行数:47,代码来源:main_window.cpp

示例13: addMarker

void Graph::addMarker(double val, const QColor &color, int axis)
{
    QwtPlotMarker *m = new QwtPlotMarker();
    m->setLineStyle(axis == QwtPlot::xBottom ? QwtPlotMarker::VLine : QwtPlotMarker::HLine);
    m->setLinePen(QPen(color));
    m->setYAxis(axis);
    m->setValue(val, val);
    m->attach(this);
    m->setLabel(QString::number(val));

    if(axis == QwtPlot::xBottom)
        m->setLabelAlignment(Qt::AlignLeft | Qt::AlignVCenter);
    else
        m->setLabelAlignment(Qt::AlignTop | Qt::AlignHCenter);

    getMarkers(axis).push_back(m);
}
开发者ID:Tasssadar,项目名称:Lorris,代码行数:17,代码来源:graph.cpp

示例14: drawHistogram


//.........这里部分代码省略.........
  grid->setPen( mGridPen );
  grid->attach( mpPlot );

  // make colors list
  mHistoColors.clear();
  foreach ( QgsRendererRangeV2 range, mRanges )
  {
    mHistoColors << ( range.symbol() ? range.symbol()->color() : Qt::black );
  }

  //draw histogram
#if defined(QWT_VERSION) && QWT_VERSION>=0x060000
  QwtPlotHistogram * plotHistogram = 0;
  plotHistogram = createPlotHistogram( mRanges.count() > 0 ? mRanges.at( 0 ).label() : QString(),
                                       mRanges.count() > 0 ? QBrush( mHistoColors.at( 0 ) ) : mBrush,
                                       mRanges.count() > 0 ? Qt::NoPen : mPen );
#else
  HistogramItem *plotHistogramItem = 0;
  plotHistogramItem = createHistoItem( mRanges.count() > 0 ? mRanges.at( 0 ).label() : QString(),
                                       mRanges.count() > 0 ? QBrush( mHistoColors.at( 0 ) ) : mBrush,
                                       mRanges.count() > 0 ? Qt::NoPen : mPen );
#endif

#if defined(QWT_VERSION) && QWT_VERSION>=0x060000
  QVector<QwtIntervalSample> dataHisto;
#else

  // we safely assume that QT>=4.0 (min version is 4.7), therefore QwtArray is a QVector, so don't set size here
  QwtArray<QwtDoubleInterval> intervalsHisto;
  QwtArray<double> valuesHisto;

#endif

  int bins = mBinsSpinBox->value();
  QList<double> edges = mHistogram.binEdges( bins );
  QList<int> counts = mHistogram.counts( bins );

  int rangeIndex = 0;
  int lastValue = 0;

  for ( int bin = 0; bin < bins; ++bin )
  {
    int binValue = counts.at( bin );

    //current bin crosses two graduated ranges, so we split between
    //two histogram items
    if ( rangeIndex < mRanges.count() - 1 && edges.at( bin ) > mRanges.at( rangeIndex ).upperValue() )
    {
      rangeIndex++;
#if defined(QWT_VERSION) && QWT_VERSION>=0x060000
      plotHistogram->setSamples( dataHisto );
      plotHistogram->attach( mpPlot );
      plotHistogram = createPlotHistogram( mRanges.at( rangeIndex ).label(), mHistoColors.at( rangeIndex ) );
      dataHisto.clear();
      dataHisto << QwtIntervalSample( lastValue, mRanges.at( rangeIndex - 1 ).upperValue(), edges.at( bin ) );
#else
      plotHistogramItem->setData( QwtIntervalData( intervalsHisto, valuesHisto ) );
      plotHistogramItem->attach( mpPlot );
      plotHistogramItem = createHistoItem( mRanges.at( rangeIndex ).label(), mHistoColors.at( rangeIndex ) );
      intervalsHisto.clear();
      valuesHisto.clear();
      intervalsHisto.append( QwtDoubleInterval( mRanges.at( rangeIndex - 1 ).upperValue(), edges.at( bin ) ) );
      valuesHisto.append( lastValue );
#endif
    }

    double upperEdge = mRanges.count() > 0 ? qMin( edges.at( bin + 1 ), mRanges.at( rangeIndex ).upperValue() )
                       : edges.at( bin + 1 );

#if defined(QWT_VERSION) && QWT_VERSION>=0x060000
    dataHisto << QwtIntervalSample( binValue, edges.at( bin ), upperEdge );
#else
    intervalsHisto.append( QwtDoubleInterval( edges.at( bin ), upperEdge ) );
    valuesHisto.append( double( binValue ) );
#endif

    lastValue = binValue;
  }

#if defined(QWT_VERSION) && QWT_VERSION>=0x060000
  plotHistogram->setSamples( dataHisto );
  plotHistogram->attach( mpPlot );
#else
  plotHistogramItem->setData( QwtIntervalData( intervalsHisto, valuesHisto ) );
  plotHistogramItem->attach( mpPlot );
#endif

  mRangeMarkers.clear();
  foreach ( QgsRendererRangeV2 range, mRanges )
  {
    QwtPlotMarker* rangeMarker = new QwtPlotMarker();
    rangeMarker->attach( mpPlot );
    rangeMarker->setLineStyle( QwtPlotMarker::VLine );
    rangeMarker->setXValue( range.upperValue() );
    rangeMarker->setLabel( QString::number( range.upperValue() ) );
    rangeMarker->setLabelOrientation( Qt::Vertical );
    rangeMarker->setLabelAlignment( Qt::AlignLeft | Qt::AlignTop );
    rangeMarker->show();
    mRangeMarkers << rangeMarker;
  }
开发者ID:Br1ndavoine,项目名称:QGIS,代码行数:101,代码来源:qgshistogramwidget.cpp

示例15: reset

void QwtPlotPrintFilter::reset(QwtPlotItem *item) const
{
    if ( d_data->cache == 0 )
        return;

    const PrivateData::Cache &cache = *d_data->cache;

    switch(item->rtti())
    {
        case QwtPlotItem::Rtti_PlotGrid:
        {
            QwtPlotGrid *grid = (QwtPlotGrid *)item;

            QPen pen = grid->majPen();
            pen.setColor(cache.gridColors[0]);
            grid->setMajPen(pen);

            pen = grid->minPen();
            pen.setColor(cache.gridColors[1]);
            grid->setMinPen(pen);

            break;
        }
        case QwtPlotItem::Rtti_PlotCurve:
        {
            QwtPlotCurve *c = (QwtPlotCurve *)item;

            QwtSymbol symbol = c->symbol();

            if ( cache.curveSymbolPenColors.contains(c) )
            {
                symbol.setPen(cache.curveSymbolPenColors[c]);
            }

            if ( cache.curveSymbolBrushColors.contains(c) )
            {
                QBrush brush = symbol.brush();
                brush.setColor(cache.curveSymbolBrushColors[c]);
                symbol.setBrush(brush);
            }
            c->setSymbol(symbol);

            if ( cache.curveColors.contains(c) )
            {
                QPen pen = c->pen();
                pen.setColor(cache.curveColors[c]);
                c->setPen(pen);
            }

            break;
        }
        case QwtPlotItem::Rtti_PlotMarker:
        {
            QwtPlotMarker *m = (QwtPlotMarker *)item;

            if ( cache.markerFonts.contains(m) )
            {
                QwtText label = m->label();
                label.setFont(cache.markerFonts[m]);
                m->setLabel(label);
            }

            if ( cache.markerLabelColors.contains(m) )
            {
                QwtText label = m->label();
                label.setColor(cache.markerLabelColors[m]);
                m->setLabel(label);
            }

            if ( cache.markerLineColors.contains(m) )
            {
                QPen pen = m->linePen();
                pen.setColor(cache.markerLineColors[m]);
                m->setLinePen(pen);
            }
            
            QwtSymbol symbol = m->symbol();

            if ( cache.markerSymbolPenColors.contains(m) )
            {
                QPen pen = symbol.pen();
                pen.setColor(cache.markerSymbolPenColors[m]);
                symbol.setPen(pen);
            }

            if ( cache.markerSymbolBrushColors.contains(m) )
            {
                QBrush brush = symbol.brush();
                brush.setColor(cache.markerSymbolBrushColors[m]);
                symbol.setBrush(brush);
            }

            m->setSymbol(symbol);

            break;
        }
        default:
            break;
    }
}
开发者ID:BijanZarif,项目名称:coolfluid3,代码行数:100,代码来源:qwt_plot_printfilter.cpp


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