MCPcopy Create free account
hub / github.com/KDAB/KDChart / MainWindow

Method MainWindow

examples/Lines/PointChart/mainwindow.cpp:23–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21using namespace KDChart;
22
23MainWindow::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
46MainWindow::~MainWindow()
47{

Callers

nothing calls this directly

Calls 5

loadFromCSVMethod · 0.80
setModelMethod · 0.45
replaceDiagramMethod · 0.45
coordinatePlaneMethod · 0.45
setGlobalLeadingMethod · 0.45

Tested by

no test coverage detected