21 #include "qcustomplot.h"
43 auto custom_plot = std::make_unique<QCustomPlot>();
44 auto graph = custom_plot->addGraph();
59 auto custom_plot = std::make_unique<QCustomPlot>();
60 auto graph = custom_plot->addGraph();
68 controller.setItem(data_item);
80 auto custom_plot = std::make_unique<QCustomPlot>();
81 auto graph = custom_plot->addGraph();
89 controller.setItem(data_item);
103 auto custom_plot = std::make_unique<QCustomPlot>();
104 auto graph = custom_plot->addGraph();
113 controller.setItem(data_item);
121 controller.setItem(
nullptr);
132 auto custom_plot = std::make_unique<QCustomPlot>();
133 auto graph = custom_plot->addGraph();
142 controller.setItem(data_item);
144 std::vector<double> expected_errors = {0.1, 0.2};
145 data_item->setErrors(expected_errors);
149 expected_errors = {0.3, 0.4};
150 data_item->setErrors(expected_errors);
159 auto custom_plot = std::make_unique<QCustomPlot>();
160 auto graph = custom_plot->addGraph();
171 controller.setItem(data_item1);
178 controller.setItem(data_item2);
Testing Data1DPlotController.
~Data1DPlotControllerTest()
Represents one-dimensional data (axis and values).
T * setAxis(Args &&... args)
Inserts axis of given type.
Establishes communication between QCPGraph and Data1DItem.
Item to represent fixed bin axis.
std::vector< double > binCenters() const override
Main class to hold hierarchy of SessionItem objects.
T * insertItem(SessionItem *parent=nullptr, const TagRow &tagrow={})
Inserts item into given parent under given tagrow.
TEST_F(Data1DPlotControllerTest, initialState)
Initial state.
materialitems.h Collection of materials to populate MaterialModel.
std::vector< double > binValues(const QCPGraph *graph)
Returns vector representing y-values on QCPgraph.
std::vector< double > binErrors(const QCPGraph *graph)
Returns vector representing bin errors of QCPGraph.
std::vector< double > binCenters(const QCPGraph *graph)
Returns vector representing bin centers on QCPgraph.