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

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