9 #ifndef QWT_POLAR_PLOT_H
10 #define QWT_POLAR_PLOT_H 1
12 #include "qwt_polar_global.h"
13 #include "qwt_polar.h"
14 #include "qwt_polar_itemdict.h"
15 #include <qwt_interval.h>
16 #include <qwt_scale_map.h>
17 #include <qwt_point_polar.h>
20 class QwtRoundScaleDraw;
26 class QwtAbstractLegend;
50 Q_PROPERTY( QBrush plotBackground READ plotBackground WRITE setPlotBackground )
51 Q_PROPERTY(
double azimuthOrigin READ azimuthOrigin WRITE setAzimuthOrigin )
85 QwtPolarPlot(
const QwtText &title, QWidget *parent = NULL );
89 void setTitle(
const QString & );
90 void setTitle(
const QwtText & );
92 QwtText title()
const;
94 QwtTextLabel *titleLabel();
95 const QwtTextLabel *titleLabel()
const;
97 void setAutoReplot(
bool tf =
true );
98 bool autoReplot()
const;
100 void setAutoScale(
int scaleId );
101 bool hasAutoScale(
int scaleId )
const;
103 void setScaleMaxMinor(
int scaleId,
int maxMinor );
104 int scaleMaxMinor(
int scaleId )
const;
106 int scaleMaxMajor(
int scaleId )
const;
107 void setScaleMaxMajor(
int scaleId,
int maxMajor );
109 QwtScaleEngine *scaleEngine(
int scaleId );
110 const QwtScaleEngine *scaleEngine(
int scaleId )
const;
111 void setScaleEngine(
int scaleId, QwtScaleEngine * );
113 void setScale(
int scaleId,
double min,
double max,
double step = 0 );
115 void setScaleDiv(
int scaleId,
const QwtScaleDiv & );
116 const QwtScaleDiv *scaleDiv(
int scaleId )
const;
117 QwtScaleDiv *scaleDiv(
int scaleId );
119 QwtScaleMap scaleMap(
int scaleId,
double radius )
const;
120 QwtScaleMap scaleMap(
int scaleId )
const;
122 void updateScale(
int scaleId );
124 double azimuthOrigin()
const;
126 void zoom(
const QwtPointPolar&,
double factor );
129 QwtPointPolar zoomPos()
const;
130 double zoomFactor()
const;
137 void setPlotBackground (
const QBrush &c );
138 const QBrush& plotBackground()
const;
140 virtual void drawCanvas( QPainter *,
const QRectF & )
const;
144 void insertLegend( QwtAbstractLegend *,
145 LegendPosition = RightLegend,
double ratio = -1.0 );
147 QwtAbstractLegend *legend();
148 const QwtAbstractLegend *legend()
const;
157 QwtInterval visibleInterval()
const;
158 QRectF plotRect()
const;
159 QRectF plotRect(
const QRectF & )
const;
161 int plotMarginHint()
const;
164 virtual QwtPolarItem *infoToItem(
const QVariant & )
const;
183 void legendDataChanged(
const QVariant &itemInfo,
184 const QList<QwtLegendData> &data );
190 void layoutChanged();
193 virtual void replot();
195 void setAzimuthOrigin(
double );
198 virtual bool event( QEvent * );
199 virtual void resizeEvent( QResizeEvent * );
201 virtual void updateLayout();
203 virtual void drawItems( QPainter *painter,
204 const QwtScaleMap &radialMap,
const QwtScaleMap &azimuthMap,
205 const QPointF &pole,
double radius,
206 const QRectF &canvasRect )
const;
212 void initPlot(
const QwtText & );