digiKam
Loading...
Searching...
No Matches
ShowFoto::ShowfotoItemViewDelegate Class Referenceabstract

#include <showfotoitemviewdelegate.h>

+ Inheritance diagram for ShowFoto::ShowfotoItemViewDelegate:

Signals

void gridSizeChanged (const QSize &newSize)
 
void hideNotification ()
 
void requestNotification (const QModelIndex &index, const QString &message)
 
void visualChange ()
 

Public Member Functions

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
 
double displayRatio () const
 
QSize gridSize () const override
 
virtual QRect imageInformationRect () const
 
void installOverlay (ItemDelegateOverlay *overlay)
 
void mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index) override
 
QList< ItemDelegateOverlay * > overlays () const
 
virtual QPixmap pixmapForDrag (const QStyleOptionViewItem &option, const QList< QModelIndex > &indexes) const =0
 
virtual QRect pixmapRect () const
 
QRect rect () const
 
void removeAllOverlays ()
 
void removeOverlay (ItemDelegateOverlay *overlay)
 
void setAllOverlaysActive (bool active)
 
void setDefaultViewOptions (const QStyleOptionViewItem &option) override
 
void setSpacing (int spacing) override
 
void setThumbnailSize (const ThumbnailSize &thumbSize) override
 reimplemented from DItemDelegate
 
void setViewOnAllOverlays (QAbstractItemView *view)
 
 ShowfotoItemViewDelegate (QWidget *const parent)
 
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
int spacing () const
 
ThumbnailSize thumbnailSize () const
 
 ~ShowfotoItemViewDelegate () override
 

Static Public Member Functions

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

void overlayDestroyed (QObject *o) override
 
void slotSetupChanged ()
 
void slotThemeChanged ()
 

Protected Member Functions

QAbstractItemDelegate * asDelegate () override
 Returns the delegate, typically, the derived class.
 
virtual void clearCaches ()
 
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
 
virtual void drawOverlays (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) 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)
 
 ShowfotoItemViewDelegate (ShowfotoItemViewDelegatePrivate &dd, QWidget *const parent)
 
QString squeezedTextCached (QPainter *const p, int width, const QString &text) const
 
QPixmap thumbnailBorderPixmap (const QSize &pixSize, bool isGrouped=false) const
 
virtual void updateSizeRectsAndPixmaps ()=0
 

Protected Attributes

ShowfotoItemViewDelegatePrivate *const d_ptr = nullptr
 
QList< ItemDelegateOverlay * > m_overlays
 

Constructor & Destructor Documentation

◆ ShowfotoItemViewDelegate() [1/2]

ShowFoto::ShowfotoItemViewDelegate::ShowfotoItemViewDelegate ( QWidget *const  parent)
explicit

◆ ~ShowfotoItemViewDelegate()

ShowFoto::ShowfotoItemViewDelegate::~ShowfotoItemViewDelegate ( )
override

◆ ShowfotoItemViewDelegate() [2/2]

ShowFoto::ShowfotoItemViewDelegate::ShowfotoItemViewDelegate ( ShowfotoItemViewDelegatePrivate dd,
QWidget *const  parent 
)
protected

Member Function Documentation

◆ acceptsActivation()

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

◆ acceptsToolTip()

bool ShowFoto::ShowfotoItemViewDelegate::acceptsToolTip ( const QPoint &  pos,
const QRect &  visualRect,
const QModelIndex &  index,
QRect *  tooltipRect = nullptr 
) const
overridevirtual

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.

Implements Digikam::DItemDelegate.

◆ asDelegate()

QAbstractItemDelegate * ShowFoto::ShowfotoItemViewDelegate::asDelegate ( )
overrideprotectedvirtual

Returns the delegate, typically, the derived class.

Implements Digikam::ItemDelegateOverlayContainer.

◆ clearCaches()

◆ dateToString()

QString Digikam::DItemDelegate::dateToString ( const QDateTime &  datetime)
staticinherited

◆ displayRatio()

double ShowFoto::ShowfotoItemViewDelegate::displayRatio ( ) const

◆ drawCreationDate()

void ShowFoto::ShowfotoItemViewDelegate::drawCreationDate ( QPainter *  p,
const QRect &  dateRect,
const QDateTime &  date 
) const
protected

◆ drawFileSize()

void ShowFoto::ShowfotoItemViewDelegate::drawFileSize ( QPainter *  p,
const QRect &  r,
qlonglong  bytes 
) const
protected

◆ drawFocusRect()

void ShowFoto::ShowfotoItemViewDelegate::drawFocusRect ( QPainter *  p,
const QStyleOptionViewItem &  option,
bool  isSelected 
) const
protected

◆ drawGeolocationIndicator()

void ShowFoto::ShowfotoItemViewDelegate::drawGeolocationIndicator ( QPainter *  p,
const QRect &  r 
) const
protected

◆ drawImageFormat()

void ShowFoto::ShowfotoItemViewDelegate::drawImageFormat ( QPainter *  p,
const QRect &  dimsRect,
const QString &  mime 
) const
protected

◆ drawImageSize()

void ShowFoto::ShowfotoItemViewDelegate::drawImageSize ( QPainter *  p,
const QRect &  dimsRect,
const QSize &  dims 
) const
protected

◆ drawMouseOverRect()

void ShowFoto::ShowfotoItemViewDelegate::drawMouseOverRect ( QPainter *  p,
const QStyleOptionViewItem &  option 
) const
protected

◆ drawName()

void ShowFoto::ShowfotoItemViewDelegate::drawName ( QPainter *  p,
const QRect &  nameRect,
const QString &  name 
) const
protected

◆ drawOverlays()

void Digikam::ItemDelegateOverlayContainer::drawOverlays ( QPainter *  p,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
protectedvirtualinherited

◆ drawThumbnail()

QRect ShowFoto::ShowfotoItemViewDelegate::drawThumbnail ( QPainter *  p,
const QRect &  thumbRect,
const QPixmap &  background,
const QPixmap &  thumbnail 
) const
protected

Use the tool methods for painting in subclasses.

References displayRatio(), and Digikam::DItemDelegate::thumbnailBorderPixmap().

Referenced by ShowFoto::ShowfotoDelegate::paint().

◆ gridSize()

QSize ShowFoto::ShowfotoItemViewDelegate::gridSize ( ) const
overridevirtual

Returns the gridsize to be set by the view. It's sizeHint plus spacing.

Implements Digikam::DItemDelegate.

Referenced by ShowFoto::ShowfotoDelegate::calculatethumbSizeToFit().

◆ gridSizeChanged

void Digikam::DItemDelegate::gridSizeChanged ( const QSize &  newSize)
signalinherited

◆ hideNotification

void ShowFoto::ShowfotoItemViewDelegate::hideNotification ( )
signal

◆ imageInformationRect()

QRect ShowFoto::ShowfotoItemViewDelegate::imageInformationRect ( ) const
virtual

Returns the area where the image information is drawn, or null if empty / not supported. 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 ShowFoto::ShowfotoDelegate.

◆ installOverlay()

◆ invalidatePaintingCache()

void ShowFoto::ShowfotoItemViewDelegate::invalidatePaintingCache ( )
protectedvirtual

◆ makeDragPixmap()

QPixmap Digikam::DItemDelegate::makeDragPixmap ( const QStyleOptionViewItem &  option,
const QList< QModelIndex > &  indexes,
double  displayRatio,
const QPixmap &  suggestedPixmap = QPixmap() 
)
staticinherited

◆ mouseMoved()

void ShowFoto::ShowfotoItemViewDelegate::mouseMoved ( QMouseEvent *  e,
const QRect &  visualRect,
const QModelIndex &  index 
)
overridevirtual

NOTE: to be called by ItemViewCategorized only

Implements Digikam::DItemDelegate.

References Digikam::ItemDelegateOverlayContainer::mouseMoved().

◆ overlayDestroyed

void ShowFoto::ShowfotoItemViewDelegate::overlayDestroyed ( QObject *  o)
overrideprotectedslot

◆ overlays()

QList< ItemDelegateOverlay * > Digikam::ItemDelegateOverlayContainer::overlays ( ) const
inherited

◆ pixmapForDrag()

virtual QPixmap Digikam::DItemDelegate::pixmapForDrag ( const QStyleOptionViewItem &  option,
const QList< QModelIndex > &  indexes 
) const
pure virtualinherited

◆ pixmapRect()

QRect ShowFoto::ShowfotoItemViewDelegate::pixmapRect ( ) const
virtual

Returns the area where the pixmap is drawn, or null if not supported

Reimplemented in ShowFoto::ShowfotoDelegate.

◆ prepareBackground()

void ShowFoto::ShowfotoItemViewDelegate::prepareBackground ( )
protected

◆ prepareFonts()

void ShowFoto::ShowfotoItemViewDelegate::prepareFonts ( )
protected

◆ prepareMetrics()

void ShowFoto::ShowfotoItemViewDelegate::prepareMetrics ( int  maxWidth)
protected

◆ rect()

QRect ShowFoto::ShowfotoItemViewDelegate::rect ( ) const

◆ removeAllOverlays()

◆ removeOverlay()

◆ requestNotification

void ShowFoto::ShowfotoItemViewDelegate::requestNotification ( const QModelIndex &  index,
const QString &  message 
)
signal

◆ setAllOverlaysActive()

void Digikam::ItemDelegateOverlayContainer::setAllOverlaysActive ( bool  active)
inherited

◆ setDefaultViewOptions()

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

Style option with standard values to use for cached rendering. option.rect shall be the viewport rectangle. Call on resize, font change.

Implements Digikam::DItemDelegate.

Reimplemented in ShowFoto::ShowfotoThumbnailDelegate.

References invalidatePaintingCache().

Referenced by ShowFoto::ShowfotoDelegate::setDefaultViewOptions().

◆ setSpacing()

void ShowFoto::ShowfotoItemViewDelegate::setSpacing ( int  spacing)
overridevirtual

◆ setThumbnailSize()

void ShowFoto::ShowfotoItemViewDelegate::setThumbnailSize ( const ThumbnailSize thumbSize)
overridevirtual

reimplemented from DItemDelegate

Implements Digikam::DItemDelegate.

References invalidatePaintingCache().

◆ setViewOnAllOverlays()

void Digikam::ItemDelegateOverlayContainer::setViewOnAllOverlays ( QAbstractItemView *  view)
inherited

◆ sizeHint()

QSize ShowFoto::ShowfotoItemViewDelegate::sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

◆ slotSetupChanged

void ShowFoto::ShowfotoItemViewDelegate::slotSetupChanged ( )
protectedslot

◆ slotThemeChanged

void ShowFoto::ShowfotoItemViewDelegate::slotThemeChanged ( )
protectedslot

◆ spacing()

int ShowFoto::ShowfotoItemViewDelegate::spacing ( ) const

◆ squeezedText()

QString Digikam::DItemDelegate::squeezedText ( const QFontMetrics &  fm,
int  width,
const QString &  text 
)
staticinherited

◆ squeezedTextCached()

QString Digikam::DItemDelegate::squeezedTextCached ( QPainter *const  p,
int  width,
const QString &  text 
) const
protectedinherited

◆ thumbnailBorderPixmap()

QPixmap Digikam::DItemDelegate::thumbnailBorderPixmap ( const QSize &  pixSize,
bool  isGrouped = false 
) const
protectedinherited

◆ thumbnailSize()

ThumbnailSize ShowFoto::ShowfotoItemViewDelegate::thumbnailSize ( ) const

◆ updateSizeRectsAndPixmaps()

virtual void ShowFoto::ShowfotoItemViewDelegate::updateSizeRectsAndPixmaps ( )
protectedpure virtual

Implemented in ShowFoto::ShowfotoDelegate.

Referenced by invalidatePaintingCache().

◆ visualChange

Member Data Documentation

◆ d_ptr

ShowfotoItemViewDelegatePrivate* const ShowFoto::ShowfotoItemViewDelegate::d_ptr = nullptr
protected

◆ m_overlays


The documentation for this class was generated from the following files: