##// END OF EJS Templates
Fixed bug in setting chart theme...
Fixed bug in setting chart theme The bug was that if you first add a series, then change theme and then restore the original theme, the color of the series was changed even though it should have been restored to match the original color.

File last commit:

r215:4c8c373c63a9
r312:0677c9dd6d92
Show More
declarativepieseries.h
39 lines | 814 B | text/x-c | CLexer
/ qmlplugin / declarativepieseries.h
#ifndef DECLARATIVEPIESERIES_H
#define DECLARATIVEPIESERIES_H
#include "qchartglobal.h"
#include "qpieslice.h"
#include <QDeclarativeItem>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
class QPieSeries;
class QChart;
class DeclarativePieSeries : public QDeclarativeItem
{
Q_OBJECT
Q_PROPERTY(QDeclarativeListProperty<QPieSlice> data READ data)
public:
explicit DeclarativePieSeries(QDeclarativeItem *parent = 0);
QDeclarativeListProperty<QPieSlice> data();
signals:
public slots:
static void appendData(QDeclarativeListProperty<QPieSlice> *list,
QPieSlice *element);
private slots:
void setParentForSeries();
private:
QChart *m_chart;
QPieSeries *m_series;
QList<QPieSlice *> m_data;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // DECLARATIVEPIESERIES_H