|
28 | 28 | CursorShape = type(QC.Qt.CursorShape.ArrowCursor) |
29 | 29 |
|
30 | 30 |
|
31 | | -def is_touch_screen_available() -> bool: |
32 | | - """Check if a touch screen is available. |
33 | | -
|
34 | | - Returns: |
35 | | - bool: True if a touch screen is available, False otherwise. |
36 | | - """ |
37 | | - touch_devices = QG.QTouchDevice.devices() |
38 | | - return any(device.type() == QG.QTouchDevice.TouchScreen for device in touch_devices) |
39 | | - |
40 | | - |
41 | 31 | def buttons_to_str(buttons: int) -> str: |
42 | 32 | """Conversion des flags Qt en chaine""" |
43 | 33 | string = "" |
@@ -1155,12 +1145,11 @@ def setup_standard_tool_filter(filter, start_state): |
1155 | 1145 | ZoomHandler(filter, QC.Qt.RightButton, start_state=start_state) |
1156 | 1146 | MenuHandler(filter, QC.Qt.RightButton, start_state=start_state) |
1157 | 1147 |
|
1158 | | - if is_touch_screen_available(): |
1159 | | - # Gestes |
1160 | | - PinchZoomHandler(filter, start_state=start_state) |
1161 | | - # FIXME: Pinch/PanZoomHandler are currently mutually exclusive: when both |
1162 | | - # are enabled, it doesn't work ; when only one is enabled, it works |
1163 | | - PanGestureHandler(filter, start_state=start_state) |
| 1148 | + # Gestes |
| 1149 | + PinchZoomHandler(filter, start_state=start_state) |
| 1150 | + # FIXME: Pinch/PanZoomHandler are currently mutually exclusive: when both |
| 1151 | + # are enabled, it doesn't work ; when only one is enabled, it works |
| 1152 | + PanGestureHandler(filter, start_state=start_state) |
1164 | 1153 |
|
1165 | 1154 | # Autres (touches, move) |
1166 | 1155 | MoveHandler(filter, start_state=start_state) |
|
0 commit comments