Qwt User's Guide 5.2.3

- Main Page
- Related Pages
- Classes

qwt_plot_dict.h
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
10 // vim: expandtab
11
13 #ifndef QWT_PLOT_DICT
14 #define QWT_PLOT_DICT
15
16 #include "qwt_global.h"
17 #include "qwt_plot_item.h"
18
19 #if QT_VERSION < 0x040000
20 #include <qvaluelist.h>
21 typedef QValueListConstIterator<QwtPlotItem *> QwtPlotItemIterator;
24 typedef QValueList<QwtPlotItem *> QwtPlotItemList;
25 #else
26 #include <qlist.h>
27 typedef QList<QwtPlotItem *>::ConstIterator QwtPlotItemIterator;
30 typedef QList<QwtPlotItem *> QwtPlotItemList;
31 #endif
32
42 class QWT_EXPORT QwtPlotDict
43 {
44 public:
45 explicit QwtPlotDict();
46 ~QwtPlotDict();
47
48 void setAutoDelete(bool);
49 bool autoDelete() const;
50
51 const QwtPlotItemList& itemList() const;
52
53 void detachItems(int rtti = QwtPlotItem::Rtti_PlotItem,
54 bool autoDelete = true);
55
56 private:
57 friend class QwtPlotItem;
58
59 void attachItem(QwtPlotItem *, bool);
60
61 class PrivateData;
62 PrivateData *d_data;
63 };
64
65 #endif