• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jni / vispy / 12291385307
70%
master: 70%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 12 Dec 2024 06:59AM UTC
Jobs 4
Files 344
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Nov 2024 03:17PM UTC coverage: 69.903% (+0.004%) from 69.899%
12291385307

push

github

web-flow
Add modifiers to QT native gesture events (#2631)

### Why this PR?

Mouse Events forwarded from QT to the canvas events have a `modifers`
attribute that is very useful to create enhanced interactions. For
instance it can be used to make CONTROL + zoom behave like a slower zoom
to better manipulate the camera.

Sadly when the QT event is a NativeGesture event, the current qt backend
(_qt.py) does not forward this list of modifiers.

This PR fixes this so that we can have access to the modifiers when
handling a QT native gesture event in vispy.

### What are the changes?

This PR just adds a `modifiers` attribute to these events, exactly as
it's done with the classic mouse events. It works the same because
QNativeGestureEvent inherits from QInputEvent
(https://doc.qt.io/qtforpython-6/PySide6/QtGui/QInputEvent.html#PySide6.QtGui.QInputEvent)
that has the `modifiers` method.

### About the tests

I couldn't find any test about the forwarding of QT events so I didn't
change any specific test in this PR

### Note

For the moment QT does not forward the keys pressed to the `modifiers`
of the QNativeGestureEvents but :
- the interface exists on the QT side (the method `modifiers` exists)
- it allows for a more homogenous interface on vispy side (mouse events
& gesture events share a better interface)
- QT will hopefully fill in the modifiers in QNativeGestureEvents in a
future update: better be ready ;)

5794 of 10522 branches covered (55.07%)

Branch coverage included in aggregate %.

23981 of 32073 relevant lines covered (74.77%)

2.45 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
87.5
-12.5% vispy/util/__init__.py
8
81.54
-0.3% vispy/visuals/volume.py
10
91.19
0.06% vispy/visuals/_scalable_textures.py
16
87.92
-0.74% vispy/visuals/image.py
18
69.88
-0.25% vispy/geometry/calculations.py
20
91.32
0.01% vispy/geometry/triangulation.py
42
79.35
0.03% vispy/gloo/texture.py
Jobs
ID Job ID Ran Files Coverage
1 run-2 - 12291385307.1 12 Dec 2024 07:08AM UTC 344
68.68
2 run-1 - 12291385307.2 12 Dec 2024 07:08AM UTC 344
43.01
3 run-3 - 12291385307.3 12 Dec 2024 07:08AM UTC 344
48.77
4 run-4 - 12291385307.4 12 Dec 2024 07:08AM UTC 344
67.43
Source Files on build 12291385307
  • Tree
  • List 344
  • Changed 10
  • Source Changed 0
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 85c4bf94 on github
  • Prev Build on main (#9266685178)
  • Next Build on main (#14532569852)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc