Eneboo - Documentación para desarrolladores
Métodos públicos
Referencia de la Clase QWidgetItem

The QWidgetItem class is a layout item that represents a widget. Más...

#include <qlayout.h>

Diagrama de herencias de QWidgetItem
QLayoutItem QLayoutItem

Lista de todos los miembros.

Métodos públicos

 QWidgetItem (QWidget *w)
QSize sizeHint () const
QSize minimumSize () const
QSize maximumSize () const
QSizePolicy::ExpandData expanding () const
bool isEmpty () const
void setGeometry (const QRect &)
QRect geometry () const
virtual QWidgetwidget ()
bool hasHeightForWidth () const
int heightForWidth (int) const
 QWidgetItem (QWidget *w)
QSize sizeHint () const
QSize minimumSize () const
QSize maximumSize () const
QSizePolicy::ExpandData expanding () const
bool isEmpty () const
void setGeometry (const QRect &)
QRect geometry () const
virtual QWidgetwidget ()
bool hasHeightForWidth () const
int heightForWidth (int) const

Descripción detallada

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

This is used by custom layouts.

Ver también:
QLayout QLayout::widget()

Documentación del constructor y destructor

QWidgetItem::QWidgetItem ( QWidget w) [inline]

Creates an item containing widget w.

QWidgetItem::QWidgetItem ( QWidget w) [inline]

Documentación de las funciones miembro

QSizePolicy::ExpandData QWidgetItem::expanding ( ) const [virtual]

Returns whether this item's widget can make use of more space than sizeHint(). A value of Vertical or Horizontal means that it wants to grow in only one dimension, whereas BothDirections means that it wants to grow in both dimensions and NoDirection means that it doesn't want to grow at all.

Implementa QLayoutItem.

QSizePolicy::ExpandData QWidgetItem::expanding ( ) const [virtual]

Implemented in subclasses to return the direction(s) this item "wants" to expand in (if any).

Implementa QLayoutItem.

QRect QWidgetItem::geometry ( ) const [virtual]

Returns the rectangle covered by this layout item.

Implementa QLayoutItem.

QRect QWidgetItem::geometry ( ) const [virtual]

Implementa QLayoutItem.

bool QWidgetItem::hasHeightForWidth ( ) const [virtual]

Reimplementado de QLayoutItem.

bool QWidgetItem::hasHeightForWidth ( ) const [virtual]

Returns TRUE if this layout's preferred height depends on its width; otherwise returns FALSE. The default implementation returns FALSE.

Reimplement this function in layout managers that support height for width.

Ver también:
heightForWidth(), QWidget::heightForWidth()

Reimplementado de QLayoutItem.

int QWidgetItem::heightForWidth ( int  w) const [virtual]

Reimplementado de QLayoutItem.

int QWidgetItem::heightForWidth ( int  ) const [virtual]

Returns the preferred height for this layout item, given the width w.

The default implementation returns -1, indicating that the preferred height is independent of the width of the item. Using the function hasHeightForWidth() will typically be much faster than calling this function and testing for -1.

Reimplement this function in layout managers that support height for width. A typical implementation will look like this:

        int MyLayout::heightForWidth( int w ) const
        {
            if ( cache_dirty || cached_width != w ) {
                // not all C++ compilers support "mutable"
                MyLayout *that = (MyLayout*)this;
                int h = calculateHeightForWidth( w );
                that->cached_hfw = h;
                return h;
            }
            return cached_hfw;
        }

Caching is strongly recommended; without it layout will take exponential time.

Ver también:
hasHeightForWidth()

Reimplementado de QLayoutItem.

bool QWidgetItem::isEmpty ( void  ) const [virtual]

Returns TRUE if the widget has been hidden; otherwise returns FALSE.

Implementa QLayoutItem.

bool QWidgetItem::isEmpty ( void  ) const [virtual]

Implemented in subclasses to return whether this item is empty, i.e. whether it contains any widgets.

Implementa QLayoutItem.

QSize QWidgetItem::maximumSize ( ) const [virtual]

Implemented in subclasses to return the maximum size of this item.

Implementa QLayoutItem.

QSize QWidgetItem::maximumSize ( ) const [virtual]

Returns the maximum size of this item.

Implementa QLayoutItem.

QSize QWidgetItem::minimumSize ( ) const [virtual]

Implemented in subclasses to return the minimum size of this item.

Implementa QLayoutItem.

QSize QWidgetItem::minimumSize ( ) const [virtual]

Returns the minimum size of this item.

Implementa QLayoutItem.

void QWidgetItem::setGeometry ( const QRect r) [virtual]

Implemented in subclasses to set this item's geometry to r.

Implementa QLayoutItem.

void QWidgetItem::setGeometry ( const QRect r) [virtual]

Sets the geometry of this item's widget to be contained within rect r, taking alignment and maximum size into account.

Implementa QLayoutItem.

QSize QWidgetItem::sizeHint ( ) const [virtual]

Implemented in subclasses to return the preferred size of this item.

Implementa QLayoutItem.

QSize QWidgetItem::sizeHint ( ) const [virtual]

Returns the preferred size of this item.

Implementa QLayoutItem.

QWidget * QWidgetItem::widget ( ) [virtual]

Returns the widget managed by this item.

Reimplementado de QLayoutItem.

virtual QWidget* QWidgetItem::widget ( ) [virtual]

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

Reimplementado de QLayoutItem.


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'