blob: f50911a305c18962743b73d9b9797ef221050e19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include "Chart.h"
#include "ChartScene.h"
#include "ChartView.h"
Chart::Chart():
scene(new ChartScene(this))
{
createChartView();
}
void Chart::createChartView()
{
view = new ChartView(scene);
QVBoxLayout* mainLt = new QVBoxLayout;
mainLt->addWidget(view);
mainLt->setContentsMargins(QMargins());
setLayout(mainLt);
}
void Chart::setDataSet(const QList<DataPoint>& dataSet)
{
scene->setDataSet(dataSet, 1);
}
|