Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QGraphicsSceneContextMenuEvent Class Reference
[QtGui module]

The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework. More...

 #include <QGraphicsSceneContextMenuEvent>

Inherits QGraphicsSceneEvent.

This class was introduced in Qt 4.2.

Public Types

  • enum Reason { Mouse, Keyboard, Other }

Public Functions

Additional Inherited Members

  • 1 property inherited from QEvent
  • 1 static public member inherited from QEvent

Detailed Description

The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.

A QContextMenuEvent received by a QGraphicsView is translated into a QGraphicsSceneContextMenuEvent. The QWheelEvent::globalPos() is translated into item, scene, and screen coordinates (pos(), scenePos(), and screenPos()).

See also QGraphicsSceneMouseEvent, QGraphicsSceneWheelEvent, and QContextMenuEvent.


Member Type Documentation

enum QGraphicsSceneContextMenuEvent::Reason

This enum describes the reason why the context event was sent.

ConstantValueDescription
QGraphicsSceneContextMenuEvent::Mouse0The mouse caused the event to be sent. On most platforms, this means the right mouse button was clicked.
QGraphicsSceneContextMenuEvent::Keyboard1The keyboard caused this event to be sent. On Windows and Mac OS X, this means the menu button was pressed.
QGraphicsSceneContextMenuEvent::Other2The event was sent by some other means (i.e. not by the mouse or keyboard).


Member Function Documentation

QGraphicsSceneContextMenuEvent::~QGraphicsSceneContextMenuEvent ()

Destroys the event.

Qt::KeyboardModifiers QGraphicsSceneContextMenuEvent::modifiers () const

Returns the keyboard modifiers in use when the context menu was requested.

QPointF QGraphicsSceneContextMenuEvent::pos () const

Returns the position of the mouse cursor in item coordinates at the moment the the context menu was requested.

See also scenePos() and screenPos().

Reason QGraphicsSceneContextMenuEvent::reason () const

Returns the reason for the context menu event.

See also QGraphicsSceneContextMenuEvent::Reason.

QPointF QGraphicsSceneContextMenuEvent::scenePos () const

Returns the position of the mouse cursor in scene coordinates at the moment the the context menu was requested.

See also pos() and screenPos().

QPoint QGraphicsSceneContextMenuEvent::screenPos () const

Returns the position of the mouse cursor in screen coordinates at the moment the the context menu was requested.

See also pos() and scenePos().

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 qtextended4.4
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 !
 
 
 
 
Partenaires

Hébergement Web