Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

TreeModel Class Reference

#include <treemodel.h>

Inheritance diagram for TreeModel:

Inheritance graph
[legend]
Collaboration diagram for TreeModel:

Collaboration graph
[legend]

List of all members.

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

TreeItemrootItem


Detailed Description

Definition at line 33 of file treemodel.h.


Constructor & Destructor Documentation

TreeModel::TreeModel ( const QString &  data,
QObject *  parent = 0 
)

Definition at line 36 of file treemodel.cpp.

References rootItem, and setupModelData().

TreeModel::TreeModel ( QObject *  parent = 0  )  [inline]

Definition at line 39 of file treemodel.h.

TreeModel::~TreeModel (  ) 

Definition at line 45 of file treemodel.cpp.

References rootItem.


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

Definition at line 79 of file treemodel.cpp.

References TreeItem::data(), and rootItem.

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

Definition at line 119 of file treemodel.cpp.

References TreeItem::childCount(), and rootItem.

int TreeModel::columnCount ( const QModelIndex &  parent = QModelIndex()  )  const

Definition at line 50 of file treemodel.cpp.

References TreeItem::columnCount(), and rootItem.

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


The documentation for this class was generated from the following files:
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.