Changeset 4327 in ntrip
- Timestamp:
- Jun 23, 2012, 5:46:52 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/polarplot.cpp
r4326 r4327 20 20 #include <qwt_symbol.h> 21 21 #include <qwt_polar_grid.h> 22 #include <qwt_color_map.h> 22 23 23 24 #include "polarplot.h" 25 26 class t_colorMap: public QwtLinearColorMap { 27 public: 28 t_colorMap() : QwtLinearColorMap(Qt::darkBlue, Qt::yellow) { 29 addColorStop(0.05, Qt::blue); 30 addColorStop(0.30, Qt::cyan); 31 addColorStop(0.60, Qt::green); 32 addColorStop(0.98, Qt::red); 33 } 34 }; 35 36 t_colorMap colorMap; 24 37 25 38 // Draw Symbols (virtual) - change symbol's color … … 33 46 const t_polarData* polarData = reinterpret_cast<const t_polarData*>(data()); 34 47 const t_polarPoint& point = polarData->sample(ii); 35 if (point._value == 1) { 36 ss.setBrush(QBrush(Qt::red)); 37 ss.setPen(QPen(Qt::red)); 38 } 39 else { 40 ss.setBrush(QBrush(Qt::blue)); 41 ss.setPen(QPen(Qt::blue)); 42 } 48 const QColor color = colorMap.color(QwtInterval(0.0, 1.0), point._value); 49 ss.setBrush(QBrush(color)); 50 ss.setPen(QPen(color)); 43 51 QwtPolarCurve::drawSymbols(painter, ss, azimuthMap, radialMap, pole, ii,ii); 44 52 } … … 57 65 const double rr = zenithInterval.minValue() + ii * stepR; 58 66 59 double value = 0.0; 60 if (ii % 3 == 0) { 61 value = 1.0; 62 } 67 double value = static_cast<double>(ii) / _size; 63 68 64 69 return t_polarPoint(aa, rr, value);
Note:
See TracChangeset
for help on using the changeset viewer.