Qt:Документация 4.3.2/qgraphicsscenecontextmenuevent

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QGraphicsSceneContextMenuEvent Class Reference
[модуль QtGui ]

The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework. Далее...

 #include <QGraphicsSceneContextMenuEvent>

Inherits QGraphicsSceneEvent.

Класс был добавлен в Qt 4.2.

[править] Открытые типы

  • enum Reason { Mouse, Keyboard, Other }

[править] Открытые функции

[править] Дополнительные унаследованные члены


[править] Подробное описание

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.


[править] Описание типов

[править]
enum QGraphicsSceneContextMenuEvent::Reason

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


Константа Значение Описание
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).

[править] Описание функций-членов

[править]
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().



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2