Inheritance diagram for QwtMarker:
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 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.
Public Types | |
enum | LineStyle { NoLine, HLine, VLine, Cross } |
Public Member Functions | |
QwtMarker () | |
virtual | ~QwtMarker () |
QwtMarker (const QwtMarker &) | |
QwtMarker & | operator= (const QwtMarker &) |
void | setLineStyle (LineStyle st) |
LineStyle | lineStyle () const |
void | setSymbol (const QwtSymbol &s) |
const QwtSymbol & | symbol () const |
void | setLabel (const QString &text, const QFont &font=QFont(), const QColor &color=QColor(), const QPen &pen=QPen(Qt::NoPen), const QBrush &brush=QBrush(Qt::NoBrush)) |
void | setLabelText (const QString &text) |
const QString | label () const |
void | setLabelAlignment (int align) |
int | labelAlignment () const |
void | setLabelColor (const QColor &c) |
const QColor | labelColor () 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 () |
|
Line styles.
|
|
Sets alignment to Qt::AlignCenter, and style to NoLine.
|
|
Destructor.
|
|
Copy constructor.
|
|
Draw the marker.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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. |
|
Assignment operator.
|
|
Specify the font for the label.
|
|
Set the label.
|
|
Set the alignment of the label. The alignment determines where the label is drawn relative to the marker's position.
|
|
Specify a color for the label.
|
|
Specify a pen for the label.
|
|
Set the label text.
|
|
Specify a pen for the line.
|
|
Set the line style.
|
|
Assign a symbol.
|
|
|