MNE-CPP  0.1.9
A Framework for Electrophysiology
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DISP3DLIB::AbstractTreeItem Class Reference

Provides the basic tree item. More...

#include <abstracttreeitem.h>

Signals

void checkStateChanged (const Qt::CheckState &checkState)
 

Public Member Functions

 AbstractTreeItem (int iType=Data3DTreeModelItemTypes::UnknownItem, const QString &text="")
 
void setData (const QVariant &value, int role=Qt::UserRole+1)
 
int type () const
 
QList< QStandardItem * > findChildren (int type)
 
QList< QStandardItem * > findChildren (const QString &text)
 
AbstractTreeItemoperator<< (AbstractTreeItem *newItem)
 
AbstractTreeItemoperator<< (AbstractTreeItem &newItem)
 

Static Public Member Functions

static void addItemWithDescription (QStandardItem *pItemParent, QStandardItem *pItemAdd)
 

Protected Member Functions

virtual void initItem ()
 
virtual void onCheckStateChanged (const Qt::CheckState &checkState)
 

Protected Attributes

int m_iType
 
Qt::CheckState m_checkStateOld
 

Detailed Description

Provides the basic tree item.

AbstractTreeItem provides AbstractTreeItem provides the basic tree item. This item should be used as a base class for all tree items throughout the disp3D library.

Definition at line 76 of file abstracttreeitem.h.

Inheritance diagram for DISP3DLIB::AbstractTreeItem:
Inheritance graph

Constructor & Destructor Documentation

◆ AbstractTreeItem()

AbstractTreeItem::AbstractTreeItem ( int  iType = Data3DTreeModelItemTypes::UnknownItem,
const QString &  text = "" 
)

Default constructor.

Parameters
[in]iTypeThe type of the item. See types.h for declaration and definition.
[in]textThe text of this item. This is also by default the displayed name of the item in a view.

Definition at line 58 of file abstracttreeitem.cpp.

Member Function Documentation

◆ addItemWithDescription()

void AbstractTreeItem::addItemWithDescription ( QStandardItem *  pItemParent,
QStandardItem *  pItemAdd 
)
static

Adds an item with its toolTip as second column item as description to the model.

Parameters
[in]pItemParentThe parent item.
[in]pItemAddThe item which is added as a row to the parent item.

Definition at line 99 of file abstracttreeitem.cpp.

◆ checkStateChanged

void DISP3DLIB::AbstractTreeItem::checkStateChanged ( const Qt::CheckState &  checkState)
signal

Emit this signal whenever this item's check state changed.

Parameters
[in]checkStateThe current check state.

◆ findChildren() [1/2]

QList< QStandardItem * > AbstractTreeItem::findChildren ( const QString &  text)

Returns all children of this item based on their text.

Parameters
[in]textThe text of the child items which should be looked for.
Returns
List with all found items.

Definition at line 131 of file abstracttreeitem.cpp.

◆ findChildren() [2/2]

QList< QStandardItem * > AbstractTreeItem::findChildren ( int  type)

Returns all children of this item based on their type.

Parameters
[in]typeThe type of the child items which should be looked for.
Returns
List with all found items.

Definition at line 112 of file abstracttreeitem.cpp.

◆ initItem()

void AbstractTreeItem::initItem ( )
protectedvirtual

◆ onCheckStateChanged()

void AbstractTreeItem::onCheckStateChanged ( const Qt::CheckState &  checkState)
protectedvirtual

Call this function whenever the check box of this item was checked.

Parameters
[in]checkStateThe current checkstate.

Reimplemented in DISP3DLIB::FsAnnotationTreeItem.

Definition at line 168 of file abstracttreeitem.cpp.

◆ operator<<() [1/2]

AbstractTreeItem & AbstractTreeItem::operator<< ( AbstractTreeItem newItem)

Overloaded stream operator to add a child to this item based on a reference.

Parameters
[in]newItemThe new item as a reference.

Definition at line 159 of file abstracttreeitem.cpp.

◆ operator<<() [2/2]

AbstractTreeItem & AbstractTreeItem::operator<< ( AbstractTreeItem newItem)

Overloaded stream operator to add a child to this item based on a pointer.

Parameters
[in]newItemThe new item as a pointer.

Definition at line 150 of file abstracttreeitem.cpp.

◆ setData()

void AbstractTreeItem::setData ( const QVariant &  value,
int  role = Qt::UserRole + 1 
)

QStandardItem functions

Definition at line 78 of file abstracttreeitem.cpp.

Member Data Documentation

◆ m_checkStateOld

Qt::CheckState DISP3DLIB::AbstractTreeItem::m_checkStateOld
protected

This item's old check state.

Definition at line 158 of file abstracttreeitem.h.

◆ m_iType

int DISP3DLIB::AbstractTreeItem::m_iType
protected

This item's type.

Definition at line 157 of file abstracttreeitem.h.


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