Package Camelot :: Package camelot :: Package view :: Package controls :: Package delegates :: Module customdelegate :: Class CustomDelegate |
[frames] | no frames]

# Class CustomDelegate

source code

    Base class for implementing custom delegates.

    .. attribute:: editor

    class attribute specifies the editor class that should be used

Nested Classes
Inherited from `PyQt4.QtGui.QAbstractItemDelegate`: `EndEditHint`

Instance Methods
__init__(self, parent=None, editable=True, **kwargs) is editable | source code
commitAndCloseEditor(self) | source code
createEditor(self, parent, option, index) will be put onto a form | source code
paint_text(self, painter, option, index, text, margin_left=0, margin_right=0) Paint unicode text into the given rect defined by option, and fill the rect with the background color :arg margin_left: additional margin to the left, to be used for icons or others :arg margin_right: additional margin to the right, to be used for icons or others | source code
setEditorData(self, editor, index) | source code
setModelData(self, editor, model, index) | source code
sizeHint(self, option, index) | source code
Inherited from `PyQt4.QtGui.QItemDelegate`: `drawBackground`, `drawCheck`, `drawDecoration`, `drawDisplay`, `drawFocus`, `editorEvent`, `eventFilter`, `hasClipping`, `itemEditorFactory`, `paint`, `setClipping`, `setItemEditorFactory`, `updateEditorGeometry` Inherited from `PyQt4.QtGui.QAbstractItemDelegate`: `closeEditor`, `commitData`, `elidedText`, `helpEvent`, `sizeHintChanged` Inherited from `PyQt4.QtCore.QObject`: `blockSignals`, `childEvent`, `children`, `connect`, `connectNotify`, `customEvent`, `deleteLater`, `destroyed`, `disconnect`, `disconnectNotify`, `dumpObjectInfo`, `dumpObjectTree`, `dynamicPropertyNames`, `emit`, `event`, `findChild`, `findChildren`, `inherits`, `installEventFilter`, `isWidgetType`, `killTimer`, `metaObject`, `moveToThread`, `objectName`, `parent`, `property`, `pyqtConfigure`, `receivers`, `removeEventFilter`, `sender`, `setObjectName`, `setParent`, `setProperty`, `signalsBlocked`, `startTimer`, `thread`, `timerEvent`, `tr`, `trUtf8` Inherited from `sip.simplewrapper`: `__delattr__`, `__getattribute__`, `__new__`, `__setattr__` Inherited from `object`: `__format__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables
| editor = `None` hash(x)
Inherited from `PyQt4.QtGui.QAbstractItemDelegate`: `EditNextItem`, `EditPreviousItem`, `NoHint`, `RevertModelCache`, `SubmitModelCache` Inherited from `PyQt4.QtCore.QObject`: `staticMetaObject`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, parent=None, editable=True, **kwargs) (Constructor) | source code
is editable Parameters: `parent` - the parent object for the delegate `editable` - a boolean indicating if the field associated to the delegate Overrides: object.__init__

### createEditor(self, parent, option, index) | source code
will be put onto a form Parameters: `option` - use an option with version 5 to indicate the widget Overrides: PyQt4.QtGui.QAbstractItemDelegate.createEditor

### setEditorData(self, editor, index) | source code
Overrides: PyQt4.QtGui.QAbstractItemDelegate.setEditorData

### setModelData(self, editor, model, index) | source code
Overrides: PyQt4.QtGui.QAbstractItemDelegate.setModelData

### sizeHint(self, option, index) | source code
Overrides: PyQt4.QtGui.QAbstractItemDelegate.sizeHint