Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkPropertyItem Class Reference

A tree item used by QmitkPropertyItemModel to represent a property row. More...

#include <QmitkPropertyItem.h>

Public Member Functions

 QmitkPropertyItem (const QList< QVariant > &data)
 Constructs a property item with the given column data. More...
 
 ~QmitkPropertyItem ()
 
void AppendChild (QmitkPropertyItem *child)
 Appends a child item to this item. More...
 
QmitkPropertyItem * GetChild (int row) const
 Returns the child item at the given row. More...
 
int GetChildCount () const
 Returns the number of child items. More...
 
int GetColumnCount () const
 Returns the number of data columns. More...
 
QVariant GetData (int column) const
 Returns the data for the given column. More...
 
QmitkPropertyItem * GetParent () const
 Returns the parent item. More...
 
int GetRow ()
 Returns the row index of this item within its parent. More...
 

Detailed Description

A tree item used by QmitkPropertyItemModel to represent a property row.

Each item stores a list of QVariant column data (typically property name and value) and maintains parent-child relationships to form a tree structure. This is a non-Qt helper class used internally by QmitkPropertyItemModel.

See also
QmitkPropertyItemModel
QmitkPropertyItemDelegate

Definition at line 29 of file QmitkPropertyItem.h.

Constructor & Destructor Documentation

◆ QmitkPropertyItem()

QmitkPropertyItem::QmitkPropertyItem ( const QList< QVariant > &  data)
explicit

Constructs a property item with the given column data.

Parameters
[in]dataA list of QVariant values, one per column.

◆ ~QmitkPropertyItem()

QmitkPropertyItem::~QmitkPropertyItem ( )

Member Function Documentation

◆ AppendChild()

void QmitkPropertyItem::AppendChild ( QmitkPropertyItem *  child)

Appends a child item to this item.

Parameters
[in]childThe child item to append. Takes ownership.

◆ GetChild()

QmitkPropertyItem* QmitkPropertyItem::GetChild ( int  row) const

Returns the child item at the given row.

Parameters
[in]rowThe zero-based row index.
Returns
Pointer to the child item, or nullptr if out of range.

◆ GetChildCount()

int QmitkPropertyItem::GetChildCount ( ) const

Returns the number of child items.

Returns
The child count.

◆ GetColumnCount()

int QmitkPropertyItem::GetColumnCount ( ) const

Returns the number of data columns.

Returns
The column count.

◆ GetData()

QVariant QmitkPropertyItem::GetData ( int  column) const

Returns the data for the given column.

Parameters
[in]columnThe zero-based column index.
Returns
The column data as QVariant.

◆ GetParent()

QmitkPropertyItem* QmitkPropertyItem::GetParent ( ) const

Returns the parent item.

Returns
Pointer to the parent item, or nullptr for the root item.

◆ GetRow()

int QmitkPropertyItem::GetRow ( )

Returns the row index of this item within its parent.

Returns
The zero-based row index.

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