profile: port basic dive editing to QtQuick

This needed a bit of refactoring of the ChartItem code, because
we have to be signaled on drag start. Currently only one handle
can be selected at a time. This was (implicitly) the case anyway,
as far as I can tell.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-01-20 21:03:02 +01:00
parent ea0085fef6
commit bece0a0652
21 changed files with 597 additions and 477 deletions

View file

@ -612,6 +612,11 @@ int ProfileScene::timeAt(QPointF pos) const
return lrint(timeAxis->valueAt(pos));
}
int ProfileScene::depthAt(QPointF pos) const
{
return lrint(profileYAxis->valueAt(pos));
}
std::pair<double, double> ProfileScene::minMaxTime() const
{
return { timeAxis->minimum(), timeAxis->maximum() };