82 Q_PROPERTY( QBrush canvasBackground
83 READ canvasBackground WRITE setCanvasBackground )
85 Q_PROPERTY(
bool autoReplot READ autoReplot WRITE setAutoReplot )
108 explicit QwtPlot( QWidget* = NULL );
113 void setAutoReplot(
bool =
true );
114 bool autoReplot()
const;
125 void setTitle(
const QString& );
126 void setTitle(
const QwtText& );
134 void setFooter(
const QString& );
135 void setFooter(
const QwtText& );
143 void setCanvas( QWidget* );
146 const QWidget* canvas()
const;
148 void setCanvasBackground(
const QBrush& );
149 QBrush canvasBackground()
const;
153 double invTransform( QwtAxisId,
double pos )
const;
154 double transform( QwtAxisId,
double value )
const;
158 bool isAxisValid( QwtAxisId )
const;
160 void setAxisVisible( QwtAxisId,
bool on =
true );
161 bool isAxisVisible( QwtAxisId )
const;
169 void setAxisAutoScale( QwtAxisId,
bool on =
true );
170 bool axisAutoScale( QwtAxisId )
const;
172 void setAxisFont( QwtAxisId,
const QFont& );
173 QFont axisFont( QwtAxisId )
const;
175 void setAxisScale( QwtAxisId,
double min,
double max,
double stepSize = 0 );
176 void setAxisScaleDiv( QwtAxisId,
const QwtScaleDiv& );
179 double axisStepSize( QwtAxisId )
const;
181 const QwtScaleDiv& axisScaleDiv( QwtAxisId )
const;
189 void setAxisLabelAlignment( QwtAxisId, Qt::Alignment );
190 void setAxisLabelRotation( QwtAxisId,
double rotation );
192 void setAxisTitle( QwtAxisId,
const QString& );
193 void setAxisTitle( QwtAxisId,
const QwtText& );
194 QwtText axisTitle( QwtAxisId )
const;
196 void setAxisMaxMinor( QwtAxisId,
int maxMinor );
197 int axisMaxMinor( QwtAxisId )
const;
199 void setAxisMaxMajor( QwtAxisId,
int maxMajor );
200 int axisMaxMajor( QwtAxisId )
const;
215 virtual QSize sizeHint() const QWT_OVERRIDE;
216 virtual QSize minimumSizeHint() const QWT_OVERRIDE;
218 virtual
void updateLayout();
219 virtual
void drawCanvas( QPainter* );
222 void updateCanvasMargins();
224 virtual
void getCanvasMarginsHint(
225 const
QwtScaleMap maps[], const QRectF& canvasRect,
226 double& left,
double& top,
double& right,
double& bottom) const;
228 virtual
bool event( QEvent* ) QWT_OVERRIDE;
229 virtual
bool eventFilter( QObject*, QEvent* ) QWT_OVERRIDE;
231 virtual
void drawItems( QPainter*, const QRectF&,
235 virtual
QwtPlotItem* infoToItem( const QVariant& ) const;
245 axisCnt = QwtAxis::AxisPositions
248 void enableAxis(
int axisId,
bool on =
true )
250 setAxisVisible( axisId, on );
253 bool axisEnabled(
int axisId )
const
255 return isAxisVisible( axisId );
282 virtual void replot();
287 virtual void resizeEvent( QResizeEvent* ) QWT_OVERRIDE;
290 void updateLegendItems(
const QVariant& itemInfo,
298 void deleteAxesData();
299 void updateScaleDiv();
301 void initPlot(
const QwtText& title );
304 ScaleData* m_scaleData;
A class representing a text.
A Widget which displays a QwtText.