##// END OF EJS Templates
Fix protected desturctor in xyseries
Michal Klocek -
r1268:b52df22eb2f4
parent child
Show More
@@ -1,86 +1,86
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2012 Digia Plc
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
8 **
9 ** $QT_BEGIN_LICENSE$
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
13 ** a written agreement between you and Digia.
14 **
14 **
15 ** If you have questions regarding the use of this file, please use
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
17 ** $QT_END_LICENSE$
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 #ifndef QXYSERIES_H
21 #ifndef QXYSERIES_H
22 #define QXYSERIES_H
22 #define QXYSERIES_H
23
23
24 #include <qchartglobal.h>
24 #include <qchartglobal.h>
25 #include <qabstractseries.h>
25 #include <qabstractseries.h>
26 #include <QPen>
26 #include <QPen>
27 #include <QBrush>
27 #include <QBrush>
28
28
29 class QModelIndex;
29 class QModelIndex;
30
30
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
31 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32
32
33 class QXYSeriesPrivate;
33 class QXYSeriesPrivate;
34 class QXYModelMapper;
34 class QXYModelMapper;
35
35
36 class QTCOMMERCIALCHART_EXPORT QXYSeries : public QAbstractSeries
36 class QTCOMMERCIALCHART_EXPORT QXYSeries : public QAbstractSeries
37 {
37 {
38 Q_OBJECT
38 Q_OBJECT
39
39
40 protected:
40 protected:
41 explicit QXYSeries(QXYSeriesPrivate &d,QObject *parent = 0);
41 explicit QXYSeries(QXYSeriesPrivate &d,QObject *parent = 0);
42 ~QXYSeries();
43
42
44 public:
43 public:
44 ~QXYSeries();
45 void append(qreal x, qreal y);
45 void append(qreal x, qreal y);
46 void append(const QPointF &point);
46 void append(const QPointF &point);
47 void append(const QList<QPointF> &points);
47 void append(const QList<QPointF> &points);
48 void replace(qreal oldX,qreal oldY,qreal newX,qreal newY);
48 void replace(qreal oldX,qreal oldY,qreal newX,qreal newY);
49 void replace(const QPointF &oldPoint,const QPointF &newPoint);
49 void replace(const QPointF &oldPoint,const QPointF &newPoint);
50 void remove(qreal x, qreal y);
50 void remove(qreal x, qreal y);
51 void remove(const QPointF &point);
51 void remove(const QPointF &point);
52 void removeAll();
52 void removeAll();
53 void insert(int index, const QPointF &point);
53 void insert(int index, const QPointF &point);
54 void clear();
54 void clear();
55
55
56 int count() const;
56 int count() const;
57 QList<QPointF> points() const;
57 QList<QPointF> points() const;
58
58
59 QXYSeries& operator << (const QPointF &point);
59 QXYSeries& operator << (const QPointF &point);
60 QXYSeries& operator << (const QList<QPointF> &points);
60 QXYSeries& operator << (const QList<QPointF> &points);
61
61
62 void setPen(const QPen &pen);
62 void setPen(const QPen &pen);
63 QPen pen() const;
63 QPen pen() const;
64
64
65 void setBrush(const QBrush &brush);
65 void setBrush(const QBrush &brush);
66 QBrush brush() const;
66 QBrush brush() const;
67
67
68 void setPointsVisible(bool visible = true);
68 void setPointsVisible(bool visible = true);
69 bool pointsVisible() const;
69 bool pointsVisible() const;
70
70
71 Q_SIGNALS:
71 Q_SIGNALS:
72 void clicked(const QPointF &point);
72 void clicked(const QPointF &point);
73 void pointReplaced(int index);
73 void pointReplaced(int index);
74 void pointRemoved(int index);
74 void pointRemoved(int index);
75 void pointAdded(int index);
75 void pointAdded(int index);
76
76
77 private:
77 private:
78 Q_DECLARE_PRIVATE(QXYSeries)
78 Q_DECLARE_PRIVATE(QXYSeries)
79 Q_DISABLE_COPY(QXYSeries)
79 Q_DISABLE_COPY(QXYSeries)
80 friend class XYLegendMarker;
80 friend class XYLegendMarker;
81 friend class XYChart;
81 friend class XYChart;
82 };
82 };
83
83
84 QTCOMMERCIALCHART_END_NAMESPACE
84 QTCOMMERCIALCHART_END_NAMESPACE
85
85
86 #endif
86 #endif
General Comments 0
You need to be logged in to leave comments. Login now