| 25 | using namespace KDChart; |
| 26 | |
| 27 | MainWindow::MainWindow(QWidget *parent) |
| 28 | : QWidget(parent) |
| 29 | { |
| 30 | setupUi(this); |
| 31 | |
| 32 | // instantiate the KD Chart classes |
| 33 | initKDChartClasses(); |
| 34 | |
| 35 | // insert the KDChart::Chart into Qt's layout |
| 36 | auto *chartLayout = new QHBoxLayout(chartFrame); |
| 37 | m_chart->setGlobalLeadingLeft(5); |
| 38 | m_chart->setGlobalLeadingRight(5); |
| 39 | chartLayout->addWidget(m_chart); |
| 40 | |
| 41 | // wire up the KD Chart classes |
| 42 | wireUpKDChartClasses(); |
| 43 | |
| 44 | // initialize the ItemModel and fill in some data |
| 45 | m_model.insertRows(0, 40); |
| 46 | m_model.insertColumns(0, 5); |
| 47 | setItemModelData(); |
| 48 | } |
| 49 | |
| 50 | void MainWindow::initKDChartClasses() |
| 51 | { |
nothing calls this directly
no test coverage detected