qwt_plot_spectrocurve.h 2.1 KB

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