qwt_plot_zoneitem.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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_ZONE_ITEM_H
  10. #define QWT_PLOT_ZONE_ITEM_H
  11. #include "qwt_global.h"
  12. #include "qwt_plot_item.h"
  13. #include "qwt_interval.h"
  14. class QPen;
  15. class QBrush;
  16. /*!
  17. \brief A plot item, which displays a zone
  18. A horizontal zone highlights an interval of the y axis - a vertical
  19. zone an interval of the x axis - and is unbounded in the opposite direction.
  20. It is filled with a brush and its border lines are optionally displayed with a pen.
  21. \note For displaying an area that is bounded for x and y coordinates
  22. use QwtPlotShapeItem
  23. */
  24. class QWT_EXPORT QwtPlotZoneItem:
  25. public QwtPlotItem
  26. {
  27. public:
  28. explicit QwtPlotZoneItem();
  29. virtual ~QwtPlotZoneItem();
  30. virtual int rtti() const;
  31. void setOrientation( Qt::Orientation );
  32. Qt::Orientation orientation();
  33. void setInterval( double min, double max );
  34. void setInterval( const QwtInterval & );
  35. QwtInterval interval() const;
  36. void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
  37. void setPen( const QPen & );
  38. const QPen &pen() const;
  39. void setBrush( const QBrush & );
  40. const QBrush &brush() const;
  41. virtual void draw( QPainter *,
  42. const QwtScaleMap &, const QwtScaleMap &,
  43. const QRectF &) const;
  44. virtual QRectF boundingRect() const;
  45. private:
  46. class PrivateData;
  47. PrivateData *d_data;
  48. };
  49. #endif