source: ntrip/trunk/BNC/qwtpolar/qwt_polar_marker.h@ 10270

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