| 84 | } |
| 85 | |
| 86 | void TextLabelTest::addPlot() { |
| 87 | Project project; |
| 88 | auto* ws = new Worksheet(QStringLiteral("worksheet")); |
| 89 | QVERIFY(ws != nullptr); |
| 90 | project.addChild(ws); |
| 91 | |
| 92 | auto* p = new CartesianPlot(QStringLiteral("plot")); |
| 93 | QVERIFY(p != nullptr); |
| 94 | ws->addChild(p); |
| 95 | |
| 96 | auto* l = new TextLabel(QStringLiteral("Label")); |
| 97 | QVERIFY(l != nullptr); |
| 98 | l->setText(QStringLiteral("TextLabelText")); |
| 99 | ws->addChild(l); |
| 100 | |
| 101 | QCOMPARE(l->text().mode, TextLabel::Mode::Text); |
| 102 | VERIFYLABELCOLORS(l, Qt::black, Qt::transparent); |
| 103 | QCOMPARE(l->fontColor(), Qt::black); |
| 104 | QCOMPARE(l->backgroundColor(), QColor(1, 1, 1, 0)); |
| 105 | |
| 106 | // add title? |
| 107 | |
| 108 | // add axes? |
| 109 | // check axis label |
| 110 | } |
| 111 | |
| 112 | /*! |
| 113 | * \brief TextLabelTest::multiLabelEdit |