Qwt User's Guide 5.2.3

- Main Page
- Related Pages
- Classes

qwt_round_scale_draw.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
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 <qpoint.h>
14 #include "qwt_global.h"
15 #include "qwt_abstract_scale_draw.h"
16
17 class QPen;
18
32 class QWT_EXPORT QwtRoundScaleDraw: public QwtAbstractScaleDraw
33 {
34 public:
35 QwtRoundScaleDraw();
36 QwtRoundScaleDraw(const QwtRoundScaleDraw &);
37
38 virtual ~QwtRoundScaleDraw();
39
40 QwtRoundScaleDraw &operator=(const QwtRoundScaleDraw &other);
41
42 void setRadius(int radius);
43 int radius() const;
44
45 void moveCenter(int x, int y);
46 void moveCenter(const QPoint &);
47 QPoint center() const;
48
49 void setAngleRange(double angle1, double angle2);
50
51 virtual int extent(const QPen &, const QFont &) const;
52
53 protected:
54 virtual void drawTick(QPainter *p, double val, int len) const;
55 virtual void drawBackbone(QPainter *p) const;
56 virtual void drawLabel(QPainter *p, double val) const;
57
58 private:
59 class PrivateData;
60 PrivateData *d_data;
61 };
62
64 inline void QwtRoundScaleDraw::moveCenter(int x, int y)
65 {
66 moveCenter(QPoint(x, y));
67 }
68
69 #endif