Changeset 4665 in ntrip


Ignore:
Timestamp:
Sep 8, 2012, 5:47:20 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/rinex/eleplot.cpp

    r4664 r4665  
    4242#include <qwt_text.h>
    4343#include <qwt_legend.h>
     44#include <qwt_plot_marker.h>
    4445
    4546#include "eleplot.h"
     
    118119  curve->setSamples(xData, yData);
    119120  curve->attach(this);
     121
     122  if (xData.size() > 0 && yData.size() > 0) {
     123    QwtPlotMarker* marker = new QwtPlotMarker();
     124    int ii = xData.size() / 2;
     125    marker->setValue(xData[ii], yData[ii]);
     126    QwtText text(name);
     127    text.setColor(symbol.pen().color());
     128    marker->setLabel(text);
     129    marker->setLabelAlignment(Qt::AlignTop);
     130    marker->attach(this);
     131  }
     132
    120133  return curve;
    121134}
Note: See TracChangeset for help on using the changeset viewer.