From d24f813f3f2a05c112e803e4256b53535895fc98 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Wed, 14 Jul 2021 11:49:10 +1200 Subject: Initial mirror commit --- src/charts/PieChart.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/charts/PieChart.cpp (limited to 'src/charts/PieChart.cpp') diff --git a/src/charts/PieChart.cpp b/src/charts/PieChart.cpp new file mode 100644 index 0000000..0637823 --- /dev/null +++ b/src/charts/PieChart.cpp @@ -0,0 +1,28 @@ +#include "PieChart.h" +#include "PieChartScene.h" +#include "ChartView.h" + +PieChart::PieChart(): + scene(new PieChartScene(this)) +{ + createChartView(); +} + +void PieChart::createChartView() +{ + view = new ChartView(scene); + QVBoxLayout* mainLt = new QVBoxLayout; + mainLt->addWidget(view); + mainLt->setContentsMargins(QMargins()); + setLayout(mainLt); +} + +void PieChart::setDataSet(const QList& dataSet) +{ + scene->setDataSet(dataSet); +} + +void PieChart::setColors(const QStringList& colors) +{ + scene->setColors(colors); +} -- cgit