123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644 |
- .TH "QwtPolarItem" 3 "Fri Sep 19 2014" "Version 1.1.1" "Qwt Polar User's Guide" \" -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- QwtPolarItem \-
- .PP
- Base class for items on a polar plot\&.
- .SH SYNOPSIS
- .br
- .PP
- .PP
- \fC#include <qwt_polar_item\&.h>\fP
- .PP
- Inherited by \fBQwtPolarCurve\fP, \fBQwtPolarGrid\fP, \fBQwtPolarMarker\fP, and \fBQwtPolarSpectrogram\fP\&.
- .SS "Public Types"
- .in +1c
- .ti -1c
- .RI "enum \fBRttiValues\fP { \fBRtti_PolarItem\fP = 0, \fBRtti_PolarGrid\fP, \fBRtti_PolarMarker\fP, \fBRtti_PolarCurve\fP, \fBRtti_PolarSpectrogram\fP, \fBRtti_PolarUserItem\fP = 1000 }"
- .br
- .RI "\fIRuntime type information\&. \fP"
- .ti -1c
- .RI "enum \fBItemAttribute\fP { \fBLegend\fP = 0x01, \fBAutoScale\fP = 0x02 }"
- .br
- .RI "\fIPlot Item Attributes\&. \fP"
- .ti -1c
- .RI "enum \fBRenderHint\fP { \fBRenderAntialiased\fP = 0x01 }"
- .br
- .RI "\fIRender hints\&. \fP"
- .ti -1c
- .RI "typedef QFlags< \fBItemAttribute\fP > \fBItemAttributes\fP"
- .br
- .RI "\fIItem attributes\&. \fP"
- .ti -1c
- .RI "typedef QFlags< \fBRenderHint\fP > \fBRenderHints\fP"
- .br
- .RI "\fIItem attributes\&. \fP"
- .in -1c
- .SS "Public Member Functions"
- .in +1c
- .ti -1c
- .RI "\fBQwtPolarItem\fP (const QwtText &\fBtitle\fP=QwtText())"
- .br
- .ti -1c
- .RI "virtual \fB~QwtPolarItem\fP ()"
- .br
- .RI "\fIDestroy the \fBQwtPolarItem\fP\&. \fP"
- .ti -1c
- .RI "void \fBattach\fP (\fBQwtPolarPlot\fP *\fBplot\fP)"
- .br
- .RI "\fIAttach the item to a plot\&. \fP"
- .ti -1c
- .RI "void \fBdetach\fP ()"
- .br
- .RI "\fIThis method detaches a \fBQwtPolarItem\fP from the \fBQwtPolarPlot\fP it has been associated with\&. \fP"
- .ti -1c
- .RI "\fBQwtPolarPlot\fP * \fBplot\fP () const "
- .br
- .ti -1c
- .RI "void \fBsetTitle\fP (const QString &\fBtitle\fP)"
- .br
- .ti -1c
- .RI "void \fBsetTitle\fP (const QwtText &\fBtitle\fP)"
- .br
- .ti -1c
- .RI "const QwtText & \fBtitle\fP () const "
- .br
- .ti -1c
- .RI "virtual int \fBrtti\fP () const "
- .br
- .ti -1c
- .RI "void \fBsetItemAttribute\fP (\fBItemAttribute\fP, bool on=true)"
- .br
- .ti -1c
- .RI "bool \fBtestItemAttribute\fP (\fBItemAttribute\fP) const "
- .br
- .ti -1c
- .RI "void \fBsetRenderHint\fP (\fBRenderHint\fP, bool on=true)"
- .br
- .ti -1c
- .RI "bool \fBtestRenderHint\fP (\fBRenderHint\fP) const "
- .br
- .ti -1c
- .RI "void \fBsetRenderThreadCount\fP (uint numThreads)"
- .br
- .ti -1c
- .RI "uint \fBrenderThreadCount\fP () const "
- .br
- .ti -1c
- .RI "double \fBz\fP () const "
- .br
- .ti -1c
- .RI "void \fBsetZ\fP (double \fBz\fP)"
- .br
- .RI "\fISet the z value\&. \fP"
- .ti -1c
- .RI "void \fBshow\fP ()"
- .br
- .RI "\fIShow the item\&. \fP"
- .ti -1c
- .RI "void \fBhide\fP ()"
- .br
- .RI "\fIHide the item\&. \fP"
- .ti -1c
- .RI "virtual void \fBsetVisible\fP (bool)"
- .br
- .ti -1c
- .RI "bool \fBisVisible\fP () const "
- .br
- .ti -1c
- .RI "virtual void \fBitemChanged\fP ()"
- .br
- .ti -1c
- .RI "virtual void \fBlegendChanged\fP ()"
- .br
- .ti -1c
- .RI "virtual void \fBdraw\fP (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const =0"
- .br
- .RI "\fIDraw the item\&. \fP"
- .ti -1c
- .RI "virtual QwtInterval \fBboundingInterval\fP (int scaleId) const "
- .br
- .ti -1c
- .RI "virtual void \fBupdateScaleDiv\fP (const QwtScaleDiv &, const QwtScaleDiv &, const QwtInterval &)"
- .br
- .RI "\fIUpdate the item to changes of the axes scale division\&. \fP"
- .ti -1c
- .RI "virtual int \fBmarginHint\fP () const "
- .br
- .ti -1c
- .RI "void \fBsetLegendIconSize\fP (const QSize &)"
- .br
- .ti -1c
- .RI "QSize \fBlegendIconSize\fP () const "
- .br
- .ti -1c
- .RI "virtual QList< QwtLegendData > \fBlegendData\fP () const "
- .br
- .RI "\fIReturn all information, that is needed to represent the item on the legend\&. \fP"
- .ti -1c
- .RI "virtual QwtGraphic \fBlegendIcon\fP (int index, const QSizeF &) const "
- .br
- .in -1c
- .SH "Detailed Description"
- .PP
- Base class for items on a polar plot\&.
- A \fBQwtPolarItem\fP is 'something that can be painted on the canvas'\&. It is connected to the QwtPolar framework by a couple of virtual methods, that are individually implemented in derived item classes\&.
- .PP
- QwtPolar offers an implementation of the most common types of items, but deriving from \fBQwtPolarItem\fP makes it easy to implement additional types of items\&.
- .SH "Member Enumeration Documentation"
- .PP
- .SS "enum \fBQwtPolarItem::ItemAttribute\fP"
- .PP
- Plot Item Attributes\&.
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBsetItemAttribute()\fP, \fBtestItemAttribute()\fP
- .RE
- .PP
- .PP
- \fBEnumerator\fP
- .in +1c
- .TP
- \fB\fILegend \fP\fP
- The item is represented on the legend\&.
- .TP
- \fB\fIAutoScale \fP\fP
- The boundingRect() of the item is included in the autoscaling calculation\&.
- .SS "enum \fBQwtPolarItem::RenderHint\fP"
- .PP
- Render hints\&.
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBsetRenderHint()\fP, \fBtestRenderHint()\fP
- .RE
- .PP
- .PP
- \fBEnumerator\fP
- .in +1c
- .TP
- \fB\fIRenderAntialiased \fP\fP
- Enable antialiasing\&.
- .SS "enum \fBQwtPolarItem::RttiValues\fP"
- .PP
- Runtime type information\&. RttiValues is used to cast plot items, without having to enable runtime type information of the compiler\&.
- .PP
- \fBEnumerator\fP
- .in +1c
- .TP
- \fB\fIRtti_PolarItem \fP\fP
- Unspecific value, that can be used, when it doesn't matter\&.
- .TP
- \fB\fIRtti_PolarGrid \fP\fP
- For \fBQwtPolarGrid\fP\&.
- .TP
- \fB\fIRtti_PolarMarker \fP\fP
- For \fBQwtPolarMarker\fP\&.
- .TP
- \fB\fIRtti_PolarCurve \fP\fP
- For \fBQwtPolarCurve\fP\&.
- .TP
- \fB\fIRtti_PolarSpectrogram \fP\fP
- For \fBQwtPolarSpectrogram\fP\&.
- .TP
- \fB\fIRtti_PolarUserItem \fP\fP
- Values >= Rtti_PolarUserItem are reserved for plot items not implemented in the QwtPolar library\&.
- .SH "Constructor & Destructor Documentation"
- .PP
- .SS "QwtPolarItem::QwtPolarItem (const QwtText &title = \fCQwtText()\fP)\fC [explicit]\fP"
- Constructor
- .PP
- \fBParameters:\fP
- .RS 4
- \fItitle\fP Item title, f\&.e used on a legend
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBsetTitle()\fP
- .RE
- .PP
- .SH "Member Function Documentation"
- .PP
- .SS "void QwtPolarItem::attach (\fBQwtPolarPlot\fP *plot)"
- .PP
- Attach the item to a plot\&. This method will attach a \fBQwtPolarItem\fP to the \fBQwtPolarPlot\fP argument\&. It will first detach the \fBQwtPolarItem\fP from any plot from a previous call to attach (if necessary)\&. If a NULL argument is passed, it will detach from any \fBQwtPolarPlot\fP it was attached to\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIplot\fP Plot widget
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBQwtPolarItem::detach()\fP
- .RE
- .PP
- .SS "QwtInterval QwtPolarItem::boundingInterval (intscaleId) const\fC [virtual]\fP"
- Interval, that is necessary to display the item
- .PP
- This interval can be useful for operations like clipping or autoscaling For items ( like the grid ), where a bounding interval makes no sense an invalid interval is returned\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIscaleId\fP Scale id ( QwtPolar::Scale )
- .RE
- .PP
- \fBReturns:\fP
- .RS 4
- Bounding interval of the plot item for a specific scale
- .RE
- .PP
- .PP
- Reimplemented in \fBQwtPolarCurve\fP, \fBQwtPolarSpectrogram\fP, and \fBQwtPolarMarker\fP\&.
- .SS "void QwtPolarItem::detach ()"
- .PP
- This method detaches a \fBQwtPolarItem\fP from the \fBQwtPolarPlot\fP it has been associated with\&. \fBdetach()\fP is equivalent to calling attach( NULL )
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBattach()\fP
- .RE
- .PP
- .SS "virtual void QwtPolarItem::draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, doubleradius, const QRectF &canvasRect) const\fC [pure virtual]\fP"
- .PP
- Draw the item\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIpainter\fP Painter
- .br
- \fIazimuthMap\fP Maps azimuth values to values related to 0\&.0, M_2PI
- .br
- \fIradialMap\fP Maps radius values into painter coordinates\&.
- .br
- \fIpole\fP Position of the pole in painter coordinates
- .br
- \fIradius\fP Radius of the complete plot area in painter coordinates
- .br
- \fIcanvasRect\fP Contents rect of the canvas in painter coordinates
- .RE
- .PP
- .PP
- Implemented in \fBQwtPolarGrid\fP, \fBQwtPolarCurve\fP, \fBQwtPolarSpectrogram\fP, and \fBQwtPolarMarker\fP\&.
- .SS "bool QwtPolarItem::isVisible () const"
- .PP
- \fBReturns:\fP
- .RS 4
- true if visible
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBsetVisible()\fP, \fBshow()\fP, \fBhide()\fP
- .RE
- .PP
- .SS "void QwtPolarItem::itemChanged ()\fC [virtual]\fP"
- Update the legend and call \fBQwtPolarPlot::autoRefresh\fP for the parent plot\&.
- .PP
- \fBSee Also:\fP
- .RS 4
- updateLegend()
- .RE
- .PP
- .SS "void QwtPolarItem::legendChanged ()\fC [virtual]\fP"
- Update the legend of the parent plot\&.
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBQwtPolarPlot::updateLegend()\fP, \fBitemChanged()\fP
- .RE
- .PP
- .SS "QList< QwtLegendData > QwtPolarItem::legendData () const\fC [virtual]\fP"
- .PP
- Return all information, that is needed to represent the item on the legend\&. Most items are represented by one entry on the legend showing an icon and a text\&.
- .PP
- QwtLegendData is basically a list of QVariants that makes it possible to overload and reimplement \fBlegendData()\fP to return almost any type of information, that is understood by the receiver that acts as the legend\&.
- .PP
- The default implementation returns one entry with the \fBtitle()\fP of the item and the \fBlegendIcon()\fP\&.
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBtitle()\fP, \fBlegendIcon()\fP, QwtLegend
- .RE
- .PP
- .SS "QwtGraphic QwtPolarItem::legendIcon (intindex, const QSizeF &size) const\fC [virtual]\fP"
- .PP
- \fBReturns:\fP
- .RS 4
- Icon representing the item on the legend
- .RE
- .PP
- The default implementation returns an invalid icon
- .PP
- \fBParameters:\fP
- .RS 4
- \fIindex\fP Index of the legend entry ( usually there is only one )
- .br
- \fIsize\fP Icon size
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBsetLegendIconSize()\fP, \fBlegendData()\fP
- .RE
- .PP
- .PP
- Reimplemented in \fBQwtPolarCurve\fP\&.
- .SS "QSize QwtPolarItem::legendIconSize () const"
- .PP
- \fBReturns:\fP
- .RS 4
- Legend icon size
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBsetLegendIconSize()\fP, \fBlegendIcon()\fP
- .RE
- .PP
- .SS "int QwtPolarItem::marginHint () const\fC [virtual]\fP"
- Some items like to display something (f\&.e\&. the azimuth axis) outside of the area of the interval of the radial scale\&. The default implementation returns 0 pixels
- .PP
- \fBReturns:\fP
- .RS 4
- Hint for the margin
- .RE
- .PP
- .PP
- Reimplemented in \fBQwtPolarGrid\fP\&.
- .SS "\fBQwtPolarPlot\fP * QwtPolarItem::plot () const"
- .PP
- \fBReturns:\fP
- .RS 4
- Attached plot
- .RE
- .PP
- .SS "uint QwtPolarItem::renderThreadCount () const"
- .PP
- \fBReturns:\fP
- .RS 4
- Number of threads to be used for rendering\&. If numThreads() is set to 0, the system specific ideal thread count is used\&.
- .RE
- .PP
- .SS "int QwtPolarItem::rtti () const\fC [virtual]\fP"
- Return rtti for the specific class represented\&. \fBQwtPolarItem\fP is simply a virtual interface class, and base classes will implement this method with specific rtti values so a user can differentiate them\&.
- .PP
- The rtti value is useful for environments, where the runtime type information is disabled and it is not possible to do a dynamic_cast<\&.\&.\&.>\&.
- .PP
- \fBReturns:\fP
- .RS 4
- rtti value
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBRttiValues\fP
- .RE
- .PP
- .PP
- Reimplemented in \fBQwtPolarGrid\fP, \fBQwtPolarCurve\fP, \fBQwtPolarSpectrogram\fP, and \fBQwtPolarMarker\fP\&.
- .SS "void QwtPolarItem::setItemAttribute (\fBItemAttribute\fPattribute, boolon = \fCtrue\fP)"
- Toggle an item attribute
- .PP
- \fBParameters:\fP
- .RS 4
- \fIattribute\fP Attribute type
- .br
- \fIon\fP true/false
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBtestItemAttribute()\fP, \fBItemAttribute\fP
- .RE
- .PP
- .SS "void QwtPolarItem::setLegendIconSize (const QSize &size)"
- Set the size of the legend icon
- .PP
- The default setting is 8x8 pixels
- .PP
- \fBParameters:\fP
- .RS 4
- \fIsize\fP Size
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBlegendIconSize()\fP, \fBlegendIcon()\fP
- .RE
- .PP
- .SS "void QwtPolarItem::setRenderHint (\fBRenderHint\fPhint, boolon = \fCtrue\fP)"
- Toggle an render hint
- .PP
- \fBParameters:\fP
- .RS 4
- \fIhint\fP Render hint
- .br
- \fIon\fP true/false
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBtestRenderHint()\fP, \fBRenderHint\fP
- .RE
- .PP
- .SS "void QwtPolarItem::setRenderThreadCount (uintnumThreads)"
- On multi core systems rendering of certain plot item ( f\&.e \fBQwtPolarSpectrogram\fP ) can be done in parallel in several threads\&.
- .PP
- The default setting is set to 1\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fInumThreads\fP Number of threads to be used for rendering\&. If numThreads is set to 0, the system specific ideal thread count is used\&.
- .RE
- .PP
- The default thread count is 1 ( = no additional threads )
- .SS "void QwtPolarItem::setTitle (const QString &title)"
- Set a new title
- .PP
- \fBParameters:\fP
- .RS 4
- \fItitle\fP Title
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBtitle()\fP
- .RE
- .PP
- .SS "void QwtPolarItem::setTitle (const QwtText &title)"
- Set a new title
- .PP
- \fBParameters:\fP
- .RS 4
- \fItitle\fP Title
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBtitle()\fP
- .RE
- .PP
- .SS "void QwtPolarItem::setVisible (boolon)\fC [virtual]\fP"
- Show/Hide the item
- .PP
- \fBParameters:\fP
- .RS 4
- \fIon\fP Show if true, otherwise hide
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBisVisible()\fP, \fBshow()\fP, \fBhide()\fP
- .RE
- .PP
- .SS "void QwtPolarItem::setZ (doublez)"
- .PP
- Set the z value\&. Plot items are painted in increasing z-order\&.
- .PP
- \fBParameters:\fP
- .RS 4
- \fIz\fP Z-value
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBz()\fP, \fBQwtPolarItemDict::itemList()\fP
- .RE
- .PP
- .SS "bool QwtPolarItem::testItemAttribute (\fBItemAttribute\fPattribute) const"
- Test an item attribute
- .PP
- \fBParameters:\fP
- .RS 4
- \fIattribute\fP Attribute type
- .RE
- .PP
- \fBReturns:\fP
- .RS 4
- true/false
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBsetItemAttribute()\fP, \fBItemAttribute\fP
- .RE
- .PP
- .SS "bool QwtPolarItem::testRenderHint (\fBRenderHint\fPhint) const"
- Test a render hint
- .PP
- \fBParameters:\fP
- .RS 4
- \fIhint\fP Render hint
- .RE
- .PP
- \fBReturns:\fP
- .RS 4
- true/false
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBsetRenderHint()\fP, \fBRenderHint\fP
- .RE
- .PP
- .SS "const QwtText & QwtPolarItem::title () const"
- .PP
- \fBReturns:\fP
- .RS 4
- Title of the item
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBsetTitle()\fP
- .RE
- .PP
- .SS "void QwtPolarItem::updateScaleDiv (const QwtScaleDiv &azimuthScaleDiv, const QwtScaleDiv &radialScaleDiv, const QwtInterval &interval)\fC [virtual]\fP"
- .PP
- Update the item to changes of the axes scale division\&. Update the item, when the axes of plot have changed\&. The default implementation does nothing, but items that depend on the scale division (like \fBQwtPolarGrid()\fP) have to reimplement \fBupdateScaleDiv()\fP
- .PP
- \fBParameters:\fP
- .RS 4
- \fIazimuthScaleDiv\fP Scale division of the azimuth-scale
- .br
- \fIradialScaleDiv\fP Scale division of the radius-axis
- .br
- \fIinterval\fP The interval of the radius-axis, that is visible on the canvas
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- QwtPolarPlot::updateAxes()
- .RE
- .PP
- .PP
- Reimplemented in \fBQwtPolarGrid\fP\&.
- .SS "double QwtPolarItem::z () const"
- Plot items are painted in increasing z-order\&.
- .PP
- \fBReturns:\fP
- .RS 4
- Z value
- .RE
- .PP
- \fBSee Also:\fP
- .RS 4
- \fBsetZ()\fP, \fBQwtPolarItemDict::itemList()\fP
- .RE
- .PP
- .SH "Author"
- .PP
- Generated automatically by Doxygen for Qwt Polar User's Guide from the source code\&.
|