| 195 | } |
| 196 | |
| 197 | void DatapickerTest::maplog10XToCartesian() { |
| 198 | DatapickerImage::ReferencePoints points; |
| 199 | points.type = DatapickerImage::GraphType::Log10X; |
| 200 | points.logicalPos[0].setX(pow(10, 1)); |
| 201 | points.logicalPos[0].setY(2); |
| 202 | points.logicalPos[1].setX(pow(10, 2)); |
| 203 | points.logicalPos[1].setY(4); |
| 204 | points.logicalPos[2].setX(pow(10, 3)); |
| 205 | points.logicalPos[2].setY(6); |
| 206 | points.scenePos[0].setX(6.21); |
| 207 | points.scenePos[0].setY(7.23); |
| 208 | points.scenePos[1].setX(-51.2); |
| 209 | points.scenePos[1].setY(3234); |
| 210 | points.scenePos[2].setX(-23); |
| 211 | points.scenePos[2].setY(+5e6); |
| 212 | |
| 213 | Transform t; |
| 214 | QCOMPARE(t.mapTypeToCartesian(points), true); |
| 215 | VALUES_EQUAL(t.x[0], 1.); |
| 216 | VALUES_EQUAL(t.y[0], 2.); |
| 217 | VALUES_EQUAL(t.x[1], 2.); |
| 218 | VALUES_EQUAL(t.y[1], 4.); |
| 219 | VALUES_EQUAL(t.x[2], 3.); |
| 220 | VALUES_EQUAL(t.y[2], 6.); |
| 221 | VALUES_EQUAL(t.X[0], 6.21); |
| 222 | VALUES_EQUAL(t.Y[0], 7.23); |
| 223 | VALUES_EQUAL(t.X[1], -51.2); |
| 224 | VALUES_EQUAL(t.Y[1], 3234.); |
| 225 | VALUES_EQUAL(t.X[2], -23.); |
| 226 | VALUES_EQUAL(t.Y[2], +5.e6); |
| 227 | } |
| 228 | |
| 229 | void DatapickerTest::maplog10YToCartesian() { |
| 230 | DatapickerImage::ReferencePoints points; |
nothing calls this directly
no test coverage detected