Qwt User's Guide 6.2.0

qwt_round_scale_draw.h
1 /******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 #ifndef QWT_ROUND_SCALE_DRAW_H
11 #define QWT_ROUND_SCALE_DRAW_H
12
13 #include "qwt_global.h"
14 #include "qwt_abstract_scale_draw.h"
15
16 #include <qpoint.h>
17
31 class QWT_EXPORT QwtRoundScaleDraw : public QwtAbstractScaleDraw
32 {
33 public:
34 QwtRoundScaleDraw();
35 virtual ~QwtRoundScaleDraw();
36
37 void setRadius( double radius );
38 double radius() const;
39
40 void moveCenter( double x, double y );
41 void moveCenter( const QPointF& );
42 QPointF center() const;
43
44 void setAngleRange( double angle1, double angle2 );
45
46 virtual double extent( const QFont& ) const QWT_OVERRIDE;
47
48 protected:
49 virtual void drawTick( QPainter*,
50 double value, double len ) const QWT_OVERRIDE;
51
52 virtual void drawBackbone(
53 QPainter* ) const QWT_OVERRIDE;
54
55 virtual void drawLabel(
56 QPainter*, double value ) const QWT_OVERRIDE;
57
58 private:
59 class PrivateData;
60 PrivateData* m_data;
61 };
62
64 inline void QwtRoundScaleDraw::moveCenter( double x, double y )
65 {
66 moveCenter( QPointF( x, y ) );
67 }
68
69 #endif
QwtAbstractScaleDraw
A abstract base class for drawing scales.
Definition: qwt_abstract_scale_draw.h:32
QwtAbstractScaleDraw::drawBackbone
virtual void drawBackbone(QPainter *painter) const =0
QwtAbstractScaleDraw::drawTick
virtual void drawTick(QPainter *painter, double value, double len) const =0
QwtAbstractScaleDraw::extent
virtual double extent(const QFont &font) const =0
QwtAbstractScaleDraw::drawLabel
virtual void drawLabel(QPainter *painter, double value) const =0
QwtRoundScaleDraw
A class for drawing round scales.
Definition: qwt_round_scale_draw.h:32
QwtRoundScaleDraw::moveCenter
void moveCenter(double x, double y)
Move the center of the scale draw, leaving the radius unchanged.
Definition: qwt_round_scale_draw.h:64