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

Signals

void hideNotification ()
 
void requestNotification (const QModelIndex &index, const QString &message)
 
void update (const QModelIndex &index)
 

Public Member Functions

 ItemDelegateOverlay (QObject *const parent=nullptr)
 
virtual bool acceptsDelegate (QAbstractItemDelegate *) const
 
QAbstractItemDelegate * delegate () const
 
virtual void mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index)
 Only these two methods are implemented as virtual methods.
 
virtual void paint (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index)
 
virtual void setActive (bool active)
 Called when the overlay was installed and shall begin working, and before it is removed and shall stop.
 
void setDelegate (QAbstractItemDelegate *delegate)
 
void setView (QAbstractItemView *view)
 
QAbstractItemView * view () const
 

Protected Slots

virtual void visualChange ()
 Called when any change from the delegate occurs - when the overlay is installed, when size hints, styles or fonts change.
 

Protected Member Functions

QList< QModelIndex > affectedIndexes (const QModelIndex &index) const
 
bool affectsMultiple (const QModelIndex &index) const
 For the context that an overlay can affect multiple items: Assuming the currently overlayed index is given.
 
int numberOfAffectedIndexes (const QModelIndex &index) const
 
bool viewHasMultiSelection () const
 Utility method.
 

Protected Attributes

QAbstractItemDelegate * m_delegate = nullptr
 
QAbstractItemView * m_view = nullptr
 

Member Function Documentation

◆ affectsMultiple()

bool Digikam::ItemDelegateOverlay::affectsMultiple ( const QModelIndex &  index) const
protected

Will an operation affect only the single item, or multiple? If multiple, retrieve the affected selection.

◆ mouseMoved()

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

For all other events, connect to the view's signals. There are a few signals specifically for overlays and all QAbstractItemView standard signals.

◆ setActive()

◆ visualChange