ItemTreeModel Class Reference

#include <ItemTreeModel.h>

Inheritance diagram for ItemTreeModel:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ItemTreeModel (QObject *parent=NULL)
virtual ~ItemTreeModel ()
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 (const ItemTreeNode *node, int column=0)
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
virtual QModelIndex parent (const QModelIndex &index) const
void setRoot (ItemTreeNode *n)
void setFixedRoot (ItemTreeNode *n)

Static Public Member Functions

static void setupView (QTreeView *view, const QModelIndex &subTree=QModelIndex())

Private Attributes

ItemTreeNoderoot
bool autoDelete
 if true this class owns root (has to be freed)
QStringList headerCap

Friends

class ItemTreeNode

Detailed Description

Definition at line 11 of file ItemTreeModel.h.


Constructor & Destructor Documentation

ItemTreeModel::ItemTreeModel ( QObject *  parent = NULL  ) 

Definition at line 10 of file ItemTreeModel.cpp.

ItemTreeModel::~ItemTreeModel (  )  [virtual]

Definition at line 16 of file ItemTreeModel.cpp.


Member Function Documentation

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

Definition at line 114 of file ItemTreeModel.cpp.

Referenced by index(), and AsmView::selectionChanged().

Here is the caller graph for this function:

QVariant ItemTreeModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const [virtual]

Reimplemented in BAstModel.

Definition at line 73 of file ItemTreeModel.cpp.

Referenced by AsmView::addArrows(), BAstModel::data(), PropertyTreeWidget::drawRow(), RoseTreeView::mouseMoveEvent(), RoseTreeView::viewClicked(), and RoseTreeView::viewDoubleClicked().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 63 of file ItemTreeModel.cpp.

Here is the call graph for this function:

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

Definition at line 99 of file ItemTreeModel.cpp.

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

Definition at line 128 of file ItemTreeModel.cpp.

Here is the call graph for this function:

QModelIndex ItemTreeModel::index ( const ItemTreeNode node,
int  column = 0 
) [virtual]

Definition at line 120 of file ItemTreeModel.cpp.

Referenced by AsmView::addArrows(), ItemTreeNode::addChildAt(), ItemTreeNode::addChildren(), PropertyTreeModel::addEntryToSection(), PropertyTreeWidget::addSection(), RoseTreeView::gotoNode(), and ItemTreeNode::removeChild().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 150 of file ItemTreeModel.cpp.

Here is the call graph for this function:

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

Definition at line 84 of file ItemTreeModel.cpp.

Referenced by PropertyTreeModel::addEntry(), PropertyTreeModel::addEntryToSection(), PropertyTreeModel::addSection(), and index().

Here is the call graph for this function:

Here is the caller graph for this function:

void ItemTreeModel::setFixedRoot ( ItemTreeNode n  ) 

Call this version if setRoot is called only once the ownership of n stays at the caller! delete the ItemTreeNode yourself

Definition at line 47 of file ItemTreeModel.cpp.

Referenced by ProjectView::ProjectView().

Here is the call graph for this function:

Here is the caller graph for this function:

void ItemTreeModel::setRoot ( ItemTreeNode n  ) 

Definition at line 22 of file ItemTreeModel.cpp.

Referenced by PropertyTreeModel::clear(), PropertyTreeModel::PropertyTreeModel(), BAstView::updateModel(), BAstModel::updateModel(), and AsmView::updateModel().

Here is the call graph for this function:

Here is the caller graph for this function:

void ItemTreeModel::setupView ( QTreeView *  view,
const QModelIndex &  subTree = QModelIndex() 
) [static]

This function changes the view according to the information in the ItemTreeNodes currently only used for isFirstColumnSpanned bad design, because view should get all information directly from model but with the isFirstColumnSpanned there seems to be no other possibility

Definition at line 169 of file ItemTreeModel.cpp.

Referenced by PropertyTreeWidget::addEntry(), PropertyTreeWidget::addEntryToSection(), and AsmView::updateModel().

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class ItemTreeNode [friend]

Definition at line 14 of file ItemTreeModel.h.


Member Data Documentation

bool ItemTreeModel::autoDelete [private]

if true this class owns root (has to be freed)

Definition at line 59 of file ItemTreeModel.h.

Referenced by setFixedRoot(), setRoot(), and ~ItemTreeModel().

QStringList ItemTreeModel::headerCap [private]

Definition at line 61 of file ItemTreeModel.h.

Referenced by columnCount(), headerData(), setFixedRoot(), and setRoot().

ItemTreeNode* ItemTreeModel::root [private]

Definition at line 56 of file ItemTreeModel.h.

Referenced by index(), parent(), rowCount(), setFixedRoot(), setRoot(), and ~ItemTreeModel().


The documentation for this class was generated from the following files:
Generated on Tue Sep 15 14:48:49 2009 for RoseQtWidgets by  doxygen 1.4.7