profile: convert the "ruler item" to qt-quick

Code is mostly based on the "tooltip item". The dragging code was
slightly reworked to be more logical. A "disk item" was added for
the handles.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-01-12 22:26:32 +01:00
parent b167e130a4
commit ea0085fef6
14 changed files with 313 additions and 228 deletions

View file

@ -342,7 +342,7 @@ void ChartView::mouseMoveEvent(QMouseEvent *event)
QSizeF sceneSize = size();
if (sceneSize.width() <= 1.0 || sceneSize.height() <= 1.0)
return;
draggedItem->setPos(event->pos() - dragStartMouse + dragStartItem);
draggedItem->drag(event->pos() - dragStartMouse + dragStartItem);
update();
}
}