QGraphicsSceneEvent Class Reference

#include <qgraphicssceneevent.h>

Inheritance diagram for QGraphicsSceneEvent:

Inheritance graph
[legend]
Collaboration diagram for QGraphicsSceneEvent:

Collaboration graph
[legend]
List of all members.

Detailed Description

The QGraphicsSceneEvent class provides a base class for all graphics view related events.

Since:
4.2

Definition at line 40 of file qgraphicssceneevent.h.

Public Member Functions

 QGraphicsSceneEvent (Type type)
 ~QGraphicsSceneEvent ()
QWidgetwidget () const
void setWidget (QWidget *widget)

Protected Member Functions

 QGraphicsSceneEvent (QGraphicsSceneEventPrivate &dd, Type type=None)

Protected Attributes

QGraphicsSceneEventPrivated_ptr


Constructor & Destructor Documentation

QGraphicsSceneEvent::QGraphicsSceneEvent ( Type  type  ) 

Constructs a generic graphics scene event of the specified type.

Definition at line 106 of file qgraphicssceneevent.cpp.

References d_ptr, and QGraphicsSceneEventPrivate::q_ptr.

00107     : QEvent(type), d_ptr(new QGraphicsSceneEventPrivate)
00108 {
00109     d_ptr->q_ptr = this;
00110 }

QGraphicsSceneEvent::~QGraphicsSceneEvent (  ) 

Destroys the event.

Definition at line 125 of file qgraphicssceneevent.cpp.

References d_ptr.

00126 {
00127     delete d_ptr;
00128 }

QGraphicsSceneEvent::QGraphicsSceneEvent ( QGraphicsSceneEventPrivate dd,
Type  type = None 
) [protected]

Definition at line 116 of file qgraphicssceneevent.cpp.

References d_ptr, and QGraphicsSceneEventPrivate::q_ptr.

00117     : QEvent(type), d_ptr(&dd)
00118 {
00119     d_ptr->q_ptr = this;
00120 }


Member Function Documentation

QWidget * QGraphicsSceneEvent::widget (  )  const

Returns the widget where the event originated. If the event did not originate from a widget, 0 is returned.

See also:
setWidget()

Definition at line 136 of file qgraphicssceneevent.cpp.

References d_ptr, and QGraphicsSceneEventPrivate::widget.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), ColorItem::mousePressEvent(), QGraphicsScenePrivate::sendHoverEvent(), setWidget(), and QGraphicsViewPrivate::storeDragDropEvent().

00137 {
00138     return d_ptr->widget;
00139 }

void QGraphicsSceneEvent::setWidget ( QWidget widget  ) 

Sets the widget related to this event.

See also:
widget()

Definition at line 146 of file qgraphicssceneevent.cpp.

References d_ptr, widget(), and QGraphicsSceneEventPrivate::widget.

Referenced by QGraphicsScenePrivate::cloneDragDropEvent(), QGraphicsView::contextMenuEvent(), QGraphicsView::dragLeaveEvent(), QGraphicsViewPrivate::populateSceneDragDropEvent(), QGraphicsScenePrivate::sendHoverEvent(), and QGraphicsViewPrivate::storeDragDropEvent().

00147 {
00148     d_ptr->widget = widget;
00149 }

Here is the call graph for this function:


Member Data Documentation

QGraphicsSceneEventPrivate* QGraphicsSceneEvent::d_ptr [protected]

Definition at line 51 of file qgraphicssceneevent.h.

Referenced by QGraphicsSceneEvent(), setWidget(), widget(), and ~QGraphicsSceneEvent().


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 17:50:48 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1