#include <treemodel.h>
Inheritance diagram for TreeModel:
Public Member Functions | |
TreeModel (QObject *parent=0) | |
~TreeModel (void) | |
QVariant | data (const QModelIndex &index, int role) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
QModelIndex | parent (const QModelIndex &index) const |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
[8] | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole) |
bool | insertRows (int position, int rows, const QModelIndex &parent=QModelIndex()) |
bool | removeRows (int position, int rows, const QModelIndex &parent=QModelIndex()) |
TreeItem * | getItem (const QModelIndex &index) const |
TreeItem * | getItem (QStringList path) const |
Public Attributes | |
TreeItem * | rootItem |
Definition at line 15 of file treemodel.h.
TreeModel::TreeModel | ( | QObject * | parent = 0 |
) |
Definition at line 8 of file treemodel.cpp.
TreeModel::~TreeModel | ( | void | ) |
Definition at line 13 of file treemodel.cpp.
QVariant TreeModel::data | ( | const QModelIndex & | index, | |
int | role | |||
) | const |
Definition at line 29 of file treemodel.cpp.
References TreeItem::data(), getItem(), and TreeItem::recordtable_getrowcount().
Referenced by getItem().
Here is the call graph for this function:
Here is the caller graph for this function:
QVariant TreeModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | const |
Definition at line 112 of file treemodel.cpp.
QModelIndex TreeModel::index | ( | int | row, | |
int | column, | |||
const QModelIndex & | parent = QModelIndex() | |||
) | const |
Definition at line 135 of file treemodel.cpp.
References TreeItem::child(), and getItem().
Referenced by knowtreemodel::indexChildren(), treescreen::ins_branch(), and knowtreemodel::move_updn_branch().
Here is the call graph for this function:
Here is the caller graph for this function:
QModelIndex TreeModel::parent | ( | const QModelIndex & | index | ) | const |
Definition at line 168 of file treemodel.cpp.
References TreeItem::childNumber(), getItem(), TreeItem::parent(), and rootItem.
Referenced by knowtreemodel::add_new_branch(), knowtreemodel::add_new_child_branch(), knowtreemodel::add_new_sibling_branch(), knowtreemodel::parsenodeelement(), and knowtreemodel::setupModelData().
Here is the call graph for this function:
Here is the caller graph for this function:
int TreeModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
[8]
Definition at line 196 of file treemodel.cpp.
References TreeItem::childCount(), and getItem().
Here is the call graph for this function:
int TreeModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
Definition at line 18 of file treemodel.cpp.
Qt::ItemFlags TreeModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 58 of file treemodel.cpp.
bool TreeModel::setData | ( | const QModelIndex & | index, | |
const QVariant & | value, | |||
int | role = Qt::EditRole | |||
) |
Definition at line 205 of file treemodel.cpp.
References getItem(), and TreeItem::setData().
Referenced by knowtreemodel::add_new_branch(), and knowtreemodel::parsenodeelement().
Here is the call graph for this function:
Here is the caller graph for this function:
bool TreeModel::setHeaderData | ( | int | section, | |
Qt::Orientation | orientation, | |||
const QVariant & | value, | |||
int | role = Qt::EditRole | |||
) |
Definition at line 219 of file treemodel.cpp.
References rootItem, and TreeItem::setData().
Here is the call graph for this function:
bool TreeModel::insertRows | ( | int | position, | |
int | rows, | |||
const QModelIndex & | parent = QModelIndex() | |||
) |
Definition at line 151 of file treemodel.cpp.
References getItem(), and TreeItem::insertChildren().
Here is the call graph for this function:
bool TreeModel::removeRows | ( | int | position, | |
int | rows, | |||
const QModelIndex & | parent = QModelIndex() | |||
) |
Definition at line 183 of file treemodel.cpp.
References getItem(), and TreeItem::removeChildren().
Here is the call graph for this function:
TreeItem * TreeModel::getItem | ( | const QModelIndex & | index | ) | const |
Definition at line 68 of file treemodel.cpp.
References rootItem.
Referenced by knowtreemodel::add_new_child_branch(), knowtreemodel::add_new_sibling_branch(), data(), treescreen::del_branch(), treescreen::edit_branch(), index(), knowtreemodel::indexChildren(), treescreen::ins_branch(), treescreen::ins_subbranch(), insertRows(), knowtreemodel::move_updn_branch(), treescreen::on_knowtree_clicked(), parent(), removeRows(), rowCount(), mainwindow::save_tree_position(), mainwindow::set_tree_position(), and setData().
Here is the caller graph for this function:
TreeItem * TreeModel::getItem | ( | QStringList | path | ) | const |
Definition at line 79 of file treemodel.cpp.
References TreeItem::child(), TreeItem::childCount(), critical_error(), data(), and rootItem.
Here is the call graph for this function:
Definition at line 54 of file treemodel.h.
Referenced by findscreen::find_start(), getItem(), knowtreemodel::knowtreemodel(), parent(), treescreen::save_knowtree(), setHeaderData(), and knowtreemodel::~knowtreemodel().