KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
AbstractModelItem::List Class Reference

A list of AbstractModelItem pointers with UUID and entity-type search helpers. More...

#include <abstractmodelitem.h>

+ Inheritance diagram for AbstractModelItem::List:
+ Collaboration diagram for AbstractModelItem::List:

Public Member Functions

AbstractModelItemfindByUuid (const QUuid &uuid) const
 Find the first item with the given UUID.
 
int indexOfUuid (const QUuid &uuid) const
 Return the list index of the first item with the given UUID.
 
int firstIndexOfEntityType (int entityType) const
 Return the list index of the first item with the given entity type.
 
int lastIndexOfEntityType (int entityType) const
 Return the list index of the last item with the given entity type.
 
template<typename T >
QList< T > findChildItems (bool recursive=true) const
 Find all child items castable to type T, optionally recursing.
 

Detailed Description

A list of AbstractModelItem pointers with UUID and entity-type search helpers.

Definition at line 102 of file abstractmodelitem.h.

Member Function Documentation

◆ findByUuid()

AbstractModelItem * AbstractModelItem::List::findByUuid ( const QUuid &  uuid) const
inline

Find the first item with the given UUID.

Parameters
uuidUUID to search for
Returns
Matching item pointer, or nullptr if not found

Definition at line 110 of file abstractmodelitem.h.

References AbstractModelItem::uuid().

◆ findChildItems()

template<typename T >
QList< T > AbstractModelItem::List::findChildItems ( bool  recursive = true) const
inline

Find all child items castable to type T, optionally recursing.

Template Parameters
TPointer type to find
Parameters
recursiveWhether to recurse into children (default true)
Returns
List of matching items cast to T

Definition at line 177 of file abstractmodelitem.h.

◆ firstIndexOfEntityType()

int AbstractModelItem::List::firstIndexOfEntityType ( int  entityType) const
inline

Return the list index of the first item with the given entity type.

Parameters
entityTypeEntity type to search for
Returns
Index of the matching item, or -1 if not found

Definition at line 140 of file abstractmodelitem.h.

References AbstractModelItem::entityType().

◆ indexOfUuid()

int AbstractModelItem::List::indexOfUuid ( const QUuid &  uuid) const
inline

Return the list index of the first item with the given UUID.

Parameters
uuidUUID to search for
Returns
Index of the matching item, or -1 if not found

Definition at line 125 of file abstractmodelitem.h.

References AbstractModelItem::uuid().

◆ lastIndexOfEntityType()

int AbstractModelItem::List::lastIndexOfEntityType ( int  entityType) const
inline

Return the list index of the last item with the given entity type.

Parameters
entityTypeEntity type to search for
Returns
Index of the matching item, or -1 if not found

Definition at line 158 of file abstractmodelitem.h.

References AbstractModelItem::entityType().


The documentation for this class was generated from the following file: