QGraphicsSceneWheelEvent Class
La classe QGraphicsSceneWheelEvent fornisce gli eventi relativi alla rotellina del mouse nel framework della vista grafica. Per saperne di più...
| Intestazione: | #include <QGraphicsSceneWheelEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake: | QT += widgets |
| Eredita da: | QGraphicsSceneEvent |
Funzioni pubbliche
| virtual | ~QGraphicsSceneWheelEvent() |
| Qt::MouseButtons | buttons() const |
| int | delta() const |
(since 6.2) bool | isInverted() const |
| Qt::KeyboardModifiers | modifiers() const |
| Qt::Orientation | orientation() const |
(since 6.2) Qt::ScrollPhase | phase() const |
(since 6.2) QPoint | pixelDelta() const |
| QPointF | pos() const |
| QPointF | scenePos() const |
| QPoint | screenPos() const |
Descrizione dettagliata
QWheelEventGli eventi ricevuti da un QGraphicsView vengono convertiti in QGraphicsSceneWheelEvents; converte QWheelEvent::globalPos() in coordinate di elemento, scena e schermo (pos(), scenePos() e screenPos()).
Vedi anche QGraphicsSceneMouseEvent, QGraphicsSceneContextMenuEvent, QGraphicsSceneHoverEvent e QWheelEvent.
Documentazione sulle funzioni membro
[virtual noexcept] QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent()
Distrugge l'QGraphicsSceneWheelEvent.
Qt::MouseButtons QGraphicsSceneWheelEvent::buttons() const
Restituisce i pulsanti del mouse che erano stati premuti al verificarsi dell'evento della rotellina.
Vedi anche modifiers().
int QGraphicsSceneWheelEvent::delta() const
Restituisce la distanza percorsa dalla rotella, espressa in ottavi (1/8) di grado. Un valore positivo indica che la rotella è stata ruotata in avanti, allontanandosi dall’utente; un valore negativo indica che la rotella è stata ruotata all’indietro, avvicinandosi all’utente.
La maggior parte dei modelli di mouse funziona con incrementi di 15 gradi; in tal caso, il valore delta è un multiplo di 120 (== 15 * 8).
[since 6.2] bool QGraphicsSceneWheelEvent::isInverted() const
Restituisce se i valori delta forniti con l’evento sono invertiti.
Questa funzione è stata introdotta in Qt 6.2.
Qt::KeyboardModifiers QGraphicsSceneWheelEvent::modifiers() const
Restituisce i modificatori della tastiera che erano attivi al momento in cui si è verificato l'evento della rotellina.
Vedi anche buttons().
Qt::Orientation QGraphicsSceneWheelEvent::orientation() const
Restituisce l'orientamento della ruota.
[since 6.2] Qt::ScrollPhase QGraphicsSceneWheelEvent::phase() const
Restituisce la fase di scorrimento di questo evento della rotella.
Questa funzione è stata introdotta in Qt 6.2.
Vedi anche QWheelEvent::phase.
[since 6.2] QPoint QGraphicsSceneWheelEvent::pixelDelta() const
Restituisce la distanza di scorrimento in pixel sullo schermo. Questo valore è disponibile sulle piattaforme che supportano valori delta basati su pixel ad alta risoluzione, come macOS. Il valore deve essere utilizzato direttamente per far scorrere il contenuto sullo schermo.
Questa funzione è stata introdotta in Qt 6.2.
Vedi anche QWheelEvent::pixelDelta.
QPointF QGraphicsSceneWheelEvent::pos() const
Restituisce la posizione del cursore nelle coordinate dell'elemento al momento in cui si è verificato l'evento della rotellina.
Vedi anche scenePos() e screenPos().
QPointF QGraphicsSceneWheelEvent::scenePos() const
Restituisce la posizione del cursore nelle coordinate della scena al momento in cui si è verificato l'evento della rotellina.
Vedi anche pos() e screenPos().
QPoint QGraphicsSceneWheelEvent::screenPos() const
Restituisce la posizione del cursore nelle coordinate dello schermo nel momento in cui si è verificato l'evento della rotellina.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.