blob: 4ab812914f68e2b22f2fb972189e3dd87a967af7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef PIE_CHART_SCENE_H
#define PIE_CHART_SCENE_H
#include <QtCore>
#include <QtWidgets>
#include "DataPoint.h"
#include "PieChart.h"
class PieChartScene: public QGraphicsScene
{
public:
static const QSizeF Margin;
static const QSizeF Size;
static const int LegendDistance = 230;
public:
PieChartScene(PieChart* chart);
void setDataSet(const QList<DataPoint>& dataSet);
void setColors(const QStringList& colors);
QList<DataPoint> getDataSet() const {return dataSet; }
QStringList getColors() const { return colors; }
private:
PieChart* chart;
QList<DataPoint> dataSet;
QStringList colors;
};
#endif
|