Qwt User's Guide 6.1.0

- Main Page
- Related Pages
- Classes

All Classes Functions Variables Typedefs Enumerations Enumerator Pages
qwt_point_mapper.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2003 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_POINT_MAPPER_H
11 #define QWT_POINT_MAPPER_H
12
13 #include "qwt_global.h"
14 #include "qwt_series_data.h"
15 #include <qimage.h>
16
17 class QwtScaleMap;
18 class QPolygonF;
19 class QPolygon;
20
29 class QWT_EXPORT QwtPointMapper
30 {
31 public:
36 enum TransformationFlag
37 {
39 RoundPoints = 0x01,
40
45 WeedOutPoints = 0x02
46 };
47
52 typedef QFlags<TransformationFlag> TransformationFlags;
53
54 QwtPointMapper();
55 ~QwtPointMapper();
56
57 void setFlags( TransformationFlags );
58 TransformationFlags flags() const;
59
60 void setFlag( TransformationFlag, bool on = true );
61 bool testFlag( TransformationFlag ) const;
62
63 void setBoundingRect( const QRectF & );
64 QRectF boundingRect() const;
65
66 QPolygonF toPolygonF( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
67 const QwtSeriesData<QPointF> *series, int from, int to ) const;
68
69 QPolygon toPolygon( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
70 const QwtSeriesData<QPointF> *series, int from, int to ) const;
71
72 QPolygon toPoints( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
73 const QwtSeriesData<QPointF> *series, int from, int to ) const;
74
75 QPolygonF toPointsF( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
76 const QwtSeriesData<QPointF> *series, int from, int to ) const;
77
78 QImage toImage( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
79 const QwtSeriesData<QPointF> *series, int from, int to,
80 const QPen &, bool antialiased, uint numThreads ) const;
81
82 private:
83 class PrivateData;
84 PrivateData *d_data;
85 };
86
87 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPointMapper::TransformationFlags )
88
89 #endif