27#ifndef QWT_SCALE_DRAW_H
28#define QWT_SCALE_DRAW_H
30#include "qwt_global.h"
31#include "qwt_abstract_scale_draw.h"
77 void getBorderDistHint(
const QFont&,
int& start,
int& end )
const;
78 int minLabelDist(
const QFont& )
const;
80 int minLength(
const QFont& )
const;
81 virtual double extent(
const QFont& )
const QWT_OVERRIDE;
83 void move(
double x,
double y );
84 void move(
const QPointF& );
85 void setLength(
double length );
87 Alignment alignment()
const;
88 void setAlignment( Alignment );
90 Qt::Orientation orientation()
const;
93 double length()
const;
95 void setLabelAlignment( Qt::Alignment );
96 Qt::Alignment labelAlignment()
const;
98 void setLabelRotation(
double rotation );
99 double labelRotation()
const;
101 int maxLabelHeight(
const QFont& )
const;
102 int maxLabelWidth(
const QFont& )
const;
104 QPointF labelPosition(
double value )
const;
106 QRectF labelRect(
const QFont&,
double value )
const;
107 QSizeF labelSize(
const QFont&,
double value )
const;
109 QRect boundingLabelRect(
const QFont&,
double value )
const;
112 QTransform labelTransformation(
const QPointF&,
const QSizeF& )
const;
115 double value,
double len )
const QWT_OVERRIDE;
117 virtual void drawBackbone( QPainter* )
const QWT_OVERRIDE;
118 virtual void drawLabel( QPainter*,
double value )
const QWT_OVERRIDE;
137 move( QPointF( x, y ) );
A abstract base class for drawing scales.
Definition qwt_abstract_scale_draw.h:49
virtual void drawBackbone(QPainter *painter) const =0
Draws the baseline of the scale.
virtual void drawTick(QPainter *painter, double value, double len) const =0
Draw a tick.
virtual double extent(const QFont &font) const =0
Calculate the extent.
virtual void drawLabel(QPainter *painter, double value) const =0
Draws the label for a major scale tick.
A class for drawing scales.
Definition qwt_scale_draw.h:53
void move(double x, double y)
Move the position of the scale.
Definition qwt_scale_draw.h:135
Alignment
Alignment of the scale draw.
Definition qwt_scale_draw.h:60
@ BottomScale
The scale is below.
Definition qwt_scale_draw.h:62
@ TopScale
The scale is above.
Definition qwt_scale_draw.h:65
@ LeftScale
The scale is left.
Definition qwt_scale_draw.h:68