TreeModel Class Reference
#include <treemodel.h>


Public Member Functions | |
| TreeModel (const QString &data, QObject *parent=0) | |
| TreeModel (QObject *parent=0) | |
| ~TreeModel () | |
| QVariant | data (const QModelIndex &index, int role) const |
| Qt::ItemFlags | flags (const QModelIndex &index) 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 |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
Protected Member Functions | |
| void | setupModelData (const QStringList &lines, TreeItem *parent) |
Protected Attributes | |
| TreeItem * | rootItem |
Detailed Description
Definition at line 33 of file treemodel.h.
Constructor & Destructor Documentation
| TreeModel::TreeModel | ( | const QString & | data, | |
| QObject * | parent = 0 | |||
| ) |
| TreeModel::TreeModel | ( | QObject * | parent = 0 |
) | [inline] |
Definition at line 39 of file treemodel.h.
| TreeModel::~TreeModel | ( | ) |
Member Function Documentation
| QVariant TreeModel::data | ( | const QModelIndex & | index, | |
| int | role | |||
| ) | const |
Definition at line 58 of file treemodel.cpp.
References TreeItem::data().
Referenced by HelpBrowser::itemSelected(), and HelpBrowser::jumpToHelpSection().
| Qt::ItemFlags TreeModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 71 of file treemodel.cpp.
| QVariant TreeModel::headerData | ( | int | section, | |
| Qt::Orientation | orientation, | |||
| int | role = Qt::DisplayRole | |||
| ) | const |
| QModelIndex TreeModel::index | ( | int | row, | |
| int | column, | |||
| const QModelIndex & | parent = QModelIndex() | |||
| ) | const |
Definition at line 88 of file treemodel.cpp.
References TreeItem::child(), and rootItem.
Referenced by HelpBrowser::jumpToHelpSection().
| QModelIndex TreeModel::parent | ( | const QModelIndex & | index | ) | const |
Definition at line 105 of file treemodel.cpp.
References TreeItem::parent(), rootItem, and TreeItem::row().
| int TreeModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
| int TreeModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
| void TreeModel::setupModelData | ( | const QStringList & | lines, | |
| TreeItem * | parent | |||
| ) | [protected] |
Definition at line 131 of file treemodel.cpp.
References TreeItem::appendChild(), and TreeItem::child().
Referenced by TreeModel().
Member Data Documentation
TreeItem* TreeModel::rootItem [protected] |
Definition at line 55 of file treemodel.h.
Referenced by ScHelpTreeModel::addRow(), columnCount(), headerData(), index(), parent(), rowCount(), ScHelpTreeModel::ScHelpTreeModel(), TreeModel(), and ~TreeModel().
The documentation for this class was generated from the following files:
