TTkLayoutItem๐ถ๏ธ
- class TTkLayoutItem(*, x: int = 0, y: int = 0, z: int = 0, pos: Tuple[int, int] | None = None, width: int = 0, height: int = 0, size: Tuple[int, int] | None = None, row: int = 0, col: int = 0, rowspan: int = 1, colspan: int = 1, maxWidth: int = 65536, maxHeight: int = 65536, maxSize: Tuple[int, int] | None = None, minWidth: int = 0, minHeight: int = 0, minSize: Tuple[int, int] | None = None, **kwargs: Any)[source]๐ถ๏ธ
Bases:
objectTTkLayoutItemis the base class of layout Items inherited byTTkLayout,TTkWidgetItem, and all the derived layout managers.- Parameters:
row (int) โ (used only in the
TTkGridLayout), the row of the grid, optional, defaults to 0col (int) โ (used only in the
TTkGridLayout), the col of the grid, optional, defaults to 0rowspan (int) โ (used only in the
TTkGridLayout), the rows used by this, optional, defaults to 1colspan (int) โ (used only in the
TTkGridLayout), the cols used by this, optional, defaults to 1
Methods๐ถ๏ธ
- geometry() Tuple[int, int, int, int][source]๐ถ๏ธ
Return the item geometry as
(x, y, width, height).
- layoutItemType() LayoutItemTypes[source]๐ถ๏ธ
Return the layout item type.
Deprecated since version 0.50.0: Prefer using
isinstance(item, TTkLayout)orisinstance(item, TTkWidgetItem)for type checks.
- maxDimension(o: int) int[source]๐ถ๏ธ
Return maximum size along an orientation.
- Parameters:
o (int) โ orientation constant
- Returns:
maximum size for the requested orientation
- Return type:
int
- maximumHeightSpan(pos: int) int[source]๐ถ๏ธ
Return the maximum height contribution for a grid row.
- Parameters:
pos (int) โ row index being queried
- Returns:
maximum height for this row slice
- Return type:
int
- maximumWidthSpan(pos: int) int[source]๐ถ๏ธ
Return the maximum width contribution for a grid column.
- Parameters:
pos (int) โ column index being queried
- Returns:
maximum width for this column slice
- Return type:
int
- minDimension(o: int) int[source]๐ถ๏ธ
Return minimum size along an orientation.
- Parameters:
o (int) โ orientation constant
- Returns:
minimum size for the requested orientation
- Return type:
int
- minimumHeightSpan(pos: int) int[source]๐ถ๏ธ
Return the minimum height contribution for a grid row.
- Parameters:
pos (int) โ row index being queried
- Returns:
minimum height for this row slice
- Return type:
int
- minimumWidthSpan(pos: int) int[source]๐ถ๏ธ
Return the minimum width contribution for a grid column.
- Parameters:
pos (int) โ column index being queried
- Returns:
minimum width for this column slice
- Return type:
int
- parent() TTkLayoutItem | None[source]๐ถ๏ธ
Return the parent layout item/container.
- setGeometry(x: int, y: int, w: int, h: int) None[source]๐ถ๏ธ
Set item geometry.
- Parameters:
x (int) โ horizontal position
y (int) โ vertical position
w (int) โ width
h (int) โ height
- setLayer(layer: int) None[source]๐ถ๏ธ
Set the layer and update the packed z-order layer bits.
- Parameters:
layer (int) โ one of the
TTkLayoutItem.LAYER*constants
- setOffset(x: int, y: int) None[source]๐ถ๏ธ
Set the item offset.
- Parameters:
x (int) โ horizontal offset
y (int) โ vertical offset
- setParent(parent: TTkLayoutItem | None) None[source]๐ถ๏ธ
Set the parent layout item/container.
- Parameters:
parent (object) โ parent object in the layout hierarchy
TTkLayoutItem Attributes๐ถ๏ธ
|
|
|
|
|
|
|
|
|