digiKam
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

virtual bool acceptsDelegate (QAbstractItemDelegate *) const
 
QAbstractItemDelegate * delegate () const
 
 ItemDelegateOverlay (QObject *const parent=nullptr)
 
virtual void mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index)
 
virtual void paint (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index)
 
virtual void setActive (bool active)
 
void setDelegate (QAbstractItemDelegate *delegate)
 
void setView (QAbstractItemView *view)
 
QAbstractItemView * view () const
 
 ~ItemDelegateOverlay () override
 

Protected Slots

virtual void visualChange ()
 

Protected Member Functions

QList< QModelIndex > affectedIndexes (const QModelIndex &index) const
 
bool affectsMultiple (const QModelIndex &index) const
 
int numberOfAffectedIndexes (const QModelIndex &index) const
 
bool viewHasMultiSelection () const
 

Protected Attributes

QAbstractItemDelegate * m_delegate
 
QAbstractItemView * m_view
 

Constructor & Destructor Documentation

◆ ItemDelegateOverlay()

Digikam::ItemDelegateOverlay::ItemDelegateOverlay ( QObject *const  parent = nullptr)
explicit

◆ ~ItemDelegateOverlay()

Digikam::ItemDelegateOverlay::~ItemDelegateOverlay ( )
override

Member Function Documentation

◆ acceptsDelegate()

virtual bool Digikam::ItemDelegateOverlay::acceptsDelegate ( QAbstractItemDelegate *  ) const
inlinevirtual

◆ affectedIndexes()

◆ affectsMultiple()

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

For the context that an overlay can affect multiple items: Assuming the currently overlayed index is given. Will an operation affect only the single item, or multiple? If multiple, retrieve the affected selection.

References view(), and viewHasMultiSelection().

Referenced by affectedIndexes(), numberOfAffectedIndexes(), and Digikam::AbstractWidgetDelegateOverlay::widgetEnterNotifyMultiple().

◆ delegate()

◆ hideNotification

void Digikam::ItemDelegateOverlay::hideNotification ( )
signal

◆ mouseMoved()

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

Only these two methods are implemented as virtual methods. For all other events, connect to the view's signals. There are a few signals specifically for overlays and all QAbstractItemView standard signals.

Referenced by Digikam::ItemDelegateOverlayContainer::mouseMoved().

◆ numberOfAffectedIndexes()

int Digikam::ItemDelegateOverlay::numberOfAffectedIndexes ( const QModelIndex &  index) const
protected

◆ paint()

void Digikam::ItemDelegateOverlay::paint ( QPainter *  p,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
)
virtual

◆ requestNotification

void Digikam::ItemDelegateOverlay::requestNotification ( const QModelIndex &  index,
const QString &  message 
)
signal

◆ setActive()

◆ setDelegate()

◆ setView()

◆ update

void Digikam::ItemDelegateOverlay::update ( const QModelIndex &  index)
signal

Referenced by setView().

◆ view()

◆ viewHasMultiSelection()

bool Digikam::ItemDelegateOverlay::viewHasMultiSelection ( ) const
protected

Utility method

References view().

Referenced by affectsMultiple().

◆ visualChange

void Digikam::ItemDelegateOverlay::visualChange ( )
protectedvirtualslot

Member Data Documentation

◆ m_delegate

QAbstractItemDelegate* Digikam::ItemDelegateOverlay::m_delegate
protected

Referenced by delegate(), and setDelegate().

◆ m_view


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