Qwt Polar User's Guide  0.1.0
qwt_polar_marker.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2  * QwtPolar Widget Library
3  * Copyright (C) 2008 Uwe Rathmann
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the Qwt License, Version 1.0
7  *****************************************************************************/
8 
9 #ifndef QWT_POLAR_MARKER_H
10 #define QWT_POLAR_MARKER_H
11 
12 #include <qstring.h>
13 #include "qwt_polar_global.h"
14 #include "qwt_polar_point.h"
15 #include "qwt_polar_item.h"
16 
17 class QRect;
18 class QwtText;
19 class QwtSymbol;
20 
38 class QWT_POLAR_EXPORT QwtPolarMarker: public QwtPolarItem
39 {
40 public:
41  explicit QwtPolarMarker();
42  virtual ~QwtPolarMarker();
43 
44  virtual int rtti() const;
45 
46  void setPosition(const QwtPolarPoint &);
47  QwtPolarPoint position() const;
48 
49  void setSymbol(const QwtSymbol &s);
50  const QwtSymbol &symbol() const;
51 
52  void setLabel(const QwtText&);
53  QwtText label() const;
54 
55 #if QT_VERSION < 0x040000
56  void setLabelAlignment(int align);
57  int labelAlignment() const;
58 #else
59  void setLabelAlignment(Qt::Alignment);
60  Qt::Alignment labelAlignment() const;
61 #endif
62 
63  virtual void draw(QPainter *painter,
64  const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap,
65  const QwtDoublePoint &pole, double radius,
66  const QwtDoubleRect &canvasRect) const;
67 
68  virtual QwtDoubleInterval boundingInterval(int scaleId) const;
69 
70 private:
71  class PrivateData;
72  PrivateData *d_data;
73 };
74 
75 #endif