digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
ShowFoto::ShowfotoThumbnailDelegate Class Reference
+ Inheritance diagram for ShowFoto::ShowfotoThumbnailDelegate:

Public Member Functions

 ShowfotoThumbnailDelegate (ShowfotoThumbnailBar *const parent)
 
bool acceptsActivation (const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *activationRect) const override
 
int maximumSize () const
 Returns the minimum or maximum viewport size in the limiting dimension, width or height, depending on current flow.
 
int minimumSize () const
 
void setDefaultViewOptions (const QStyleOptionViewItem &option) override
 Style option with standard values to use for cached rendering.
 
void setFlow (QListView::Flow flow)
 
- Public Member Functions inherited from ShowFoto::ShowfotoDelegate
 ShowfotoDelegate (QWidget *const parent)
 
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.
 
QRect actualPixmapRect (const QModelIndex &index) const
 
int calculatethumbSizeToFit (int ws)
 
QRect coordinatesIndicatorRect () const
 
QRect groupIndicatorRect () const
 
QRect imageInformationRect () const override
 Returns the area where the image information is drawn, or null if empty / not supported.
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
QPixmap pixmapForDrag (const QStyleOptionViewItem &option, const QList< QModelIndex > &indexes) const override
 
QRect pixmapRect () const override
 Returns the area where the pixmap is drawn, or null if not supported.
 
void setView (ShowfotoThumbnailBar *view)
 
- Public Member Functions inherited from ShowFoto::ShowfotoItemViewDelegate
 ShowfotoItemViewDelegate (QWidget *const parent)
 
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.
 
void mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index) override
 
QRect rect () const
 
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)
 
- 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 Member Functions

int thumbnailPixmapSize (bool withHighlight, int size)
 
void updateContentWidth () override
 Reimplement this to set contentWidth.
 
void updateRects () override
 In a subclass, you need to implement this method to set up the rects for drawing.
 
- Protected Member Functions inherited from ShowFoto::ShowfotoDelegate
 ShowfotoDelegate (ShowfotoDelegate::ShowfotoDelegatePrivate &dd, QWidget *const parent)
 
void clearCaches () override
 
virtual void clearModelDataCaches ()
 Reimplement to clear caches based on model indexes (hash on row number etc.) Change signals are listened to this is called whenever such properties become invalid.
 
bool onActualPixmapRect (const QPoint &pos, const QRect &visualRect, const QModelIndex &index, QRect *actualRect) const
 
void setModel (QAbstractItemModel *model)
 
virtual QPixmap thumbnailPixmap (const QModelIndex &index) const
 
void updateActualPixmapRect (const QModelIndex &index, const QRect &rect)
 
void updateSizeRectsAndPixmaps () override
 
- Protected Member Functions inherited from ShowFoto::ShowfotoItemViewDelegate
 ShowfotoItemViewDelegate (ShowfotoItemViewDelegatePrivate &dd, QWidget *const parent)
 
QAbstractItemDelegate * asDelegate () override
 
void drawCreationDate (QPainter *p, const QRect &dateRect, const QDateTime &date) 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 drawImageFormat (QPainter *p, const QRect &dimsRect, const QString &mime) const
 
void drawImageSize (QPainter *p, const QRect &dimsRect, const QSize &dims) const
 
void drawMouseOverRect (QPainter *p, const QStyleOptionViewItem &option) const
 
void drawName (QPainter *p, const QRect &nameRect, const QString &name) 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)
 
- Protected Member Functions inherited from Digikam::DItemDelegate
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.
 

Additional Inherited Members

- Signals inherited from ShowFoto::ShowfotoItemViewDelegate
void hideNotification ()
 
void requestNotification (const QModelIndex &index, const QString &message)
 
- Signals inherited from Digikam::DItemDelegate
void gridSizeChanged (const QSize &newSize)
 
void visualChange ()
 
- Static Public Member Functions inherited from ShowFoto::ShowfotoDelegate
static QPixmap retrieveThumbnailPixmap (const QModelIndex &index, int thumbnailSize)
 Retrieve the thumbnail pixmap in given size for the ShowfotoItemModel::ThumbnailRole for the given index from the given index, which must adhere to ShowfotoThumbnailModel semantics.
 
- Static Public Member Functions inherited from Digikam::DItemDelegate
static QString dateToString (const QDateTime &datetime)
 
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 Slots inherited from ShowFoto::ShowfotoDelegate
void modelChanged ()
 
void modelContentsChanged ()
 
- Protected Slots inherited from ShowFoto::ShowfotoItemViewDelegate
void overlayDestroyed (QObject *o) override
 
void slotSetupChanged ()
 
void slotThemeChanged ()
 
- Protected Attributes inherited from ShowFoto::ShowfotoItemViewDelegate
ShowfotoItemViewDelegatePrivate *const d_ptr = nullptr
 
- Protected Attributes inherited from Digikam::ItemDelegateOverlayContainer
QList< ItemDelegateOverlay * > m_overlays
 

Member Function Documentation

◆ acceptsActivation()

bool ShowFoto::ShowfotoThumbnailDelegate::acceptsActivation ( const QPoint &  pos,
const QRect &  visualRect,
const QModelIndex &  index,
QRect *  activationRect 
) const
overridevirtual

Reimplemented from ShowFoto::ShowfotoDelegate.

◆ setDefaultViewOptions()

void ShowFoto::ShowfotoThumbnailDelegate::setDefaultViewOptions ( const QStyleOptionViewItem &  option)
overridevirtual

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

Reimplemented from ShowFoto::ShowfotoDelegate.

◆ updateContentWidth()

void ShowFoto::ShowfotoThumbnailDelegate::updateContentWidth ( )
overrideprotectedvirtual

This is the maximum width of all content rectangles, typically excluding margins on both sides.

Reimplemented from ShowFoto::ShowfotoDelegate.

◆ updateRects()

void ShowFoto::ShowfotoThumbnailDelegate::updateRects ( )
overrideprotectedvirtual

The paint() method operates depending on these rects.

Implements ShowFoto::ShowfotoDelegate.