20 #include "qcustomplot.h"
42 auto custom_plot = std::make_unique<QCustomPlot>();
43 auto graph = custom_plot->addGraph();
51 auto custom_plot = std::make_unique<QCustomPlot>();
52 auto graph = custom_plot->addGraph();
63 EXPECT_EQ(graph->pen().color(), QColor(Qt::black));
64 EXPECT_EQ(graph->pen().style(), Qt::SolidLine);
65 EXPECT_EQ(graph->pen().width(), 1);
70 auto custom_plot = std::make_unique<QCustomPlot>();
71 auto graph = custom_plot->addGraph();
79 pen_item->setSelected(
true);
82 EXPECT_EQ(graph->pen().color(), QColor(Qt::black));
83 EXPECT_EQ(graph->pen().style(), Qt::DashLine);
84 EXPECT_EQ(graph->pen().width(), 1);
89 auto custom_plot = std::make_unique<QCustomPlot>();
90 auto graph = custom_plot->addGraph();
102 EXPECT_EQ(graph->pen().color(), QColor(Qt::red));
103 EXPECT_EQ(graph->pen().style(), Qt::SolidLine);
104 EXPECT_EQ(graph->pen().width(), 2);
107 pen_item->setNamedColor(
"azure");
108 EXPECT_EQ(graph->pen().color().name(), QString(
"#f0ffff"));
void setItem(SessionItem *item)
Establishes communication between QCPGraph and PenItem.
Represents basics settings of QPen.
static const std::string P_COLOR
static const std::string P_WIDTH
Main class to hold hierarchy of SessionItem objects.
T * insertItem(SessionItem *parent=nullptr, const TagRow &tagrow={})
Inserts item into given parent under given tagrow.
materialitems.h Collection of materials to populate MaterialModel.
TEST_F(PenControllerTest, initialState)
Initial state.