MCPcopy Create free account
hub / github.com/KDE/labplot / zoomOutX_SingleRange

Method zoomOutX_SingleRange

tests/multirange/MultiRangeTest.cpp:515–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513}
514
515void MultiRangeTest::zoomOutX_SingleRange() {
516 LOAD_PROJECT
517
518 auto refValuesAxis1 = vertAxisP1->tickLabelValues();
519 auto refValuesAxis2 = vertAxis2P1->tickLabelValues();
520 auto refValuesAxis3 = vertAxis3P1->tickLabelValues();
521 horAxisP1->setSelected(true);
522 p1->zoomOutX(0);
523
524 CHECK_RANGE(p1, sinCurve, Dimension::X, -0.2, 1.2); // zoom
525 CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.);
526 CHECK_RANGE(p1, tanCurve, Dimension::X, -0.2, 1.2); // zoom
527 CHECK_RANGE(p1, tanCurve, Dimension::Y, -250., 250.);
528 CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.);
529 CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.);
530
531 // check auto scale
532 p1->navigate(0, CartesianPlot::NavigationOperation::ScaleAutoX);
533
534 CHECK_RANGE(p1, sinCurve, Dimension::X, 0., 1.);
535 CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.);
536 CHECK_RANGE(p1, tanCurve, Dimension::X, 0., 1.);
537 CHECK_RANGE(p1, tanCurve, Dimension::Y, -250., 250.);
538 CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.);
539 CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.);
540
541 COMPARE_DOUBLE_VECTORS(vertAxisP1->tickLabelValues(), refValuesAxis1);
542 COMPARE_DOUBLE_VECTORS(vertAxis2P1->tickLabelValues(), refValuesAxis2);
543 COMPARE_DOUBLE_VECTORS(vertAxis3P1->tickLabelValues(), refValuesAxis3); // on third axis there is no autoscale, because it uses a different range
544}
545
546void MultiRangeTest::zoomOutX_AllRanges() {
547 LOAD_PROJECT

Callers

nothing calls this directly

Calls 4

tickLabelValuesMethod · 0.80
zoomOutXMethod · 0.80
navigateMethod · 0.80
setSelectedMethod · 0.45

Tested by

no test coverage detected