Qwt User's Guide 6.2.0

qwt_plot_spectrocurve.h
1 /******************************************************************************
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
16 class QwtColorMap;
17
22 class QWT_EXPORT QwtPlotSpectroCurve
23 : public QwtPlotSeriesItem
24 , public QwtSeriesStore< QwtPoint3D >
25 {
26 public:
28 enum PaintAttribute
29 {
31 ClipPoints = 1
32 };
33
34 Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
35
36 explicit QwtPlotSpectroCurve( const QString& title = QString() );
37 explicit QwtPlotSpectroCurve( const QwtText& title );
38
39 virtual ~QwtPlotSpectroCurve();
40
41 virtual int rtti() const QWT_OVERRIDE;
42
43 void setPaintAttribute( PaintAttribute, bool on = true );
44 bool testPaintAttribute( PaintAttribute ) const;
45
46 void setSamples( const QVector< QwtPoint3D >& );
47 void setSamples( QwtSeriesData< QwtPoint3D >* );
48
49
50 void setColorMap( QwtColorMap* );
51 const QwtColorMap* colorMap() const;
52
53 void setColorRange( const QwtInterval& );
54 QwtInterval& colorRange() const;
55
56 virtual void drawSeries( QPainter*,
57 const QwtScaleMap& xMap, const QwtScaleMap& yMap,
58 const QRectF& canvasRect, int from, int to ) const QWT_OVERRIDE;
59
60 void setPenWidth( double );
61 double penWidth() const;
62
63 protected:
64 virtual void drawDots( QPainter*,
65 const QwtScaleMap& xMap, const QwtScaleMap& yMap,
66 const QRectF& canvasRect, int from, int to ) const;
67
68 private:
69 void init();
70
71 class PrivateData;
72 PrivateData* m_data;
73 };
74
75 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotSpectroCurve::PaintAttributes )
76
77 #endif
QVector
Definition: qwt_clipper.h:23
QwtColorMap
QwtColorMap is used to map values into colors.
Definition: qwt_color_map.h:38
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:23
QwtPlotItem::rtti
virtual int rtti() const
Definition: qwt_plot_item.cpp:136
QwtPlotSeriesItem
Base class for plot items representing a series of samples.
Definition: qwt_plot_seriesitem.h:26
QwtPlotSpectroCurve
Curve that displays 3D points as dots, where the z coordinate is mapped to a color.
Definition: qwt_plot_spectrocurve.h:25
QwtPlotSpectroCurve::PaintAttribute
PaintAttribute
Paint attributes.
Definition: qwt_plot_spectrocurve.h:29
QwtPlotSpectroCurve::PaintAttributes
QFlags< PaintAttribute > PaintAttributes
Definition: qwt_plot_spectrocurve.h:34
QwtPoint3D
QwtPoint3D class defines a 3D point in double coordinates.
Definition: qwt_point_3d.h:23
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:27
QwtSeriesData
Abstract interface for iterating over samples.
Definition: qwt_series_data.h:50
QwtSeriesStore
Class storing a QwtSeriesData object.
Definition: qwt_series_store.h:67
QwtText
A class representing a text.
Definition: qwt_text.h:52