19 #include "qcustomplot.h"
37 auto custom_plot = std::make_unique<QCustomPlot>();
39 auto axis = custom_plot->xAxis;
45 EXPECT_EQ(axis->label(), QString());
50 auto custom_plot = std::make_unique<QCustomPlot>();
55 auto axis = custom_plot->xAxis;
61 const int expected_pointSize = 10;
62 const std::string expected_family =
"Noto Sans";
69 EXPECT_EQ(axis->label(), QString());
70 EXPECT_EQ(axis->labelFont().family().toStdString(), expected_family);
71 EXPECT_EQ(axis->labelFont().pointSize(), expected_pointSize);
76 auto custom_plot = std::make_unique<QCustomPlot>();
81 auto axis = custom_plot->xAxis;
89 const QString expected_text(
"abc");
90 const QString expected_family(
"Helvetica");
91 const int expected_size = 42;
97 EXPECT_EQ(axis->label(), expected_text);
98 EXPECT_EQ(axis->labelFont().family(), expected_family);
99 EXPECT_EQ(axis->labelFont().pointSize(), expected_size);
TEST_F(AxisTitleControllerTest, initialState)
Initial state.
Testing AxisTitleControllers.
~AxisTitleControllerTest()
Propagates title settings from TextItem to QCPAxis.
void setItem(SessionItem *item)
Main class to hold hierarchy of SessionItem objects.
T * insertItem(SessionItem *parent=nullptr, const TagRow &tagrow={})
Inserts item into given parent under given tagrow.
Represent text item on plot.
static const std::string P_SIZE
static const std::string P_FONT
static const std::string P_TEXT
materialitems.h Collection of materials to populate MaterialModel.