#include <qwt_marker.h>
Inheritance diagram for QwtMarker:

Public Types | |
| enum | LineStyle { NoLine, HLine, VLine, Cross } |
Public Member Functions | |
| QwtMarker () | |
| virtual | ~QwtMarker () |
| const QwtMarker & | operator= (const QwtMarker &) |
| void | setLineStyle (LineStyle st) |
| LineStyle | lineStyle () const |
| void | setSymbol (const QwtSymbol &s) |
| const QwtSymbol & | symbol () const |
| void | setLabel (const QString &txt) |
| const QString & | label () const |
| void | setLabelAlignment (int align) |
| int | labelAlignment () const |
| void | setLabelPen (const QPen &p) |
| const QPen & | labelPen () const |
| void | setLinePen (const QPen &p) |
| const QPen & | linePen () const |
| void | setFont (const QFont &f) |
| const QFont & | font () const |
| virtual void | draw (QPainter *p, int x, int y, const QRect &r) |
Protected Member Functions | |
| virtual void | markerChanged () |
Private Attributes | |
| QString | d_label |
| QPen | d_pen |
| QPen | d_tPen |
| QFont | d_font |
| QwtSymbol | d_sym |
| int | d_align |
| LineStyle | d_style |
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 QwtMarker::setSymbol() member assigns a symbol to the marker. The symbol is drawn at the specified point.
With QwtMarker::setLabel(), a label can be assigned to the marker. The QwtMarker::setLabelAlignment() member specifies where the label is drawn. All the Align*-constants in qwindefs.h (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 40 of file qwt_marker.h.
|
|
Line styles.
Definition at line 48 of file qwt_marker.h. Referenced by QwtPlot::insertLineMarker(), lineStyle(), and QwtPlot::markerLineStyle(). |
|
|
Sets alignment to Qt::AlignCenter, and style to NoLine.
Definition at line 18 of file qwt_marker.cpp. |
|
|
Destructor.
Definition at line 25 of file qwt_marker.cpp. |
|
||||||||||||||||||||
|
Draw the marker.
Definition at line 54 of file qwt_marker.cpp. References Cross, d_align, d_font, d_label, d_pen, d_style, d_sym, d_tPen, QwtSymbol::draw(), QwtPainter::drawLine(), QwtPainter::drawText(), HLine, LabelDist, NoLine, QwtSymbol::None, qwtMax, QwtSymbol::size(), QwtSymbol::style(), and VLine. Referenced by QwtPlot::drawCanvasItems(). |
|
|
Definition at line 163 of file qwt_marker.cpp. References d_font. Referenced by QwtPlotPrintFilter::apply(), and QwtPlot::markerFont(). |
|
|
Definition at line 231 of file qwt_marker.cpp. References d_label. Referenced by QwtPlot::markerLabel(). |
|
|
Definition at line 260 of file qwt_marker.cpp. References d_align. Referenced by QwtPlot::markerLabelAlign(). |
|
|
Definition at line 306 of file qwt_marker.cpp. References d_tPen. Referenced by QwtPlotPrintFilter::apply(), QwtPlot::markerLabelPen(), and QwtPlotPrintFilter::reset(). |
|
|
Definition at line 283 of file qwt_marker.cpp. References d_pen. Referenced by QwtPlotPrintFilter::apply(), QwtPlot::markerLinePen(), and QwtPlotPrintFilter::reset(). |
|
|
Definition at line 188 of file qwt_marker.cpp. References d_style, and LineStyle. Referenced by QwtPlot::closestMarker(), and QwtPlot::markerLineStyle(). |
|
|
Notify a change of parameters. This virtual function is called when a marker property has been changed and redrawing is advisable. It can be reimplemented by derived classes. The default implementation does nothing. Reimplemented in QwtPlotMarker. Definition at line 319 of file qwt_marker.cpp. Referenced by setFont(), setLabel(), setLabelAlignment(), setLabelPen(), setLinePen(), setLineStyle(), setSymbol(), QwtPlotMarker::setXValue(), and QwtPlotMarker::setYValue(). |
|
|
Assignment operator.
Definition at line 33 of file qwt_marker.cpp. References d_align, d_font, d_label, d_pen, d_style, d_sym, and d_tPen. |
|
|
Specify the font for the label.
Definition at line 150 of file qwt_marker.cpp. References d_font, and markerChanged(). Referenced by QwtPlotPrintFilter::apply(), QwtPlotPrintFilter::reset(), and QwtPlot::setMarkerFont(). |
|
|
Set the label.
Definition at line 218 of file qwt_marker.cpp. References d_label, and markerChanged(). Referenced by QwtPlot::insertLineMarker(), QwtPlot::insertMarker(), and QwtPlot::setMarkerLabel(). |
|
|
Set the alignment of the label. The alignment determines where the label is drawn relative to the marker's position.
Definition at line 247 of file qwt_marker.cpp. References d_align, and markerChanged(). Referenced by QwtPlot::insertLineMarker(), and QwtPlot::setMarkerLabelAlign(). |
|
|
Specify a pen for the label.
Definition at line 293 of file qwt_marker.cpp. References d_tPen, and markerChanged(). Referenced by QwtPlotPrintFilter::apply(), QwtPlotPrintFilter::reset(), QwtPlot::setMarkerLabelPen(), and QwtPlot::setMarkerPen(). |
|
|
Specify a pen for the line.
Definition at line 270 of file qwt_marker.cpp. References d_pen, and markerChanged(). Referenced by QwtPlotPrintFilter::apply(), QwtPlotPrintFilter::reset(), QwtPlot::setMarkerLinePen(), and QwtPlot::setMarkerPen(). |
|
|
Set the line style.
Definition at line 175 of file qwt_marker.cpp. References d_style, and markerChanged(). Referenced by QwtPlot::insertLineMarker(), and QwtPlot::setMarkerLineStyle(). |
|
|
Assign a symbol.
Definition at line 198 of file qwt_marker.cpp. References d_sym, and markerChanged(). Referenced by QwtPlotPrintFilter::apply(), QwtPlotPrintFilter::reset(), and QwtPlot::setMarkerSymbol(). |
|
|
Definition at line 208 of file qwt_marker.cpp. References d_sym. Referenced by QwtPlotPrintFilter::apply(), QwtPlot::closestMarker(), QwtPlot::markerSymbol(), and QwtPlotPrintFilter::reset(). |
|
|
Definition at line 86 of file qwt_marker.h. Referenced by draw(), labelAlignment(), operator=(), QwtMarker(), and setLabelAlignment(). |
|
|
Definition at line 84 of file qwt_marker.h. Referenced by draw(), font(), operator=(), and setFont(). |
|
|
Definition at line 81 of file qwt_marker.h. Referenced by draw(), label(), operator=(), and setLabel(). |
|
|
Definition at line 82 of file qwt_marker.h. Referenced by draw(), linePen(), operator=(), and setLinePen(). |
|
|
Definition at line 87 of file qwt_marker.h. Referenced by draw(), lineStyle(), operator=(), QwtMarker(), and setLineStyle(). |
|
|
Definition at line 85 of file qwt_marker.h. Referenced by draw(), operator=(), setSymbol(), and symbol(). |
|
|
Definition at line 83 of file qwt_marker.h. Referenced by draw(), labelPen(), operator=(), and setLabelPen(). |
1.3.2