Qt 4.8
|
The QChildEvent class contains event parameters for child object events. More...
#include <qcoreevent.h>
Public Functions | |
bool | added () const |
Returns true if type() is QEvent::ChildAdded; otherwise returns false. More... | |
QObject * | child () const |
Returns the child object that was added or removed. More... | |
bool | polished () const |
Returns true if type() is QEvent::ChildPolished; otherwise returns false. More... | |
QChildEvent (Type type, QObject *child) | |
Constructs a child event object of a particular type for the child. More... | |
bool | removed () const |
Returns true if type() is QEvent::ChildRemoved; otherwise returns false. More... | |
~QChildEvent () | |
Public Functions inherited from QEvent | |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). More... | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). More... | |
bool | isAccepted () const |
QEvent (Type type) | |
Contructs an event object of type type. More... | |
void | setAccepted (bool accepted) |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false. More... | |
Type | type () const |
Returns the event type. More... | |
virtual | ~QEvent () |
Destroys the event. More... | |
Protected Variables | |
QObject * | c |
Protected Variables inherited from QEvent | |
QEventPrivate * | d |
ushort | t |
The QChildEvent class contains event parameters for child object events.
Child events are sent immediately to objects when children are added or removed.
In both cases you can only rely on the child being a QObject (or, if QObject::isWidgetType() returns true, a QWidget). This is because in the QEvent::ChildAdded case the child is not yet fully constructed; in the QEvent::ChildRemoved case it might have already been destructed.
The handler for these events is QObject::childEvent().
Definition at line 353 of file qcoreevent.h.
Constructs a child event object of a particular type for the child.
type can be QEvent::ChildAdded, QEvent::ChildRemoved, QEvent::ChildPolished, or QEvent::ChildRemoved.
Definition at line 502 of file qcoreevent.cpp.
QChildEvent::~QChildEvent | ( | ) |
Definition at line 508 of file qcoreevent.cpp.
|
inline |
Returns true if type() is QEvent::ChildAdded; otherwise returns false.
Definition at line 359 of file qcoreevent.h.
Referenced by QSplitter::childEvent().
|
inline |
Returns the child object that was added or removed.
Definition at line 358 of file qcoreevent.h.
Referenced by QGroupBox::childEvent(), QWorkspace::childEvent(), QSplitter::childEvent(), QMdiSubWindow::childEvent(), QMdiArea::childEvent(), QLayout::childEvent(), QWorkspaceChild::childEvent(), QAnimationGroup::event(), and QLayout::widgetEvent().
|
inline |
Returns true if type() is QEvent::ChildPolished; otherwise returns false.
Definition at line 363 of file qcoreevent.h.
Referenced by QSplitter::childEvent().
|
inline |
Returns true if type() is QEvent::ChildRemoved; otherwise returns false.
Definition at line 364 of file qcoreevent.h.
Referenced by QWorkspace::childEvent().
|
protected |
Definition at line 366 of file qcoreevent.h.