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

Method setMinusDeltaYPos

src/backend/datapicker/DatapickerPoint.cpp:276–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274
275STD_SETTER_CMD_IMPL_F_S(DatapickerPoint, SetMinusDeltaYPos, QPointF, minusDeltaYPos, update)
276void 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
293void DatapickerPoint::setPrinting(bool on) {
294 Q_D(DatapickerPoint);

Callers 1

mouseReleaseEventMethod · 0.80

Calls 3

xMethod · 0.80
QPointFClass · 0.70
yMethod · 0.45

Tested by

no test coverage detected