| 274 | |
| 275 | STD_SETTER_CMD_IMPL_F_S(DatapickerPoint, SetMinusDeltaYPos, QPointF, minusDeltaYPos, update) |
| 276 | void DatapickerPoint::setMinusDeltaYPos(QPointF pos) { |
| 277 | Q_D(DatapickerPoint); |
| 278 | if (pos != d->minusDeltaYPos) { |
| 279 | auto* curve = dynamic_cast<DatapickerCurve*>(parentAspect()); |
| 280 | if (!curve) |
| 281 | return; |
| 282 | |
| 283 | beginMacro(i18n("%1: set -delta_Y position", name())); |
| 284 | if (curve->curveErrorTypes().y == DatapickerCurve::ErrorType::SymmetricError) { |
| 285 | exec(new DatapickerPointSetMinusDeltaYPosCmd(d, pos, ki18n("%1: set -delta_Y position"))); |
| 286 | setPlusDeltaYPos(QPointF(pos.x(), -std::abs(pos.y()))); |
| 287 | } else |
| 288 | exec(new DatapickerPointSetMinusDeltaYPosCmd(d, pos, ki18n("%1: set -delta_Y position"))); |
| 289 | endMacro(); |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | void DatapickerPoint::setPrinting(bool on) { |
| 294 | Q_D(DatapickerPoint); |
no test coverage detected