9 #ifndef QWT_POLAR_PLOT_H
10 #define QWT_POLAR_PLOT_H 1
13 #include "qwt_polar_global.h"
14 #include "qwt_double_interval.h"
15 #include "qwt_scale_map.h"
16 #include "qwt_polar.h"
17 #include "qwt_polar_point.h"
18 #include "qwt_polar_itemdict.h"
20 class QwtRoundScaleDraw;
49 Q_PROPERTY(QBrush plotBackground READ plotBackground WRITE setPlotBackground)
50 Q_PROPERTY(
double azimuthOrigin READ azimuthOrigin WRITE setAzimuthOrigin)
87 QwtPolarPlot(
const QwtText &title, QWidget *parent = NULL);
91 void setTitle(
const QString &);
92 void setTitle(
const QwtText &);
94 QwtText title()
const;
96 QwtTextLabel *titleLabel();
97 const QwtTextLabel *titleLabel()
const;
99 void setAutoReplot(
bool tf =
true);
100 bool autoReplot()
const;
102 void setAutoScale(
int scaleId);
103 bool hasAutoScale(
int scaleId)
const;
105 void setScaleMaxMinor(
int scaleId,
int maxMinor);
106 int scaleMaxMinor(
int scaleId)
const;
108 int scaleMaxMajor(
int scaleId)
const;
109 void setScaleMaxMajor(
int scaleId,
int maxMajor);
111 QwtScaleEngine *scaleEngine(
int scaleId);
112 const QwtScaleEngine *scaleEngine(
int scaleId)
const;
113 void setScaleEngine(
int scaleId, QwtScaleEngine *);
115 void setScale(
int scaleId,
double min,
double max,
double step = 0);
117 void setScaleDiv(
int scaleId,
const QwtScaleDiv &);
118 const QwtScaleDiv *scaleDiv(
int scaleId)
const;
119 QwtScaleDiv *scaleDiv(
int scaleId);
121 QwtScaleMap scaleMap(
int scaleId,
double radius)
const;
122 QwtScaleMap scaleMap(
int scaleId)
const;
124 void updateScale(
int scaleId);
126 double azimuthOrigin()
const;
132 double zoomFactor()
const;
134 virtual void polish();
141 void setPlotBackground (
const QBrush &c);
142 const QBrush& plotBackground()
const;
144 virtual void drawCanvas(QPainter *,
const QwtDoubleRect &)
const;
149 void insertLegend(QwtLegend *, LegendPosition = QwtPolarPlot::RightLegend,
150 double ratio = -1.0);
153 const QwtLegend *legend()
const;
159 QwtDoubleInterval visibleInterval()
const;
160 QwtDoubleRect plotRect()
const;
161 QwtDoubleRect plotRect(
const QRect &)
const;
163 int plotMarginHint()
const;
165 void renderTo(QPaintDevice &)
const;
166 virtual void renderTo(QPainter *,
const QRect &)
const;
198 void layoutChanged();
201 virtual void replot();
203 void setAzimuthOrigin(
double);
206 virtual void legendItemClicked();
207 virtual void legendItemChecked(
bool);
210 virtual bool event(QEvent *);
211 virtual void resizeEvent(QResizeEvent *);
213 virtual void updateLayout();
215 virtual void drawItems(QPainter *painter,
216 const QwtScaleMap &radialMap,
const QwtScaleMap &azimuthMap,
217 const QwtDoublePoint &pole,
double radius,
218 const QwtDoubleRect &canvasRect)
const;
220 virtual void renderTitle(QPainter *,
const QRect &)
const;
221 virtual void renderLegend(QPainter *,
const QRect &)
const;
222 virtual void renderLegendItem(QPainter *,
223 const QWidget *,
const QRect &)
const;
226 void initPlot(
const QwtText &);