Eneboo - Documentación para desarrolladores
Clases | Tipos públicos | Métodos públicos | Métodos protegidos
Referencia de la Clase QwtPlotRasterItem

A class, which displays raster data. Más...

#include <qwt_plot_rasteritem.h>

Diagrama de herencias de QwtPlotRasterItem
QwtPlotItem QwtLegendItemManager QwtPlotSpectrogram

Lista de todos los miembros.

Clases

class  PrivateData

Tipos públicos

enum  CachePolicy { NoCache, PaintCache, ScreenCache }

Métodos públicos

 QwtPlotRasterItem (const QString &title=QString::null)
 Constructor.
 QwtPlotRasterItem (const QwtText &title)
 Constructor.
virtual ~QwtPlotRasterItem ()
 Destructor.
void setAlpha (int alpha)
 Set an alpha value for the raster data.
int alpha () const
void setCachePolicy (CachePolicy)
CachePolicy cachePolicy () const
void invalidateCache ()
virtual void draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &rect) const
 Draw the raster data.
virtual QSize rasterHint (const QwtDoubleRect &) const
 Returns the recommended raster for a given rect.

Métodos protegidos

virtual QImage renderImage (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtDoubleRect &area) const =0

Descripción detallada

A class, which displays raster data.

Raster data is a grid of pixel values, that can be represented as a QImage. It is used for many types of information like spectrograms, cartograms, geographical maps ...

Often a plot has several types of raster data organized in layers. ( f.e a geographical map, with weather statistics ). Using setAlpha() raster items can be stacked easily.

QwtPlotRasterItem is only implemented for images of the following formats: QImage::Format_Indexed8, QImage::Format_ARGB32.

Ver también:
QwtPlotSpectrogram

Documentación de las enumeraciones miembro de la clase

  • NoCache
    renderImage() is called, whenever the item has to be repainted
  • PaintCache
    renderImage() is called, whenever the image cache is not valid, or the scales, or the size of the canvas has changed. This type of cache is only useful for improving the performance of hide/show operations. All other situations are already handled by the plot canvas cache.
  • ScreenCache
    The screen cache is an image in size of the screen. As long as the scales don't change the target image is scaled from the cache. This might improve the performance when resizing the plot widget, but suffers from scaling effects.

The default policy is NoCache

Valores de enumeraciones:
NoCache 
PaintCache 
ScreenCache 

Documentación del constructor y destructor

QwtPlotRasterItem::QwtPlotRasterItem ( const QString title = QString::null) [explicit]

Constructor.

QwtPlotRasterItem::QwtPlotRasterItem ( const QwtText title) [explicit]

Constructor.

QwtPlotRasterItem::~QwtPlotRasterItem ( ) [virtual]

Destructor.


Documentación de las funciones miembro

int QwtPlotRasterItem::alpha ( ) const
Devuelve:
Alpha value of the raster item
Ver también:
setAlpha()
QwtPlotRasterItem::CachePolicy QwtPlotRasterItem::cachePolicy ( ) const
Devuelve:
Cache policy
Ver también:
CachePolicy, setCachePolicy()
void QwtPlotRasterItem::draw ( QPainter painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRect canvasRect 
) const [virtual]

Draw the raster data.

Parámetros:
painterPainter
xMapX-Scale Map
yMapY-Scale Map
canvasRectContents rect of the plot canvas

Implementa QwtPlotItem.

Reimplementado en QwtPlotSpectrogram.

void QwtPlotRasterItem::invalidateCache ( )

Invalidate the paint cache

Ver también:
setCachePolicy
QSize QwtPlotRasterItem::rasterHint ( const QwtDoubleRect ) const [virtual]

Returns the recommended raster for a given rect.

F.e the raster hint can be used to limit the resolution of the image that is rendered.

The default implementation returns an invalid size (QSize()), what means: no hint.

Reimplementado en QwtPlotSpectrogram.

virtual QImage QwtPlotRasterItem::renderImage ( const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QwtDoubleRect area 
) const [protected, pure virtual]

Renders an image for an area

The format of the image must be QImage::Format_Indexed8, QImage::Format_RGB32 or QImage::Format_ARGB32

Parámetros:
xMapMaps x-values into pixel coordinates.
yMapMaps y-values into pixel coordinates.
areaRequested area for the image in scale coordinates

Implementado en QwtPlotSpectrogram.

void QwtPlotRasterItem::setAlpha ( int  alpha)

Set an alpha value for the raster data.

Often a plot has several types of raster data organized in layers. ( f.e a geographical map, with weather statistics ). Using setAlpha() raster items can be stacked easily.

The alpha value is a value [0, 255] to control the transparency of the image. 0 represents a fully transparent color, while 255 represents a fully opaque color.

Parámetros:
alphaAlpha value
  • alpha >= 0
    All alpha values of the pixels returned by renderImage() will be set to alpha, beside those with an alpha value of 0 (invalid pixels).
  • alpha < 0 The alpha values returned by renderImage() are not changed.

The default alpha value is -1.

Ver también:
alpha()
void QwtPlotRasterItem::setCachePolicy ( QwtPlotRasterItem::CachePolicy  policy)

Change the cache policy

The default policy is NoCache

Parámetros:
policyCache policy
Ver también:
CachePolicy, cachePolicy()

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'