Qt Jambi Home

com.trolltech.qt.gui
Class QWidgetItem

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.gui.QWidgetItem
All Implemented Interfaces:
QLayoutItemInterface, QtJambiInterface

public class QWidgetItem
extends QtJambiObject
implements QLayoutItemInterface

The QWidgetItem class is a layout item that represents a widget.

Normally, you don't need to use this class directly. Qt's built-in layout managers provide the following functions for manipulating widgets in layouts:

ClassFunctions
QBoxLayoutaddWidget(), insertWidget(), setStretchFactor()
QGridLayoutaddWidget()
QStackedLayoutaddWidget(), insertWidget(), currentWidget(), setCurrentWidget(), widget()

See Also:
QLayout, QSpacerItem, QLayoutItem::widget

Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, 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
QWidgetItem(QWidget w)
          Creates an item containing the given w.
 
Method Summary
 Qt.Alignment alignment()
          Returns the alignment of this item.
 QSizePolicy.ControlTypes controlTypes()
          Returns the control type(s) for the layout item.
 Qt.Orientations expandingDirections()
          This function is reimplemented for internal reasons.
static QWidgetItem fromNativePointer(QNativePointer nativePointer)
          This function returns the QWidgetItem instance pointed to by nativePointer
 QRect geometry()
          This function is reimplemented for internal reasons.
 boolean hasHeightForWidth()
          This function is reimplemented for internal reasons.
 int heightForWidth(int arg__1)
          This function is reimplemented for internal reasons.
 void invalidate()
          Invalidates any cached information in this layout item.
 boolean isEmpty()
          Returns true if the widget is hidden; otherwise returns false.
 QLayout layout()
          If this item is a QLayout, it is returned as a QLayout; otherwise 0 is returned.
 QSize maximumSize()
          This function is reimplemented for internal reasons.
 int minimumHeightForWidth(int arg__1)
          Returns the minimum height this widget needs for the given width, arg__1.
 QSize minimumSize()
          This function is reimplemented for internal reasons.
 void setAlignment(Qt.Alignment a)
          Sets the alignment of this item to a.
 void setGeometry(QRect arg__1)
          This function is reimplemented for internal reasons.
 QSize sizeHint()
          This function is reimplemented for internal reasons.
 QSpacerItem spacerItem()
          If this item is a QSpacerItem, it is returned as a QSpacerItem; otherwise 0 is returned.
 QWidget widget()
          Returns the widget managed by this item.
 
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

QWidgetItem

public QWidgetItem(QWidget w)

Creates an item containing the given w.

Method Detail

alignment

public final Qt.Alignment alignment()

Returns the alignment of this item.

Specified by:
alignment in interface QLayoutItemInterface
See Also:
setAlignment

controlTypes

public final QSizePolicy.ControlTypes controlTypes()

Returns the control type(s) for the layout item. For a QWidgetItem, the control type comes from the widget's size policy; for a QLayoutItem, the control types is derived from the layout's contents.

Specified by:
controlTypes in interface QLayoutItemInterface
See Also:
QSizePolicy::controlType

setAlignment

public final void setAlignment(Qt.Alignment a)

Sets the alignment of this item to a.

Note: Item alignment is only supported by QLayoutItem subclasses where it would have a visual effect. Except for QSpacerItem, which provides blank space for layouts, all public Qt classes that inherit QLayoutItem support item alignment.

Specified by:
setAlignment in interface QLayoutItemInterface
See Also:
alignment

expandingDirections

public Qt.Orientations expandingDirections()

This function is reimplemented for internal reasons.

Specified by:
expandingDirections in interface QLayoutItemInterface

geometry

public QRect geometry()

This function is reimplemented for internal reasons.

Specified by:
geometry in interface QLayoutItemInterface
See Also:
setGeometry

hasHeightForWidth

public boolean hasHeightForWidth()

This function is reimplemented for internal reasons.

Specified by:
hasHeightForWidth in interface QLayoutItemInterface
See Also:
heightForWidth, QWidget::heightForWidth

heightForWidth

public int heightForWidth(int arg__1)

This function is reimplemented for internal reasons.

Specified by:
heightForWidth in interface QLayoutItemInterface
See Also:
hasHeightForWidth

invalidate

public void invalidate()

Invalidates any cached information in this layout item.

Specified by:
invalidate in interface QLayoutItemInterface

isEmpty

public boolean isEmpty()

Returns true if the widget is hidden; otherwise returns false.

Specified by:
isEmpty in interface QLayoutItemInterface
See Also:
QWidget::isHidden

layout

public QLayout layout()

If this item is a QLayout, it is returned as a QLayout; otherwise 0 is returned. This function provides type-safe casting.

Specified by:
layout in interface QLayoutItemInterface

maximumSize

public QSize maximumSize()

This function is reimplemented for internal reasons.

Specified by:
maximumSize in interface QLayoutItemInterface

minimumHeightForWidth

public int minimumHeightForWidth(int arg__1)

Returns the minimum height this widget needs for the given width, arg__1. The default implementation simply returns heightForWidth(arg__1).

Specified by:
minimumHeightForWidth in interface QLayoutItemInterface

minimumSize

public QSize minimumSize()

This function is reimplemented for internal reasons.

Specified by:
minimumSize in interface QLayoutItemInterface

setGeometry

public void setGeometry(QRect arg__1)

This function is reimplemented for internal reasons.

Specified by:
setGeometry in interface QLayoutItemInterface
See Also:
geometry

sizeHint

public QSize sizeHint()

This function is reimplemented for internal reasons.

Specified by:
sizeHint in interface QLayoutItemInterface

spacerItem

public QSpacerItem spacerItem()

If this item is a QSpacerItem, it is returned as a QSpacerItem; otherwise 0 is returned. This function provides type-safe casting.

Specified by:
spacerItem in interface QLayoutItemInterface

widget

public QWidget widget()

Returns the widget managed by this item.

Specified by:
widget in interface QLayoutItemInterface

fromNativePointer

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

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

Qt Jambi Home