Package Camelot :: Package camelot :: Package view :: Package controls :: Package delegates :: Module currencydelegate :: Class CurrencyDelegate |
[frames] | no frames]

# Class CurrencyDelegate

source code

    Custom delegate for float values

    .. _delegate-CurrencyDelegate:

    .. image:: ../_static/delegates/CurrencyDelegate_unselected_disabled.png
    .. image:: ../_static/delegates/CurrencyDelegate_unselected_editable.png

    .. image:: ../_static/delegates/CurrencyDelegate_selected_disabled.png
    .. image:: ../_static/delegates/CurrencyDelegate_selected_editable.png

    Field attributes supported by the delegate :

     * :ref:`minimum <field-attribute-minimum>`
     * :ref:`maximum <field-attribute-maximum>`
     * :ref:`precision <field-attribute-precision>`
     * :ref:`editable <field-attribute-editable>`
     * :ref:`prefix <field-attribute-prefix>`
     * :ref:`suffix <field-attribute-suffix>`
    By default, creates a FloatEditor as its editor.

    .. image:: ../_static/editors/FloatEditor_editable.png
    Field attributes supported by this editor :

     * :ref:`precision <field-attribute-precision>`
     * :ref:`minimum <field-attribute-minimum>`
     * :ref:`maximum <field-attribute-maximum>`
     * :ref:`editable <field-attribute-editable>`
     * :ref:`prefix <field-attribute-prefix>`
     * :ref:`suffix <field-attribute-suffix>`
     * :ref:`calculator <field-attribute-calculator>`

Nested Classes
| editor Widget for editing a float field, with a calculator
Inherited from `PyQt4.QtGui.QAbstractItemDelegate`: `EndEditHint`

Instance Methods
__metaclass__(name, bases, dct) | source code
__init__(self, minimum=-1e+15, maximum=1e+15, precision=2, editable=True, parent=None, prefix=`'````'`, suffix=`'````'`, **kwargs) to the precision specified in the definition of the Field. | source code
setEditorData(self, editor, index) | source code
paint(self, painter, option, index) | source code
Inherited from `customdelegate.CustomDelegate`: `commitAndCloseEditor`, `createEditor`, `paint_text`, `setModelData`, `sizeHint` Inherited from `PyQt4.QtGui.QItemDelegate`: `drawBackground`, `drawCheck`, `drawDecoration`, `drawDisplay`, `drawFocus`, `editorEvent`, `eventFilter`, `hasClipping`, `itemEditorFactory`, `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
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, minimum=-1e+15, maximum=1e+15, precision=2, editable=True, parent=None, prefix=`'````'`, suffix=`'````'`, **kwargs) (Constructor) | source code
to the precision specified in the definition of the Field. Parameters: `precision` - The number of digits after the decimal point displayed. This defaults Overrides: object.__init__

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

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