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_PLOT_CURVE_3D_H
|
---|
11 | #define QWT_PLOT_CURVE_3D_H
|
---|
12 |
|
---|
13 | #include "qwt_global.h"
|
---|
14 | #include "qwt_plot_seriesitem.h"
|
---|
15 | #include "qwt_series_data.h"
|
---|
16 |
|
---|
17 | class QwtSymbol;
|
---|
18 | class QwtColorMap;
|
---|
19 |
|
---|
20 | /*!
|
---|
21 | \brief Curve that displays 3D points as dots, where the z coordinate is
|
---|
22 | mapped to a color.
|
---|
23 | */
|
---|
24 | class QWT_EXPORT QwtPlotSpectroCurve: public QwtPlotSeriesItem<QwtPoint3D>
|
---|
25 | {
|
---|
26 | public:
|
---|
27 | //! Paint attributes
|
---|
28 | enum PaintAttribute
|
---|
29 | {
|
---|
30 | //! Clip points outside the canvas rectangle
|
---|
31 | ClipPoints = 1
|
---|
32 | };
|
---|
33 |
|
---|
34 | //! Paint attributes
|
---|
35 | typedef QFlags<PaintAttribute> PaintAttributes;
|
---|
36 |
|
---|
37 | explicit QwtPlotSpectroCurve( const QString &title = QString::null );
|
---|
38 | explicit QwtPlotSpectroCurve( const QwtText &title );
|
---|
39 |
|
---|
40 | virtual ~QwtPlotSpectroCurve();
|
---|
41 |
|
---|
42 | virtual int rtti() const;
|
---|
43 |
|
---|
44 | void setPaintAttribute( PaintAttribute, bool on = true );
|
---|
45 | bool testPaintAttribute( PaintAttribute ) const;
|
---|
46 |
|
---|
47 | void setSamples( const QVector<QwtPoint3D> & );
|
---|
48 |
|
---|
49 | void setColorMap( QwtColorMap * );
|
---|
50 | const QwtColorMap *colorMap() const;
|
---|
51 |
|
---|
52 | void setColorRange( const QwtInterval & );
|
---|
53 | QwtInterval & colorRange() const;
|
---|
54 |
|
---|
55 | virtual void drawSeries( QPainter *,
|
---|
56 | const QwtScaleMap &xMap, const QwtScaleMap &yMap,
|
---|
57 | const QRectF &canvasRect, int from, int to ) const;
|
---|
58 |
|
---|
59 | void setPenWidth(double width);
|
---|
60 | double penWidth() const;
|
---|
61 |
|
---|
62 | protected:
|
---|
63 | virtual void drawDots( QPainter *,
|
---|
64 | const QwtScaleMap &xMap, const QwtScaleMap &yMap,
|
---|
65 | const QRectF &canvasRect, int from, int to ) const;
|
---|
66 |
|
---|
67 | private:
|
---|
68 | void init();
|
---|
69 |
|
---|
70 | class PrivateData;
|
---|
71 | PrivateData *d_data;
|
---|
72 | };
|
---|
73 |
|
---|
74 | Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotSpectroCurve::PaintAttributes )
|
---|
75 |
|
---|
76 | #endif
|
---|