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

Method shiftDown_SingleRange

tests/multirange/MultiRangeTest.cpp:794–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792}
793
794void MultiRangeTest::shiftDown_SingleRange() {
795 LOAD_PROJECT
796 auto refValuesAxis1 = vertAxisP1->tickLabelValues();
797 auto refValuesAxis2 = vertAxis2P1->tickLabelValues();
798 auto refValuesAxis3 = vertAxis3P1->tickLabelValues();
799
800 vertAxisP1->setSelected(true);
801 p1->shiftDownY(0);
802
803 CHECK_RANGE(p1, sinCurve, Dimension::X, 0., 1.);
804 CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.);
805 CHECK_RANGE(p1, tanCurve, Dimension::X, 0., 1.)
806 CHECK_RANGE(p1, tanCurve, Dimension::Y, -200., 300.); // shift
807 CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.);
808 CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.);
809
810 // check auto scale
811 // p1->enableAutoScale(Dimension::Y, 0);
812 p1->navigate(0, CartesianPlot::NavigationOperation::ScaleAutoY);
813
814 CHECK_RANGE(p1, sinCurve, Dimension::X, 0., 1.);
815 CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.);
816 CHECK_RANGE(p1, tanCurve, Dimension::X, 0., 1.);
817 CHECK_RANGE(p1, tanCurve, Dimension::Y, -250., 250.);
818 CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.);
819 CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.);
820
821 // retransform of vertAxisP1 is done, so the tickLabelValues change back
822 COMPARE_DOUBLE_VECTORS(vertAxisP1->tickLabelValues(), refValuesAxis1);
823 COMPARE_DOUBLE_VECTORS(vertAxis2P1->tickLabelValues(), refValuesAxis2);
824 COMPARE_DOUBLE_VECTORS(vertAxis3P1->tickLabelValues(), refValuesAxis3);
825}
826
827void MultiRangeTest::shiftUp_AllRanges() {
828 LOAD_PROJECT

Callers

nothing calls this directly

Calls 4

tickLabelValuesMethod · 0.80
shiftDownYMethod · 0.80
navigateMethod · 0.80
setSelectedMethod · 0.45

Tested by

no test coverage detected