This is for desktop only. We will have to think about what to
do on mobile. Either a "hamburger menu" or a "long click" seem
to be the most reasonable options.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
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>
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>
The code assumed that when adding chart items to lists, prev
and next are initialized to null. Make this more robust.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This was very painful, because I had to implement rearranging the
paint order of the QSGNodes. The resulting code appears quite
brittle. Let's see where that brings us.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
To do so, generalize the animation routine.
This seems to expose a QtQuick bug: we get spurious
hover-events when the tooltip item is updated in the
animation. We have to check for that to prevent
en endless loop (until the user moves the mouse out
of the profile window).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
So far, the only dragable item was the legend in the statistics
code. On the profile, we will have multiple dragable items.
Therefore, move the code up and make it more general. This
took some reorganization. Now, the size of the ChartItem
is saved in the base class. Also, setPos() became a virtual
function.
The dragable items are kept as an unsorted list.
If there will be many of them, this should be changed to
some sort of sorted list (maybe quadtree?).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Still behaves weirdly when panning the chart.
No support for moving the ToolTipItem.
Doesn't add information on bookmarks under the mouse cursor.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This breaks all dynamic features, including animations,
zooming tooltips, planner-handles, etc. They will have to be
converted one-by-one to QtQuick, which will be a major pain,
as the ProfileView is destroyed by Qt6 on reparenting.
This means that the view cannot store any persistent state.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Move most of the QtQuick code to its own directory, so that it
can be reused in the future for the chart.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>