QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | List of all members
QwtRoundScaleDraw Class Reference

A class for drawing round scales. More...

#include <qwt_round_scale_draw.h>

Inheritance diagram for QwtRoundScaleDraw:
QwtAbstractScaleDraw QwtCompassScaleDraw

Classes

class  PrivateData
 

Public Member Functions

 QwtRoundScaleDraw ()
 Constructor.
 
virtual ~QwtRoundScaleDraw ()
 Destructor.
 
void setRadius (double radius)
 Set the radius.
 
double radius () const
 Get the radius.
 
void moveCenter (double x, double y)
 Move the center.
 
void moveCenter (const QPointF &)
 Move the center.
 
QPointF center () const
 Get the center of the scale.
 
void setAngleRange (double angle1, double angle2)
 Set the angle range.
 
virtual double extent (const QFont &) const override
 Calculate the extent of the scale.
 
- Public Member Functions inherited from QwtAbstractScaleDraw
 QwtAbstractScaleDraw ()
 Constructor for QwtAbstractScaleDraw.
 
virtual ~QwtAbstractScaleDraw ()
 Destructor for QwtAbstractScaleDraw .
 
void setScaleDiv (const QwtScaleDiv &)
 Set the scale division.
 
const QwtScaleDivscaleDiv () const
 Return the scale division.
 
void setTransformation (QwtTransform *)
 Set the scale transformation.
 
const QwtScaleMapscaleMap () const
 Return the scale map (const version)
 
QwtScaleMapscaleMap ()
 Return the scale map (non-const version)
 
void enableComponent (ScaleComponent, bool enable=true)
 Enable or disable a scale component.
 
bool hasComponent (ScaleComponent) const
 Check if a component is enabled.
 
void setTickLength (QwtScaleDiv::TickType, double length)
 Set the length of the ticks.
 
double tickLength (QwtScaleDiv::TickType) const
 Get the length of the ticks.
 
double maxTickLength () const
 Get the length of the longest tick.
 
void setSpacing (double)
 Set the spacing between tick and labels.
 
double spacing () const
 Get the spacing.
 
void setPenWidthF (qreal width)
 Specify the width of the scale pen.
 
qreal penWidthF () const
 Get the scale pen width.
 
void setSelected (bool on)
 Set whether the scale draw is selected.
 
bool isSelected () const
 Check if the scale draw is selected.
 
void setSelectedPenWidthOffset (qreal offset=1)
 Set the pen width offset for the axis when it is in selected state.
 
qreal selectedPenWidthOffset () const
 Get the current pen width offset for the axis when it is in selected state.
 
virtual void draw (QPainter *, const QPalette &) const
 Draw the scale.
 
virtual QwtText label (double) const
 Convert a value into its representing label.
 
void setMinimumExtent (double)
 Set a minimum for the extent.
 
double minimumExtent () const
 Get the minimum extent.
 
void invalidateCache ()
 Invalidate the cache used by tickLabel()
 

Protected Member Functions

virtual void drawTick (QPainter *, double value, double len) const override
 Draw a tick.
 
virtual void drawBackbone (QPainter *) const override
 Draws the baseline of the scale.
 
virtual void drawLabel (QPainter *, double value) const override
 Draws the label for a major scale tick.
 
- Protected Member Functions inherited from QwtAbstractScaleDraw
const QwtTexttickLabel (const QFont &, double value) const
 Convert a value into its representing label and cache it.
 

Additional Inherited Members

- Public Types inherited from QwtAbstractScaleDraw
enum  ScaleComponent { Backbone = 0x01 , Ticks = 0x02 , Labels = 0x04 }
 Components of a scale. More...
 

Detailed Description

A class for drawing round scales.

Constructor & Destructor Documentation

◆ QwtRoundScaleDraw()

QwtRoundScaleDraw::QwtRoundScaleDraw ( )

Constructor.

Member Function Documentation

◆ center()

QPointF QwtRoundScaleDraw::center ( ) const

Get the center of the scale.

Returns
the center

◆ drawBackbone()

void QwtRoundScaleDraw::drawBackbone ( QPainter *  painter) const
overrideprotectedvirtual

Draws the baseline of the scale.

Implements QwtAbstractScaleDraw.

◆ drawLabel()

void QwtRoundScaleDraw::drawLabel ( QPainter *  painter,
double  value 
) const
overrideprotectedvirtual

Draws the label for a major scale tick.

Implements QwtAbstractScaleDraw.

◆ drawTick()

void QwtRoundScaleDraw::drawTick ( QPainter *  painter,
double  value,
double  len 
) const
overrideprotectedvirtual

Draw a tick.

Implements QwtAbstractScaleDraw.

◆ extent()

double QwtRoundScaleDraw::extent ( const QFont &  font) const
overridevirtual

Calculate the extent of the scale.

Implements QwtAbstractScaleDraw.

◆ moveCenter() [1/2]

void QwtRoundScaleDraw::moveCenter ( const QPointF &  center)

Move the center.

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

◆ moveCenter() [2/2]

void QwtRoundScaleDraw::moveCenter ( double  x,
double  y 
)
inline

Move the center.

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

◆ radius()

double QwtRoundScaleDraw::radius ( ) const

Get the radius.

Returns
the radius

◆ setAngleRange()

void QwtRoundScaleDraw::setAngleRange ( double  angle1,
double  angle2 
)

Set the angle range.

Adjust the baseline circle segment for round scales.

◆ setRadius()

void QwtRoundScaleDraw::setRadius ( double  radius)

Set the radius.

Change the radius of the scale.


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