#include <LegendMarker.h>

Contrary to its name, LegendMarker is not just used for the plot legend, but for any kind of text; particularly also for the "Add Text" tool. Accordingly, it is also referred to as "TextMarker" by other classes.
Public Types | |
| enum | FrameStyle { None = 0, Line = 1, Shadow = 2 } |
| The kinds of frame a LegendMarker can draw around the Text. More... | |
Public Member Functions | |
| int | angle () |
| QColor | backgroundColor () |
| virtual QwtDoubleRect | boundingRect () const |
| Bounding rectangle in plot coordinates. | |
| QFont | font () |
| int | frameStyle () |
| LegendMarker (Plot *) | |
| QRect | rect () const |
| Bounding rectangle in paint coordinates. | |
| void | setAngle (int ang) |
| void | setBackgroundColor (const QColor &c) |
| void | setFont (const QFont &font) |
| void | setFrameStyle (int style) |
| void | setOrigin (const QPoint &p) |
| Set QwtPlotMarker::value() in paint coordinates. | |
| void | setOriginCoord (double x, double y) |
| Sets the position of the top left corner in axis coordinates. | |
| void | setText (const QString &s) |
| void | setTextColor (const QColor &c) |
| QString | text () |
| QColor | textColor () |
| void | updateOrigin () |
| Keep the markers on screen each time the scales are modified by adding/removing curves. | |
| ~LegendMarker () | |
Protected Attributes | |
| int | d_angle |
| Rotation angle: not implemented yet. | |
| int | d_frame |
| Frame type. | |
| Plot * | d_plot |
| Parent plot. | |
| QPoint | d_pos |
| TopLeft position in pixels. | |
| QwtText * | d_text |
| Pointer to the QwtText object. | |
| int | hspace |
| Distance between symbols and legend text. | |
| int | left_margin |
| Distance between frame and content. | |
| int | top_margin |
Private Member Functions | |
| void | draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &r) const |
| void | drawFrame (QPainter *p, int type, const QRect &rect) const |
| void | drawLegends (QPainter *p, const QRect &rect, QwtArray< long > height, int symbolLineLength) const |
| void | drawSymbols (QPainter *p, const QRect &rect, QwtArray< long > height, int symbolLineLength) const |
| void | drawVector (QPainter *p, int x, int y, int l, int curveIndex) const |
| QwtArray< long > | itemsHeight (int y, int symbolLineLength, int &width, int &height) const |
| QString | parse (const QString &str) const |
| int | symbolsMaxLineLength () const |
| LegendMarker::LegendMarker | ( | Plot * | plot | ) |
| LegendMarker::~LegendMarker | ( | ) |
| int LegendMarker::angle | ( | ) | [inline] |
| QColor LegendMarker::backgroundColor | ( | ) | [inline] |
| QwtDoubleRect LegendMarker::boundingRect | ( | ) | const [virtual] |
| void LegendMarker::draw | ( | QPainter * | p, | |
| const QwtScaleMap & | xMap, | |||
| const QwtScaleMap & | yMap, | |||
| const QRect & | r | |||
| ) | const [private] |
| void LegendMarker::drawFrame | ( | QPainter * | p, | |
| int | type, | |||
| const QRect & | rect | |||
| ) | const [private] |
| void LegendMarker::drawLegends | ( | QPainter * | p, | |
| const QRect & | rect, | |||
| QwtArray< long > | height, | |||
| int | symbolLineLength | |||
| ) | const [private] |
| void LegendMarker::drawSymbols | ( | QPainter * | p, | |
| const QRect & | rect, | |||
| QwtArray< long > | height, | |||
| int | symbolLineLength | |||
| ) | const [private] |
| void LegendMarker::drawVector | ( | QPainter * | p, | |
| int | x, | |||
| int | y, | |||
| int | l, | |||
| int | curveIndex | |||
| ) | const [private] |
| QFont LegendMarker::font | ( | ) | [inline] |
| int LegendMarker::frameStyle | ( | ) | [inline] |
| QwtArray< long > LegendMarker::itemsHeight | ( | int | y, | |
| int | symbolLineLength, | |||
| int & | width, | |||
| int & | height | |||
| ) | const [private] |
| QString LegendMarker::parse | ( | const QString & | str | ) | const [private] |
| QRect LegendMarker::rect | ( | ) | const [virtual] |
| void LegendMarker::setAngle | ( | int | ang | ) | [inline] |
| void LegendMarker::setBackgroundColor | ( | const QColor & | c | ) |
| void LegendMarker::setFont | ( | const QFont & | font | ) |
| void LegendMarker::setFrameStyle | ( | int | style | ) |
| void LegendMarker::setOrigin | ( | const QPoint & | p | ) |
| void LegendMarker::setOriginCoord | ( | double | x, | |
| double | y | |||
| ) |
Sets the position of the top left corner in axis coordinates.
| void LegendMarker::setText | ( | const QString & | s | ) |
| void LegendMarker::setTextColor | ( | const QColor & | c | ) |
| int LegendMarker::symbolsMaxLineLength | ( | ) | const [private] |
| QString LegendMarker::text | ( | ) | [inline] |
| QColor LegendMarker::textColor | ( | ) | [inline] |
| void LegendMarker::updateOrigin | ( | ) |
Keep the markers on screen each time the scales are modified by adding/removing curves.
int LegendMarker::d_angle [protected] |
Rotation angle: not implemented yet.
int LegendMarker::d_frame [protected] |
Frame type.
Plot* LegendMarker::d_plot [protected] |
Parent plot.
QPoint LegendMarker::d_pos [protected] |
QwtText* LegendMarker::d_text [protected] |
Pointer to the QwtText object.
int LegendMarker::hspace [protected] |
Distance between symbols and legend text.
int LegendMarker::left_margin [protected] |
Distance between frame and content.
int LegendMarker::top_margin [protected] |
1.5.3