digiKam Developer Documentation: Digikam::PersistentWidgetDelegateOverlay Class Reference

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

Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Protected Member Functions | List of all members
Digikam::PersistentWidgetDelegateOverlay Class Reference
Inheritance diagram for Digikam::PersistentWidgetDelegateOverlay:

## Public Slots
void | enterPersistentMode ()
void | leavePersistentMode ()
void | setPersistent (bool persistent)
| Enters persistent mode.
void | storeFocus ()

## Public Member Functions
| PersistentWidgetDelegateOverlay (QObject *const parent)
| This class offers additional / modified behavior: When a "persistent" mode is entered, it will not move by mouse hover, but stay and only move on mouse click.
bool | isPersistent () const
void | setActive (bool active) override
| If active is true, this will call createWidget(), initialize the widget for use, and setup connections for the virtual slots.
Public Member Functions inherited from Digikam::AbstractWidgetDelegateOverlay
| AbstractWidgetDelegateOverlay (QObject *const parent)
| This class provides functionality for using a widget in an overlay.
Public Member Functions inherited from Digikam::ItemDelegateOverlay
| 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)
void | setDelegate (QAbstractItemDelegate *delegate)
void | setView (QAbstractItemView *view)
QAbstractItemView * | view () const

## Protected Member Functions
void | hide () override
| Called when the widget shall be hidden (mouse cursor left index, viewport, uninstalled etc.).
QModelIndex | index () const
void | restoreFocus ()
virtual void | setFocusOnWidget ()
| Reimplement to set the focus on the correct subwidget.
virtual void | showOnIndex (const QModelIndex &index)
void | slotEntered (const QModelIndex &index) override
| Most overlays reimplement this slot to get the starting point for repositioning a widget etc.
void | slotLayoutChanged () override
void | slotReset () override
| Default implementations of these three slots call hide()
void | slotRowsRemoved (const QModelIndex &parent, int start, int end) override
void | slotViewportEntered () override
void | viewportLeaveEvent (QObject *obj, QEvent *event) override
| Called when a QEvent::Leave of the viewport is received.
Protected Member Functions inherited from Digikam::AbstractWidgetDelegateOverlay
virtual bool | checkIndex (const QModelIndex &index) const
bool | checkIndexOnEnter (const QModelIndex &index) const
| Utility method called from slotEntered.
virtual QWidget * | createWidget ()=0
| Create your widget here.
bool | eventFilter (QObject *obj, QEvent *event) override
virtual QString | notifyMultipleMessage (const QModelIndex &, int number)
QWidget * | parentWidget () const
virtual void | widgetEnterEvent ()
| Called when a QEvent::Enter resp.
void | widgetEnterNotifyMultiple (const QModelIndex &index)
| A sample implementation for above methods.
virtual void | widgetLeaveEvent ()
void | widgetLeaveNotifyMultiple ()
Protected Member Functions inherited from Digikam::ItemDelegateOverlay
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 overlaid index is given.
int | numberOfAffectedIndexes (const QModelIndex &index) const
bool | viewHasMultiSelection () const
| Utility method.

## Additional Inherited Members
Signals inherited from Digikam::ItemDelegateOverlay
void | hideNotification ()
void | requestNotification (const QModelIndex &index, const QString &message)
void | update (const QModelIndex &index)
Protected Slots inherited from Digikam::AbstractWidgetDelegateOverlay
Protected Slots inherited from Digikam::ItemDelegateOverlay
virtual void | visualChange ()
| Called when any change from the delegate occurs - when the overlay is installed, when size hints, styles or fonts change.
Protected Attributes inherited from Digikam::AbstractWidgetDelegateOverlay
bool | m_mouseButtonPressedOnWidget = false
QWidget * | m_widget = nullptr
Protected Attributes inherited from Digikam::ItemDelegateOverlay
QAbstractItemDelegate * | m_delegate = nullptr
QAbstractItemView * | m_view = nullptr

## Constructor & Destructor Documentation

## ◆ PersistentWidgetDelegateOverlay()

Digikam::PersistentWidgetDelegateOverlay::PersistentWidgetDelegateOverlay | ( | QObject *const | parent | ) |
| explicit

If the overlay widget had focus, it will be restored on show.

## Member Function Documentation

## ◆ hide()

void Digikam::PersistentWidgetDelegateOverlay::hide | ( |  | ) |
| overrideprotectedvirtual

Default implementation hide()s m_widget.

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

## ◆ setActive()

void Digikam::PersistentWidgetDelegateOverlay::setActive | ( | bool | active | ) |
| overridevirtual

If active is false, this will delete the widget and disconnect all signal from model and view to this object (!)

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

## ◆ setFocusOnWidget()

void Digikam::PersistentWidgetDelegateOverlay::setFocusOnWidget | ( |  | ) |
| protectedvirtual

Default implementation sets focus on widget()

Reimplemented in Digikam::AssignNameOverlay.

## ◆ setPersistent

void Digikam::PersistentWidgetDelegateOverlay::setPersistent | ( | bool | persistent | ) |
| slot

The overlay is moved because of mouse hover.

## ◆ showOnIndex()

void Digikam::PersistentWidgetDelegateOverlay::showOnIndex | ( | const QModelIndex & | index | ) |
| protectedvirtual

See also
  slotEntered()

Reimplemented in Digikam::AssignNameOverlay.

## ◆ slotEntered()

void Digikam::PersistentWidgetDelegateOverlay::slotEntered | ( | const QModelIndex & | index | ) |
| overrideprotectedvirtual

This class instead provides showOnIndex() which you shall use for this purpose.

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

## ◆ slotLayoutChanged()

void Digikam::PersistentWidgetDelegateOverlay::slotLayoutChanged | ( |  | ) |
| overrideprotectedvirtual

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

## ◆ slotReset()

void Digikam::PersistentWidgetDelegateOverlay::slotReset | ( |  | ) |
| overrideprotectedvirtual

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

## ◆ slotRowsRemoved()

void Digikam::PersistentWidgetDelegateOverlay::slotRowsRemoved | ( | const QModelIndex & | parent,
|  | int | start,
|  | int | end
| ) |  |
| overrideprotectedvirtual

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

## ◆ slotViewportEntered()

void Digikam::PersistentWidgetDelegateOverlay::slotViewportEntered | ( |  | ) |
| overrideprotectedvirtual

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

## ◆ viewportLeaveEvent()

void Digikam::PersistentWidgetDelegateOverlay::viewportLeaveEvent | ( | QObject * | obj,
|  | QEvent * | event
| ) |  |
| overrideprotectedvirtual

The default implementation hide()s.

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.