##// END OF EJS Templates
QPieSeries::set() -> replace()
Jani Honkonen -
r354:c0d30224ca96
parent child
Show More
@@ -158,15 +158,15 bool QPieSeries::setData(QList<qreal> data)
158 QList<QPieSlice*> slices;
158 QList<QPieSlice*> slices;
159 foreach (qreal value, data)
159 foreach (qreal value, data)
160 slices << new QPieSlice(value, QString::number(value));
160 slices << new QPieSlice(value, QString::number(value));
161 set(slices);
161 replace(slices);
162 return true;
162 return true;
163 }
163 }
164
164
165 /*!
165 /*!
166 Sets an array of \a slices to the series.
166 Sets an array of \a slices to the series replacing the existing slices.
167 Slice ownership is passed to the series.
167 Slice ownership is passed to the series.
168 */
168 */
169 void QPieSeries::set(QList<QPieSlice*> slices)
169 void QPieSeries::replace(QList<QPieSlice*> slices)
170 {
170 {
171 clear();
171 clear();
172 add(slices);
172 add(slices);
@@ -59,7 +59,7 public: // from QChartSeries
59 virtual bool setData(QList<qreal> data); // TODO: remove this
59 virtual bool setData(QList<qreal> data); // TODO: remove this
60
60
61 public:
61 public:
62 void set(QList<QPieSlice*> slices);
62 void replace(QList<QPieSlice*> slices);
63 void add(QList<QPieSlice*> slices);
63 void add(QList<QPieSlice*> slices);
64 void add(QPieSlice* slice);
64 void add(QPieSlice* slice);
65 QPieSlice* add(qreal value, QString name);
65 QPieSlice* add(qreal value, QString name);
General Comments 0
You need to be logged in to leave comments. Login now