#include <QtAstModel.h>
Public Slots | |
| void | setNode (SgNode *node) |
| Set new root of the tree. | |
| void | setFilter (AstFilterInterface *filter) |
Public Member Functions | |
| QtAstModel (SgNode *node, QObject *parent=0) | |
| virtual | ~QtAstModel () |
| virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
| virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| virtual QModelIndex | parent (const QModelIndex &index) const |
| virtual SgNode * | getNodeFromIndex (const QModelIndex &ind) |
Protected Attributes | |
| ModelNode * | treeRoot |
| AstFilterInterface * | filter |
Classes | |
| class | ModelNode |
| Node for a tree consisting of DisplayInformation of an Ast. More... | |
If you are not familiar with the Qt Model-View interfaces see the Qt-documentation for QAbstractItemModel
The data are fetched from the AST on demand while the user browses through it so the model is build up on demand
There is a second tree build up (out of ModelNodes) which just holds the display-information but usually this display-tree is smaller than the whole AST because it's build up on demand
Definition at line 23 of file QtAstModel.h.
| QtAstModel::QtAstModel | ( | SgNode * | node, | |
| QObject * | parent = 0 | |||
| ) |
Definition at line 146 of file QtAstModel.cpp.
| QtAstModel::~QtAstModel | ( | ) | [virtual] |
Definition at line 152 of file QtAstModel.cpp.
| int QtAstModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Definition at line 211 of file QtAstModel.cpp.
Referenced by index().
Here is the caller graph for this function:

| QVariant QtAstModel::data | ( | const QModelIndex & | index, | |
| int | role = Qt::DisplayRole | |||
| ) | const [virtual] |
| Qt::ItemFlags QtAstModel::flags | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 178 of file QtAstModel.cpp.
| SgNode * QtAstModel::getNodeFromIndex | ( | const QModelIndex & | ind | ) | [virtual] |
Should not be used any more, query for the SgNodeRole of an index
Definition at line 307 of file QtAstModel.cpp.
Here is the call graph for this function:

| QVariant QtAstModel::headerData | ( | int | section, | |
| Qt::Orientation | orientation, | |||
| int | role = Qt::DisplayRole | |||
| ) | const [virtual] |
Definition at line 197 of file QtAstModel.cpp.
| QModelIndex QtAstModel::index | ( | int | row, | |
| int | column, | |||
| const QModelIndex & | parent = QModelIndex() | |||
| ) | const [virtual] |
| QModelIndex QtAstModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
| int QtAstModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Definition at line 216 of file QtAstModel.cpp.
Referenced by index().
Here is the call graph for this function:

Here is the caller graph for this function:

| void QtAstModel::setFilter | ( | AstFilterInterface * | filter | ) | [slot] |
Tree can be filtered by ASTFilterInterface Deletion of filter is done by this class set to NULL, for unfiltered view
Definition at line 160 of file QtAstModel.cpp.
Referenced by AstBrowserWidget::setFilter().
| void QtAstModel::setNode | ( | SgNode * | node | ) | [slot] |
Set new root of the tree.
Definition at line 171 of file QtAstModel.cpp.
Referenced by AstBrowserWidget::setNode().
AstFilterInterface* QtAstModel::filter [protected] |
Definition at line 59 of file QtAstModel.h.
Referenced by rowCount(), setFilter(), and ~QtAstModel().
ModelNode* QtAstModel::treeRoot [protected] |
Definition at line 58 of file QtAstModel.h.
Referenced by index(), parent(), QtAstModel(), setFilter(), setNode(), and ~QtAstModel().
1.4.7