source: ntrip/trunk/BNC/qwt/qwt_polar_marker.h

Last change on this file was 11158, checked in by stuerze, 4 weeks ago

deprecated functions exchanged libs updated

File size: 2.0 KB
Line 
1/******************************************************************************
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 "qwt_global.h"
13#include "qwt_polar_item.h"
14#include "qwt_point_polar.h"
15
16class QRect;
17class QwtText;
18class QwtSymbol;
19
20/*!
21 \brief A class for drawing markers
22
23 A marker can be a a symbol, a label or a combination of them, which can
24 be drawn around a center point inside a bounding rectangle.
25
26 The setSymbol() member assigns a symbol to the marker.
27 The symbol is drawn at the specified point.
28
29 With setLabel(), a label can be assigned to the marker.
30 The setLabelAlignment() member specifies where the label is
31 drawn. All the Align*-constants in Qt::AlignmentFlags (see Qt documentation)
32 are valid. The alignment refers to the center point of
33 the marker, which means, for example, that the label would be painted
34 left above the center point if the alignment was set to AlignLeft|AlignTop.
35 */
36class QWT_EXPORT QwtPolarMarker : public QwtPolarItem
37{
38 public:
39 explicit QwtPolarMarker();
40 virtual ~QwtPolarMarker();
41
42 virtual int rtti() const QWT_OVERRIDE;
43
44 void setPosition( const QwtPointPolar& );
45 QwtPointPolar position() const;
46
47 void setSymbol( const QwtSymbol* s );
48 const QwtSymbol* symbol() const;
49
50 void setLabel( const QwtText& );
51 QwtText label() const;
52
53 void setLabelAlignment( Qt::Alignment );
54 Qt::Alignment labelAlignment() const;
55
56 virtual void draw( QPainter* painter,
57 const QwtScaleMap& azimuthMap, const QwtScaleMap& radialMap,
58 const QPointF& pole, double radius,
59 const QRectF& canvasRect ) const QWT_OVERRIDE;
60
61 virtual QwtInterval boundingInterval( int scaleId ) const QWT_OVERRIDE;
62
63 private:
64 class PrivateData;
65 PrivateData* m_data;
66};
67
68#endif
Note: See TracBrowser for help on using the repository browser.