diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-17 18:29:54 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2021-01-20 08:47:18 +0100 |
commit | 5d5ebfcf3c737aa8c36192eb7bf7d7dee6b33099 (patch) | |
tree | f28e670816bc6a2676b914709419665d98b28dbd /tests/tst_qPrefDivePlanner.qml | |
parent | b42e19e36b4d80716059011581851c8600338cbb (diff) | |
download | subsurface-5d5ebfcf3c737aa8c36192eb7bf7d7dee6b33099.tar.gz |
statistics: implement showing / hiding of items in QSG
To replace the QGraphicsScene, we need the possibility of
showing and hiding items.
Turns out, the QSG API is completely insane.
Whether an item should be shown is queried by the virtual
function isSubtreeBlocked(), which is supposed to be
overriden by the derived classes.
However, the common nodes for rectangles and pixmaps are
supposed to be created by QQuickWindow, for hardware
optimization. This gives nodes that cannot be derived
from and therefore whether the item is shown or not cannot
be controlled.
There are therefore two distinct cases to consider: The
node is allocated by the code directly or indirectly by
QQuickWindow.
In the latter case, we use a proxy node with the only
purpose of having a "visible" flag and add the obtained
node as a child.
This madness is performed with template trickery to get
unified code.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'tests/tst_qPrefDivePlanner.qml')
0 files changed, 0 insertions, 0 deletions