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()).
Definition at line 32 of file qwt_dyngrid_layout.h.
Public Member Functions | |
QwtDynGridLayout (QWidget *, int margin=0, int space=-1) | |
QwtDynGridLayout (QLayout *, int space=-1) | |
QwtDynGridLayout (int space=-1) | |
virtual | ~QwtDynGridLayout () |
virtual void | invalidate () |
void | setMaxCols (uint maxCols) |
uint | maxCols () const |
uint | numRows () const |
uint | numCols () const |
virtual void | addItem (QLayoutItem *) |
virtual QLayoutIterator | iterator () |
void | setExpanding (QSizePolicy::ExpandData) |
virtual QSizePolicy::ExpandData | expanding () const |
QValueList< QRect > | layoutItems (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 |
Protected Member Functions | |
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 |
|
Definition at line 96 of file qwt_dyngrid_layout.cpp. |
|
Definition at line 112 of file qwt_dyngrid_layout.cpp. |
|
Definition at line 124 of file qwt_dyngrid_layout.cpp. |
|
Destructor.
Definition at line 149 of file qwt_dyngrid_layout.cpp. |
|
Adds item to the next free position.
Definition at line 207 of file qwt_dyngrid_layout.cpp. |
|
Calculate the number of columns for a given width. It tries to use as many columns as possible (limited by maxCols())
Definition at line 348 of file qwt_dyngrid_layout.cpp. Referenced by QwtPlot::printLegend(). |
|
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.
Definition at line 263 of file qwt_dyngrid_layout.cpp. |
|
Definition at line 542 of file qwt_dyngrid_layout.cpp. |
|
Definition at line 552 of file qwt_dyngrid_layout.cpp. Referenced by QwtLegend::layoutContents(). |
|
Definition at line 217 of file qwt_dyngrid_layout.cpp. |
|
Definition at line 226 of file qwt_dyngrid_layout.cpp. |
|
Definition at line 236 of file qwt_dyngrid_layout.cpp. Referenced by QwtPlot::printLegend(). |
|
Calculate the dimensions for the columns and rows for a grid of numCols columns.
Definition at line 513 of file qwt_dyngrid_layout.cpp. |
|
Calculate the geometries of the layout items for a layout with numCols columns and a given rect.
Definition at line 432 of file qwt_dyngrid_layout.cpp. Referenced by QwtPlot::printLegend(). |
|
Return the upper limit for the number of columns. 0 means unlimited, what is the default.
Definition at line 200 of file qwt_dyngrid_layout.cpp. |
|
Definition at line 404 of file qwt_dyngrid_layout.cpp. Referenced by QwtLegend::layoutContents(). |
|
Definition at line 683 of file qwt_dyngrid_layout.cpp. |
|
Definition at line 673 of file qwt_dyngrid_layout.cpp. |
|
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.
Definition at line 250 of file qwt_dyngrid_layout.cpp. |
|
Reorganizes columns and rows and resizes managed widgets within the rectangle rect. Definition at line 309 of file qwt_dyngrid_layout.cpp. |
|
Limit the number of columns.
Definition at line 189 of file qwt_dyngrid_layout.cpp. Referenced by QwtPlot::insertLegend(). |
|
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. Definition at line 642 of file qwt_dyngrid_layout.cpp. |
|
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. Definition at line 581 of file qwt_dyngrid_layout.cpp. |