| 157 | } |
| 158 | |
| 159 | void MultiRangeTest::zoomYSelection_AllRanges() { |
| 160 | LOAD_PROJECT |
| 161 | auto refValuesAxis1 = vertAxisP1->tickLabelValues(); |
| 162 | auto refValuesAxis2 = vertAxis2P1->tickLabelValues(); |
| 163 | auto refValuesAxis3 = vertAxis3P1->tickLabelValues(); |
| 164 | vertAxisP1->setSelected(true); |
| 165 | w->setCartesianPlotActionMode(Worksheet::CartesianPlotActionMode::ApplyActionToSelection); |
| 166 | SET_CARTESIAN_MOUSE_MODE(CartesianPlot::MouseMode::ZoomYSelection) |
| 167 | |
| 168 | p1->mousePressZoomSelectionMode(QPointF(0.2, -150), -1); |
| 169 | p1->mouseMoveZoomSelectionMode(QPointF(0.6, 100), -1); |
| 170 | p1->mouseReleaseZoomSelectionMode(-1); |
| 171 | |
| 172 | CHECK_RANGE(p1, sinCurve, Dimension::X, 0., 1.); |
| 173 | CHECK_RANGE(p1, sinCurve, Dimension::Y, -0.8, 0.6); // zoom |
| 174 | CHECK_RANGE(p1, tanCurve, Dimension::X, 0., 1.); |
| 175 | CHECK_RANGE(p1, tanCurve, Dimension::Y, -150., 100.); // zoom |
| 176 | CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.); |
| 177 | CHECK_RANGE(p1, logCurve, Dimension::Y, -7., 2.); // zoom |
| 178 | |
| 179 | QVector<double> ref = {-150.0, -100, -50, 0, 50, 100}; |
| 180 | COMPARE_DOUBLE_VECTORS(vertAxisP1->tickLabelValues(), ref); |
| 181 | ref = {-0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6}; |
| 182 | COMPARE_DOUBLE_VECTORS(vertAxis2P1->tickLabelValues(), ref); |
| 183 | ref = {-7., -4., -1., 2.}; |
| 184 | COMPARE_DOUBLE_VECTORS(vertAxis3P1->tickLabelValues(), ref); |
| 185 | } |
| 186 | |
| 187 | void MultiRangeTest::zoomYSelection_SingleRange() { |
| 188 | LOAD_PROJECT |
nothing calls this directly
no test coverage detected