![]() |
Mixxx
|
#include <treeitemmodel.h>
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) |
TreeItem * | getItem (const QModelIndex &index) const |
Definition at line 11 of file treeitemmodel.h.
TreeItemModel::TreeItemModel | ( | QObject * | parent = 0 | ) |
Definition at line 30 of file treeitemmodel.cpp.
TreeItemModel::~TreeItemModel | ( | ) | [virtual] |
Definition at line 37 of file treeitemmodel.cpp.
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.
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.
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] |
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.
QModelIndex TreeItemModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
bool TreeItemModel::removeRows | ( | int | position, |
int | rows, | ||
const QModelIndex & | parent = QModelIndex() |
||
) | [virtual] |
Definition at line 145 of file treeitemmodel.cpp.
int TreeItemModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
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.