Eneboo - Documentación para desarrolladores
|
A class for drawing markers. Más...
#include <qwt_plot_marker.h>
Clases | |
class | PrivateData |
Tipos públicos | |
enum | LineStyle { NoLine, HLine, VLine, Cross } |
Métodos públicos | |
QwtPlotMarker () | |
Sets alignment to Qt::AlignCenter, and style to NoLine. | |
virtual | ~QwtPlotMarker () |
Destructor. | |
virtual int | rtti () const |
double | xValue () const |
Return x Value. | |
double | yValue () const |
Return y Value. | |
QwtDoublePoint | value () const |
Return Value. | |
void | setXValue (double) |
Set X Value. | |
void | setYValue (double) |
Set Y Value. | |
void | setValue (double, double) |
Set Value. | |
void | setValue (const QwtDoublePoint &) |
Set Value. | |
void | setLineStyle (LineStyle st) |
Set the line style. | |
LineStyle | lineStyle () const |
void | setLinePen (const QPen &p) |
Specify a pen for the line. | |
const QPen & | linePen () const |
void | setSymbol (const QwtSymbol &s) |
Assign a symbol. | |
const QwtSymbol & | symbol () const |
void | setLabel (const QwtText &) |
Set the label. | |
QwtText | label () const |
void | setLabelAlignment (int align) |
Set the alignment of the label. | |
int | labelAlignment () const |
virtual void | draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &) const |
Draw the marker. | |
virtual QwtDoubleRect | boundingRect () const |
A class for drawing markers.
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.
Line styles.
QwtPlotMarker::QwtPlotMarker | ( | ) | [explicit] |
Sets alignment to Qt::AlignCenter, and style to NoLine.
QwtPlotMarker::~QwtPlotMarker | ( | ) | [virtual] |
Destructor.
QwtDoubleRect QwtPlotMarker::boundingRect | ( | ) | const [virtual] |
Reimplementado de QwtPlotItem.
void QwtPlotMarker::draw | ( | QPainter * | p, |
const QwtScaleMap & | xMap, | ||
const QwtScaleMap & | yMap, | ||
const QRect & | r | ||
) | const [virtual] |
Draw the marker.
p | Painter |
xMap | x Scale Map |
yMap | y Scale Map |
r | Bounding rect, where to paint |
Implementa QwtPlotItem.
QwtText QwtPlotMarker::label | ( | ) | const |
int QwtPlotMarker::labelAlignment | ( | ) | const |
const QPen & QwtPlotMarker::linePen | ( | ) | const |
QwtPlotMarker::LineStyle QwtPlotMarker::lineStyle | ( | ) | const |
int QwtPlotMarker::rtti | ( | ) | const [virtual] |
Reimplementado de QwtPlotItem.
void QwtPlotMarker::setLabel | ( | const QwtText & | label | ) |
void QwtPlotMarker::setLabelAlignment | ( | int | align | ) |
Set the alignment of the label.
The alignment determines where the label is drawn relative to the marker's position.
align | Alignment. A combination of AlignTop, AlignBottom, AlignLeft, AlignRight, AlignCenter, AlgnHCenter, AlignVCenter. |
void QwtPlotMarker::setLinePen | ( | const QPen & | p | ) |
void QwtPlotMarker::setLineStyle | ( | QwtPlotMarker::LineStyle | st | ) |
Set the line style.
st | Line style. Can be one of QwtPlotMarker::NoLine, HLine, VLine or Cross |
void QwtPlotMarker::setSymbol | ( | const QwtSymbol & | s | ) |
void QwtPlotMarker::setValue | ( | const QwtDoublePoint & | pos | ) |
const QwtSymbol & QwtPlotMarker::symbol | ( | ) | const |
QwtDoublePoint QwtPlotMarker::value | ( | ) | const |
Return Value.
double QwtPlotMarker::xValue | ( | ) | const |
Return x Value.
double QwtPlotMarker::yValue | ( | ) | const |
Return y Value.