AccountViewDelegate Class Reference

To edit some data in the account view. More...

#include <accountviewdelegate.h>

List of all members.

Public Member Functions

 AccountViewDelegate (QObject *parent=0)
 Constructor.
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &index) const
 Returns a editor widget to edit the given index.
void setEditorData (QWidget *editor, const QModelIndex &index) const
 Sets the data to be displayed and edited by the editor from the data model item specified by the model index.
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 Gets data drom the editor widget and stores it in the account view model at the item index.
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &) const
 Updates the geometry of the editor widget.

Public Attributes

KIcon picActive
 Picture for a active account used by the combo box to switch the account state.
KIcon picNotActive
 Picture for a inactive account used by the combo box to switch the account state.


Detailed Description

To edit some data in the account view.

Definition at line 34 of file accountviewdelegate.h.


Constructor & Destructor Documentation

AccountViewDelegate::AccountViewDelegate ( QObject *  parent = 0  ) 

Constructor.

Parameters:
parent parent object

Definition at line 20 of file accountviewdelegate.cpp.


Member Function Documentation

QWidget * AccountViewDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  ,
const QModelIndex &  index 
) const

Returns a editor widget to edit the given index.

Parameters:
parent parent of the returned widget
index index which shall be handled by the editor
Returns:
editor widget

Definition at line 30 of file accountviewdelegate.cpp.

void AccountViewDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const

Sets the data to be displayed and edited by the editor from the data model item specified by the model index.

Parameters:
editor editor widget
index Index of the model data

Definition at line 45 of file accountviewdelegate.cpp.

void AccountViewDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const

Gets data drom the editor widget and stores it in the account view model at the item index.

Parameters:
editor Editor which has edited the data
model the Account View Model
index edited index

Definition at line 66 of file accountviewdelegate.cpp.

void AccountViewDelegate::updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &   
) const

Updates the geometry of the editor widget.

Parameters:
editor editor widget
option Options for the editor widget

Definition at line 81 of file accountviewdelegate.cpp.


Member Data Documentation

Picture for a active account used by the combo box to switch the account state.

Set by the constructor

Definition at line 83 of file accountviewdelegate.h.

Picture for a inactive account used by the combo box to switch the account state.

Set by the constructor

Definition at line 90 of file accountviewdelegate.h.


The documentation for this class was generated from the following files:

Generated on Tue May 18 19:43:53 2010 for KShowmail by  doxygen 1.5.6