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

Method MainWindow

examples/DataValueTexts/mainwindow.cpp:26–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24using namespace KDChart;
25
26MainWindow::MainWindow(QWidget *parent)
27 : QWidget(parent)
28{
29 setupUi(this);
30
31 auto *chartLayout = new QHBoxLayout(chartFrame);
32 m_chart = new Chart();
33 chartLayout->addWidget(m_chart);
34
35 m_model.loadFromCSV(":/data");
36
37 // Set up the diagram
38 m_bars = new BarDiagram();
39 m_bars->setModel(&m_model);
40
41 QPen pen(m_bars->pen());
42 pen.setColor(Qt::darkGray);
43 pen.setWidth(1);
44 m_bars->setPen(pen);
45 m_chart->coordinatePlane()->replaceDiagram(m_bars);
46 m_chart->setGlobalLeadingTop(20);
47
48 scopeCommonRB->setFocus(Qt::OtherFocusReason);
49 scopeCommonRB->setChecked(true);
50 paintValuesCB->setChecked(true);
51}
52
53void MainWindow::on_scopeOneBarRB_toggled(bool checked)
54{

Callers

nothing calls this directly

Calls 8

loadFromCSVMethod · 0.80
setColorMethod · 0.80
setModelMethod · 0.45
penMethod · 0.45
setPenMethod · 0.45
replaceDiagramMethod · 0.45
coordinatePlaneMethod · 0.45
setGlobalLeadingTopMethod · 0.45

Tested by

no test coverage detected