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

vispy / vispy / 11757320223
75%

Build:
DEFAULT BRANCH: main
Ran 09 Nov 2024 03:19PM 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: 74.77% (+0.003%) from 74.767%
11757320223

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%)

23981 of 32073 relevant lines covered (74.77%)

2.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4 - 11757320223.1 09 Nov 2024 03:28PM UTC 0
72.32
2 run-2 - 11757320223.2 09 Nov 2024 03:28PM UTC 0
74.02
3 run-3 - 11757320223.3 09 Nov 2024 03:28PM UTC 0
52.12
4 run-1 - 11757320223.4 09 Nov 2024 03:28PM UTC 0
46.55
Source Files on build 11757320223
Detailed source file information is not available for this build.
  • Back to Repo
  • 85c4bf94 on github
  • Prev Build on main (#11221906118)
  • Next Build on main (#12667848614)
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

© 2026 Coveralls, Inc