#include <qwt_dyngrid_layout.h>
Public Member Functions | |
| QwtDynGridLayout (QWidget *, int margin=0, int space=-1, const char *name=0) | |
| QwtDynGridLayout (QLayout *, int space=-1, const char *name=0) | |
| QwtDynGridLayout (int space=-1, const char *name=0) | |
| virtual | ~QwtDynGridLayout () |
| void | setMaxCols (uint maxCols) |
| uint | maxCols () const |
| uint | numRows () const |
| uint | numCols () const |
| virtual void | addItem (QLayoutItem *) |
| virtual QLayoutIterator | iterator () |
| virtual int | maxItemWidth () const |
| virtual void | setGeometry (const QRect &rect) |
| virtual bool | hasHeightForWidth () const |
| virtual int | heightForWidth (int) const |
| virtual QSize | sizeHint () const |
| void | setExpanding (QSizePolicy::ExpandData) |
| virtual QSizePolicy::ExpandData | expanding () const |
| virtual bool | isEmpty () const |
| virtual uint | columnsForWidth (int width) const |
| QValueList< QRect > | layoutItems (const QRect &, uint numCols) 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 |
Private Member Functions | |
| void | init () |
Private Attributes | |
| uint | d_maxCols |
| uint | d_numRows |
| uint | d_numCols |
| QSizePolicy::ExpandData | d_expanding |
| QList< QLayoutItem > | d_itemList |
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 35 of file qwt_dyngrid_layout.h.
|
||||||||||||||||||||
|
Definition at line 61 of file qwt_dyngrid_layout.cpp. References init(). |
|
||||||||||||||||
|
Definition at line 74 of file qwt_dyngrid_layout.cpp. References init(). |
|
||||||||||||
|
Definition at line 86 of file qwt_dyngrid_layout.cpp. References init(). |
|
|
Destructor.
Definition at line 105 of file qwt_dyngrid_layout.cpp. |
|
|
Adds item to the next free position.
Definition at line 134 of file qwt_dyngrid_layout.cpp. References d_itemList. |
|
|
Calculate the number of columns for a given width. It tries to use as many columns as possible (limited by maxCols())
Definition at line 195 of file qwt_dyngrid_layout.cpp. References d_itemList, d_maxCols, and numCols(). Referenced by heightForWidth(), QwtPlot::printLegend(), and setGeometry(). |
|
|
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 375 of file qwt_dyngrid_layout.cpp. References d_expanding. Referenced by layoutItems(), and stretchGrid(). |
|
|
Definition at line 385 of file qwt_dyngrid_layout.cpp. |
|
|
Definition at line 395 of file qwt_dyngrid_layout.cpp. References columnsForWidth(), d_itemList, layoutGrid(), numCols(), and numRows(). Referenced by QwtLegend::layoutContents(). |
|
|
Initialize the layout with default values. Definition at line 95 of file qwt_dyngrid_layout.cpp. References d_expanding, d_maxCols, d_numCols, and d_numRows. Referenced by QwtDynGridLayout(). |
|
|
Definition at line 141 of file qwt_dyngrid_layout.cpp. References d_itemList. |
|
|
Definition at line 148 of file qwt_dyngrid_layout.cpp. References d_itemList. Referenced by QwtPlot::printLegend(). |
|
||||||||||||||||
|
Calculate the dimensions for the columns and rows for a grid of numCols columns.
Definition at line 330 of file qwt_dyngrid_layout.cpp. References d_itemList. Referenced by heightForWidth(), layoutItems(), and sizeHint(). |
|
||||||||||||
|
Calculate the geometries of the layout items for a layout with numCols columns and a given rect.
Definition at line 261 of file qwt_dyngrid_layout.cpp. References d_itemList, d_maxCols, expanding(), layoutGrid(), maxCols(), numRows(), and stretchGrid(). Referenced by QwtPlot::printLegend(), and setGeometry(). |
|
|
Return the upper limit for the number of columns. 0 means unlimited, what is the default.
Definition at line 127 of file qwt_dyngrid_layout.cpp. References d_maxCols. Referenced by layoutItems(). |
|
|
Definition at line 236 of file qwt_dyngrid_layout.cpp. References d_itemList. Referenced by QwtLegend::layoutContents(). |
|
|
Definition at line 517 of file qwt_dyngrid_layout.cpp. References d_numCols. Referenced by columnsForWidth(), heightForWidth(), and sizeHint(). |
|
|
Definition at line 507 of file qwt_dyngrid_layout.cpp. References d_numRows. Referenced by heightForWidth(), layoutItems(), sizeHint(), and stretchGrid(). |
|
|
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 362 of file qwt_dyngrid_layout.cpp. References d_expanding. |
|
|
Reorganizes columns and rows and resizes managed widgets within the rectangle rect. Definition at line 158 of file qwt_dyngrid_layout.cpp. References columnsForWidth(), d_itemList, d_numCols, d_numRows, and layoutItems(). |
|
|
Limit the number of columns.
Definition at line 116 of file qwt_dyngrid_layout.cpp. References d_maxCols. Referenced by QwtPlot::setLegendPos(). |
|
|
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 476 of file qwt_dyngrid_layout.cpp. References d_itemList, d_maxCols, layoutGrid(), numCols(), and numRows(). |
|
||||||||||||||||||||
|
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 424 of file qwt_dyngrid_layout.cpp. References d_itemList, expanding(), and numRows(). Referenced by layoutItems(). |
|
|
Definition at line 87 of file qwt_dyngrid_layout.h. Referenced by expanding(), init(), and setExpanding(). |
|
|
Definition at line 88 of file qwt_dyngrid_layout.h. Referenced by addItem(), columnsForWidth(), heightForWidth(), isEmpty(), iterator(), layoutGrid(), layoutItems(), maxItemWidth(), setGeometry(), sizeHint(), and stretchGrid(). |
|
|
Definition at line 83 of file qwt_dyngrid_layout.h. Referenced by columnsForWidth(), init(), layoutItems(), maxCols(), setMaxCols(), and sizeHint(). |
|
|
Definition at line 85 of file qwt_dyngrid_layout.h. Referenced by init(), numCols(), and setGeometry(). |
|
|
Definition at line 84 of file qwt_dyngrid_layout.h. Referenced by init(), numRows(), and setGeometry(). |
1.3.2