TTkAbstractScrollViewLayout🌶️

class TTkAbstractScrollViewLayout(*args, **kwargs)[source]🌶️

Bases: TTkLayout, TTkAbstractScrollViewInterface

TTkAbstractScrollViewLayout

Signals🌶️

viewChanged

This signal is emitted whenever there is a change in the view content topology (size,pos)

viewMovedTo

This signal is emitted when the view content move to a new position (x,y),

viewSizeChanged

This signal is emitted when the view content size changed

Slots🌶️

viewMoveTo(x, y)

Move the view to the specified offset position

Members🌶️

viewChanged: pyTTkSignal🌶️

This signal is emitted whenever there is a change in the view content topology (size,pos)

Note

This signal must be implemented in any implementation of TTkAbstractScrollView to notify that the view content boudaries changed

viewMovedTo: pyTTkSignal🌶️

This signal is emitted when the view content move to a new position (x,y),

Parameters:
  • x (int) – the new horizontal offset

  • y (int) – the new vertical offset

viewSizeChanged: pyTTkSignal🌶️

This signal is emitted when the view content size changed

Parameters:
  • width (int) – the new width

  • height (int) – the new height

Methods🌶️

getViewOffsets() → Tuple[int, int][source]🌶️

Retrieve the vertical and horizontal offsets of the TTkAbstractScrollViewInterface

Note

Reimplement this function to handle this event

This method is already implemented in the following classes:
Returns:

the (x,y) offset

Return type:

tuple[int,int]

viewDisplayedSize() → Tuple[int, int][source]🌶️

Return the displayed size of the layout

Returns:

the (width, height) of the displayed area

Return type:

tuple[int,int]

viewFullAreaSize() → Tuple[int, int][source]🌶️

Return the full area size of the layout

Returns:

the (width, height) of the full area

Return type:

tuple[int,int]

viewMoveTo(x: int, y: int) → None[source]🌶️

Move the view to the specified offset position

Parameters:
  • x (int) – the horizontal offset

  • y (int) – the vertical offset

Methods Inherited from: TTkLayout

addItem(item)

Append a layout item.

addItems(items)

Append multiple layout items.

addWidget(widget)

Add a widget to this Layout

addWidgets(widgets)

Add a list of widgets to this Layout

children()

Return the list of direct child layout items.

clear()

Remove and detach all items from this layout.

count()

Return the number of direct child layout items.

fullWidgetAreaGeometry()

Return the bounding geometry that encloses all child items.

insertItem(index, item)

Insert a single item at index.

insertItems(index, items)

Insert multiple items at index and re-parent them.

insertWidget(index, widget)

Insert a widget at index.

insertWidgets(index, widgets)

Insert widgets at index.

itemAt(index)

Return the item at index or None when out of range.

iterWidgets([onlyVisible, recurse, reverse])

Iterate over all widgets in the layout.

layoutItemType()

Return TTkK.LayoutItemTypes.LayoutItem.

lowerWidget(widget)

Lower a widget (and its branch) to the bottom z-order.

parentWidget()

Return the widget owning this layout branch.

raiseWidget(widget)

Raise a widget (and its branch) to the top z-order.

removeItem(item)

Remove a single layout item.

removeItems(items)

Remove a list of layout items if present.

removeWidget(widget)

Remove a widget from this Layout

removeWidgets(widgets)

Remove a list of widget from this Layout

replaceItem(item, index)

Replace the item at index with item.

setGeometry(x, y, w, h)

Set the geometry and emit viewChanged signal

setParent(parent)

Set the parent layout item and propagate parent widget ownership.

update(*args, **kwargs)

Propagate update requests to child widgets and nested layouts.

TTkAbstractScrollViewLayout Attributes🌶️

LAYER0

LAYER1

LAYER2

LAYER3

LAYERMASK

zSortedItems

Return child items sorted by z-order.