kget
KExtendableItemDelegate Class Reference
#include <kextendableitemdelegate.h>

Detailed Description
Definition at line 40 of file kextendableitemdelegate.h.
Public Types | |
| enum | auxDataRoles { ShowExtensionIndicatorRole = Qt::UserRole + 200 } |
Signals | |
| void | extenderCreated (QWidget *extender, const QModelIndex &index) |
| void | extenderDestroyed (QWidget *extender, const QModelIndex &index) |
Public Member Functions | |
| KExtendableItemDelegate (QAbstractItemView *parent) | |
| virtual | ~KExtendableItemDelegate () |
| virtual QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const |
| virtual void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | extendItem (QWidget *extender, const QModelIndex &index) |
| void | contractItem (const QModelIndex &index) |
| bool | isExtended (const QModelIndex &index) const |
| virtual void | updateExtenderGeometry (QWidget *extender, const QStyleOptionViewItem &option, const QModelIndex &index) const |
Protected Member Functions | |
| QRect | extenderRect (QWidget *extender, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | setExtendIcon (const QPixmap &) |
| void | setContractIcon (const QPixmap &) |
| QPixmap | extendIcon () |
| QPixmap | contractIcon () |
Member Enumeration Documentation
Constructor & Destructor Documentation
| KExtendableItemDelegate::KExtendableItemDelegate | ( | QAbstractItemView * | parent | ) |
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.
Definition at line 47 of file kextendableitemdelegate.cpp.
| KExtendableItemDelegate::~KExtendableItemDelegate | ( | ) | [virtual] |
Definition at line 57 of file kextendableitemdelegate.cpp.
Member Function Documentation
| QSize KExtendableItemDelegate::sizeHint | ( | const QStyleOptionViewItem & | option, | |
| const QModelIndex & | index | |||
| ) | const [virtual] |
| void KExtendableItemDelegate::paint | ( | QPainter * | painter, | |
| const QStyleOptionViewItem & | option, | |||
| const QModelIndex & | index | |||
| ) | const [virtual] |
| void KExtendableItemDelegate::extendItem | ( | QWidget * | extender, | |
| const QModelIndex & | index | |||
| ) |
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.
Definition at line 63 of file kextendableitemdelegate.cpp.
| void KExtendableItemDelegate::contractItem | ( | const QModelIndex & | index | ) |
Remove the extender that logically belongs to index from the view.
Definition at line 85 of file kextendableitemdelegate.cpp.
| bool KExtendableItemDelegate::isExtended | ( | const QModelIndex & | index | ) | const |
Return whether there is an extender that belongs to index.
Definition at line 121 of file kextendableitemdelegate.cpp.
| void KExtendableItemDelegate::updateExtenderGeometry | ( | QWidget * | extender, | |
| const QStyleOptionViewItem & | option, | |||
| const QModelIndex & | index | |||
| ) | const [virtual] |
Reimplement this function to adjust the internal geometry of the extender.
The external geometry of the extender will be set by the delegate.
Definition at line 303 of file kextendableitemdelegate.cpp.
| void KExtendableItemDelegate::extenderCreated | ( | QWidget * | extender, | |
| const QModelIndex & | index | |||
| ) | [signal] |
This signal indicates that the item at index was extended with extender.
| void KExtendableItemDelegate::extenderDestroyed | ( | QWidget * | extender, | |
| const QModelIndex & | index | |||
| ) | [signal] |
This signal indicates that the extender belonging to index has emitted the destroyed() signal.
| QRect KExtendableItemDelegate::extenderRect | ( | QWidget * | extender, | |
| const QStyleOptionViewItem & | option, | |||
| const QModelIndex & | index | |||
| ) | const [protected] |
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.
Definition at line 235 of file kextendableitemdelegate.cpp.
| void KExtendableItemDelegate::setExtendIcon | ( | const QPixmap & | icon | ) | [protected] |
Definition at line 321 of file kextendableitemdelegate.cpp.
| void KExtendableItemDelegate::setContractIcon | ( | const QPixmap & | icon | ) | [protected] |
Definition at line 327 of file kextendableitemdelegate.cpp.
| QPixmap KExtendableItemDelegate::extendIcon | ( | ) | [protected] |
Definition at line 333 of file kextendableitemdelegate.cpp.
| QPixmap KExtendableItemDelegate::contractIcon | ( | ) | [protected] |
Definition at line 339 of file kextendableitemdelegate.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference