#include <accountviewdelegate.h>
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. |
Definition at line 34 of file accountviewdelegate.h.
AccountViewDelegate::AccountViewDelegate | ( | QObject * | parent = 0 |
) |
Constructor.
parent | parent object |
Definition at line 20 of file accountviewdelegate.cpp.
QWidget * AccountViewDelegate::createEditor | ( | QWidget * | parent, | |
const QStyleOptionViewItem & | , | |||
const QModelIndex & | index | |||
) | const |
Returns a editor widget to edit the given index.
parent | parent of the returned widget | |
index | index which shall be handled by the editor |
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.
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.
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.
editor | editor widget | |
option | Options for the editor widget |
Definition at line 81 of file accountviewdelegate.cpp.
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.