digiKam Developer Documentation: Digikam::ItemViewImportDelegate Class Reference

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

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

## Signals
void | hideNotification ()
void | requestNotification (const QModelIndex &index, const QString &message)
Signals inherited from Digikam::DItemDelegate
void | gridSizeChanged (const QSize &newSize)
void | visualChange ()

## Public Member Functions
| ItemViewImportDelegate (QWidget *const parent)
bool | acceptsActivation (const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *activationRect=nullptr) const override
bool | acceptsToolTip (const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *tooltipRect=nullptr) const override
| 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.
double | displayRatio () const
QSize | gridSize () const override
| Returns the gridsize to be set by the view.
virtual QRect | imageInformationRect () const
| Returns the area where the image information is drawn, or null if empty / not supported.
void | mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index) override
virtual QRect | pixmapRect () const
| Returns the area where the pixmap is drawn, or null if not supported.
virtual QRect | ratingRect () const
| Returns the rectangle where the rating is drawn, or a null rectangle if not supported.
QRect | rect () const
void | setDefaultViewOptions (const QStyleOptionViewItem &option) override
| Style option with standard values to use for cached rendering.
void | setRatingEdited (const QModelIndex &index)
| Can be used to temporarily disable drawing of the rating.
void | setSpacing (int spacing) override
void | setThumbnailSize (const ThumbnailSize &thumbSize) override
| reimplemented from DItemDelegate
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override
int | spacing () const
ThumbnailSize | thumbnailSize () const
Public Member Functions inherited from Digikam::DItemDelegate
| DItemDelegate (QObject *const parent=nullptr)
virtual QPixmap | pixmapForDrag (const QStyleOptionViewItem &option, const QList< QModelIndex > &indexes) const =0
Public Member Functions inherited from Digikam::ItemDelegateOverlayContainer
| ItemDelegateOverlayContainer ()=default
| This is a sample implementation for delegate management methods, to be inherited by a delegate.
void | installOverlay (ItemDelegateOverlay *overlay)
void | mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index)
QList< ItemDelegateOverlay * > | overlays () const
void | removeAllOverlays ()
void | removeOverlay (ItemDelegateOverlay *overlay)
void | setAllOverlaysActive (bool active)
void | setViewOnAllOverlays (QAbstractItemView *view)

## Protected Slots
void | overlayDestroyed (QObject *o) override
void | slotSetupChanged ()
void | slotThemeChanged ()

## Protected Member Functions
| ItemViewImportDelegate (ItemViewImportDelegatePrivate &dd, QWidget *const parent)
QAbstractItemDelegate * | asDelegate () override
void | drawColorLabelLine (QPainter *p, const QRect &pixRect, int colorId) const
void | drawCreationDate (QPainter *p, const QRect &dateRect, const QDateTime &date) const
void | drawDownloadIndicator (QPainter *p, const QRect &r, int itemType) const
void | drawFileSize (QPainter *p, const QRect &r, qlonglong bytes) const
void | drawFocusRect (QPainter *p, const QStyleOptionViewItem &option, bool isSelected) const
void | drawGeolocationIndicator (QPainter *p, const QRect &r) const
void | drawGroupIndicator (QPainter *p, const QRect &r, int numberOfGroupedImages, bool open) const
void | drawImageFormat (QPainter *p, const QRect &dimsRect, const QString &mime) const
void | drawImageSize (QPainter *p, const QRect &dimsRect, const QSize &dims) const
void | drawLockIndicator (QPainter *p, const QRect &r, int lockStatus) const
void | drawMouseOverRect (QPainter *p, const QStyleOptionViewItem &option) const
void | drawName (QPainter *p, const QRect &nameRect, const QString &name) const
void | drawPickLabelIcon (QPainter *p, const QRect &r, int pickLabel) const
void | drawRating (QPainter *p, const QModelIndex &index, const QRect &ratingRect, int rating, bool isSelected) const
void | drawTags (QPainter *p, const QRect &r, const QString &tagsString, bool isSelected) const
QRect | drawThumbnail (QPainter *p, const QRect &thumbRect, const QPixmap &background, const QPixmap &thumbnail) const
| Use the tool methods for painting in subclasses.
virtual void | invalidatePaintingCache ()
| reimplement these in subclasses
void | prepareBackground ()
void | prepareFonts ()
void | prepareMetrics (int maxWidth)
void | prepareRatingPixmaps (bool composeOverBackground=true)
QPixmap | ratingPixmap (int rating, bool selected) const
| Returns the relevant pixmap from the cached rating pixmaps.
virtual void | updateSizeRectsAndPixmaps ()=0
Protected Member Functions inherited from Digikam::DItemDelegate
virtual void | clearCaches ()
QString | squeezedTextCached (QPainter *const p, int width, const QString &text) const
QPixmap | thumbnailBorderPixmap (const QSize &pixSize, bool isGrouped=false) const
Protected Member Functions inherited from Digikam::ItemDelegateOverlayContainer
virtual void | drawOverlays (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const
virtual void | overlayDestroyed (QObject *o)
| Declare as slot in the derived class calling this method.

## Protected Attributes
ItemViewImportDelegatePrivate *const | d_ptr = nullptr
Protected Attributes inherited from Digikam::ItemDelegateOverlayContainer
QList< ItemDelegateOverlay * > | m_overlays

## Additional Inherited Members
Static Public Member Functions inherited from Digikam::DItemDelegate
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)

## Member Function Documentation

## ◆ acceptsActivation()

bool Digikam::ItemViewImportDelegate::acceptsActivation | ( | const QPoint & | pos,
|  | const QRect & | visualRect,
|  | const QModelIndex & | index,
|  | QRect * | activationRect = `nullptr`
| ) |  | const
| overridevirtual

Implements Digikam::DItemDelegate.

## ◆ acceptsToolTip()

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

Implements Digikam::DItemDelegate.

## ◆ asDelegate()

QAbstractItemDelegate * Digikam::ItemViewImportDelegate::asDelegate | ( |  | ) |
| overrideprotectedvirtual

Returns
  the delegate, typically, the derived class

Implements Digikam::ItemDelegateOverlayContainer.

## ◆ gridSize()

QSize Digikam::ItemViewImportDelegate::gridSize | ( |  | ) | const
| overridevirtual

It's sizeHint plus spacing.

Implements Digikam::DItemDelegate.

## ◆ imageInformationRect()

QRect Digikam::ItemViewImportDelegate::imageInformationRect | ( |  | ) | const
| virtual

The image information is textual or graphical information, but not the pixmap. The ratingRect() will e.g. typically be contained in this area.

Reimplemented in Digikam::ImportDelegate.

## ◆ invalidatePaintingCache()

void Digikam::ItemViewImportDelegate::invalidatePaintingCache | ( |  | ) |
| protectedvirtual

Reimplemented in Digikam::ImportDelegate.

## ◆ mouseMoved()

void Digikam::ItemViewImportDelegate::mouseMoved | ( | QMouseEvent * | e,
|  | const QRect & | visualRect,
|  | const QModelIndex & | index
| ) |  |
| overridevirtual

Note
  to be called by ItemViewCategorized only

Implements Digikam::DItemDelegate.

## ◆ pixmapRect()

QRect Digikam::ItemViewImportDelegate::pixmapRect | ( |  | ) | const
| virtual

Reimplemented in Digikam::ImportDelegate.

## ◆ prepareRatingPixmaps()

void Digikam::ItemViewImportDelegate::prepareRatingPixmaps | ( | bool | composeOverBackground = `true` | ) |
| protected

Please call this method after prepareBackground() and when d->ratingPixmap is set

## ◆ setDefaultViewOptions()

void Digikam::ItemViewImportDelegate::setDefaultViewOptions | ( | const QStyleOptionViewItem & | option | ) |
| overridevirtual

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

Implements Digikam::DItemDelegate.

## ◆ setRatingEdited()

void Digikam::ItemViewImportDelegate::setRatingEdited | ( | const QModelIndex & | index | ) |

Call with QModelIndex() afterwards.

## ◆ setSpacing()

void Digikam::ItemViewImportDelegate::setSpacing | ( | int | spacing | ) |
| overridevirtual

Implements Digikam::DItemDelegate.

## ◆ setThumbnailSize()

void Digikam::ItemViewImportDelegate::setThumbnailSize | ( | const ThumbnailSize & | thumbSize | ) |
| overridevirtual

Implements Digikam::DItemDelegate.