A marker can be a horizontal line, a vertical line, a symbol, a label or any combination of them, which can be drawn around a center point inside a bounding rectangle.
The QwtPlotMarker::setSymbol() member assigns a symbol to the marker. The symbol is drawn at the specified point.
With QwtPlotMarker::setLabel(), a label can be assigned to the marker. The QwtPlotMarker::setLabelAlignment() member specifies where the label is drawn. All the Align*-constants in Qt::AlignmentFlags (see Qt documentation) are valid. The interpretation of the alignment depends on the marker's line style. The alignment refers to the center point of the marker, which means, for example, that the label would be printed left above the center point if the alignment was set to AlignLeft|AlignTop.
Definition at line 45 of file qwt_plot_marker.h.
Public Types | |
enum | LineStyle { NoLine, HLine, VLine, Cross } |
Public Member Functions | |
QwtPlotMarker () | |
virtual | ~QwtPlotMarker () |
QwtPlotMarker (const QwtPlotMarker &) | |
QwtPlotMarker & | operator= (const QwtPlotMarker &) |
virtual int | rtti () const |
double | xValue () const |
double | yValue () const |
QwtDoublePoint | value () const |
void | setXValue (double) |
void | setYValue (double) |
void | setValue (double, double) |
void | setValue (const QwtDoublePoint &) |
void | setLineStyle (LineStyle st) |
LineStyle | lineStyle () const |
void | setLinePen (const QPen &p) |
const QPen & | linePen () const |
void | setSymbol (const QwtSymbol &s) |
const QwtSymbol & | symbol () const |
void | setLabel (const QwtText &) |
QwtText | label () const |
void | setLabelAlignment (int align) |
int | labelAlignment () const |
virtual void | draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &) const |
virtual QwtDoubleRect | boundingRect () const |
|
Line styles. Definition at line 53 of file qwt_plot_marker.h. |
|
Sets alignment to Qt::AlignCenter, and style to NoLine.
Definition at line 48 of file qwt_plot_marker.cpp. References QwtPlotItem::setZ(). |
|
Destructor.
Definition at line 55 of file qwt_plot_marker.cpp. |
|
Copy constructor.
Definition at line 64 of file qwt_plot_marker.cpp. |
|
Draw the marker.
Implements QwtPlotItem. Definition at line 153 of file qwt_plot_marker.cpp. References QwtPainter::drawLine(), QwtPainter::metricsMap(), qwtMax, QwtMetricsMap::screenToLayoutX(), QwtMetricsMap::screenToLayoutY(), and QwtScaleMap::transform(). |
|
Definition at line 318 of file qwt_plot_marker.cpp. Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset(). |
|
Definition at line 352 of file qwt_plot_marker.cpp. |
|
Definition at line 378 of file qwt_plot_marker.cpp. Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset(). |
|
Definition at line 275 of file qwt_plot_marker.cpp. |
|
Assignment operator.
Definition at line 74 of file qwt_plot_marker.cpp. References QwtPlotItem::itemChanged(). |
|
Set the label.
Definition at line 305 of file qwt_plot_marker.cpp. References QwtPlotItem::itemChanged(). Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset(). |
|
Set the alignment of the label. The alignment determines where the label is drawn relative to the marker's position.
Definition at line 335 of file qwt_plot_marker.cpp. |
|
Specify a pen for the line.
Definition at line 365 of file qwt_plot_marker.cpp. References QwtPlotItem::itemChanged(). Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset(). |
|
Set the line style.
Definition at line 262 of file qwt_plot_marker.cpp. References QwtPlotItem::itemChanged(). |
|
Assign a symbol.
Definition at line 285 of file qwt_plot_marker.cpp. References QwtPlotItem::itemChanged(). Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset(). |
|
Set Value.
Definition at line 118 of file qwt_plot_marker.cpp. References setValue(), QwtDoublePoint::x(), and QwtDoublePoint::y(). |
|
Set Value.
Definition at line 124 of file qwt_plot_marker.cpp. References QwtPlotItem::itemChanged(). Referenced by setValue(), setXValue(), and setYValue(). |
|
Set X Value.
Definition at line 135 of file qwt_plot_marker.cpp. References setValue(). |
|
Set Y Value.
Definition at line 141 of file qwt_plot_marker.cpp. References setValue(). |
|
Definition at line 295 of file qwt_plot_marker.cpp. Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset(). |
|
Return Value.
Definition at line 100 of file qwt_plot_marker.cpp. |
|
Return x Value.
Definition at line 106 of file qwt_plot_marker.cpp. |
|
Return y Value.
Definition at line 112 of file qwt_plot_marker.cpp. |