| 21 | using namespace KDChart; |
| 22 | |
| 23 | MainWindow::MainWindow(QWidget *parent) |
| 24 | : QWidget(parent) |
| 25 | { |
| 26 | setupUi(this); |
| 27 | path = new QPainterPath(); |
| 28 | path->addEllipse(-2.0, -1.0, 4.0, 2.0); |
| 29 | |
| 30 | auto *chartLayout = new QHBoxLayout(chartFrame); |
| 31 | m_chart = new Chart(); |
| 32 | chartLayout->addWidget(m_chart); |
| 33 | |
| 34 | m_model.loadFromCSV(":/data"); |
| 35 | |
| 36 | // Set up the diagram |
| 37 | m_lines = new LineDiagram(); |
| 38 | m_lines->setModel(&m_model); |
| 39 | m_chart->coordinatePlane()->replaceDiagram(m_lines); |
| 40 | m_chart->setGlobalLeading(20, 20, 20, 20); |
| 41 | |
| 42 | on_paintLinesCB_toggled(false); |
| 43 | on_paintMarkersCB_toggled(true); |
| 44 | } |
| 45 | |
| 46 | MainWindow::~MainWindow() |
| 47 | { |
nothing calls this directly
no test coverage detected