Review 2 fixes for 13.17 and 13.18: the glow scales back exactly, tests for the front tab, a rendering editor, the Scanlines rows, removePoint's reach, repair's strict bound, the divider strip; bullets corrected
This commit is contained in:
1 parent
81894f744a
commit
5c8e18c5af
7 files changed
+129
-18
No files matched your search
@@ -59,6 +59,8 @@ private slots:
|
||||
void theChosenPointIsLitAndReadOut();
|
||||
void aNewChannelOrPresetDropsTheChoice();
|
||||
void aDoubleClickRemovesAnInnerPointAndTheChoice();
|
||||
void aDoubleClickReachesFourHundredthsByX();
|
||||
void aDoubleClickInTheStripMovesADivider();
|
||||
void onlyTheLeftButtonDragsAndAPressStartsAfresh();
|
||||
void theGraphSaysWhatADragDoes();
|
||||
};
|
||||
@@ -358,6 +360,31 @@ void CameraRawCurveGraphTests::aDoubleClickRemovesAnInnerPointAndTheChoice()
|
||||
QCOMPARE(graph.readout().text(), QString("In 255 Out 255"));
|
||||
}
|
||||
|
||||
void CameraRawCurveGraphTests::aDoubleClickReachesFourHundredthsByX()
|
||||
{
|
||||
Graph graph(true);
|
||||
// Beside the start nothing is added; 0.037 removes, 0.042 not.
|
||||
QVERIFY(3.0 / graph.graph->width() < 0.01);
|
||||
for (const auto &[inner, removed] : {std::pair(0.045, true), std::pair(0.05, false)}) {
|
||||
graph.set([inner](CameraRawCurveSettings &curve) { curve.rgb = {{0, 0}, {inner, 0.9}, {1, 1}}; });
|
||||
QTest::mouseDClick(graph.graph->window()->windowHandle(), Qt::LeftButton, {}, graph.graph->mapTo(graph.graph->window(), QPoint(3, 140)));
|
||||
QCOMPARE(graph.curve().rgb.size(), removed ? size_t(2) : size_t(3));
|
||||
}
|
||||
}
|
||||
|
||||
void CameraRawCurveGraphTests::aDoubleClickInTheStripMovesADivider()
|
||||
{
|
||||
Graph graph;
|
||||
const int w = graph.graph->width(), h = graph.graph->height();
|
||||
graph.set([](CameraRawCurveSettings &curve) { curve.rgb = {{0, 0}, {0.5, 0.5}, {1, 1}}; });
|
||||
// Both presses take the nearest divider there; no point goes.
|
||||
QTest::mouseDClick(graph.graph->window()->windowHandle(), Qt::LeftButton, {}, graph.graph->mapTo(graph.graph->window(), QPoint(int(0.3 * w), h - 5)));
|
||||
QVERIFY(std::abs(graph.curve().shadowSplit - 30) < 0.5);
|
||||
QVERIFY(graph.curve().darkSplit == 50 && graph.curve().lightSplit == 75);
|
||||
QCOMPARE(graph.curve().rgb.size(), size_t(3));
|
||||
QVERIFY(graph.curve().shadows == 0 && graph.curve().darks == 0);
|
||||
}
|
||||
|
||||
void CameraRawCurveGraphTests::onlyTheLeftButtonDragsAndAPressStartsAfresh()
|
||||
{
|
||||
Graph graph(true);
|
||||
|
||||
Reference in new issue
Block a user