QGraphicsSceneContextMenuEvent Class Reference |
enum | Reason { Mouse, Keyboard, Other } |
~QGraphicsSceneContextMenuEvent () | |
Qt::KeyboardModifiers | modifiers () const |
QPointF | pos () const |
Reason | reason () const |
QPointF | scenePos () const |
QPoint | screenPos () const |
The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.
A QContextMenuEvent received by a QGraphicsView is translated into a QGraphicsSceneContextMenuEvent. The QContextMenuEvent::globalPos() is translated into item, scene, and screen coordinates (pos(), scenePos(), and screenPos()).
See also QGraphicsSceneMouseEvent, QGraphicsSceneWheelEvent, and QContextMenuEvent.
This enum describes the reason why the context event was sent.
Constant | Value | Description |
---|---|---|
QGraphicsSceneContextMenuEvent::Mouse | 0 | The mouse caused the event to be sent. On most platforms, this means the right mouse button was clicked. |
QGraphicsSceneContextMenuEvent::Keyboard | 1 | The keyboard caused this event to be sent. On Windows and Mac OS X, this means the menu button was pressed. |
QGraphicsSceneContextMenuEvent::Other | 2 | The event was sent by some other means (i.e. not by the mouse or keyboard). |
Destroys the event.
Returns the keyboard modifiers in use when the context menu was requested.
Returns the position of the mouse cursor in item coordinates at the moment the context menu was requested.
See also scenePos() and screenPos().
Returns the reason for the context menu event.
See also QGraphicsSceneContextMenuEvent::Reason.
Returns the position of the mouse cursor in scene coordinates at the moment the the context menu was requested.
See also pos() and screenPos().
Returns the position of the mouse cursor in screen coordinates at the moment the the context menu was requested.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com