voidQwtDynGridLayout::addItem(QLayoutItem*item)[virtual]
Add an item to the next free position.
Parameters:item Layout item
uintQwtDynGridLayout::columnsForWidth(intwidth)const[virtual]
Calculate the number of columns for a given width. The calculation tries to use as many columns as
possible ( limited by maxColumns() )
Parameters:width Available width for all columns
Returns:
Number of columns for a given width
Seealso:maxColumns(), setMaxColumns()intQwtDynGridLayout::count()const[virtual]Returns:
Number of items in the layout
Qt::OrientationsQwtDynGridLayout::expandingDirections()const[virtual]
Returns whether this layout can make use of more space than sizeHint(). A value of Qt::Vertical or
Qt::Horizontal means that it wants to grow in only one dimension, while Qt::Vertical | Qt::Horizontal
means that it wants to grow in both dimensions.
Returns:
Orientations, where the layout expands
Seealso:setExpandingDirections()boolQwtDynGridLayout::hasHeightForWidth()const[virtual]Returns:
true: QwtDynGridLayout implements heightForWidth().
Seealso:heightForWidth()intQwtDynGridLayout::heightForWidth(intwidth)const[virtual]Returns:
The preferred height for this layout, given a width.
Seealso:hasHeightForWidth()boolQwtDynGridLayout::isEmpty()const[virtual]Returns:
true if this layout is empty.
QLayoutItem*QwtDynGridLayout::itemAt(intindex)const[virtual]
Find the item at a specific index
Parameters:index Index
Returns:
Item at a specific index
Seealso:takeAt()uintQwtDynGridLayout::itemCount()constReturns:
number of layout items
voidQwtDynGridLayout::layoutGrid(uintnumColumns,QVector<int>&rowHeight,QVector<int>&colWidth)const[protected]
Calculate the dimensions for the columns and rows for a grid of numColumns columns.
Parameters:numColumns Number of columns.
rowHeight Array where to fill in the calculated row heights.
colWidth Array where to fill in the calculated column widths.
QList<QRect>QwtDynGridLayout::layoutItems(constQRect&rect,uintnumColumns)const
Calculate the geometries of the layout items for a layout with numColumns columns and a given rectangle.
Parameters:rect Rect where to place the items
numColumns Number of columns
Returns:
item geometries
uintQwtDynGridLayout::maxColumns()const
Return the upper limit for the number of columns. 0 means unlimited, what is the default.
Returns:
Upper limit for the number of columns
Seealso:setMaxColumns()intQwtDynGridLayout::maxItemWidth()const[virtual]Returns:
the maximum width of all layout items
uintQwtDynGridLayout::numColumns()constReturns:
Number of columns of the current layout.
Seealso:numRows()Warning:
The number of columns might change whenever the geometry changes
uintQwtDynGridLayout::numRows()constReturns:
Number of rows of the current layout.
Seealso:numColumns()Warning:
The number of rows might change whenever the geometry changes
voidQwtDynGridLayout::setExpandingDirections(Qt::Orientationsexpanding)
Set whether this layout can make use of more space than sizeHint(). A value of Qt::Vertical or
Qt::Horizontal means that it wants to grow in only one dimension, while Qt::Vertical | Qt::Horizontal
means that it wants to grow in both dimensions. The default value is 0.
Parameters:expanding Or'd orientations
Seealso:expandingDirections()voidQwtDynGridLayout::setGeometry(constQRect&rect)[virtual]
Reorganizes columns and rows and resizes managed items within a rectangle.
Parameters:rect Layout geometry
voidQwtDynGridLayout::setMaxColumns(uintmaxColumns)
Limit the number of columns.
Parameters:maxColumns upper limit, 0 means unlimited
Seealso:maxColumns()QSizeQwtDynGridLayout::sizeHint()const[virtual]
Return the size hint. If maxColumns() > 0 it is the size for a grid with maxColumns() columns, otherwise
it is the size for a grid with only one row.
Returns:
Size hint
Seealso:maxColumns(), setMaxColumns()voidQwtDynGridLayout::stretchGrid(constQRect&rect,uintnumColumns,QVector<int>&rowHeight,QVector<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.
Parameters:rect Bounding rectangle
numColumns Number of columns
rowHeight Array to be filled with the calculated row heights
colWidth Array to be filled with the calculated column widths
Seealso:
setExpanding(), expanding()
QLayoutItem*QwtDynGridLayout::takeAt(intindex)[virtual]
Find the item at a specific index and remove it from the layout
Parameters:index Index
Returns:
Layout item, removed from the layout
Seealso:itemAt()