Mixxx

TreeItemModel Class Reference

#include <treeitemmodel.h>

Inheritance diagram for TreeItemModel:
Collaboration diagram for TreeItemModel:

List of all members.

Public Member Functions

 TreeItemModel (QObject *parent=0)
virtual ~TreeItemModel ()
virtual QVariant data (const QModelIndex &index, int role) const
virtual Qt::ItemFlags flags (const QModelIndex &index) const
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
virtual QModelIndex parent (const QModelIndex &index) const
virtual bool insertRows (QList< TreeItem * > &data, int position, int rows, const QModelIndex &parent=QModelIndex())
virtual bool removeRows (int position, int rows, const QModelIndex &parent=QModelIndex())
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
void setRootItem (TreeItem *item)
TreeItemgetItem (const QModelIndex &index) const

Detailed Description

Definition at line 11 of file treeitemmodel.h.


Constructor & Destructor Documentation

TreeItemModel::TreeItemModel ( QObject *  parent = 0)

Definition at line 30 of file treeitemmodel.cpp.

TreeItemModel::~TreeItemModel ( ) [virtual]

Definition at line 37 of file treeitemmodel.cpp.


Member Function Documentation

int TreeItemModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const [virtual]

Definition at line 42 of file treeitemmodel.cpp.

QVariant TreeItemModel::data ( const QModelIndex &  index,
int  role 
) const [virtual]

Definition at line 46 of file treeitemmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Qt::ItemFlags TreeItemModel::flags ( const QModelIndex &  index) const [virtual]

Definition at line 58 of file treeitemmodel.cpp.

TreeItem * TreeItemModel::getItem ( const QModelIndex &  index) const

Return the underlying TreeItem. If the index is invalid, the root item is returned.

Definition at line 156 of file treeitemmodel.cpp.

Here is the caller graph for this function:

QVariant TreeItemModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const [virtual]

Definition at line 65 of file treeitemmodel.cpp.

QModelIndex TreeItemModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const [virtual]

Definition at line 69 of file treeitemmodel.cpp.

Here is the call graph for this function:

bool TreeItemModel::insertRows ( QList< TreeItem * > &  data,
int  position,
int  rows,
const QModelIndex &  parent = QModelIndex() 
) [virtual]

Before you can resize the data model dynamically by using 'insertRows' and 'removeRows' make sure you have initialized

Definition at line 134 of file treeitemmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QModelIndex TreeItemModel::parent ( const QModelIndex &  index) const [virtual]

Definition at line 87 of file treeitemmodel.cpp.

Here is the call graph for this function:

bool TreeItemModel::removeRows ( int  position,
int  rows,
const QModelIndex &  parent = QModelIndex() 
) [virtual]

Definition at line 145 of file treeitemmodel.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int TreeItemModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const [virtual]

Definition at line 100 of file treeitemmodel.cpp.

Here is the call graph for this function:

void TreeItemModel::setRootItem ( TreeItem item)

Populates the model and notifies the view. Call this method first, before you do call any other methods.

Definition at line 123 of file treeitemmodel.cpp.

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines