JobPropertyModel Class Reference

#include <jobpropertymodel.h>

Collaboration diagram for JobPropertyModel:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 JobPropertyModel (QObject *parent)
 ~JobPropertyModel ()
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
QModelIndex parent (const QModelIndex &index) const
int rowCount (const QModelIndex &parent=QModelIndex()) const
int columnCount (const QModelIndex &parent=QModelIndex()) const
Qt::ItemFlags flags (const QModelIndex &index) const
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
void emitLayoutAboutToBeChanged ()
void emitLayoutChanged ()
JobPropertyItemgetItem (const QModelIndex &index) const

Public Attributes

JobPropertyItemrootItem
bool _layoutAboutToBeChanged


Detailed Description

Model describing job properties

Definition at line 19 of file jobpropertymodel.h.


Constructor & Destructor Documentation

JobPropertyModel::JobPropertyModel ( QObject *  parent  ) 

Construct a JobPropertyModel

Parameters:
parent parent of this model

Definition at line 18 of file jobpropertymodel.cpp.

References data(), and rootItem.

Here is the call graph for this function:

JobPropertyModel::~JobPropertyModel (  ) 

Destroy this object

Definition at line 29 of file jobpropertymodel.cpp.

References rootItem.


Member Function Documentation

QVariant JobPropertyModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

Get the data at the specified index for the specified role

Parameters:
index where to get the data
role role how to view the data

Definition at line 51 of file jobpropertymodel.cpp.

References JobPropertyItem::data(), and getItem().

Referenced by JobPropertyModel().

Here is the call graph for this function:

QVariant JobPropertyModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

Get the Header data for the specified section.

Parameters:
section section to get the header
orientation orientation
role role to view the header

Definition at line 96 of file jobpropertymodel.cpp.

References JobPropertyItem::data(), and rootItem.

Here is the call graph for this function:

QModelIndex JobPropertyModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const

Get an index to the specified position

Parameters:
row row index
column column index
parent parent of the item to get an index for

Definition at line 112 of file jobpropertymodel.cpp.

References JobPropertyItem::child(), and getItem().

Referenced by JobPropertyItem::getSelfIndex().

Here is the call graph for this function:

bool JobPropertyModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)

Remove rows in the model

Parameters:
row index of the first row to remove in the child list of the parent
count number of rows to delete
parent parent of the rows to remove

Definition at line 224 of file jobpropertymodel.cpp.

References JobPropertyItem::deleteChild(), and getItem().

Here is the call graph for this function:

QModelIndex JobPropertyModel::parent ( const QModelIndex &  index  )  const

Get the parent of the specified item

Parameters:
index indes to the item to get the parent of

Definition at line 131 of file jobpropertymodel.cpp.

References JobPropertyItem::childNumber(), getItem(), JobPropertyItem::parent(), and rootItem.

Here is the call graph for this function:

int JobPropertyModel::rowCount ( const QModelIndex &  parent = QModelIndex()  )  const

Get the number of rows the item has

Parameters:
parent the item to get the children it has

Definition at line 153 of file jobpropertymodel.cpp.

References JobPropertyItem::childCount(), and getItem().

Here is the call graph for this function:

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

Get the number of columns this model has

Parameters:
parent where to get the number of columns

Definition at line 39 of file jobpropertymodel.cpp.

References JobPropertyItem::columnCount(), and rootItem.

Here is the call graph for this function:

Qt::ItemFlags JobPropertyModel::flags ( const QModelIndex &  index  )  const

Get the flags the specified item has

Parameters:
index how to get the item

Definition at line 69 of file jobpropertymodel.cpp.

bool JobPropertyModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

Set the value of an item

Parameters:
index how to get the item to edit
value the value to set
role role of this data

Definition at line 168 of file jobpropertymodel.cpp.

References getItem(), and JobPropertyItem::setData().

Here is the call graph for this function:

bool JobPropertyModel::setHeaderData ( int  section,
Qt::Orientation  orientation,
const QVariant &  value,
int  role = Qt::EditRole 
)

Set the header data

Parameters:
section section of the header to edit
orientation orientation
value the value to set
role role of this data

Definition at line 187 of file jobpropertymodel.cpp.

References rootItem, and JobPropertyItem::setData().

Here is the call graph for this function:

void JobPropertyModel::emitLayoutAboutToBeChanged (  ) 

Emit the signal layoutAboutToBeChanged();

Definition at line 199 of file jobpropertymodel.cpp.

References _layoutAboutToBeChanged.

Referenced by JobPropertyItemNodes::addNode(), JobPropertyItemNode::createCustomContextMenu(), JobPropertyItemString::set(), JobPropertyItemNode::set(), and JobPropertyItemNodes::set().

void JobPropertyModel::emitLayoutChanged (  ) 

Emit the signal emit layoutChanged();

Definition at line 211 of file jobpropertymodel.cpp.

References _layoutAboutToBeChanged.

Referenced by JobPropertyItemNodes::addNode(), JobPropertyItemNode::createCustomContextMenu(), JobPropertyItemString::set(), JobPropertyItemNode::set(), and JobPropertyItemNodes::set().

JobPropertyItem * JobPropertyModel::getItem ( const QModelIndex &  index  )  const

Get the item at the specified index

Parameters:
index how to get the item

Definition at line 82 of file jobpropertymodel.cpp.

References rootItem.

Referenced by JobPropertyDelegate::createEditor(), data(), index(), JobPropertyDelegate::onCustomContextMenuRequested(), parent(), removeRows(), rowCount(), and setData().


Member Data Documentation

JobPropertyItem* JobPropertyModel::rootItem

Definition at line 49 of file jobpropertymodel.h.

Referenced by columnCount(), getItem(), headerData(), JobEditorWidget::JobEditorWidget(), JobPropertyModel(), parent(), setHeaderData(), and ~JobPropertyModel().

bool JobPropertyModel::_layoutAboutToBeChanged

Definition at line 52 of file jobpropertymodel.h.

Referenced by emitLayoutAboutToBeChanged(), and emitLayoutChanged().


The documentation for this class was generated from the following files:
Generated on Mon Mar 16 18:46:08 2009 for QCJM by  doxygen 1.5.4