#include <PlotEnrichement.h>
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.
Following the above thoughts, it might help clarify the purpose of PlotEnrichement, Legend and ArrowMarker 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.
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. |
PlotEnrichement::PlotEnrichement | ( | ) |
double PlotEnrichement::bottom | ( | ) | [inline] |
QwtDoubleRect PlotEnrichement::boundingRect | ( | ) | const [virtual] |
Return bounding rectangle in plot coordinates.
Reimplemented in ArrowMarker, and ImageMarker.
References d_x_right, and d_y_bottom.
QRect PlotEnrichement::calculatePaintingRect | ( | ) | [private] |
QPoint PlotEnrichement::origin | ( | ) | const [inline] |
virtual QRect PlotEnrichement::rect | ( | ) | const [inline, virtual] |
double PlotEnrichement::right | ( | ) | [inline] |
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 ArrowMarker, and ImageMarker.
References calculatePaintingRect(), d_pos, d_size, d_x_right, and d_y_bottom.
void PlotEnrichement::setOrigin | ( | const QPoint & | p | ) |
Set QwtPlotMarker::value() in paint coordinates.
Reimplemented in ImageMarker.
References calculatePaintingRect(), d_pos, d_size, and updateBoundingRect().
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.
References d_pos, d_size, and updateBoundingRect().
void PlotEnrichement::setSize | ( | const QSize & | size | ) |
QSize PlotEnrichement::size | ( | ) | [inline] |
void PlotEnrichement::updateBoundingRect | ( | ) | [virtual] |
Reimplemented in ArrowMarker, and ImageMarker.
References d_pos, d_size, d_x_right, and d_y_bottom.
Referenced by setOrigin(), and setRect().
QPoint PlotEnrichement::d_pos [private] |
The position in paint coordiantes.
Reimplemented in ImageMarker.
Referenced by origin(), rect(), setBoundingRect(), setOrigin(), setRect(), and updateBoundingRect().
QSize PlotEnrichement::d_size [private] |
The size (in paint coordinates).
Reimplemented in ImageMarker.
Referenced by rect(), setBoundingRect(), setOrigin(), setRect(), size(), and updateBoundingRect().
double PlotEnrichement::d_x_right [private] |
The right side position in scale coordinates.
Reimplemented in ImageMarker.
Referenced by boundingRect(), calculatePaintingRect(), right(), setBoundingRect(), and updateBoundingRect().
double PlotEnrichement::d_y_bottom [private] |
The bottom side position in scale coordinates.
Reimplemented in ImageMarker.
Referenced by bottom(), boundingRect(), calculatePaintingRect(), setBoundingRect(), and updateBoundingRect().