#include <LegendWidget.h>
Public Types | |
| enum | FrameStyle { None = 0, Line = 1, Shadow = 2 } |
| The kinds of frame a LegendWidget can draw around the Text. More... | |
Signals | |
| void | enableEditor () |
| void | showDialog () |
| void | showMenu () |
Public Member Functions | |
| int | angle () |
| QColor | backgroundColor () |
| QFont | font () |
| int | frameStyle () |
| LegendWidget (Plot *) | |
| QwtPlot * | plot () |
| void | print (QPainter *p, const QwtScaleMap map[QwtPlot::axisCnt]) |
| void | setAngle (int ang) |
| void | setBackgroundColor (const QColor &c) |
| void | setFont (const QFont &font) |
| void | setFrameStyle (int style) |
| void | setOriginCoord (double x, double y) |
| Sets the position of the top left corner in axis coordinates. | |
| void | setSelected (bool on=true) |
| void | setSVGMode (bool on=true) |
| void | setText (const QString &s) |
| void | setTextColor (const QColor &c) |
| void | showContextMenu () |
| void | showTextDialog () |
| void | showTextEditor () |
| QString | text () |
| QColor | textColor () |
| double | xValue () |
| double | yValue () |
| ~LegendWidget () | |
Private Member Functions | |
| void | contextMenuEvent (QContextMenuEvent *) |
| void | drawFrame (QPainter *p, const QRect &rect) |
| void | drawSymbol (PlotCurve *c, int point, QPainter *p, int x, int y, int l) |
| void | drawText (QPainter *, const QRect &, QwtArray< long >, int) |
| void | drawVector (PlotCurve *c, QPainter *p, int x, int y, int l) |
| PlotCurve * | getCurve (const QString &s, int &point) |
| QwtArray< long > | itemsHeight (int y, int symbolLineLength, int &width, int &height) |
| void | mousePressEvent (QMouseEvent *) |
| virtual void | paintEvent (QPaintEvent *e) |
| QString | parse (const QString &str) |
| QString | parseSVG (const QString &str) |
| int | symbolsMaxWidth () |
Private Attributes | |
| int | d_angle |
| Rotation angle: not implemented yet. | |
| int | d_frame |
| Frame type. | |
| Plot * | d_plot |
| Parent plot. | |
| SelectionMoveResizer * | d_selector |
| bool | d_SVG_mode |
| Introduced as a work-around for bugs in exporting to SVG. | |
| QwtText * | d_text |
| Pointer to the QwtText object. | |
| double | d_x |
| double | d_y |
| int | h_space |
| Distance between symbols and legend text. | |
| int | left_margin |
| Distance between frame and content. | |
| int | line_length |
| Length of the symbol line. | |
| int | top_margin |
| LegendWidget::LegendWidget | ( | Plot * | plot | ) |
| LegendWidget::~LegendWidget | ( | ) |
| int LegendWidget::angle | ( | ) | [inline] |
| QColor LegendWidget::backgroundColor | ( | ) | [inline] |
| void LegendWidget::contextMenuEvent | ( | QContextMenuEvent * | ) | [inline, private] |
| void LegendWidget::drawFrame | ( | QPainter * | p, | |
| const QRect & | rect | |||
| ) | [private] |
| void LegendWidget::drawSymbol | ( | PlotCurve * | c, | |
| int | point, | |||
| QPainter * | p, | |||
| int | x, | |||
| int | y, | |||
| int | l | |||
| ) | [private] |
| void LegendWidget::drawText | ( | QPainter * | p, | |
| const QRect & | rect, | |||
| QwtArray< long > | height, | |||
| int | symbolLineLength | |||
| ) | [private] |
| void LegendWidget::drawVector | ( | PlotCurve * | c, | |
| QPainter * | p, | |||
| int | x, | |||
| int | y, | |||
| int | l | |||
| ) | [private] |
| void LegendWidget::enableEditor | ( | ) | [signal] |
| QFont LegendWidget::font | ( | ) | [inline] |
| int LegendWidget::frameStyle | ( | ) | [inline] |
| PlotCurve * LegendWidget::getCurve | ( | const QString & | s, | |
| int & | point | |||
| ) | [private] |
| QwtArray< long > LegendWidget::itemsHeight | ( | int | y, | |
| int | symbolLineLength, | |||
| int & | width, | |||
| int & | height | |||
| ) | [private] |
| void LegendWidget::mousePressEvent | ( | QMouseEvent * | ) | [private] |
| void LegendWidget::paintEvent | ( | QPaintEvent * | e | ) | [private, virtual] |
| QString LegendWidget::parse | ( | const QString & | str | ) | [private] |
| QString LegendWidget::parseSVG | ( | const QString & | str | ) | [private] |
| QwtPlot* LegendWidget::plot | ( | ) | [inline] |
| void LegendWidget::print | ( | QPainter * | p, | |
| const QwtScaleMap | map[QwtPlot::axisCnt] | |||
| ) |
| void LegendWidget::setAngle | ( | int | ang | ) | [inline] |
| void LegendWidget::setBackgroundColor | ( | const QColor & | c | ) |
| void LegendWidget::setFont | ( | const QFont & | font | ) |
| void LegendWidget::setFrameStyle | ( | int | style | ) |
| void LegendWidget::setOriginCoord | ( | double | x, | |
| double | y | |||
| ) |
Sets the position of the top left corner in axis coordinates.
| void LegendWidget::setSelected | ( | bool | on = true |
) |
| void LegendWidget::setSVGMode | ( | bool | on = true |
) | [inline] |
| void LegendWidget::setText | ( | const QString & | s | ) |
| void LegendWidget::setTextColor | ( | const QColor & | c | ) |
| void LegendWidget::showContextMenu | ( | ) | [inline] |
| void LegendWidget::showDialog | ( | ) | [signal] |
| void LegendWidget::showMenu | ( | ) | [signal] |
| void LegendWidget::showTextDialog | ( | ) | [inline] |
| void LegendWidget::showTextEditor | ( | ) |
| int LegendWidget::symbolsMaxWidth | ( | ) | [private] |
| QString LegendWidget::text | ( | ) | [inline] |
| QColor LegendWidget::textColor | ( | ) | [inline] |
| double LegendWidget::xValue | ( | ) |
| double LegendWidget::yValue | ( | ) |
int LegendWidget::d_angle [private] |
Rotation angle: not implemented yet.
int LegendWidget::d_frame [private] |
Frame type.
Plot* LegendWidget::d_plot [private] |
Parent plot.
SelectionMoveResizer* LegendWidget::d_selector [private] |
bool LegendWidget::d_SVG_mode [private] |
Introduced as a work-around for bugs in exporting to SVG.
QwtText* LegendWidget::d_text [private] |
Pointer to the QwtText object.
double LegendWidget::d_x [private] |
double LegendWidget::d_y [private] |
int LegendWidget::h_space [private] |
Distance between symbols and legend text.
int LegendWidget::left_margin [private] |
Distance between frame and content.
int LegendWidget::line_length [private] |
Length of the symbol line.
int LegendWidget::top_margin [private] |
1.5.4