Qwt Polar User's Guide  0.1.0
qwt_polar_itemdict.h
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 
9 #ifndef QWT_POLAR_ITEMDICT_H
10 #define QWT_POLAR_ITEMDICT_H
11 
14 #include "qwt_polar_global.h"
15 #include "qwt_polar_item.h"
16 
17 #if QT_VERSION < 0x040000
18 #include <qvaluelist.h>
19 typedef QValueListConstIterator<QwtPolarItem *> QwtPolarItemIterator;
22 typedef QValueList<QwtPolarItem *> QwtPolarItemList;
23 #else
24 #include <qlist.h>
25 typedef QList<QwtPolarItem *>::ConstIterator QwtPolarItemIterator;
28 typedef QList<QwtPolarItem *> QwtPolarItemList;
29 #endif
30 
40 class QWT_POLAR_EXPORT QwtPolarItemDict
41 {
42 public:
43  explicit QwtPolarItemDict();
45 
46  void setAutoDelete(bool);
47  bool autoDelete() const;
48 
49  const QwtPolarItemList& itemList() const;
50 
51  void detachItems(int rtti = QwtPolarItem::Rtti_PolarItem,
52  bool autoDelete = true);
53 
54 private:
55  friend class QwtPolarItem;
56 
57  void attachItem(QwtPolarItem *, bool);
58 
59  class PrivateData;
60  PrivateData *d_data;
61 };
62 
63 #endif