source: ntrip/trunk/BNC/src/rinex/polarplot.h@ 4334

Last change on this file since 4334 was 4334, checked in by mervart, 12 years ago
File size: 1.8 KB
Line 
1
2#ifndef POLARPLOT_H
3#define POLARPLOT_H
4
5#include <qwt_polar_plot.h>
6#include <qwt_polar_curve.h>
7//
8//////////////////////////////////////////////////////////////////////////////
9class t_polarCurve : public QwtPolarCurve {
10 public:
11 t_polarCurve() {}
12 virtual ~t_polarCurve() {}
13 protected:
14 virtual void drawSymbols (QPainter* painter, const QwtSymbol& symbol,
15 const QwtScaleMap& azimuthMap,
16 const QwtScaleMap& radialMap,
17 const QPointF& pole, int from, int to) const;
18};
19
20//
21//////////////////////////////////////////////////////////////////////////////
22class t_polarPoint {
23 public:
24 t_polarPoint(double az, double zen, double value) {
25 _az = az;
26 _zen = zen;
27 _value = value;
28 }
29 double _az;
30 double _zen;
31 double _value;
32};
33
34//
35//////////////////////////////////////////////////////////////////////////////
36class t_polarData: public QwtSeriesData<QwtPointPolar> {
37 public:
38 t_polarData(QVector<t_polarPoint*>* data) {
39 _data = data;
40 _size = data->size();
41 }
42 ~t_polarData() {
43 for (int ii = 0; ii < _data->size(); ii++) {
44 delete _data->at(ii);
45 }
46 }
47 virtual QwtPointPolar sample(size_t ii) const {
48 const t_polarPoint* point = _data->at(ii);
49 QwtPointPolar qp(point->_az, point->_zen); qp._value = point->_value;
50 return qp;
51 }
52 virtual size_t size() const {return _size;}
53 virtual QRectF boundingRect() const {return d_boundingRect;}
54 protected:
55 size_t _size;
56 private:
57 QVector<t_polarPoint*>* _data;
58};
59
60//
61//////////////////////////////////////////////////////////////////////////////
62class t_polarPlot: public QwtPolarPlot {
63 Q_OBJECT
64
65 public:
66 t_polarPlot(QWidget* = 0);
67 void addCurve(QVector<t_polarPoint*>* data);
68
69 private:
70};
71
72#endif
Note: See TracBrowser for help on using the repository browser.