PropertyTreeModel Class Reference

#include <PropertyTreeModel.h>

Inheritance diagram for PropertyTreeModel:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PropertyTreeModel (QObject *parent=NULL)
virtual ~PropertyTreeModel ()
int addSection (const QString &sectionName)
QModelIndex addEntryToSection (int sectionId, const QString &property, const QVariant &value)
QModelIndex addEntry (const QModelIndex &parent, const QString &property, const QVariant &value)
void clear ()
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())

Protected Attributes

ItemTreeNodetreeRoot

Classes

class  ItemTreeHeaderNode
class  ItemTreePropValueNode

Detailed Description

TreeModel for a Tree like the PropertyEditor in Qt-Designer column count: 2

section-header1 | empty (ItemTreeHeaderNode) -> property1 | value1 (ItemTreePropValueNode) -> property2 | value2 (ItemTreePropValueNode) section-header2 | empty (ItemTreeHeaderNode) ->

Definition at line 19 of file PropertyTreeModel.h.


Constructor & Destructor Documentation

PropertyTreeModel::PropertyTreeModel ( QObject *  parent = NULL  ) 

Definition at line 121 of file PropertyTreeModel.cpp.

Here is the call graph for this function:

PropertyTreeModel::~PropertyTreeModel (  )  [virtual]

Definition at line 128 of file PropertyTreeModel.cpp.


Member Function Documentation

QModelIndex PropertyTreeModel::addEntry ( const QModelIndex &  parent,
const QString &  property,
const QVariant &  value 
)

Definition at line 162 of file PropertyTreeModel.cpp.

Referenced by PropertyTreeWidget::addEntry().

Here is the call graph for this function:

Here is the caller graph for this function:

QModelIndex PropertyTreeModel::addEntryToSection ( int  sectionId,
const QString &  property,
const QVariant &  value 
)

Definition at line 148 of file PropertyTreeModel.cpp.

Referenced by PropertyTreeWidget::addEntryToSection().

Here is the call graph for this function:

Here is the caller graph for this function:

int PropertyTreeModel::addSection ( const QString &  sectionName  ) 

Definition at line 139 of file PropertyTreeModel.cpp.

Referenced by PropertyTreeWidget::addSection().

Here is the call graph for this function:

Here is the caller graph for this function:

void PropertyTreeModel::clear (  ) 

Definition at line 133 of file PropertyTreeModel.cpp.

Referenced by PropertyTreeWidget::clear().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 114 of file ItemTreeModel.cpp.

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

Here is the caller graph for this function:

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

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, inherited]

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, inherited]

Definition at line 99 of file ItemTreeModel.cpp.

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

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, inherited]

Definition at line 120 of file ItemTreeModel.cpp.

Referenced by AsmView::addArrows(), ItemTreeNode::addChildAt(), ItemTreeNode::addChildren(), 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, inherited]

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, inherited]

Definition at line 84 of file ItemTreeModel.cpp.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void ItemTreeModel::setFixedRoot ( ItemTreeNode n  )  [inherited]

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  )  [inherited]

Definition at line 22 of file ItemTreeModel.cpp.

Referenced by clear(), 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, inherited]

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:


Member Data Documentation

ItemTreeNode* PropertyTreeModel::treeRoot [protected]

Definition at line 45 of file PropertyTreeModel.h.

Referenced by addEntryToSection(), addSection(), clear(), and PropertyTreeModel().


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