qwt_polar_itemdict.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
  2. * QwtPolar Widget Library
  3. * Copyright (C) 2008 Uwe Rathmann
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the Qwt License, Version 1.0
  7. *****************************************************************************/
  8. #ifndef QWT_POLAR_ITEMDICT_H
  9. #define QWT_POLAR_ITEMDICT_H
  10. /*! \file !*/
  11. #include "qwt_polar_global.h"
  12. #include "qwt_polar_item.h"
  13. #include <qlist.h>
  14. typedef QList<QwtPolarItem *>::ConstIterator QwtPolarItemIterator;
  15. /// \var typedef QList< QwtPolarItem *> QwtPolarItemList
  16. /// \brief See QT 4.x assistant documentation for QList
  17. typedef QList<QwtPolarItem *> QwtPolarItemList;
  18. /*!
  19. \brief A dictionary for polar plot items
  20. QwtPolarItemDict organizes polar plot items in increasing z-order.
  21. If autoDelete() is enabled, all attached items will be deleted
  22. in the destructor of the dictionary.
  23. \sa QwtPolarItem::attach(), QwtPolarItem::detach(), QwtPolarItem::z()
  24. */
  25. class QWT_POLAR_EXPORT QwtPolarItemDict
  26. {
  27. public:
  28. explicit QwtPolarItemDict();
  29. ~QwtPolarItemDict();
  30. void setAutoDelete( bool );
  31. bool autoDelete() const;
  32. const QwtPolarItemList& itemList() const;
  33. void detachItems( int rtti = QwtPolarItem::Rtti_PolarItem,
  34. bool autoDelete = true );
  35. protected:
  36. void insertItem( QwtPolarItem * );
  37. void removeItem( QwtPolarItem * );
  38. private:
  39. class PrivateData;
  40. PrivateData *d_data;
  41. };
  42. #endif