| 639 | } |
| 640 | |
| 641 | CartesianPlot* StatisticsColumnWidget::addPlot(QWidget* widget) { |
| 642 | auto* ws = new Worksheet(QString()); |
| 643 | ws->setUseViewSize(true); |
| 644 | ws->setLayoutTopMargin(0.); |
| 645 | ws->setLayoutBottomMargin(0.); |
| 646 | ws->setLayoutLeftMargin(0.); |
| 647 | ws->setLayoutRightMargin(0.); |
| 648 | m_project->addChild(ws); |
| 649 | |
| 650 | auto* plot = new CartesianPlot(QString()); |
| 651 | plot->setSuppressRetransform(true); |
| 652 | plot->setType(CartesianPlot::Type::TwoAxes); |
| 653 | plot->setSymmetricPadding(false); |
| 654 | const double padding = Worksheet::convertToSceneUnits(1.0, Worksheet::Unit::Centimeter); |
| 655 | plot->setRightPadding(padding); |
| 656 | plot->setVerticalPadding(padding); |
| 657 | plot->plotArea()->borderLine()->setStyle(Qt::NoPen); |
| 658 | |
| 659 | ws->addChild(plot); |
| 660 | plot->setSuppressRetransform(false); |
| 661 | |
| 662 | auto* layout = new QVBoxLayout(widget); |
| 663 | layout->setSpacing(0); |
| 664 | layout->addWidget(ws->view()); |
| 665 | ws->setInteractive(false); |
| 666 | widget->setLayout(layout); |
| 667 | |
| 668 | return plot; |
| 669 | } |
| 670 | |
| 671 | // helpers |
| 672 | const QString StatisticsColumnWidget::isNanValue(const double value) const { |
nothing calls this directly
no test coverage detected