![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
This class allows to create item delegates embedding simple widgets to interact with items. More...
Inheritance diagram for Digikam::DWItemDelegate:Public Member Functions | |
| DWItemDelegate (QAbstractItemView *const itemView, QObject *const parent=nullptr) | |
| Creates a new ItemDelegate to be used with a given itemview. | |
| QPersistentModelIndex | focusedIndex () const |
| Retrieves the currently focused index. | |
| QAbstractItemView * | itemView () const |
| Retrieves the item view this delegate is monitoring. | |
Protected Member Functions | |
| QList< QEvent::Type > | blockedEventTypes (QWidget *const widget) const |
| Retrieves the list of blocked event types for the given widget. | |
| virtual QList< QWidget * > | createItemWidgets (const QModelIndex &index) const =0 |
| Creates the list of widgets needed for an item. | |
| void | setBlockedEventTypes (QWidget *const widget, const QList< QEvent::Type > &types) const |
Sets the list of event types that a widget will block. | |
| virtual void | updateItemWidgets (const QList< QWidget * > &widgets, const QStyleOptionViewItem &option, const QPersistentModelIndex &index) const =0 |
| Updates a list of widgets for its use inside of the delegate (painting or event handling). | |
Friends | |
| class | DWItemDelegateEventListener |
| class | DWItemDelegatePool |
For instance you can add push buttons, line edits, etc. to your delegate and use them to modify the state of your model.
|
explicit |
| itemView | the item view the new delegate will monitor |
| parent | the parent of this delegate |
|
protected |
| widget | the specified widget. |
|
protectedpure virtual |
Implemented in Digikam::SetupCollectionDelegate.
| QPersistentModelIndex Digikam::DWItemDelegate::focusedIndex | ( | ) | const |
An invalid index if none is focused.
| QAbstractItemView * Digikam::DWItemDelegate::itemView | ( | ) | const |
|
protected |
Blocked events are not passed to the view. This way you can prevent an item from being selected when a button is clicked for instance.
| widget | the widget which must block events |
| types | the list of event types the widget must block |
|
protectedpure virtual |
| widgets | the widgets to update |
| option | the current set of style options for the view. |
| index | the model index of the item currently manipulated. |
Implemented in Digikam::SetupCollectionDelegate.