Qwt Polar User's Guide 0.1.0
qwt_polar_itemdict.h
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * QwtPolar Widget Library
00003  * Copyright (C) 2008   Uwe Rathmann
00004  * 
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the Qwt License, Version 1.0
00007  *****************************************************************************/
00008 
00009 #ifndef QWT_POLAR_ITEMDICT_H
00010 #define QWT_POLAR_ITEMDICT_H
00011 
00014 #include "qwt_polar_global.h"
00015 #include "qwt_polar_item.h"
00016 
00017 #if QT_VERSION < 0x040000
00018 #include <qvaluelist.h>
00019 typedef QValueListConstIterator<QwtPolarItem *> QwtPolarItemIterator;
00022 typedef QValueList<QwtPolarItem *> QwtPolarItemList;
00023 #else
00024 #include <qlist.h>
00025 typedef QList<QwtPolarItem *>::ConstIterator QwtPolarItemIterator;
00028 typedef QList<QwtPolarItem *> QwtPolarItemList;
00029 #endif
00030 
00040 class QWT_POLAR_EXPORT QwtPolarItemDict
00041 {
00042 public:
00043     explicit QwtPolarItemDict();
00044     ~QwtPolarItemDict();
00045 
00046     void setAutoDelete(bool);
00047     bool autoDelete() const;
00048 
00049     const QwtPolarItemList& itemList() const;
00050 
00051     void detachItems(int rtti = QwtPolarItem::Rtti_PolarItem,
00052         bool autoDelete = true);
00053 
00054 private:
00055     friend class QwtPolarItem;
00056 
00057     void attachItem(QwtPolarItem *, bool);
00058 
00059     class PrivateData;
00060     PrivateData *d_data;
00061 };
00062 
00063 #endif