Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QFocusEvent

    java.lang.Object
      com.trolltech.qt.internal.QSignalEmitterInternal
          com.trolltech.qt.QSignalEmitter
              com.trolltech.qt.QtJambiObject
                  com.trolltech.qt.core.QEvent
                      com.trolltech.qt.gui.QFocusEvent

All Implemented Interfaces:
  QtJambiInterface

    public class QFocusEvent

extends QEvent

The QFocusEvent class contains event parameters for widget focus events. Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, key presses (such as Tab or Backtab), the window system, popup menus, keyboard shortcuts, or other application-specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler.

The event handlers `QWidget::focusInEvent()` and `QWidget::focusOutEvent()` receive focus events.

See also:
  `QWidget::setFocus()`, `QWidget::setFocusPolicy()`, and Keyboard Focus.

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.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal`

Field Summary

Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`currentSender`

Constructor Summary
`QFocusEvent(QEvent.Type type)` Constructs a focus event object.
`QFocusEvent(QEvent.Type type, Qt.FocusReason reason)` Constructs a focus event object.

Method Summary
`boolean` | `gotFocus()` Returns true if `type()` is `QEvent::FocusIn` ; otherwise returns false.
`boolean` | `lostFocus()` Returns true if `type()` is `QEvent::FocusOut` ; otherwise returns false.
`java.lang.String` | `toString()` Returns a string representation of the `this QFocusEvent`.

Methods inherited from class com.trolltech.qt.core.QEvent
`accept, ignore, isAccepted, registerEventType, registerEventType, setAccepted, setT, spontaneous, t, type`

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`__qt_signalInitialization`

Methods inherited from class java.lang.Object
`clone, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Constructor Detail

### QFocusEvent

    public QFocusEvent(QEvent.Type type)

  Constructs a focus event object.

  The `type` parameter must be either `QEvent::FocusIn` or `QEvent::FocusOut` . The `reason` describes the cause of the change in focus.

### QFocusEvent

    public QFocusEvent(QEvent.Type type,
                       Qt.FocusReason reason)

  Constructs a focus event object.

  The `type` parameter must be either `QEvent::FocusIn` or `QEvent::FocusOut` . The `reason` describes the cause of the change in focus.

Method Detail

### gotFocus

    public final boolean gotFocus()

  Returns true if `type()` is `QEvent::FocusIn` ; otherwise returns false.

### lostFocus

    public final boolean lostFocus()

  Returns true if `type()` is `QEvent::FocusOut` ; otherwise returns false.

### toString

    public java.lang.String toString()

  Returns a string representation of the `this QFocusEvent`.

  Overrides:
    `toString` in class `QEvent`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD