PlotEnrichement Class Reference

#include <PlotEnrichement.h>

Inheritance diagram for PlotEnrichement:

ImageMarker LegendMarker LineMarker

List of all members.


Detailed Description

Draw images on a QwtPlot.

PlotEnrichement draws d_pic at the position specified by d_pos, scaled to d_size. d_file_name isn't used internally, but only provided to help Graph manage save/restore.

Future Plans

Add a QwtPlotItem subclass (PlotEnrichment ?) and make PlotEnrichement, LegendMarker and LineMarker subclasses of that. These (usually) don't really mark a specific point in a plot and they don't use the symbol/label functionality of QwtPlotMarker. Instead, it would make sense to provide a unified move/resize (or even general affine transformations via QMatrix) interface and support for positioning them either at fixed plot coordinates (like QwtPlotMarker) or at a fixed drawing position within a QwtPlot (like a QWidget child); leaving the choice of positioning policy to the user. If PlotEnrichment (ideas for a better name?) inherits from both QWidget and QwtPlotItem (which is luckily no QObject) and provides a unified drawing framework, its instances could be added directly to MultiLayer without the need for a dummy Graph in between. Could also help to avoid the hack in MultiLayer::updateMarkersBoundingRect().

Following the above thoughts, it might help clarify the purpose of PlotEnrichement, LegendMarker and LineMarker if they are renamed according to the new superclasse's name (e.g. ImageEnrichment, TextEnrichment and LineEnrichment).

See the documentation of SelectionMoveResizer for other advantages of this approach.

See also:
LegendMarker, LineMarker

Public Member Functions

double bottom ()
virtual QwtDoubleRect boundingRect () const
 Return bounding rectangle in plot coordinates.
QPoint origin () const
 Return position in paint coordinates.
 PlotEnrichement ()
virtual QRect rect () const
 Return bounding rectangle in paint coordinates.
double right ()
virtual void setBoundingRect (double left, double top, double right, double bottom)
 Set position (xValue() and yValue()), right and bottom values giving everything in plot coordinates.
void setOrigin (const QPoint &p)
 Set QwtPlotMarker::value() in paint coordinates.
virtual void setRect (int x, int y, int w, int h)
 Set value (position) and d_size, giving everything in paint coordinates.
void setSize (const QSize &size)
 Set d_size.
QSize size ()
 Return d_size.
virtual void updateBoundingRect ()

Private Member Functions

QRect calculatePaintingRect ()

Private Attributes

QPoint d_pos
 The position in paint coordiantes.
QSize d_size
 The size (in paint coordinates).
double d_x_right
 The right side position in scale coordinates.
double d_y_bottom
 The bottom side position in scale coordinates.

Constructor & Destructor Documentation

PlotEnrichement::PlotEnrichement (  ) 


Member Function Documentation

double PlotEnrichement::bottom (  )  [inline]

Reimplemented in ImageMarker.

QwtDoubleRect PlotEnrichement::boundingRect (  )  const [virtual]

Return bounding rectangle in plot coordinates.

Reimplemented in ImageMarker, LegendMarker, and LineMarker.

QRect PlotEnrichement::calculatePaintingRect (  )  [private]

QPoint PlotEnrichement::origin (  )  const [inline]

Return position in paint coordinates.

Reimplemented in ImageMarker.

virtual QRect PlotEnrichement::rect (  )  const [inline, virtual]

Return bounding rectangle in paint coordinates.

Reimplemented in ImageMarker, LegendMarker, and LineMarker.

double PlotEnrichement::right (  )  [inline]

Reimplemented in ImageMarker.

void PlotEnrichement::setBoundingRect ( double  left,
double  top,
double  right,
double  bottom 
) [virtual]

Set position (xValue() and yValue()), right and bottom values giving everything in plot coordinates.

Reimplemented in ImageMarker, and LineMarker.

void PlotEnrichement::setOrigin ( const QPoint &  p  ) 

Set QwtPlotMarker::value() in paint coordinates.

Reimplemented in ImageMarker, and LegendMarker.

void PlotEnrichement::setRect ( int  x,
int  y,
int  w,
int  h 
) [virtual]

Set value (position) and d_size, giving everything in paint coordinates.

Reimplemented in ImageMarker.

void PlotEnrichement::setSize ( const QSize &  size  ) 

Set d_size.

Reimplemented in ImageMarker.

QSize PlotEnrichement::size (  )  [inline]

Return d_size.

Reimplemented in ImageMarker.

void PlotEnrichement::updateBoundingRect (  )  [virtual]

Reimplemented in ImageMarker, and LineMarker.


Member Data Documentation

QPoint PlotEnrichement::d_pos [private]

The position in paint coordiantes.

Reimplemented in ImageMarker, and LegendMarker.

QSize PlotEnrichement::d_size [private]

The size (in paint coordinates).

Reimplemented in ImageMarker.

double PlotEnrichement::d_x_right [private]

The right side position in scale coordinates.

Reimplemented in ImageMarker.

double PlotEnrichement::d_y_bottom [private]

The bottom side position in scale coordinates.

Reimplemented in ImageMarker.


The documentation for this class was generated from the following files:
Generated on Mon Oct 15 06:11:43 2007 for QtiPlot by  doxygen 1.5.3