Eneboo - Documentación para desarrolladores
|
A class for drawing symbols. Más...
#include <qwt_symbol.h>
Tipos públicos | |
enum | Style { NoSymbol = -1, Ellipse, Rect, Diamond, Triangle, DTriangle, UTriangle, LTriangle, RTriangle, Cross, XCross, HLine, VLine, Star1, Star2, Hexagon, StyleCnt } |
Métodos públicos | |
QwtSymbol () | |
QwtSymbol (Style st, const QBrush &bd, const QPen &pn, const QSize &s) | |
Constructor. | |
virtual | ~QwtSymbol () |
Destructor. | |
bool | operator!= (const QwtSymbol &) const |
!= operator | |
virtual bool | operator== (const QwtSymbol &) const |
== operator | |
virtual QwtSymbol * | clone () const |
void | setSize (const QSize &s) |
Set the symbol's size. | |
void | setSize (int a, int b=-1) |
Specify the symbol's size. | |
void | setBrush (const QBrush &b) |
Assign a brush. | |
void | setPen (const QPen &p) |
Assign a pen. | |
void | setStyle (Style s) |
Specify the symbol style. | |
const QBrush & | brush () const |
Return Brush. | |
const QPen & | pen () const |
Return Pen. | |
const QSize & | size () const |
Return Size. | |
Style | style () const |
Return Style. | |
void | draw (QPainter *p, const QPoint &pt) const |
Draw the symbol at a specified point. | |
void | draw (QPainter *p, int x, int y) const |
Draw the symbol at a point (x,y). | |
virtual void | draw (QPainter *p, const QRect &r) const |
Draw the symbol into a bounding rectangle. |
A class for drawing symbols.
enum QwtSymbol::Style |
QwtSymbol::QwtSymbol | ( | ) |
Default Constructor
The symbol is constructed with gray interior, black outline with zero width, no size and style 'NoSymbol'.
QwtSymbol::QwtSymbol | ( | QwtSymbol::Style | style, |
const QBrush & | brush, | ||
const QPen & | pen, | ||
const QSize & | size | ||
) |
Constructor.
style | Symbol Style |
brush | brush to fill the interior |
pen | outline pen |
size | size |
QwtSymbol::~QwtSymbol | ( | ) | [virtual] |
Destructor.
const QBrush& QwtSymbol::brush | ( | ) | const [inline] |
Return Brush.
QwtSymbol * QwtSymbol::clone | ( | ) | const [virtual] |
Draw the symbol into a bounding rectangle.
This function assumes that the painter has been initialized with brush and pen before. This allows a much more performant implementation when painting many symbols with the same brush and pen like in curves.
painter | Painter |
r | Bounding rectangle |
Draw the symbol at a specified point.
painter | Painter |
pos | Center of the symbol |
const QPen& QwtSymbol::pen | ( | ) | const [inline] |
Return Pen.
void QwtSymbol::setBrush | ( | const QBrush & | br | ) |
Assign a brush.
The brush is used to draw the interior of the symbol.
br | brush |
void QwtSymbol::setPen | ( | const QPen & | pn | ) |
Assign a pen.
The pen is used to draw the symbol's outline.
pn | pen |
Specify the symbol's size.
If the 'h' parameter is left out or less than 0, and the 'w' parameter is greater than or equal to 0, the symbol size will be set to (w,w).
w | width |
h | height (defaults to -1) |
void QwtSymbol::setStyle | ( | QwtSymbol::Style | s | ) |
Specify the symbol style.
The following styles are defined:
s | style |
const QSize& QwtSymbol::size | ( | ) | const [inline] |
Return Size.