Eneboo - Documentación para desarrolladores
Clases | Métodos públicos | Métodos protegidos
Referencia de la Clase QwtRoundScaleDraw

A class for drawing round scales. Más...

#include <qwt_round_scale_draw.h>

Diagrama de herencias de QwtRoundScaleDraw
QwtAbstractScaleDraw QwtDialScaleDraw

Lista de todos los miembros.

Clases

class  PrivateData

Métodos públicos

 QwtRoundScaleDraw ()
 Constructor.
 QwtRoundScaleDraw (const QwtRoundScaleDraw &)
 Copy constructor.
virtual ~QwtRoundScaleDraw ()
 Destructor.
QwtRoundScaleDrawoperator= (const QwtRoundScaleDraw &other)
 Assignment operator.
void setRadius (int radius)
int radius () const
void moveCenter (int x, int y)
void moveCenter (const QPoint &)
QPoint center () const
 Get the center of the scale.
void setAngleRange (double angle1, double angle2)
 Adjust the baseline circle segment for round scales.
virtual int extent (const QPen &, const QFont &) const

Métodos protegidos

virtual void drawTick (QPainter *p, double val, int len) const
virtual void drawBackbone (QPainter *p) const
virtual void drawLabel (QPainter *p, double val) const

Descripción detallada

A class for drawing round scales.

QwtRoundScaleDraw can be used to draw round scales. The circle segment can be adjusted by QwtRoundScaleDraw::setAngleRange(). The geometry of the scale can be specified with QwtRoundScaleDraw::moveCenter() and QwtRoundScaleDraw::setRadius().

After a scale division has been specified as a QwtScaleDiv object using QwtAbstractScaleDraw::setScaleDiv(const QwtScaleDiv &s), the scale can be drawn with the QwtAbstractScaleDraw::draw() member.


Documentación del constructor y destructor

QwtRoundScaleDraw::QwtRoundScaleDraw ( )

Constructor.

The range of the scale is initialized to [0, 100], The center is set to (50, 50) with a radius of 50. The angle range is set to [-135, 135].

QwtRoundScaleDraw::QwtRoundScaleDraw ( const QwtRoundScaleDraw other)

Copy constructor.

QwtRoundScaleDraw::~QwtRoundScaleDraw ( ) [virtual]

Destructor.


Documentación de las funciones miembro

QPoint QwtRoundScaleDraw::center ( ) const

Get the center of the scale.

void QwtRoundScaleDraw::drawBackbone ( QPainter painter) const [protected, virtual]

Draws the baseline of the scale

Parámetros:
painterPainter
Ver también:
drawTick(), drawLabel()

Implementa QwtAbstractScaleDraw.

void QwtRoundScaleDraw::drawLabel ( QPainter painter,
double  value 
) const [protected, virtual]

Draws the label for a major scale tick

Parámetros:
painterPainter
valueValue
Ver también:
drawTick(), drawBackbone()

Implementa QwtAbstractScaleDraw.

void QwtRoundScaleDraw::drawTick ( QPainter painter,
double  value,
int  len 
) const [protected, virtual]

Draw a tick

Parámetros:
painterPainter
valueValue of the tick
lenLenght of the tick
Ver también:
drawBackbone(), drawLabel()

Implementa QwtAbstractScaleDraw.

int QwtRoundScaleDraw::extent ( const QPen pen,
const QFont font 
) const [virtual]

Calculate the extent of the scale

The extent is the distcance between the baseline to the outermost pixel of the scale draw. radius() + extent() is an upper limit for the radius of the bounding circle.

Parámetros:
penPen that is used for painting backbone and ticks
fontFont used for painting the labels
Ver también:
setMinimumExtent(), minimumExtent()
Atención:
The implemented algo is not too smart and calculates only an upper limit, that might be a few pixels too large

Implementa QwtAbstractScaleDraw.

void QwtRoundScaleDraw::moveCenter ( const QPoint center)

Move the center of the scale draw, leaving the radius unchanged

Parámetros:
centerNew center
Ver también:
setRadius
void QwtRoundScaleDraw::moveCenter ( int  x,
int  y 
) [inline]
QwtRoundScaleDraw & QwtRoundScaleDraw::operator= ( const QwtRoundScaleDraw other)

Assignment operator.

int QwtRoundScaleDraw::radius ( ) const

Get the radius

Radius is the radius of the backbone without ticks and labels.

Ver también:
setRadius(), extent()
void QwtRoundScaleDraw::setAngleRange ( double  angle1,
double  angle2 
)

Adjust the baseline circle segment for round scales.

The baseline will be drawn from min(angle1,angle2) to max(angle1, angle2). The default setting is [ -135, 135 ]. An angle of 0 degrees corresponds to the 12 o'clock position, and positive angles count in a clockwise direction.

Parámetros:
angle1
angle2boundaries of the angle interval in degrees.
Atención:
  • The angle range is limited to [-360, 360] degrees. Angles exceeding this range will be clipped.
  • For angles more than 359 degrees above or below min(angle1, angle2), scale marks will not be drawn.
  • If you need a counterclockwise scale, use QwtScaleDiv::setRange
void QwtRoundScaleDraw::setRadius ( int  radius)

Change of radius the scale

Radius is the radius of the backbone without ticks and labels.

Parámetros:
radiusNew Radius
Ver también:
moveCenter

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'