QskIndexedLayoutBox

Base class of layouts with index ordered elements. #include <QskIndexedLayoutBox.h>

Inherits from QskBox

Inherited by QskLinearBox, QskStackBox

Public Signals

  Name
void autoAddChildrenChanged()

Public Functions

  Name
  QskIndexedLayoutBox(QQuickItem * parent =nullptr)
Constructor.
  ~QskIndexedLayoutBox() override
Destructor.
void setAutoAddChildren(bool on =true)
En/Disable auto appending of children.
bool autoAddChildren() const

Protected Functions

  Name
void itemChange(ItemChange , const ItemChangeData & ) override
void reparentItem(QQuickItem * item)
void unparentItem(QQuickItem * item)

Public Properties

  Name
bool autoAddChildren
Flag controlling whether to automatically append children to the layout.

Public Signals Documentation

signal autoAddChildrenChanged

void autoAddChildrenChanged()

See: setAutoAddChildren(), autoAddChildren()

The autoAddChildren property has changed

Public Functions Documentation

function QskIndexedLayoutBox

explicit QskIndexedLayoutBox(
    QQuickItem * parent =nullptr
)

Constructor.

Parameters:

Create a layout having autoAddChildren set to false.

function ~QskIndexedLayoutBox

~QskIndexedLayoutBox() override

Destructor.

function setAutoAddChildren

void setAutoAddChildren(
    bool on =true
)

En/Disable auto appending of children.

Parameters:

Note: Existing children, that have not been inserted before remain being not seen by the layout.

When autoAddChildren() is enabled new children are automatically appended to the layout. Otherwise items have to be inserted manually using addItem() or insertItem().

function autoAddChildren

bool autoAddChildren() const

Return: Value of the autoAddChildren property

Protected Functions Documentation

function itemChange

void itemChange(
    ItemChange ,
    const ItemChangeData & 
) override

See: autoAddChildren

Checking ItemChildAddedChange/ItemChildRemovedChange changes to implement the autoAddChildren mode

function reparentItem

void reparentItem(
    QQuickItem * item
)

function unparentItem

void unparentItem(
    QQuickItem * item
)

Public Property Documentation

property autoAddChildren

bool autoAddChildren;

Flag controlling whether to automatically append children to the layout.

Note: Children being transparent for positioners are ignored

Par: Access functions:

autoAddChildren(), setAutoAddChildren(), autoAddChildrenChanged()

When autoAddChildren is enabled new children are automatically appended to the layout. Otherwise items have to be inserted manually using addItem() or insertItem().


Updated on 28 July 2023 at 14:02:28 CEST