Changeset 4610 in ntrip for trunk/BNC/src/rinex/availplot.cpp
- Timestamp:
- Aug 31, 2012, 11:33:14 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/availplot.cpp
r4604 r4610 1 1 2 #include <qwt_plot_curve.h>3 2 #include <qwt_scale_draw.h> 4 3 #include <qwt_text.h> 4 #include <qwt_legend.h> 5 5 6 6 #include "availplot.h" … … 57 57 QwtSymbol* symbolBlue = new QwtSymbol(QwtSymbol::Rect, QBrush(blue), 58 58 QPen(blue), QSize(1,1)); 59 60 // Legend 61 // ------ 62 QwtLegend* legend = new QwtLegend; 63 insertLegend(legend, QwtPlot::RightLegend); 59 64 60 65 // Curves … … 77 82 const QVector<double>& xData = availData._L1ok; 78 83 QVector<double> yData(xData.size(), double(iC)+eps); 79 addCurve(prn, symbolGreen, xData, yData); 84 QwtPlotCurve* curve = addCurve(prn, symbolGreen, xData, yData); 85 curve->setItemAttribute(QwtPlotItem::Legend, false); 80 86 } 81 87 … … 85 91 const QVector<double>& xData = availData._L2ok; 86 92 QVector<double> yData(xData.size(), double(iC)-eps); 87 addCurve(prn, symbolGreen, xData, yData); 93 QwtPlotCurve* curve = addCurve(prn, symbolGreen, xData, yData); 94 curve->setItemAttribute(QwtPlotItem::Legend, false); 88 95 } 89 96 … … 93 100 const QVector<double>& xData = availData._L1gap; 94 101 QVector<double> yData(xData.size(), double(iC)+eps); 95 addCurve(prn, symbolBlue, xData, yData); 102 QwtPlotCurve* curve = addCurve(prn, symbolBlue, xData, yData); 103 curve->setItemAttribute(QwtPlotItem::Legend, false); 96 104 } 97 105 … … 101 109 const QVector<double>& xData = availData._L2gap; 102 110 QVector<double> yData(xData.size(), double(iC)-eps); 103 addCurve(prn, symbolBlue, xData, yData); 111 QwtPlotCurve* curve = addCurve(prn, symbolBlue, xData, yData); 112 curve->setItemAttribute(QwtPlotItem::Legend, false); 104 113 } 105 114 … … 109 118 const QVector<double>& xData = availData._L1slip; 110 119 QVector<double> yData(xData.size(), double(iC)+eps); 111 addCurve(prn, symbolRed, xData, yData); 120 QwtPlotCurve* curve = addCurve(prn, symbolRed, xData, yData); 121 curve->setItemAttribute(QwtPlotItem::Legend, false); 112 122 } 113 123 … … 117 127 const QVector<double>& xData = availData._L2slip; 118 128 QVector<double> yData(xData.size(), double(iC)-eps); 119 addCurve(prn, symbolRed, xData, yData); 129 QwtPlotCurve* curve = addCurve(prn, symbolRed, xData, yData); 130 curve->setItemAttribute(QwtPlotItem::Legend, false); 120 131 } 121 132 } … … 138 149 // Add Curve 139 150 ////////////////////////////////////////////////////////////////////////////// 140 void t_availPlot::addCurve(const QString& name, const QwtSymbol* symbol, 141 const QVector<double>& xData, 142 const QVector<double>& yData) { 151 QwtPlotCurve* t_availPlot::addCurve(const QString& name, 152 const QwtSymbol* symbol, 153 const QVector<double>& xData, 154 const QVector<double>& yData) { 143 155 QwtPlotCurve* curve = new QwtPlotCurve(name); 144 156 curve->setSymbol(symbol); … … 148 160 curve->setSamples(xData, yData); 149 161 curve->attach(this); 162 return curve; 150 163 }
Note:
See TracChangeset
for help on using the changeset viewer.