|
terminalgui
0.1.0
Widgets for your terminal, powered by Qt! Create textual GUI (TUI) in your console easily.
|
Arranges children of parent() Widget in a grid. More...
#include <tggridlayout.h>


Public Member Functions | |
| void | doLayout () override |
| Lays out children of Widget (parent). More... | |
| int | columnCount () const |
| Returns the maximal number of columns this grid will draw. More... | |
| void | setColumnCount (const int number) |
| Sets the maximal number of columns which this grid will draw. | |
Public Member Functions inherited from Tg::Layout | |
| Type | type () const |
| Returns the Type of this Layout. | |
| Widget * | parent () const |
| Returns the parent Widget - on which Layout is working to resize and position it's children. More... | |
| void | setParent (Widget *parent) |
| Sets the parent Widget. More... | |
| SizeOvershoot | overshoot () const |
| Read this after calling doLayout() to check if all child widgets fit nicely onto parent. | |
Additional Inherited Members | |
Public Types inherited from Tg::Layout | |
| enum | Type { Type::None, Type::ChildFillsParent, Type::Column, Type::Row, Type::Grid } |
| Type of a Layout. More... | |
Protected Member Functions inherited from Tg::Layout | |
| Layout (const Type type) | |
| Constructor used by subclasses to set Layout type they implement. | |
Protected Attributes inherited from Tg::Layout | |
| SizeOvershoot | _overshoot = Overshoot::None |
| Indicates whether children of Widget cannot fit the Widget, and in which direction they fail to fit. | |
| Widget * | _parent = nullptr |
| Parent Widget. More... | |
| const Type | _type = Type::None |
| Type of a Layout. More... | |
Arranges children of parent() Widget in a grid.
By defaylt, the grid will contain 2 columns - this can be changed by calling setColumnCount().
Maximum number of rows cannot be set - it depends on columnCount() and the number of children to lay out.
| int Tg::GridLayout::columnCount | ( | ) | const |
Returns the maximal number of columns this grid will draw.
If Widgets do not fit, extra ones will be drawn in next row(s).
|
overridevirtual |
Lays out children of Widget (parent).
It stretches first child to fill the whole widget.
Reimplemented from Tg::Layout.
1.8.18