Qt Jambi Home

com.trolltech.qt.core
Class QChildEvent

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.core.QEvent
              extended by com.trolltech.qt.core.QChildEvent
All Implemented Interfaces:
QtJambiInterface

public class QChildEvent
extends QEvent

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().


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.core.QEvent
QEvent.Type
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Constructor Summary
QChildEvent(QEvent.Type type, QObject child)
          Constructs a child event object of a particular type for the child.
 
Method Summary
 boolean added()
          Returns true if type is QEvent::ChildAdded; otherwise returns false.
 QObject child()
          Returns the child object that was added or removed.
static QChildEvent fromNativePointer(QNativePointer nativePointer)
          This function returns the QChildEvent instance pointed to by nativePointer
 boolean polished()
          Returns true if type is QEvent::ChildPolished; otherwise returns false.
 boolean removed()
          Returns true if type is QEvent::ChildRemoved; otherwise returns false.
 
Methods inherited from class com.trolltech.qt.core.QEvent
accept, ignore, isAccepted, setAccepted, setT, spontaneous, t, type
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QChildEvent

public QChildEvent(QEvent.Type type,
                   QObject child)

Constructs a child event object of a particular type for the child.

type can be QEvent::ChildAdded, QEvent::ChildRemoved, QEvent::ChildPolished, or QEvent::ChildRemoved.

See Also:
child
Method Detail

added

public final boolean added()

Returns true if type is QEvent::ChildAdded; otherwise returns false.


child

public final QObject child()

Returns the child object that was added or removed.


polished

public final boolean polished()

Returns true if type is QEvent::ChildPolished; otherwise returns false.


removed

public final boolean removed()

Returns true if type is QEvent::ChildRemoved; otherwise returns false.


fromNativePointer

public static QChildEvent fromNativePointer(QNativePointer nativePointer)
This function returns the QChildEvent instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.

Qt Jambi Home