Logo Search packages:      
Sourcecode: pcp-gui version File versions

QwtPlotMarker Class Reference

#include <qwt_plot_marker.h>

Inheritance diagram for QwtPlotMarker:


List of all members.

Detailed Description

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.

Definition at line 45 of file qwt_plot_marker.h.

Public Types

enum  ItemAttribute { Legend = 1, AutoScale = 2 }
enum  LineStyle { NoLine, HLine, VLine, Cross }
enum  RttiValues {
  Rtti_PlotItem = 0, Rtti_PlotGrid, Rtti_PlotMarker, Rtti_PlotCurve,
  Rtti_PlotHistogram, Rtti_PlotSpectrogram, Rtti_PlotSVG, Rtti_PlotUserItem = 1000

Public Member Functions

void attach (QwtPlot *plot)
virtual QwtDoubleRect boundingRect () const
void detach ()
virtual void draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &) const
 Draw the marker.
void hide ()
QwtDoubleRect invTransform (const QwtScaleMap &, const QwtScaleMap &, const QRect &) const
bool isVisible () const
virtual void itemChanged ()
QwtText label () const
int labelAlignment () const
virtual QWidget * legendItem () const
 Allocate the widget that represents the item on the legend.
const QPen & linePen () const
LineStyle lineStyle () const
QRect paintRect (const QwtScaleMap &, const QwtScaleMap &) const
 Calculate the bounding paint rect of 2 maps.
QwtPlotplot () const
 Return attached plot.
 QwtPlotMarker ()
 Sets alignment to Qt::AlignCenter, and style to NoLine.
virtual int rtti () const
QwtDoubleRect scaleRect (const QwtScaleMap &, const QwtScaleMap &) const
 Calculate the bounding scale rect of 2 maps.
void setAxis (int xAxis, int yAxis)
void setItemAttribute (ItemAttribute, bool on=true)
void setLabel (const QwtText &)
 Set the label.
void setLabelAlignment (int align)
 Set the alignment of the label.
void setLinePen (const QPen &p)
 Specify a pen for the line.
void setLineStyle (LineStyle st)
 Set the line style.
void setSymbol (const QwtSymbol &s)
 Assign a symbol.
void setTitle (const QwtText &title)
void setTitle (const QString &title)
void setValue (const QwtDoublePoint &)
 Set Value.
void setValue (double, double)
 Set Value.
virtual void setVisible (bool)
void setXAxis (int axis)
void setXValue (double)
 Set X Value.
void setYAxis (int axis)
void setYValue (double)
 Set Y Value.
void setZ (double z)
 Set the z value.
void show ()
const QwtSymbolsymbol () const
bool testItemAttribute (ItemAttribute) const
const QwtTexttitle () const
QRect transform (const QwtScaleMap &, const QwtScaleMap &, const QwtDoubleRect &) const
virtual void updateLegend (QwtLegend *) const
 Update the widget that represents the item on the legend.
virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &)
 Update the item to changes of the axes scale division.
QwtDoublePoint value () const
 Return Value.
int xAxis () const
 Return xAxis.
double xValue () const
 Return x Value.
int yAxis () const
 Return yAxis.
double yValue () const
 Return y Value.
double z () const
virtual ~QwtPlotMarker ()

Private Attributes

PrivateData * d_data


class  PrivateData

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index