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