| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Attributes | List of all members
Digikam::SetupCollectionDelegate Class Reference
Inheritance diagram for Digikam::SetupCollectionDelegate:

## Signals
void | appendPressed (int mappedId) const
void | categoryButtonPressed (int mappedId) const
void | deletePressed (int mappedId) const
void | updatePressed (int mappedId) const

## Public Member Functions
| SetupCollectionDelegate (QAbstractItemView *const view, QObject *const parent=nullptr)
QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
QList< QWidget * > | createItemWidgets (const QModelIndex &index) const override
| Creates the list of widgets needed for an item.
bool | editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
void | setEditorData (QWidget *editor, const QModelIndex &index) const override
void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override
void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
void | updateItemWidgets (const QList< QWidget * > &widgets, const QStyleOptionViewItem &option, const QPersistentModelIndex &index) const override
| Updates a list of widgets for its use inside of the delegate (painting or event handling).
Public Member Functions inherited from Digikam::DWItemDelegate
| 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 Attributes
int | m_categoryMaxStyledWidth = 0
QToolButton * | m_sampleAppendButton = nullptr
QToolButton * | m_sampleDeleteButton = nullptr
QPushButton * | m_samplePushButton = nullptr
QToolButton * | m_sampleUpdateButton = nullptr
QStyledItemDelegate * | m_styledDelegate = nullptr

## Additional Inherited Members
Protected Member Functions inherited from Digikam::DWItemDelegate
QList< QEvent::Type > | blockedEventTypes (QWidget *const widget) const
| Retrieves the list of blocked event types for the given widget.
void | setBlockedEventTypes (QWidget *const widget, const QList< QEvent::Type > &types) const
| Sets the list of event `types` that a `widget` will block.

## Member Function Documentation

## ◆ createItemWidgets()

QList< QWidget * > Digikam::SetupCollectionDelegate::createItemWidgets | ( | const QModelIndex & | index | ) | const
| override virtual

Note
  No initialization of the widgets is supposed to happen here. The widgets will be initialized based on needs for a given item.
  If you want to connect some widget signals to any slot, you should do it here.

- index the index to create widgets for.

Note
  If you want to know the index for which you are creating widgets, it is available as a QModelIndex Q_PROPERTY called "goya:creatingWidgetsForIndex". Ensure to add Q_DECLARE_METATYPE(QModelIndex) before your method definition to tell QVariant about QModelIndex.

Returns
  the list of newly created widgets which will be used to interact with an item.

See also
  updateItemWidgets()

Implements Digikam::DWItemDelegate.

## ◆ updateItemWidgets()

void Digikam::SetupCollectionDelegate::updateItemWidgets | ( | const QList< QWidget * > & | widgets,
|  | const QStyleOptionViewItem & | option,
|  | const QPersistentModelIndex & | index
| ) |  | const
| override virtual

Note
  All the positioning and sizing should be done in item coordinates.

Warning
  Do not make widget connections in here, since this method will be called very regularly.

Parameters

  widgets | the widgets to update
  option | the current set of style options for the view.
  index | the model index of the item currently manipulated.

Implements Digikam::DWItemDelegate.