QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Friends | List of all members
QwtPolarPlot Class Reference

A plotting widget, displaying a polar coordinate system. More...

#include <qwt_polar_plot.h>

Inheritance diagram for QwtPolarPlot:
QwtPolarItemDict

Classes

class  PrivateData
 

Public Types

enum  LegendPosition {
  LeftLegend , RightLegend , BottomLegend , TopLegend ,
  ExternalLegend
}
 Position of the legend, relative to the canvas. More...
 

Public Slots

virtual void replot ()
 Replot the plot.
 
void autoRefresh ()
 Auto refresh the plot.
 
void setAzimuthOrigin (double)
 Set the azimuth origin.
 

Signals

void itemAttached (QwtPolarItem *plotItem, bool on)
 A signal indicating, that an item has been attached/detached 表示绘图项已附加/分离的信号
 
void legendDataChanged (const QVariant &itemInfo, const QList< QwtLegendData > &data)
 A signal with the attributes how to update the legend entries for a plot item 包含如何更新绘图项图例条目属性的信号
 
void layoutChanged ()
 A signal that is emitted, whenever the layout of the plot has been recalculated 当绘图的布局重新计算时发出的信号
 

Public Member Functions

 QwtPolarPlot (QWidget *parent=nullptr)
 Constructor.
 
 QwtPolarPlot (const QwtText &title, QWidget *parent=nullptr)
 Constructor with title.
 
virtual ~QwtPolarPlot ()
 Destructor.
 
void setTitle (const QString &)
 Set the title.
 
void setTitle (const QwtText &)
 Set the title.
 
QwtText title () const
 Get the title.
 
QwtTextLabeltitleLabel ()
 Get the title label.
 
const QwtTextLabeltitleLabel () const
 Get the title label (const version)
 
void setAutoReplot (bool tf=true)
 Set auto replot.
 
bool autoReplot () const
 Get auto replot.
 
void setAutoScale (int scaleId)
 Set auto scale for a scale.
 
bool hasAutoScale (int scaleId) const
 Check if a scale has auto scale.
 
void setScaleMaxMinor (int scaleId, int maxMinor)
 Set the maximum number of minor ticks for a scale.
 
int scaleMaxMinor (int scaleId) const
 Get the maximum number of minor ticks for a scale.
 
int scaleMaxMajor (int scaleId) const
 Get the maximum number of major ticks for a scale.
 
void setScaleMaxMajor (int scaleId, int maxMajor)
 Set the maximum number of major ticks for a scale.
 
QwtScaleEnginescaleEngine (int scaleId)
 Get the scale engine for a scale.
 
const QwtScaleEnginescaleEngine (int scaleId) const
 Get the scale engine for a scale (const version)
 
void setScaleEngine (int scaleId, QwtScaleEngine *)
 Set the scale engine for a scale.
 
void setScale (int scaleId, double min, double max, double step=0)
 Set the scale for a scale.
 
void setScaleDiv (int scaleId, const QwtScaleDiv &)
 Set the scale division for a scale.
 
const QwtScaleDivscaleDiv (int scaleId) const
 Get the scale division for a scale (const version)
 
QwtScaleDivscaleDiv (int scaleId)
 Get the scale division for a scale.
 
QwtScaleMap scaleMap (int scaleId, double radius) const
 Get the scale map for a scale with radius.
 
QwtScaleMap scaleMap (int scaleId) const
 Get the scale map for a scale.
 
void updateScale (int scaleId)
 Update a scale.
 
double azimuthOrigin () const
 Get the azimuth origin.
 
void zoom (const QwtPointPolar &, double factor)
 Zoom to a position with a factor.
 
void unzoom ()
 Unzoom the plot.
 
QwtPointPolar zoomPos () const
 Get the zoom position.
 
double zoomFactor () const
 Get the zoom factor.
 
QwtPolarCanvascanvas ()
 Get the canvas.
 
const QwtPolarCanvascanvas () const
 Get the canvas (const version)
 
void setPlotBackground (const QBrush &c)
 Set the plot background.
 
const QBrush & plotBackground () const
 Get the plot background.
 
virtual void drawCanvas (QPainter *, const QRectF &) const
 Draw the canvas.
 
void insertLegend (QwtAbstractLegend *, LegendPosition=RightLegend, double ratio=-1.0)
 Insert a legend.
 
QwtAbstractLegendlegend ()
 Get the legend.
 
const QwtAbstractLegendlegend () const
 Get the legend (const version)
 
void updateLegend ()
 Update the legend.
 
void updateLegend (const QwtPolarItem *)
 Update the legend for an item.
 
QwtPolarLayoutplotLayout ()
 Get the plot layout.
 
const QwtPolarLayoutplotLayout () const
 Get the plot layout (const version)
 
QwtInterval visibleInterval () const
 Get the visible interval.
 
QRectF plotRect () const
 Get the plot rectangle.
 
QRectF plotRect (const QRectF &) const
 Get the plot rectangle for a given rectangle.
 
int plotMarginHint () const
 Get the plot margin hint.
 
virtual QVariant itemToInfo (QwtPolarItem *) const
 Convert an item to info.
 
virtual QwtPolarIteminfoToItem (const QVariant &) const
 Convert info to an item.
 
- Public Member Functions inherited from QwtPolarItemDict
 QwtPolarItemDict ()
 Constructor.
 
 ~QwtPolarItemDict ()
 Destructor.
 
void setAutoDelete (bool)
 Set auto delete.
 
bool autoDelete () const
 Get auto delete.
 
const QwtPolarItemListitemList () const
 Get the item list.
 
void detachItems (int rtti=QwtPolarItem::Rtti_PolarItem, bool autoDelete=true)
 Detach items.
 

Protected Member Functions

virtual bool event (QEvent *) override
 Handle events.
 
virtual void resizeEvent (QResizeEvent *) override
 Handle resize events.
 
virtual void updateLayout ()
 Update the layout.
 
virtual void drawItems (QPainter *painter, const QwtScaleMap &radialMap, const QwtScaleMap &azimuthMap, const QPointF &pole, double radius, const QRectF &canvasRect) const
 Draw items.
 
- Protected Member Functions inherited from QwtPolarItemDict
void insertItem (QwtPolarItem *)
 Insert an item.
 
void removeItem (QwtPolarItem *)
 Remove an item.
 

Properties

QBrush plotBackground
 
double azimuthOrigin
 

Friends

class QwtPolarItem
 

Detailed Description

A plotting widget, displaying a polar coordinate system.

Member Enumeration Documentation

◆ LegendPosition

Position of the legend, relative to the canvas.

Enumerator
LeftLegend 

The legend will be left from the canvas.

RightLegend 

The legend will be right from the canvas.

BottomLegend 

The legend will be below the canvas.

TopLegend 

The legend will be between canvas and title.

ExternalLegend 

External means that only the content of the legend will be handled by QwtPlot, but not its geometry. This might be interesting if an application wants to have a legend in an external window ( or on the canvas ).

Note
The legend is not painted by QwtPolarRenderer

Constructor & Destructor Documentation

◆ QwtPolarPlot() [1/2]

QwtPolarPlot::QwtPolarPlot ( QWidget *  parent = nullptr)
explicit

Constructor.

◆ QwtPolarPlot() [2/2]

QwtPolarPlot::QwtPolarPlot ( const QwtText title,
QWidget *  parent = nullptr 
)

Constructor with title.

◆ ~QwtPolarPlot()

QwtPolarPlot::~QwtPolarPlot ( )
virtual

Destructor.

Destructor

.

Member Function Documentation

◆ autoRefresh

void QwtPolarPlot::autoRefresh ( )
slot

Auto refresh the plot.

Replots the plot if autoReplot() is true

.

◆ autoReplot()

bool QwtPolarPlot::autoReplot ( ) const

Get auto replot.

Check if autoReplot option is set.

◆ azimuthOrigin()

double QwtPolarPlot::azimuthOrigin ( ) const

Get the azimuth origin.

Get the origin of the azimuth scale.

◆ canvas() [1/2]

QwtPolarCanvas * QwtPolarPlot::canvas ( )

Get the canvas.

Get the plot's canvas.

◆ canvas() [2/2]

const QwtPolarCanvas * QwtPolarPlot::canvas ( ) const

Get the canvas (const version)

Get the plot's canvas (const version)

◆ drawCanvas()

void QwtPolarPlot::drawCanvas ( QPainter *  painter,
const QRectF &  canvasRect 
) const
virtual

Draw the canvas.

Redraw the canvas.

◆ drawItems()

void QwtPolarPlot::drawItems ( QPainter *  painter,
const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
double  radius,
const QRectF &  canvasRect 
) const
protectedvirtual

Draw items.

Redraw the canvas items.

◆ event()

bool QwtPolarPlot::event ( QEvent *  e)
overrideprotectedvirtual

Handle events.

Qt event handler.

◆ hasAutoScale()

bool QwtPolarPlot::hasAutoScale ( int  scaleId) const

Check if a scale has auto scale.

Check if autoscaling is enabled.

◆ infoToItem()

QwtPolarItem * QwtPolarPlot::infoToItem ( const QVariant &  itemInfo) const
virtual

Convert info to an item.

Identify the plot item according to an item info object.

◆ insertLegend()

void QwtPolarPlot::insertLegend ( QwtAbstractLegend legend,
QwtPolarPlot::LegendPosition  pos = RightLegend,
double  ratio = -1.0 
)

Insert a legend.

◆ itemAttached

void QwtPolarPlot::itemAttached ( QwtPolarItem plotItem,
bool  on 
)
signal

A signal indicating, that an item has been attached/detached 表示绘图项已附加/分离的信号

Parameters
plotItemPlot item / 绘图项
onAttached/Detached / 附加/分离

◆ itemToInfo()

QVariant QwtPolarPlot::itemToInfo ( QwtPolarItem plotItem) const
virtual

Convert an item to info.

Build an information object to identify a plot item on the legend.

◆ legend() [1/2]

QwtAbstractLegend * QwtPolarPlot::legend ( )

Get the legend.

Get the plot's legend.

◆ legend() [2/2]

const QwtAbstractLegend * QwtPolarPlot::legend ( ) const

Get the legend (const version)

Get the plot's legend (const version)

◆ legendDataChanged

void QwtPolarPlot::legendDataChanged ( const QVariant &  itemInfo,
const QList< QwtLegendData > &  data 
)
signal

A signal with the attributes how to update the legend entries for a plot item 包含如何更新绘图项图例条目属性的信号

Parameters
itemInfoInfo about a plot, build from itemToInfo() / 关于绘图的信息,由 itemToInfo() 构建
dataAttributes of the entries ( usually <= 1 ) for the plot item / 绘图项的条目属性(通常 <= 1)
See also
itemToInfo(), infoToItem(), QwtAbstractLegend::updateLegend()

◆ plotBackground()

const QBrush & QwtPolarPlot::plotBackground ( ) const

Get the plot background.

Get the plot background brush.

◆ plotLayout() [1/2]

QwtPolarLayout * QwtPolarPlot::plotLayout ( )

Get the plot layout.

Get the layout responsible for geometry of plot components.

◆ plotLayout() [2/2]

const QwtPolarLayout * QwtPolarPlot::plotLayout ( ) const

Get the plot layout (const version)

Get the layout responsible for geometry of plot components (const version)

◆ plotMarginHint()

int QwtPolarPlot::plotMarginHint ( ) const

Get the plot margin hint.

Get the maximum of all item margin hints.

◆ plotRect() [1/2]

QRectF QwtPolarPlot::plotRect ( ) const

Get the plot rectangle.

Get the bounding rect of the plot area.

◆ plotRect() [2/2]

QRectF QwtPolarPlot::plotRect ( const QRectF &  canvasRect) const

Get the plot rectangle for a given rectangle.

Calculate the bounding rect of the plot area.

◆ replot

void QwtPolarPlot::replot ( )
virtualslot

Replot the plot.

Redraw the plot.

◆ resizeEvent()

void QwtPolarPlot::resizeEvent ( QResizeEvent *  e)
overrideprotectedvirtual

Handle resize events.

Resize and update internal layout.

◆ scaleDiv() [1/2]

QwtScaleDiv * QwtPolarPlot::scaleDiv ( int  scaleId)

Get the scale division for a scale.

Return the scale division of a specified scale.

◆ scaleDiv() [2/2]

const QwtScaleDiv * QwtPolarPlot::scaleDiv ( int  scaleId) const

Get the scale division for a scale (const version)

Return the scale division of a specified scale.

◆ scaleEngine() [1/2]

QwtScaleEngine * QwtPolarPlot::scaleEngine ( int  scaleId)

Get the scale engine for a scale.

Get scale engine for a specific scale.

◆ scaleEngine() [2/2]

const QwtScaleEngine * QwtPolarPlot::scaleEngine ( int  scaleId) const

Get the scale engine for a scale (const version)

Get scale engine for a specific scale (const version)

◆ scaleMap() [1/2]

QwtScaleMap QwtPolarPlot::scaleMap ( int  scaleId) const

Get the scale map for a scale.

Build a scale map.

◆ scaleMap() [2/2]

QwtScaleMap QwtPolarPlot::scaleMap ( int  scaleId,
double  radius 
) const

Get the scale map for a scale with radius.

Build a scale map with specified radius.

◆ scaleMaxMajor()

int QwtPolarPlot::scaleMaxMajor ( int  scaleId) const

Get the maximum number of major ticks for a scale.

Get the maximum number of major ticks for a specified axis.

◆ scaleMaxMinor()

int QwtPolarPlot::scaleMaxMinor ( int  scaleId) const

Get the maximum number of minor ticks for a scale.

Get the maximum number of minor ticks for a specified axis.

◆ setAutoReplot()

void QwtPolarPlot::setAutoReplot ( bool  enable = true)

Set auto replot.

Set or reset the autoReplot option.

◆ setAutoScale()

void QwtPolarPlot::setAutoScale ( int  scaleId)

Set auto scale for a scale.

Enable autoscaling.

◆ setAzimuthOrigin

void QwtPolarPlot::setAzimuthOrigin ( double  origin)
slot

Set the azimuth origin.

Change the origin of the azimuth scale.

◆ setPlotBackground()

void QwtPolarPlot::setPlotBackground ( const QBrush &  brush)

Set the plot background.

Set the background of the plot area.

◆ setScale()

void QwtPolarPlot::setScale ( int  scaleId,
double  min,
double  max,
double  stepSize = 0 
)

Set the scale for a scale.

Disable autoscaling and specify a fixed scale for a selected scale.

◆ setScaleDiv()

void QwtPolarPlot::setScaleDiv ( int  scaleId,
const QwtScaleDiv scaleDiv 
)

Set the scale division for a scale.

Disable autoscaling and specify a fixed scale for a selected scale.

◆ setScaleEngine()

void QwtPolarPlot::setScaleEngine ( int  scaleId,
QwtScaleEngine scaleEngine 
)

Set the scale engine for a scale.

Change the scale engine for an axis.

◆ setScaleMaxMajor()

void QwtPolarPlot::setScaleMaxMajor ( int  scaleId,
int  maxMajor 
)

Set the maximum number of major ticks for a scale.

Set the maximum number of major scale intervals for a specified scale.

◆ setScaleMaxMinor()

void QwtPolarPlot::setScaleMaxMinor ( int  scaleId,
int  maxMinor 
)

Set the maximum number of minor ticks for a scale.

Set the maximum number of minor scale intervals for a specified scale.

◆ setTitle() [1/2]

void QwtPolarPlot::setTitle ( const QString &  title)

Set the title.

Change the plot's title.

◆ setTitle() [2/2]

void QwtPolarPlot::setTitle ( const QwtText title)

Set the title.

Change the plot's title.

◆ title()

QwtText QwtPolarPlot::title ( ) const

Get the title.

Get the plot's title.

◆ titleLabel() [1/2]

QwtTextLabel * QwtPolarPlot::titleLabel ( )

Get the title label.

Get the title label widget.

◆ titleLabel() [2/2]

const QwtTextLabel * QwtPolarPlot::titleLabel ( ) const

Get the title label (const version)

Get the title label widget (const version)

◆ unzoom()

void QwtPolarPlot::unzoom ( )

Unzoom the plot.

◆ updateLayout()

void QwtPolarPlot::updateLayout ( )
protectedvirtual

Update the layout.

Rebuild the layout

.

◆ updateLegend() [1/2]

void QwtPolarPlot::updateLegend ( )

Update the legend.

Emit legendDataChanged() for all plot items.

◆ updateLegend() [2/2]

void QwtPolarPlot::updateLegend ( const QwtPolarItem plotItem)

Update the legend for an item.

Emit legendDataChanged() for a plot item.

◆ updateScale()

void QwtPolarPlot::updateScale ( int  scaleId)

Update a scale.

Rebuild the scale.

◆ visibleInterval()

QwtInterval QwtPolarPlot::visibleInterval ( ) const

Get the visible interval.

Get the bounding interval of the radial scale visible on canvas.

◆ zoom()

void QwtPolarPlot::zoom ( const QwtPointPolar zoomPos,
double  zoomFactor 
)

Zoom to a position with a factor.

Translate and in/decrease the zoom factor.

◆ zoomFactor()

double QwtPolarPlot::zoomFactor ( ) const

Get the zoom factor.

◆ zoomPos()

QwtPointPolar QwtPolarPlot::zoomPos ( ) const

Get the zoom position.


The documentation for this class was generated from the following files: