| 856 | } |
| 857 | |
| 858 | void MultiRangeTest::shiftDown_AllRanges() { |
| 859 | LOAD_PROJECT |
| 860 | auto refValuesAxis1 = vertAxisP1->tickLabelValues(); |
| 861 | auto refValuesAxis2 = vertAxis2P1->tickLabelValues(); |
| 862 | auto refValuesAxis3 = vertAxis3P1->tickLabelValues(); |
| 863 | vertAxisP1->setSelected(true); |
| 864 | p1->shiftDownY(); |
| 865 | |
| 866 | CHECK_RANGE(p1, sinCurve, Dimension::X, 0., 1.); |
| 867 | CHECK_RANGE(p1, sinCurve, Dimension::Y, -0.8, 1.2); // shift |
| 868 | CHECK_RANGE(p1, tanCurve, Dimension::X, 0., 1.); |
| 869 | CHECK_RANGE(p1, tanCurve, Dimension::Y, -200., 300.); // shift |
| 870 | CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.); |
| 871 | CHECK_RANGE(p1, logCurve, Dimension::Y, -8.4, 7.6); // shift |
| 872 | |
| 873 | // check auto scale (all) |
| 874 | p1->setSelected(true); |
| 875 | p1->navigate(-1, CartesianPlot::NavigationOperation::ScaleAuto); |
| 876 | |
| 877 | CHECK_RANGE(p1, sinCurve, Dimension::X, 0., 1.); |
| 878 | CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.); |
| 879 | CHECK_RANGE(p1, tanCurve, Dimension::X, 0., 1.); |
| 880 | CHECK_RANGE(p1, tanCurve, Dimension::Y, -250., 250.); |
| 881 | CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.); |
| 882 | CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.); |
| 883 | |
| 884 | // retransform of vertAxisP1 is done, so the tickLabelValues change back |
| 885 | COMPARE_DOUBLE_VECTORS(vertAxisP1->tickLabelValues(), refValuesAxis1); |
| 886 | COMPARE_DOUBLE_VECTORS(vertAxis2P1->tickLabelValues(), refValuesAxis2); |
| 887 | QVector<double> ref = {-10, -6, -2, 2, 6}; |
| 888 | COMPARE_DOUBLE_VECTORS(vertAxis3P1->tickLabelValues(), ref); // vertAxis3 is not autoscaled when loading, after autoscaling the values are different |
| 889 | } |
| 890 | |
| 891 | QTEST_MAIN(MultiRangeTest) |
nothing calls this directly
no test coverage detected