Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
AbstractTreeItem Class Reference

#include </tmp/quassel/src/client/treemodel.h>

Inheritance diagram for AbstractTreeItem:

Public Types

enum  TreeItemFlag { NoTreeItemFlag = 0x00, DeleteOnLastChildRemoved = 0x01 }

Signals

void dataChanged (int column=-1)
void beginAppendChilds (int firstRow, int lastRow)
void endAppendChilds ()
void beginRemoveChilds (int firstRow, int lastRow)
void endRemoveChilds ()

Public Member Functions

 Q_DECLARE_FLAGS (TreeItemFlags, TreeItemFlag) AbstractTreeItem(AbstractTreeItem *parent=0)
bool newChild (AbstractTreeItem *child)
bool newChilds (const QList< AbstractTreeItem * > &items)
bool removeChild (int row)
bool removeChild (AbstractTreeItem *child)
void removeAllChilds ()
bool reParent (AbstractTreeItem *newParent)
AbstractTreeItemchild (int row) const
int childCount (int column=0) const
virtual int columnCount () const =0
virtual QVariant data (int column, int role) const =0
virtual bool setData (int column, const QVariant &value, int role)=0
virtual Qt::ItemFlags flags () const
virtual void setFlags (Qt::ItemFlags flags)
AbstractTreeItem::TreeItemFlags treeItemFlags () const
void setTreeItemFlags (AbstractTreeItem::TreeItemFlags flags)
int row () const
AbstractTreeItemparent () const
void dumpChildList ()

Protected Member Functions

void customEvent (QEvent *event)

Private Member Functions

void removeChildLater (AbstractTreeItem *child)
void checkForDeletion ()

Private Attributes

QList< AbstractTreeItem * > _childItems
Qt::ItemFlags _flags
TreeItemFlags _treeItemFlags

Detailed Description

Definition at line 34 of file treemodel.h.

Member Enumeration Documentation

Enumerator:
NoTreeItemFlag 
DeleteOnLastChildRemoved 

Definition at line 39 of file treemodel.h.

Member Function Documentation

Q_DECLARE_FLAGS ( TreeItemFlags  ,
TreeItemFlag   
)
pure virtual
bool newChilds ( const QList< AbstractTreeItem * > &  items)

Definition at line 59 of file treemodel.cpp.

References _childItems, beginAppendChilds(), childCount(), and endAppendChilds().

Referenced by UserCategoryItem::addUsers().

bool removeChild ( AbstractTreeItem child)
inline

Definition at line 51 of file treemodel.h.

References removeChild().

Referenced by removeChild().

virtual int columnCount ( ) const
pure virtual
virtual bool setData ( int  column,
const QVariant &  value,
int  role 
)
pure virtual
virtual Qt::ItemFlags flags ( ) const
inlinevirtual

Definition at line 65 of file treemodel.h.

References _flags.

Referenced by TreeModel::flags(), QueryBufferItem::QueryBufferItem(), setFlags(), and setTreeItemFlags().

virtual void setFlags ( Qt::ItemFlags  flags)
inlinevirtual
AbstractTreeItem::TreeItemFlags treeItemFlags ( ) const
inline

Definition at line 68 of file treemodel.h.

References _treeItemFlags.

Referenced by checkForDeletion().

void setTreeItemFlags ( AbstractTreeItem::TreeItemFlags  flags)
inline

Definition at line 69 of file treemodel.h.

References _treeItemFlags, and flags().

Referenced by removeAllChilds(), and UserCategoryItem::UserCategoryItem().

int row ( ) const
void dumpChildList ( )

Definition at line 214 of file treemodel.cpp.

References _childItems, child(), childCount(), data(), and row().

void beginAppendChilds ( int  firstRow,
int  lastRow 
)
signal

Referenced by newChild(), and newChilds().

void endAppendChilds ( )
signal

Referenced by newChild(), and newChilds().

void beginRemoveChilds ( int  firstRow,
int  lastRow 
)
signal
void endRemoveChilds ( )
signal
void customEvent ( QEvent *  event)
protected
void removeChildLater ( AbstractTreeItem child)
private

Definition at line 124 of file treemodel.cpp.

Referenced by checkForDeletion().

void checkForDeletion ( )
inlineprivate

Member Data Documentation

QList<AbstractTreeItem *> _childItems
private
Qt::ItemFlags _flags
private

Definition at line 89 of file treemodel.h.

Referenced by flags(), and setFlags().

TreeItemFlags _treeItemFlags
private

Definition at line 90 of file treemodel.h.

Referenced by setTreeItemFlags(), and treeItemFlags().


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