digiKam Developer Documentation: Digikam::DItemDelegate Class Reference

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

Loading...
Searching...
No Matches
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Digikam::DItemDelegate Class Referenceabstract
Inheritance diagram for Digikam::DItemDelegate:

## Signals
void | gridSizeChanged (const QSize &newSize)
void | visualChange ()

## Public Member Functions
| DItemDelegate (QObject *const parent=nullptr)
virtual bool | acceptsActivation (const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *activationRect=nullptr) const =0
virtual bool | acceptsToolTip (const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *tooltipRect=nullptr) const =0
| These methods take four parameters: The position on viewport, the rect on viewport, the index, and optionally a parameter into which, if the return value is true, a rectangle can be written for which the return value will be true as well.
virtual QSize | gridSize () const =0
| Returns the gridsize to be set by the view.
virtual void | mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index)=0
virtual QPixmap | pixmapForDrag (const QStyleOptionViewItem &option, const QList< QModelIndex > &indexes) const =0
virtual void | setDefaultViewOptions (const QStyleOptionViewItem &option)=0
| Style option with standard values to use for cached rendering.
virtual void | setSpacing (int spacing)=0
virtual void | setThumbnailSize (const ThumbnailSize &thumbSize)=0
| You must set these options from the view.

## Static Public Member Functions
static QPixmap | makeDragPixmap (const QStyleOptionViewItem &option, const QList< QModelIndex > &indexes, double displayRatio, const QPixmap &suggestedPixmap=QPixmap())
static QString | squeezedText (const QFontMetrics &fm, int width, const QString &text)

## Protected Member Functions
virtual void | clearCaches ()
QString | squeezedTextCached (QPainter *const p, int width, const QString &text) const
QPixmap | thumbnailBorderPixmap (const QSize &pixSize, bool isGrouped=false) const

## Member Function Documentation

## ◆ acceptsToolTip()

virtual bool Digikam::DItemDelegate::acceptsToolTip | ( | const QPoint & | pos,
|  | const QRect & | visualRect,
|  | const QModelIndex & | index,
|  | QRect * | tooltipRect = `nullptr`
| ) |  | const
| pure virtual

Implemented in Digikam::ItemDelegate, Digikam::ItemViewDelegate, ShowFoto::ShowfotoDelegate, ShowFoto::ShowfotoItemViewDelegate, Digikam::ImportDelegate, and Digikam::ItemViewImportDelegate.

## ◆ gridSize()

virtual QSize Digikam::DItemDelegate::gridSize | ( |  | ) | const
| pure virtual

It's sizeHint plus spacing.

Implemented in Digikam::ItemViewDelegate, ShowFoto::ShowfotoItemViewDelegate, and Digikam::ItemViewImportDelegate.

## ◆ mouseMoved()

virtual void Digikam::DItemDelegate::mouseMoved | ( | QMouseEvent * | e,
|  | const QRect & | visualRect,
|  | const QModelIndex & | index
| ) |  |
| pure virtual

Note
  to be called by ItemViewCategorized only

Implemented in Digikam::ItemViewDelegate, ShowFoto::ShowfotoItemViewDelegate, and Digikam::ItemViewImportDelegate.

## ◆ setDefaultViewOptions()

virtual void Digikam::DItemDelegate::setDefaultViewOptions | ( | const QStyleOptionViewItem & | option | ) |
| pure virtual

option.rect shall be the viewport rectangle. Call on resize, font change.

Implemented in Digikam::ItemDelegate, Digikam::ItemThumbnailDelegate, Digikam::ItemViewDelegate, ShowFoto::ShowfotoThumbnailDelegate, ShowFoto::ShowfotoItemViewDelegate, Digikam::ImportDelegate, Digikam::ImportThumbnailDelegate, and Digikam::ItemViewImportDelegate.

## ◆ setThumbnailSize()

virtual void Digikam::DItemDelegate::setThumbnailSize | ( | const ThumbnailSize & | thumbSize | ) |
| pure virtual

Implemented in Digikam::ItemViewDelegate, ShowFoto::ShowfotoItemViewDelegate, and Digikam::ItemViewImportDelegate.