Eneboo - Documentación para desarrolladores
Clases | Métodos públicos | Métodos protegidos
Referencia de la Clase QwtDynGridLayout

The QwtDynGridLayout class lays out widgets in a grid, adjusting the number of columns and rows to the current size. Más...

#include <qwt_dyngrid_layout.h>

Diagrama de herencias de QwtDynGridLayout
QLayout QObject QLayoutItem QObject QLayoutItem Qt Qt Qt Qt

Lista de todos los miembros.

Clases

class  PrivateData

Métodos públicos

 QwtDynGridLayout (QWidget *, int margin=0, int space=-1)
 QwtDynGridLayout (QLayout *, int space=-1)
 QwtDynGridLayout (int space=-1)
virtual ~QwtDynGridLayout ()
 Destructor.
virtual void invalidate ()
void setMaxCols (uint maxCols)
uint maxCols () const
uint numRows () const
uint numCols () const
virtual void addItem (QLayoutItem *)
 Adds item to the next free position.
virtual QLayoutIterator iterator ()
void setExpanding (QSizePolicy::ExpandData)
virtual QSizePolicy::ExpandData expanding () const
QValueList< QRectlayoutItems (const QRect &, uint numCols) const
virtual int maxItemWidth () const
virtual void setGeometry (const QRect &rect)
virtual bool hasHeightForWidth () const
virtual int heightForWidth (int) const
virtual QSize sizeHint () const
virtual bool isEmpty () const
uint itemCount () const
virtual uint columnsForWidth (int width) const

Métodos protegidos

void layoutGrid (uint numCols, QwtArray< int > &rowHeight, QwtArray< int > &colWidth) const
void stretchGrid (const QRect &rect, uint numCols, QwtArray< int > &rowHeight, QwtArray< int > &colWidth) const

Descripción detallada

The QwtDynGridLayout class lays out widgets in a grid, adjusting the number of columns and rows to the current size.

QwtDynGridLayout takes the space it gets, divides it up into rows and columns, and puts each of the widgets it manages into the correct cell(s). It lays out as many number of columns as possible (limited by maxCols()).


Documentación del constructor y destructor

QwtDynGridLayout::QwtDynGridLayout ( QWidget parent,
int  margin = 0,
int  spacing = -1 
) [explicit]
Parámetros:
parentParent widget
marginMargin
spacingSpacing
QwtDynGridLayout::QwtDynGridLayout ( QLayout parent,
int  spacing = -1 
) [explicit]
Parámetros:
parentParent widget
spacingSpacing
QwtDynGridLayout::QwtDynGridLayout ( int  spacing = -1) [explicit]
Parámetros:
spacingSpacing
QwtDynGridLayout::~QwtDynGridLayout ( ) [virtual]

Destructor.


Documentación de las funciones miembro

void QwtDynGridLayout::addItem ( QLayoutItem item) [virtual]

Adds item to the next free position.

Implementa QLayout.

uint QwtDynGridLayout::columnsForWidth ( int  width) const [virtual]

Calculate the number of columns for a given width. It tries to use as many columns as possible (limited by maxCols())

Parámetros:
widthAvailable width for all columns
Ver también:
QwtDynGridLayout::maxCols(), QwtDynGridLayout::setMaxCols()
QSizePolicy::ExpandData QwtDynGridLayout::expanding ( ) const [virtual]

Returns whether this layout can make use of more space than sizeHint(). A value of Vertical or Horizontal means that it wants to grow in only one dimension, while BothDirections means that it wants to grow in both dimensions.

Ver también:
QwtDynGridLayout::setExpanding()

Reimplementado de QLayout.

bool QwtDynGridLayout::hasHeightForWidth ( ) const [virtual]
Devuelve:
true: QwtDynGridLayout implements heightForWidth.
Ver también:
QwtDynGridLayout::heightForWidth()

Reimplementado de QLayoutItem.

int QwtDynGridLayout::heightForWidth ( int  width) const [virtual]
Devuelve:
The preferred height for this layout, given the width w.
Ver también:
QwtDynGridLayout::hasHeightForWidth()

Reimplementado de QLayoutItem.

void QwtDynGridLayout::invalidate ( ) [virtual]

Invalidates cached information. Reimplementations must call this.

Reimplementado de QLayout.

bool QwtDynGridLayout::isEmpty ( void  ) const [virtual]
Devuelve:
true if this layout is empty.

Reimplementado de QLayout.

uint QwtDynGridLayout::itemCount ( ) const
Devuelve:
number of layout items
QLayoutIterator QwtDynGridLayout::iterator ( ) [virtual]
Devuelve:
An iterator over the children of this layout.

Implementa QLayout.

void QwtDynGridLayout::layoutGrid ( uint  numCols,
QwtArray< int > &  rowHeight,
QwtArray< int > &  colWidth 
) const [protected]

Calculate the dimensions for the columns and rows for a grid of numCols columns.

Parámetros:
numColsNumber of columns.
rowHeightArray where to fill in the calculated row heights.
colWidthArray where to fill in the calculated column widths.
QValueList< QRect > QwtDynGridLayout::layoutItems ( const QRect rect,
uint  numCols 
) const

Calculate the geometries of the layout items for a layout with numCols columns and a given rect.

Parámetros:
rectRect where to place the items
numColsNumber of columns
Devuelve:
item geometries
uint QwtDynGridLayout::maxCols ( ) const

Return the upper limit for the number of columns. 0 means unlimited, what is the default.

Ver también:
QwtDynGridLayout::setMaxCols()
int QwtDynGridLayout::maxItemWidth ( ) const [virtual]
Devuelve:
the maximum width of all layout items
uint QwtDynGridLayout::numCols ( ) const
Devuelve:
Number of columns of the current layout.
Ver también:
QwtDynGridLayout::numRows
Atención:
The number of columns might change whenever the geometry changes
uint QwtDynGridLayout::numRows ( ) const
Devuelve:
Number of rows of the current layout.
Ver también:
QwtDynGridLayout::numCols
Atención:
The number of rows might change whenever the geometry changes
void QwtDynGridLayout::setExpanding ( QSizePolicy::ExpandData  expanding)

Set whether this layout can make use of more space than sizeHint(). A value of Vertical or Horizontal means that it wants to grow in only one dimension, while BothDirections means that it wants to grow in both dimensions. The default value is NoDirection.

Ver también:
QwtDynGridLayout::expanding()
void QwtDynGridLayout::setGeometry ( const QRect rect) [virtual]

Reorganizes columns and rows and resizes managed widgets within the rectangle rect.

Implementa QLayout.

void QwtDynGridLayout::setMaxCols ( uint  maxCols)

Limit the number of columns.

Parámetros:
maxColsupper limit, 0 means unlimited
Ver también:
QwtDynGridLayout::maxCols()
QSize QwtDynGridLayout::sizeHint ( ) const [virtual]

Return the size hint. If maxCols() > 0 it is the size for a grid with maxCols() columns, otherwise it is the size for a grid with only one row.

Ver también:
QwtDynGridLayout::maxCols(), QwtDynGridLayout::setMaxCols()

Implementa QLayoutItem.

void QwtDynGridLayout::stretchGrid ( const QRect rect,
uint  numCols,
QwtArray< int > &  rowHeight,
QwtArray< int > &  colWidth 
) const [protected]

Stretch columns in case of expanding() & QSizePolicy::Horizontal and rows in case of expanding() & QSizePolicy::Vertical to fill the entire rect. Rows and columns are stretched with the same factor.

Ver también:
QwtDynGridLayout::setExpanding(), QwtDynGridLayout::expanding()

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'