# class KExtendableItemDelegate

###

Module | kdeui
Namespace |
Class | KExtendableItemDelegate
Inherits | QStyledItemDelegate

### enums

- auxDataRoles { ShowExtensionIndicatorRole }

enum details

### methods

- KExtendableItemDelegate (parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parent | QAbstractItemView |

  Create a new KExtendableItemDelegate that belongs to parent. In contrast to generic QAbstractItemDelegates, an instance of this class can only ever be the delegate for one instance of af QAbstractItemView subclass.

- contractAll ( )

  returns Nothing

  Close all extenders and delete all extender widgets.

- contractItem (index)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  index | QModelIndex |

  Close the extender that logically belongs to index from the view. The extender widget will be deleted.

- contractPixmap ( )

  returns QPixmap

  Return the pixmap that is displayed to contract an item.

- extendItem (extender, index)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  extender | QWidget |
  index | QModelIndex |

  Insert the extender that logically belongs to index into the view. If you need a parent for the extender at construction time, use the itemview's viewport(). The extender will be reparented and resized to the viewport by this function.

- extendPixmap ( )

  returns QPixmap

  Return the pixmap that is displayed to extend an item.

- extenderCreated (extender, index)

  returns Nothing
  SIGNAL ("extenderCreated (QWidget*, const QModelIndex&)")

  Argument | Type | Default
  --- | --- | ---
  extender | QWidget |
  index | QModelIndex |

  This signal indicates that the item at index was extended with extender.

- extenderDestroyed (extender, index)

  returns Nothing
  SIGNAL ("extenderDestroyed (QWidget*, const QModelIndex&)")

  Argument | Type | Default
  --- | --- | ---
  extender | QWidget |
  index | QModelIndex |

  This signal indicates that the extender belonging to index has emitted the destroyed() signal.

- extenderRect (extender, option, index)

  returns QRect

  Argument | Type | Default
  --- | --- | ---
  extender | QWidget |
  option | QStyleOptionViewItem |
  index | QModelIndex |

  Reimplement this function to fine-tune the position of the extender. option.rect will be a rectangle that is as wide as the viewport and as high as the usual item height plus the extender size hint's height. Its upper left corner will be at the upper left corner of the usual item. You can place the returned rectangle of this function anywhere inside that area.

- isExtended (index)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  index | QModelIndex |

  Return whether there is an extender that belongs to index.

- paint (painter, option, index)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  painter | QPainter |
  option | QStyleOptionViewItem |
  index | QModelIndex |

  Re-implemented for internal reasons. API not affected.

- setContractPixmap (pixmap)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  pixmap | QPixmap |

  The pixmap that is displayed to contract an item. pixmap must have the same size as the pixmap in setExtendPixmap.

- setExtendPixmap (pixmap)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  pixmap | QPixmap |

  The pixmap that is displayed to extend an item. pixmap must have the same size as the pixmap in setContractPixmap.

- sizeHint (option, index)

  returns QSize

  Argument | Type | Default
  --- | --- | ---
  option | QStyleOptionViewItem |
  index | QModelIndex |

  Re-implemented for internal reasons. API not affected.

- updateExtenderGeometry (extender, option, index)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  extender | QWidget |
  option | QStyleOptionViewItem |
  index | QModelIndex |

  Reimplement this function to adjust the internal geometry of the extender. The external geometry of the extender will be set by the delegate.

### enums - detail

- auxDataRoles { ShowExtensionIndicatorRole }

  | ShowExtensionIndicatorRole | - Qt::UserRole+200 | - |