digiKam
Digikam::AssignNameOverlay Class Reference
+ Inheritance diagram for Digikam::AssignNameOverlay:

Public Slots

void enterPersistentMode ()
 
void leavePersistentMode ()
 
void setPersistent (bool persistent)
 
void storeFocus ()
 

Signals

void confirmFaces (const QList< QModelIndex > &indexes, int tagId)
 
void hideNotification ()
 
void ignoreFaces (const QList< QModelIndex > &indexes)
 
void removeFaces (const QList< QModelIndex > &indexes)
 
void requestNotification (const QModelIndex &index, const QString &message)
 
void unknownFaces (const QList< QModelIndex > &indexes)
 
void update (const QModelIndex &index)
 

Public Member Functions

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

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 Member Functions

QList< QModelIndex > affectedIndexes (const QModelIndex &index) const
 
bool affectsMultiple (const QModelIndex &index) const
 
bool checkIndex (const QModelIndex &index) const override
 
bool checkIndexOnEnter (const QModelIndex &index) const
 
QWidget * createWidget () override
 
bool eventFilter (QObject *o, QEvent *e) override
 
void hide () override
 
QModelIndex index () const
 
virtual QString notifyMultipleMessage (const QModelIndex &, int number)
 
int numberOfAffectedIndexes (const QModelIndex &index) const
 
QWidget * parentWidget () const
 
void restoreFocus ()
 
void setActive (bool) override
 
void setFocusOnWidget () override
 
void showOnIndex (const QModelIndex &index) override
 see slotEntered() More...
 
void slotEntered (const QModelIndex &index) override
 
void slotLayoutChanged () override
 
void slotReset () override
 
void slotRowsRemoved (const QModelIndex &parent, int start, int end) override
 
void slotViewportEntered () override
 
void updateFace ()
 
void updatePosition ()
 
bool viewHasMultiSelection () const
 
void viewportLeaveEvent (QObject *obj, QEvent *event) override
 
void visualChange () override
 
void widgetEnterEvent () override
 
void widgetEnterNotifyMultiple (const QModelIndex &index)
 
void widgetLeaveEvent () override
 
void widgetLeaveNotifyMultiple ()
 

Protected Attributes

QAbstractItemDelegate * m_delegate
 
bool m_mouseButtonPressedOnWidget
 
QAbstractItemView * m_view
 
QWidget * m_widget
 

Constructor & Destructor Documentation

◆ AssignNameOverlay()

Digikam::AssignNameOverlay::AssignNameOverlay ( QObject *const  parent)
explicit

◆ ~AssignNameOverlay()

Digikam::AssignNameOverlay::~AssignNameOverlay ( )
override

Member Function Documentation

◆ acceptsDelegate()

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

◆ affectedIndexes()

◆ affectsMultiple()

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

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 Digikam::ItemDelegateOverlay::view(), and Digikam::ItemDelegateOverlay::viewHasMultiSelection().

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

◆ assignNameWidget()

AssignNameWidget * Digikam::AssignNameOverlay::assignNameWidget ( ) const

◆ checkIndex()

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

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

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

References Digikam::ItemModel::ExtraDataRole, Digikam::FaceTagsIface::fromVariant(), and Digikam::PersistentWidgetDelegateOverlay::index().

◆ checkIndexOnEnter()

bool Digikam::AbstractWidgetDelegateOverlay::checkIndexOnEnter ( const QModelIndex &  index) const
protectedinherited

◆ confirmFaces

void Digikam::AssignNameOverlay::confirmFaces ( const QList< QModelIndex > &  indexes,
int  tagId 
)
signal

Referenced by slotAssigned().

◆ createWidget()

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

◆ delegate()

◆ enterPersistentMode

void Digikam::PersistentWidgetDelegateOverlay::enterPersistentMode ( )
slotinherited

◆ eventFilter()

◆ hide()

void Digikam::AssignNameOverlay::hide ( )
overrideprotectedvirtual

Called when the widget shall be hidden (mouse cursor left index, viewport, uninstalled etc.). Default implementation hide()s m_widget.

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

References Digikam::PersistentWidgetDelegateOverlay::hide().

Referenced by slotAssigned(), slotIgnored(), slotRejected(), and slotUnknown().

◆ hideNotification

void Digikam::ItemDelegateOverlay::hideNotification ( )
signalinherited

◆ ignoreFaces

void Digikam::AssignNameOverlay::ignoreFaces ( const QList< QModelIndex > &  indexes)
signal

Referenced by slotIgnored().

◆ index()

◆ isPersistent()

bool Digikam::PersistentWidgetDelegateOverlay::isPersistent ( ) const
inherited

Referenced by viewportLeaveEvent().

◆ leavePersistentMode

void Digikam::PersistentWidgetDelegateOverlay::leavePersistentMode ( )
slotinherited

◆ mouseMoved()

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

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().

◆ notifyMultipleMessage()

QString Digikam::AbstractWidgetDelegateOverlay::notifyMultipleMessage ( const QModelIndex &  ,
int  number 
)
protectedvirtualinherited

◆ numberOfAffectedIndexes()

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

◆ paint()

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

◆ parentWidget()

◆ removeFaces

void Digikam::AssignNameOverlay::removeFaces ( const QList< QModelIndex > &  indexes)
signal

Referenced by slotRejected().

◆ requestNotification

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

◆ restoreFocus()

void Digikam::PersistentWidgetDelegateOverlay::restoreFocus ( )
protectedinherited

◆ setActive()

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

Called when the overlay was installed and shall begin working, and before it is removed and shall stop. Setup your connections to view and delegate here. You will be disconnected automatically on removal.

Reimplemented from Digikam::ItemDelegateOverlay.

References assignNameWidget(), Digikam::PersistentWidgetDelegateOverlay::enterPersistentMode(), Digikam::PersistentWidgetDelegateOverlay::leavePersistentMode(), Digikam::PersistentWidgetDelegateOverlay::setActive(), slotAssigned(), slotIgnored(), slotRejected(), slotUnknown(), and Digikam::PersistentWidgetDelegateOverlay::storeFocus().

◆ setDelegate()

◆ setFocusOnWidget()

void Digikam::AssignNameOverlay::setFocusOnWidget ( )
overrideprotectedvirtual

Reimplement to set the focus on the correct subwidget. Default implementation sets focus on widget()

Reimplemented from Digikam::PersistentWidgetDelegateOverlay.

References assignNameWidget(), and Digikam::AssignNameWidget::lineEdit().

◆ setPersistent

◆ setView()

◆ showOnIndex()

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

◆ slotAssigned

◆ slotEntered()

void Digikam::PersistentWidgetDelegateOverlay::slotEntered ( const QModelIndex &  index)
overrideprotectedvirtualinherited

◆ slotIgnored

void Digikam::AssignNameOverlay::slotIgnored ( const ItemInfo info,
const QVariant &  faceIdentifier 
)
protectedslot

◆ slotLayoutChanged()

void Digikam::PersistentWidgetDelegateOverlay::slotLayoutChanged ( )
overrideprotectedvirtualinherited

◆ slotRejected

void Digikam::AssignNameOverlay::slotRejected ( const ItemInfo info,
const QVariant &  faceIdentifier 
)
protectedslot

◆ slotReset()

void Digikam::PersistentWidgetDelegateOverlay::slotReset ( )
overrideprotectedvirtualinherited

◆ slotRowsRemoved()

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

◆ slotUnknown

void Digikam::AssignNameOverlay::slotUnknown ( const ItemInfo info,
const QVariant &  faceIdentifier 
)
protectedslot

◆ slotViewportEntered()

void Digikam::PersistentWidgetDelegateOverlay::slotViewportEntered ( )
overrideprotectedvirtualinherited

◆ storeFocus

void Digikam::PersistentWidgetDelegateOverlay::storeFocus ( )
slotinherited

Referenced by setActive().

◆ unknownFaces

void Digikam::AssignNameOverlay::unknownFaces ( const QList< QModelIndex > &  indexes)
signal

Referenced by slotUnknown().

◆ update

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

◆ updateFace()

void Digikam::AssignNameOverlay::updateFace ( )
protected

◆ updatePosition()

◆ view()

◆ viewHasMultiSelection()

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

◆ viewportLeaveEvent()

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

◆ visualChange()

void Digikam::AssignNameOverlay::visualChange ( )
overrideprotectedvirtual

Called when any change from the delegate occurs - when the overlay is installed, when size hints, styles or fonts change

Reimplemented from Digikam::ItemDelegateOverlay.

References Digikam::AbstractWidgetDelegateOverlay::m_widget, and updatePosition().

◆ widgetEnterEvent()

void Digikam::AssignNameOverlay::widgetEnterEvent ( )
overrideprotectedvirtual

Called when a QEvent::Enter resp. QEvent::Leave event for the widget is received. The default implementation does nothing.

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

References Digikam::PersistentWidgetDelegateOverlay::index(), and Digikam::AbstractWidgetDelegateOverlay::widgetEnterNotifyMultiple().

◆ widgetEnterNotifyMultiple()

◆ widgetLeaveEvent()

void Digikam::AssignNameOverlay::widgetLeaveEvent ( )
overrideprotectedvirtual

◆ widgetLeaveNotifyMultiple()

Member Data Documentation

◆ m_delegate

QAbstractItemDelegate* Digikam::ItemDelegateOverlay::m_delegate
protectedinherited

◆ m_mouseButtonPressedOnWidget

bool Digikam::AbstractWidgetDelegateOverlay::m_mouseButtonPressedOnWidget
protectedinherited

◆ m_view

◆ m_widget

QWidget* Digikam::AbstractWidgetDelegateOverlay::m_widget
protectedinherited

Referenced by Digikam::TagsLineEditOverlay::addTagsLineEdit(), Digikam::HoverButtonDelegateOverlay::button(), Digikam::GroupIndicatorOverlay::buttonWidget(), Digikam::ItemCoordinatesOverlay::buttonWidget(), ShowFoto::ShowfotoCoordinatesOverlay::buttonWidget(), Digikam::ImportCoordinatesOverlay::buttonWidget(), Digikam::ImportLockOverlay::buttonWidget(), Digikam::ImportDownloadOverlay::buttonWidget(), Digikam::GroupIndicatorOverlay::checkIndex(), Digikam::ItemCoordinatesOverlay::checkIndex(), ShowFoto::ShowfotoCoordinatesOverlay::checkIndex(), Digikam::ImportCoordinatesOverlay::checkIndex(), Digikam::ImportLockOverlay::checkIndex(), Digikam::ImportDownloadOverlay::checkIndex(), Digikam::AbstractWidgetDelegateOverlay::eventFilter(), Digikam::AbstractWidgetDelegateOverlay::hide(), Digikam::TagsLineEditOverlay::hide(), Digikam::PersistentWidgetDelegateOverlay::hide(), Digikam::ItemRatingOverlay::ratingWidget(), Digikam::ImportRatingOverlay::ratingWidget(), Digikam::AbstractWidgetDelegateOverlay::setActive(), Digikam::PersistentWidgetDelegateOverlay::setFocusOnWidget(), Digikam::ItemRatingOverlay::slotDataChanged(), Digikam::ImportRatingOverlay::slotDataChanged(), Digikam::AbstractWidgetDelegateOverlay::slotEntered(), Digikam::ItemRatingOverlay::slotEntered(), Digikam::TagsLineEditOverlay::slotEntered(), Digikam::PersistentWidgetDelegateOverlay::slotEntered(), Digikam::ImportRatingOverlay::slotEntered(), Digikam::ItemRatingOverlay::slotRatingChanged(), Digikam::ImportRatingOverlay::slotRatingChanged(), Digikam::TagsLineEditOverlay::slotTagChanged(), updatePosition(), Digikam::GroupIndicatorOverlay::updatePosition(), Digikam::ItemCoordinatesOverlay::updatePosition(), Digikam::ItemRatingOverlay::updatePosition(), Digikam::TagsLineEditOverlay::updatePosition(), ShowFoto::ShowfotoCoordinatesOverlay::updatePosition(), Digikam::ImportCoordinatesOverlay::updatePosition(), Digikam::ImportLockOverlay::updatePosition(), Digikam::ImportDownloadOverlay::updatePosition(), Digikam::ImportRatingOverlay::updatePosition(), Digikam::ItemRatingOverlay::updateRating(), Digikam::ImportRatingOverlay::updateRating(), viewportLeaveEvent(), visualChange(), Digikam::GroupIndicatorOverlay::visualChange(), Digikam::ItemCoordinatesOverlay::visualChange(), Digikam::ItemRatingOverlay::visualChange(), Digikam::TagsLineEditOverlay::visualChange(), Digikam::HoverButtonDelegateOverlay::visualChange(), ShowFoto::ShowfotoCoordinatesOverlay::visualChange(), Digikam::ImportCoordinatesOverlay::visualChange(), Digikam::ImportLockOverlay::visualChange(), Digikam::ImportDownloadOverlay::visualChange(), and Digikam::ImportRatingOverlay::visualChange().


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