digiKam Developer Documentation: Digikam::AssignNameOverlay Class Reference

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

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

## Signals
void | confirmFaces (const QList< QModelIndex > &indexes, int tagId)
void | ignoreFaces (const QList< QModelIndex > &indexes)
void | removeFaces (const QList< QModelIndex > &indexes)
void | unknownFaces (const QList< QModelIndex > &indexes)
Signals inherited from Digikam::ItemDelegateOverlay
void | hideNotification ()
void | requestNotification (const QModelIndex &index, const QString &message)
void | update (const QModelIndex &index)

## Public Member Functions
| AssignNameOverlay (QObject *const parent)
AssignNameWidget * | assignNameWidget () const
Public Member Functions inherited from Digikam::PersistentWidgetDelegateOverlay
| 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 Slots
void | slotAssigned (const TaggingAction &action, const ItemInfo &, const QVariant &faceIdentifier)
void | slotIgnored (const ItemInfo &, const QVariant &faceIdentifier)
void | slotRejected (const ItemInfo &, const QVariant &faceIdentifier)
void | slotUnknown (const ItemInfo &, const QVariant &faceIdentifier)
Protected Slots inherited from Digikam::AbstractWidgetDelegateOverlay
Protected Slots inherited from Digikam::ItemDelegateOverlay

## Protected Member Functions
bool | checkIndex (const QModelIndex &index) const override
QWidget * | createWidget () override
| Create your widget here.
bool | eventFilter (QObject *o, QEvent *e) override
void | setActive (bool) override
| If active is true, this will call createWidget(), initialize the widget for use, and setup connections for the virtual slots.
void | setFocusOnWidget () override
| Reimplement to set the focus on the correct subwidget.
void | showOnIndex (const QModelIndex &index) override
void | updateFace ()
void | updatePosition ()
void | viewportLeaveEvent (QObject *obj, QEvent *event) override
| Called when a QEvent::Leave of the viewport is received.
void | visualChange () override
| Called when any change from the delegate occurs - when the overlay is installed, when size hints, styles or fonts change.
void | widgetEnterEvent () override
| Called when a QEvent::Enter resp.
void | widgetLeaveEvent () override
Protected Member Functions inherited from Digikam::PersistentWidgetDelegateOverlay
void | hide () override
| Called when the widget shall be hidden (mouse cursor left index, viewport, uninstalled etc.).
QModelIndex | index () const
void | restoreFocus ()
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
bool | checkIndexOnEnter (const QModelIndex &index) const
| Utility method called from slotEntered.
bool | eventFilter (QObject *obj, QEvent *event) override
virtual QString | notifyMultipleMessage (const QModelIndex &, int number)
QWidget * | parentWidget () const
void | widgetEnterNotifyMultiple (const QModelIndex &index)
| A sample implementation for above methods.
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
Public Slots inherited from Digikam::PersistentWidgetDelegateOverlay
void | enterPersistentMode ()
void | leavePersistentMode ()
void | setPersistent (bool persistent)
| Enters persistent mode.
void | storeFocus ()
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

## Member Function Documentation

## ◆ checkIndex()

bool Digikam::AssignNameOverlay::checkIndex | ( | const QModelIndex & | index | ) | const
| overrideprotectedvirtual

Returns
  true here if you want to show the overlay for the given index. The default implementation returns true.

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

## ◆ createWidget()

QWidget * Digikam::AssignNameOverlay::createWidget | ( |  | ) |
| overrideprotectedvirtual

When creating the object, pass parentWidget() as parent widget. Ownership of the object is passed. It will be deleted in setActive(false).

Implements Digikam::AbstractWidgetDelegateOverlay.

## ◆ setActive()

void Digikam::AssignNameOverlay::setActive | ( | bool | active | ) |
| overrideprotectedvirtual

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::AssignNameOverlay::setFocusOnWidget | ( |  | ) |
| overrideprotectedvirtual

Default implementation sets focus on widget()

Reimplemented from Digikam::PersistentWidgetDelegateOverlay.

## ◆ showOnIndex()

void Digikam::AssignNameOverlay::showOnIndex | ( | const QModelIndex & | index | ) |
| overrideprotectedvirtual

See also
  slotEntered()

Reimplemented from Digikam::PersistentWidgetDelegateOverlay.

## ◆ updateFace()

void Digikam::AssignNameOverlay::updateFace | ( |  | ) |
| protected

The order to plug these functions is important, since setUserData() controls how the Overlay appears on a particular face.

## ◆ viewportLeaveEvent()

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

The default implementation hide()s.

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

## ◆ visualChange()

void Digikam::AssignNameOverlay::visualChange | ( |  | ) |
| overrideprotectedvirtual

Reimplemented from Digikam::ItemDelegateOverlay.

## ◆ widgetEnterEvent()

void Digikam::AssignNameOverlay::widgetEnterEvent | ( |  | ) |
| overrideprotectedvirtual

QEvent::Leave event for the widget is received. The default implementation does nothing.

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

## ◆ widgetLeaveEvent()

void Digikam::AssignNameOverlay::widgetLeaveEvent | ( |  | ) |
| overrideprotectedvirtual

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.