#include <jobpropertydelegate.h>
Public Slots | |
| void | sync () | 
| void | slotDestroyed (QObject *object) | 
| void | onCustomContextMenuRequested (const QPoint &pos) | 
Signals | |
| void | editorOpened () | 
| void | editorClosed () | 
Public Member Functions | |
| JobPropertyDelegate (QObject *parent) | |
| virtual | ~JobPropertyDelegate () | 
| virtual bool | eventFilter (QObject *object, QEvent *event) | 
| Filters event on the view.   | |
| virtual void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const | 
| virtual QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const | 
| virtual QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const | 
| virtual void | setEditorData (QWidget *editor, const QModelIndex &index) const | 
| virtual void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const | 
| virtual void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const | 
Private Attributes | |
| bool | m_syncing | 
| QObject * | m_lastEdited | 
Definition at line 18 of file jobpropertydelegate.h.
| JobPropertyDelegate::JobPropertyDelegate | ( | QObject * | parent | ) | 
Construct a JobPropertyDelegate
| parent | of the delegate | 
Definition at line 25 of file jobpropertydelegate.cpp.
| JobPropertyDelegate::~JobPropertyDelegate | ( | ) |  [virtual] | 
        
Destroy a JobPropertyDelegate
Definition at line 35 of file jobpropertydelegate.cpp.
| bool JobPropertyDelegate::eventFilter | ( | QObject * | object, | |
| QEvent * | event | |||
| ) |  [virtual] | 
        
Filters event on the view.
Used to close the property editor
| object | where the event comes from/to | |
| event | the event | 
Definition at line 47 of file jobpropertydelegate.cpp.
| void JobPropertyDelegate::paint | ( | QPainter * | painter, | |
| const QStyleOptionViewItem & | opt, | |||
| const QModelIndex & | index | |||
| ) |  const [virtual] | 
        
Paint the value from the model to the view
| painter | the painter | |
| opt | options on how to view the item | |
| index | index in the model for the item to paint | 
Definition at line 92 of file jobpropertydelegate.cpp.
| QSize JobPropertyDelegate::sizeHint | ( | const QStyleOptionViewItem & | opt, | |
| const QModelIndex & | index | |||
| ) |  const [virtual] | 
        
Returns the size needed by the delegate to display the item specified by index, taking into account the style information provided by the option.
| opt | options on how to view the item | |
| index | index in the model for the item to paint | 
Definition at line 125 of file jobpropertydelegate.cpp.
| QWidget * JobPropertyDelegate::createEditor | ( | QWidget * | parent, | |
| const QStyleOptionViewItem & | option, | |||
| const QModelIndex & | index | |||
| ) |  const [virtual] | 
        
Create an editor for a specified item
| parent | where to draw the widget | |
| option | options on how to view/edit the item | |
| index | index in the model for the item to edit | 
Definition at line 152 of file jobpropertydelegate.cpp.
References JobPropertyItem::createEditor(), editorOpened(), JobPropertyModel::getItem(), m_lastEdited, slotDestroyed(), and sync().

| void JobPropertyDelegate::setEditorData | ( | QWidget * | editor, | |
| const QModelIndex & | index | |||
| ) |  const [virtual] | 
        
Set the data to edit
| editor | the editor | |
| index | index in the model to get the data from | 
Definition at line 186 of file jobpropertydelegate.cpp.
| void JobPropertyDelegate::setModelData | ( | QWidget * | editor, | |
| QAbstractItemModel * | model, | |||
| const QModelIndex & | index | |||
| ) |  const [virtual] | 
        
Set the data edited in the model
| editor | the editor | |
| model | the model | |
| index | index in the model to set the data | 
Definition at line 204 of file jobpropertydelegate.cpp.
| void JobPropertyDelegate::updateEditorGeometry | ( | QWidget * | editor, | |
| const QStyleOptionViewItem & | option, | |||
| const QModelIndex & | index | |||
| ) |  const [virtual] | 
        
Update the editor geometry.
Definition at line 232 of file jobpropertydelegate.cpp.
| void JobPropertyDelegate::editorOpened | ( | ) |  [signal] | 
        
Slignal to let the model know we're editing it
Referenced by createEditor().
| void JobPropertyDelegate::editorClosed | ( | ) |  [signal] | 
        
Slignal to let the model know we've finished editing it
Referenced by slotDestroyed().
| void JobPropertyDelegate::sync | ( | ) |  [slot] | 
        
Synchronize the model with the editor
Definition at line 219 of file jobpropertydelegate.cpp.
References m_syncing.
Referenced by createEditor().
| void JobPropertyDelegate::slotDestroyed | ( | QObject * | object | ) |  [slot] | 
        
Called when the editor is destroyed
| object | the editor being destroyed | 
Definition at line 136 of file jobpropertydelegate.cpp.
References editorClosed(), and m_lastEdited.
Referenced by createEditor().
| void JobPropertyDelegate::onCustomContextMenuRequested | ( | const QPoint & | pos | ) |  [slot] | 
        
Slot called when a context menu is requested
| pos | pos where the context menu is requested | 
Definition at line 243 of file jobpropertydelegate.cpp.
References JobPropertyItem::createCustomContextMenu(), JobPropertyModel::getItem(), and JobPropertyItem::hasContextMenu().
bool JobPropertyDelegate::m_syncing [private]           | 
        
QObject* JobPropertyDelegate::m_lastEdited [mutable, private]           | 
        
Definition at line 66 of file jobpropertydelegate.h.
Referenced by createEditor(), and slotDestroyed().
 1.5.4