27#ifndef QWT_SCALE_DRAW_H
28#define QWT_SCALE_DRAW_H
30#include "qwt_global.h"
31#include "qwt_abstract_scale_draw.h"
93 void getBorderDistHint(
const QFont&,
int& start,
int& end )
const;
95 int minLabelDist(
const QFont& )
const;
98 int minLength(
const QFont& )
const;
99 virtual double extent(
const QFont& )
const override;
101 void move(
double x,
double y );
102 void move(
const QPointF& );
103 void setLength(
double length );
106 Alignment alignment()
const;
108 void setAlignment( Alignment );
111 Qt::Orientation orientation()
const;
116 double length()
const;
119 void setLabelAlignment( Qt::Alignment );
121 Qt::Alignment labelAlignment()
const;
124 void setLabelRotation(
double rotation );
126 double labelRotation()
const;
129 int maxLabelHeight(
const QFont& )
const;
131 int maxLabelWidth(
const QFont& )
const;
134 QPointF labelPosition(
double value )
const;
137 QRectF labelRect(
const QFont&,
double value )
const;
139 QSizeF labelSize(
const QFont&,
double value )
const;
142 QRect boundingLabelRect(
const QFont&,
double value )
const;
145 QTransform labelTransformation(
const QPointF&,
const QSizeF& )
const;
147 virtual void drawTick( QPainter*,
double value,
double len )
const override;
150 virtual void drawLabel( QPainter*,
double value )
const override;
175 move( QPointF( x, y ) );
An abstract base class for drawing scales.
Definition qwt_abstract_scale_draw.h:55
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 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:62
void move(double x, double y)
Move the position of the scale.
Definition qwt_scale_draw.h:173
Alignment
Alignment of the scale draw.
Definition qwt_scale_draw.h:75
@ BottomScale
The scale is below.
Definition qwt_scale_draw.h:77
@ TopScale
The scale is above.
Definition qwt_scale_draw.h:80
@ LeftScale
The scale is left.
Definition qwt_scale_draw.h:83