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

Method zoomOutX_AllRanges

tests/multirange/MultiRangeTest.cpp:546–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544}
545
546void MultiRangeTest::zoomOutX_AllRanges() {
547 LOAD_PROJECT
548
549 auto refValuesAxis1 = vertAxisP1->tickLabelValues();
550 auto refValuesAxis2 = vertAxis2P1->tickLabelValues();
551 auto refValuesAxis3 = vertAxis3P1->tickLabelValues();
552 horAxisP1->setSelected(true);
553 p1->zoomOutX();
554
555 CHECK_RANGE(p1, sinCurve, Dimension::X, -0.2, 1.2); // zoom
556 CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.);
557 CHECK_RANGE(p1, tanCurve, Dimension::X, -0.2, 1.2); // zoom
558 CHECK_RANGE(p1, tanCurve, Dimension::Y, -250., 250.);
559 CHECK_RANGE(p1, logCurve, Dimension::X, -20., 120.); // zoom
560 CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.);
561
562 // check auto scale
563 p1->navigate(-1, CartesianPlot::NavigationOperation::ScaleAutoX);
564
565 CHECK_RANGE(p1, sinCurve, Dimension::X, 0., 1.);
566 CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.);
567 CHECK_RANGE(p1, tanCurve, Dimension::X, 0., 1.);
568 CHECK_RANGE(p1, tanCurve, Dimension::Y, -250., 250.);
569 CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.);
570 CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.);
571
572 COMPARE_DOUBLE_VECTORS(vertAxisP1->tickLabelValues(), refValuesAxis1);
573 COMPARE_DOUBLE_VECTORS(vertAxis2P1->tickLabelValues(), refValuesAxis2);
574 COMPARE_DOUBLE_VECTORS(vertAxis3P1->tickLabelValues(), refValuesAxis3); // on third axis there is no autoscale, because it uses a different range
575}
576
577void MultiRangeTest::zoomOutY_SingleRange() {
578 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