KXQTS::TreeItem Class Reference

TreeItem is a node in a hierachial structure and is used together with TreeModel. More...

#include <TreeItem.h>

Inheritance diagram for KXQTS::TreeItem:

Inheritance graph
[legend]
List of all members.

Public Types

typedef QList< QPointer< TreeItem > > List

Signals

void changed (TreeItem *item)

Public Member Functions

virtual void appendChild (TreeItem *item)=0
virtual TreeItemchild (const unsigned int row) const=0
virtual unsigned int childCount () const=0
virtual TreeItem::List children () const=0
virtual int columnCount () const=0
virtual QVariant data (const Qt::ItemDataRole role, int column) const=0
virtual TreeItemparent () const=0
int row () const
virtual ~TreeItem ()

Detailed Description

TreeItem is a node in a hierachial structure and is used together with TreeModel.

TreeItem is abstract base class. Instances of sub-classes of TreeItem can be used with TreeModel in order to use hierarchial data in Qt's model/view framework.

TreeItem is a QObject in order to be able to be used with QPointer.

Author:
Frans Englich <frans.englich@telia.com>
See also:
TreeModel

Definition at line 40 of file TreeItem.h.


Member Function Documentation

void KXQTS::TreeItem::changed ( TreeItem item  )  [signal]

Emitted whenever this item changed. This is used for keeping views in synchronization with the item model which houses this item.

Parameters:
item the item which changed. That is, this TreeItem.

Referenced by KXQTS::TestContainer::appendChild().

int TreeItem::row (  )  const

Determines the position among the children of this TreeItem's parent. This is done by introspecting the result of children().

Definition at line 21 of file TreeItem.cpp.

References children().

Referenced by KXQTS::XDTItemItem::data(), and KXQTS::TreeModel::parent().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Thu Feb 8 14:54:31 2007 for Patternist by  doxygen 1.5.1