A container widget with possibility to automatically layout child widgets.
#include <QtxGridBox.h>

Classes | |
| class | Space |
| Represents a space in the grid box. More... | |
Public Member Functions | |
| QtxGridBox (QWidget *=0, const int=5, const int=5) | |
| Constructor. More... | |
| QtxGridBox (const int, Qt::Orientation, QWidget *=0, const int=5, const int=5) | |
| Constructor. More... | |
| virtual | ~QtxGridBox () |
| Destructor. More... | |
| int | columns () const |
| Get number of grid box columns/rows (depending on the orientation). More... | |
| Qt::Orientation | orientation () const |
| Get the grid box orientation. More... | |
| void | setColumns (const int) |
| Set number of grid box columns/rows (depending on the orientation). More... | |
| void | setOrientation (Qt::Orientation) |
| Set the grid box orientation. More... | |
| void | setLayout (const int, Qt::Orientation) |
| Initialize internal layout. More... | |
| bool | skipInvisible () const |
| Get "skip invisible widgets" flags. More... | |
| void | setSkipInvisible (const bool) |
| Set "skip invisible widgets" flags. More... | |
| void | addSpace (const int) |
| Add space (empty cell) to the grid box. More... | |
| int | insideMargin () const |
| Get grid box's inside margin size. More... | |
| int | insideSpacing () const |
| Get grid box's inside spacing size. More... | |
| void | setInsideMargin (const int) |
| Set grid box's inside margin size. More... | |
| void | setInsideSpacing (const int) |
| Set grid box's inside spacing size. More... | |
| virtual bool | eventFilter (QObject *, QEvent *) |
| Custom event filter. More... | |
Protected Member Functions | |
| void | childEvent (QChildEvent *) |
| Customize child event. More... | |
Private Member Functions | |
| void | skip () |
| Increment the grid box current cell. More... | |
| void | arrangeWidgets () |
| Arrange child widgets. More... | |
| void | placeWidget (QWidget *) |
| Place new widget to the current grid box cell. More... | |
Private Attributes | |
| int | myCols |
| bool | mySkip |
| Qt::Orientation | myOrient |
| QGridLayout * | myLayout |
| int | myCol |
| int | myRow |
| parent | parent widget |
| m | grid box margin |
| s | grid box spacing |
References myLayout.
| QtxGridBox::QtxGridBox | ( | const int | cols, |
| Qt::Orientation | o, | ||
| QWidget * | parent = 0, |
||
| const int | m = 5, |
||
| const int | s = 5 |
||
| ) |
| cols | number of grid box columns or rows (depending on the orientation) |
| o | grid box orientation |
| parent | parent widget |
| m | grid box margin |
| s | grid box spacing |
References myLayout.
|
virtual |
| void QtxGridBox::addSpace | ( | const int | sp | ) |
| sp | requied space size |
|
private |
References myCol, myLayout, myRow, placeWidget(), s, and skipInvisible().
|
protected |
| e | child event |
References placeWidget().
| int QtxGridBox::columns | ( | ) | const |
References myCols.
| o | event receiver object. |
| e | event |
true if the event processing should be stopped References arrangeWidgets(), and skipInvisible().
| int QtxGridBox::insideMargin | ( | ) | const |
References myLayout.
| int QtxGridBox::insideSpacing | ( | ) | const |
References myLayout.
| Qt::Orientation QtxGridBox::orientation | ( | ) | const |
References myOrient.
|
private |
| void QtxGridBox::setColumns | ( | const int | cols | ) |
| cols | number of columns (rows) |
References orientation(), and setLayout().
| void QtxGridBox::setInsideMargin | ( | const int | m | ) |
| m | new inside margin size |
References myLayout.
| void QtxGridBox::setInsideSpacing | ( | const int | s | ) |
| s | new inside spacing size |
References myLayout.
| void QtxGridBox::setLayout | ( | const int | cols, |
| Qt::Orientation | o | ||
| ) |
| cols | number of columns (rows) |
| o | orientation |
References arrangeWidgets(), myCols, and myOrient.
| void QtxGridBox::setOrientation | ( | Qt::Orientation | o | ) |
| o | orientation |
References columns(), and setLayout().
| void QtxGridBox::setSkipInvisible | ( | const bool | on | ) |
If this flag is set to false, invisible widgets are not taken into account when layouting widgets.
| on | new flag state |
References arrangeWidgets(), and mySkip.
|
private |
References columns(), Horizontal, myCol, myRow, and orientation().
| bool QtxGridBox::skipInvisible | ( | ) | const |
References mySkip.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |