class _Cells:
Class _Cells aggregates _Cell
objects in a simple list
Grid.cells
property._Cell
objects and to apply them_Cell
objects.Method | __init__ |
Example |
Instance Variable | grid |
Grid object |
Method | get |
Get accessor for _list of _Cell objects |
Method | add |
Add (or aggregate) a _Cell object to the _list |
Method | get_cell |
Return the _Cell object from coordinate (y,x) |
Method | get_last |
Return the last inserted _Cell object |
Method | has_taken |
Check if a _Cell object exists at coordinate (y, x) |
Method | get_current_max_y |
Get the maximum y-coordinate value out of all aggregated _Cell objects |
Method | apply_to_layout |
Add all _Cell.item objects to the resulting QGridLayout |
Instance Variable | _list |
Aggregated list of _Cell objects |
Get accessor for _list of _Cell
objects
for cell in grid.cells.get(): print("y,x :", cell.y, cell.x)
Returns | self._list (type: list ) |
Check if a _Cell
object exists at coordinate (y, x)
if grid.cells.has_taken( 0,1 ) : pass
Parameters | y | int |
x | int | |
Returns | bool (type: bool ) |
Get the maximum y-coordinate value out of all aggregated _Cell
objects
max_y = grid.cells.get_current_max_y()
Returns | int max y (type: int ) |
Add all _Cell.item
objects to the resulting QGridLayout
grid.cells.apply_to_layout()