Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
QwtPlotVectorField Class Reference

#include <qwt_plot_vectorfield.h>

Inheritance diagram for QwtPlotVectorField:
Inheritance graph
[legend]

Classes

class  PrivateData
 

Public Types

enum  IndicatorOrigin { OriginHead, OriginTail, OriginCenter }
 
enum  MagnitudeMode { MagnitudeAsColor = 0x01, MagnitudeAsLength = 0x02 }
 
typedef QFlags< MagnitudeModeMagnitudeModes
 Paint attributes. More...
 
enum  PaintAttribute { FilterVectors = 0x01, LimitLength = 0x02 }
 
typedef QFlags< PaintAttributePaintAttributes
 Paint attributes. More...
 
- Public Types inherited from QwtPlotItem
enum  ItemAttribute { Legend = 0x01, AutoScale = 0x02, Margins = 0x04 }
 Plot Item Attributes. More...
 
typedef QFlags< ItemAttributeItemAttributes
 Plot Item Attributes. More...
 
enum  ItemInterest { ScaleInterest = 0x01, LegendInterest = 0x02 }
 Plot Item Interests. More...
 
typedef QFlags< ItemInterestItemInterests
 Plot Item Interests. More...
 
enum  RenderHint { RenderAntialiased = 0x1 }
 Render hints. More...
 
typedef QFlags< RenderHintRenderHints
 Render hints. More...
 
enum  RttiValues {
  Rtti_PlotItem = 0, Rtti_PlotGrid, Rtti_PlotScale, Rtti_PlotLegend,
  Rtti_PlotMarker, Rtti_PlotCurve, Rtti_PlotSpectroCurve, Rtti_PlotIntervalCurve,
  Rtti_PlotHistogram, Rtti_PlotSpectrogram, Rtti_PlotGraphic, Rtti_PlotTradingCurve,
  Rtti_PlotBarChart, Rtti_PlotMultiBarChart, Rtti_PlotShape, Rtti_PlotTextLabel,
  Rtti_PlotZone, Rtti_PlotVectorField, Rtti_PlotUserItem = 1000
}
 Runtime type information. More...
 

Public Member Functions

virtual double arrowLength (double magnitude) const
 
virtual QRectF boundingRect () const QWT_OVERRIDE
 
QBrush brush () const
 
const QwtColorMapcolorMap () const
 
virtual void drawSeries (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const QWT_OVERRIDE
 
IndicatorOrigin indicatorOrigin () const
 
virtual QwtGraphic legendIcon (int index, const QSizeF &) const QWT_OVERRIDE
 
MagnitudeModes magnitudeModes () const
 
double magnitudeScaleFactor () const
 
QPen pen () const
 
 QwtPlotVectorField (const QString &title=QString())
 
 QwtPlotVectorField (const QwtText &title)
 
QSizeF rasterSize () const
 
virtual int rtti () const QWT_OVERRIDE
 
void setBrush (const QBrush &)
 
void setColorMap (QwtColorMap *)
 
void setIndicatorOrigin (IndicatorOrigin)
 
void setMagnitudeMode (MagnitudeMode, bool on=true)
 
void setMagnitudeModes (MagnitudeModes)
 
void setMagnitudeRange (const QwtInterval &magnitudeRange)
 
void setMagnitudeScaleFactor (double factor)
 
void setPaintAttribute (PaintAttribute, bool on=true)
 
void setPen (const QPen &)
 
void setRasterSize (const QSizeF &)
 
void setSamples (const QVector< QwtVectorFieldSample > &)
 
void setSamples (QwtVectorFieldData *)
 
void setSymbol (QwtVectorFieldSymbol *)
 
const QwtVectorFieldSymbolsymbol () const
 
bool testMagnitudeMode (MagnitudeMode) const
 
bool testPaintAttribute (PaintAttribute) const
 
virtual ~QwtPlotVectorField ()
 Destructor. More...
 
- Public Member Functions inherited from QwtPlotSeriesItem
virtual void draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const QWT_OVERRIDE
 Draw the complete series. More...
 
Qt::Orientation orientation () const
 
 QwtPlotSeriesItem (const QString &title=QString())
 
 QwtPlotSeriesItem (const QwtText &title)
 
void setOrientation (Qt::Orientation)
 
virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) QWT_OVERRIDE
 Update the item to changes of the axes scale division. More...
 
virtual ~QwtPlotSeriesItem ()
 Destructor. More...
 
- Public Member Functions inherited from QwtPlotItem
void attach (QwtPlot *plot)
 Attach the item to a plot. More...
 
void detach ()
 This method detaches a QwtPlotItem from any QwtPlot it has been associated with. More...
 
virtual void getCanvasMarginHint (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const
 Calculate a hint for the canvas margin. More...
 
void hide ()
 Hide the item. More...
 
bool isVisible () const
 
virtual void itemChanged ()
 
virtual void legendChanged ()
 
virtual QList< QwtLegendDatalegendData () const
 Return all information, that is needed to represent the item on the legend. More...
 
QSize legendIconSize () const
 
QRectF paintRect (const QwtScaleMap &, const QwtScaleMap &) const
 Calculate the bounding paint rectangle of 2 maps. More...
 
QwtPlotplot () const
 Return attached plot. More...
 
 QwtPlotItem ()
 
 QwtPlotItem (const QString &title)
 
 QwtPlotItem (const QwtText &title)
 
uint renderThreadCount () const
 
QRectF scaleRect (const QwtScaleMap &, const QwtScaleMap &) const
 Calculate the bounding scale rectangle of 2 maps. More...
 
void setAxes (int xAxis, int yAxis)
 
void setItemAttribute (ItemAttribute, bool on=true)
 
void setItemInterest (ItemInterest, bool on=true)
 
void setLegendIconSize (const QSize &)
 
void setRenderHint (RenderHint, bool on=true)
 
void setRenderThreadCount (uint numThreads)
 
void setTitle (const QString &title)
 
void setTitle (const QwtText &title)
 
virtual void setVisible (bool)
 
void setXAxis (int axis)
 
void setYAxis (int axis)
 
void setZ (double z)
 Set the z value. More...
 
void show ()
 Show the item. More...
 
bool testItemAttribute (ItemAttribute) const
 
bool testItemInterest (ItemInterest) const
 
bool testRenderHint (RenderHint) const
 
const QwtTexttitle () const
 
virtual void updateLegend (const QwtPlotItem *, const QList< QwtLegendData > &)
 Update the item to changes of the legend info. More...
 
int xAxis () const
 Return xAxis. More...
 
int yAxis () const
 Return yAxis. More...
 
double z () const
 
virtual ~QwtPlotItem ()
 Destroy the QwtPlotItem. More...
 
- Public Member Functions inherited from QwtAbstractSeriesStore
virtual ~QwtAbstractSeriesStore ()
 Destructor. More...
 
- Public Member Functions inherited from QwtSeriesStore< QwtVectorFieldSample >
QwtSeriesData< QwtVectorFieldSample > * data ()
 
const QwtSeriesData< QwtVectorFieldSample > * data () const
 
virtual QRectF dataRect () const QWT_OVERRIDE
 
virtual size_t dataSize () const QWT_OVERRIDE
 
 QwtSeriesStore ()
 Constructor The store contains no series. More...
 
QwtVectorFieldSample sample (int index) const
 
void setData (QwtSeriesData< QwtVectorFieldSample > *series)
 
virtual void setRectOfInterest (const QRectF &rect) QWT_OVERRIDE
 
QwtSeriesData< QwtVectorFieldSample > * swapData (QwtSeriesData< QwtVectorFieldSample > *series)
 
 ~QwtSeriesStore ()
 Destructor. More...
 

Protected Member Functions

virtual void dataChanged () QWT_OVERRIDE
 dataChanged() indicates, that the series has been changed. More...
 
virtual void drawSymbol (QPainter *, double x, double y, double vx, double vy) const
 
virtual void drawSymbols (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const
 
- Protected Member Functions inherited from QwtPlotItem
QwtGraphic defaultIcon (const QBrush &, const QSizeF &) const
 Return a default icon from a brush. More...
 

Private Member Functions

void init ()
 Initialize data members. More...
 

Private Attributes

PrivateDatad_data
 

Detailed Description

Definition at line 21 of file qwt_plot_vectorfield.h.

Member Typedef Documentation

Paint attributes.

Definition at line 52 of file qwt_plot_vectorfield.h.

Paint attributes.

Definition at line 43 of file qwt_plot_vectorfield.h.

Member Enumeration Documentation

Enumerator
OriginHead 
OriginTail 
OriginCenter 

Definition at line 25 of file qwt_plot_vectorfield.h.

Enumerator
MagnitudeAsColor 
MagnitudeAsLength 

Definition at line 45 of file qwt_plot_vectorfield.h.

Attributes to modify the rendering

See also
setPaintAttribute(), testPaintAttribute()
Enumerator
FilterVectors 
LimitLength 

Definition at line 36 of file qwt_plot_vectorfield.h.

Constructor & Destructor Documentation

QwtPlotVectorField::QwtPlotVectorField ( const QString &  title = QString())
explicit

Constructor

Parameters
titleTitle of the curve

Definition at line 296 of file qwt_plot_vectorfield.cpp.

QwtPlotVectorField::QwtPlotVectorField ( const QwtText title)
explicit

Constructor

Parameters
titleTitle of the curve

Definition at line 286 of file qwt_plot_vectorfield.cpp.

QwtPlotVectorField::~QwtPlotVectorField ( )
virtual

Destructor.

Definition at line 303 of file qwt_plot_vectorfield.cpp.

Member Function Documentation

double QwtPlotVectorField::arrowLength ( double  magnitude) const
virtual

Computes length of the arrow in screen coordinate units based on its magnitude. Default implementation simply scales the vector using the magnitudeScaleFactor property. Re-implement this function to provide special handling for zero/non-zero magnitude arrows, or impose minimum/maximum arrow length limits.

Returns
Length of arrow to be drawn in dependence of vector magnitude.
See also
setMagnitudeScaleFactor

Definition at line 568 of file qwt_plot_vectorfield.cpp.

QRectF QwtPlotVectorField::boundingRect ( ) const
virtual
Returns
An invalid bounding rect: QRectF(1.0, 1.0, -2.0, -2.0)
Note
A width or height < 0.0 is ignored by the autoscaler

Reimplemented from QwtPlotSeriesItem.

Definition at line 594 of file qwt_plot_vectorfield.cpp.

QBrush QwtPlotVectorField::brush ( ) const

Definition at line 349 of file qwt_plot_vectorfield.cpp.

const QwtColorMap * QwtPlotVectorField::colorMap ( ) const
Returns
Color Map used for mapping the intensity values to colors
See also
setColorMap()

Definition at line 544 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::dataChanged ( )
protectedvirtual

dataChanged() indicates, that the series has been changed.

Reimplemented from QwtPlotSeriesItem.

Definition at line 853 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::drawSeries ( QPainter *  painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRectF &  canvasRect,
int  from,
int  to 
) const
virtual

Draw a subset of the points

Parameters
painterPainter
xMapMaps x-values into pixel coordinates.
yMapMaps y-values into pixel coordinates.
canvasRectContents rectangle of the canvas
fromIndex of the first sample to be painted
toIndex of the last sample to be painted. If to < 0 the series will be painted to its last sample.
See also
drawDots()

Implements QwtPlotSeriesItem.

Definition at line 646 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::drawSymbol ( QPainter *  painter,
double  x,
double  y,
double  vx,
double  vy 
) const
protectedvirtual

Definition at line 794 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::drawSymbols ( QPainter *  painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRectF &  canvasRect,
int  from,
int  to 
) const
protectedvirtual

Definition at line 674 of file qwt_plot_vectorfield.cpp.

QwtPlotVectorField::IndicatorOrigin QwtPlotVectorField::indicatorOrigin ( ) const

Definition at line 364 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::init ( )
private

Initialize data members.

Definition at line 311 of file qwt_plot_vectorfield.cpp.

QwtGraphic QwtPlotVectorField::legendIcon ( int  index,
const QSizeF &  size 
) const
virtual
Returns
Icon representing the item on the legend

The default implementation returns an invalid icon

Parameters
indexIndex of the legend entry ( usually there is only one )
sizeIcon size
See also
setLegendIconSize(), legendData()

Reimplemented from QwtPlotItem.

Definition at line 607 of file qwt_plot_vectorfield.cpp.

QwtPlotVectorField::MagnitudeModes QwtPlotVectorField::magnitudeModes ( ) const

Definition at line 485 of file qwt_plot_vectorfield.cpp.

double QwtPlotVectorField::magnitudeScaleFactor ( ) const

Definition at line 378 of file qwt_plot_vectorfield.cpp.

QPen QwtPlotVectorField::pen ( ) const

Definition at line 333 of file qwt_plot_vectorfield.cpp.

QSizeF QwtPlotVectorField::rasterSize ( ) const

Definition at line 392 of file qwt_plot_vectorfield.cpp.

int QwtPlotVectorField::rtti ( ) const
virtual
Returns
QwtPlotItem::Rtti_PlotField

Reimplemented from QwtPlotItem.

Definition at line 432 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setBrush ( const QBrush &  brush)

Definition at line 338 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setColorMap ( QwtColorMap colorMap)

Change the color map

Often it is useful to display the mapping between intensities and colors as an additional plot axis, showing a color bar.

Parameters
colorMapColor Map
See also
colorMap(), QwtScaleWidget::setColorBarEnabled(), QwtScaleWidget::setColorMap()

Definition at line 525 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setIndicatorOrigin ( IndicatorOrigin  origin)

Definition at line 354 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setMagnitudeMode ( MagnitudeMode  mode,
bool  on = true 
)

Definition at line 437 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setMagnitudeModes ( MagnitudeModes  modes)

Definition at line 455 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setMagnitudeRange ( const QwtInterval magnitudeRange)

Sets the min/max magnitudes to be used for color map lookups. If invalid (min=max=0 or negative values), the range is determined from the current range of magnitudes in the vector samples.

Definition at line 554 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setMagnitudeScaleFactor ( double  factor)

Definition at line 369 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setPaintAttribute ( PaintAttribute  attribute,
bool  on = true 
)

Specify an attribute how to draw the curve

Parameters
attributePaint attribute
onOn/Off
See also
testPaintAttribute()

Definition at line 404 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setPen ( const QPen &  pen)

Definition at line 322 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setRasterSize ( const QSizeF &  size)

Definition at line 383 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setSamples ( const QVector< QwtVectorFieldSample > &  samples)

Initialize data with an array of samples.

Parameters
samplesVector of points

Definition at line 494 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setSamples ( QwtVectorFieldData data)

Assign a series of samples

setSamples() is just a wrapper for setData() without any additional value - beside that it is easier to find for the developer.

Parameters
dataData
Warning
The item takes ownership of the data object, deleting it when its not used anymore.

Definition at line 509 of file qwt_plot_vectorfield.cpp.

void QwtPlotVectorField::setSymbol ( QwtVectorFieldSymbol symbol)

Sets a new arrow symbol (implementation of arrow drawing code). Ownership is transferred to QwtPlotVectorField.

Definition at line 468 of file qwt_plot_vectorfield.cpp.

const QwtVectorFieldSymbol * QwtPlotVectorField::symbol ( ) const

Definition at line 480 of file qwt_plot_vectorfield.cpp.

bool QwtPlotVectorField::testMagnitudeMode ( MagnitudeMode  mode) const

Definition at line 450 of file qwt_plot_vectorfield.cpp.

bool QwtPlotVectorField::testPaintAttribute ( PaintAttribute  attribute) const
Returns
True, when attribute is enabled
See also
PaintAttribute, setPaintAttribute()

Definition at line 425 of file qwt_plot_vectorfield.cpp.

Member Data Documentation

PrivateData* QwtPlotVectorField::d_data
private

Definition at line 119 of file qwt_plot_vectorfield.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:50