digiKam
|
Public Slots | |
void | enterPersistentMode () |
void | leavePersistentMode () |
void | setPersistent (bool persistent) |
void | storeFocus () |
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 |
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) |
PersistentWidgetDelegateOverlay (QObject *const parent) | |
void | setActive (bool active) override |
void | setDelegate (QAbstractItemDelegate *delegate) |
void | setView (QAbstractItemView *view) |
QAbstractItemView * | view () const |
~PersistentWidgetDelegateOverlay () override | |
Protected Slots | |
virtual void | visualChange () |
Protected Member Functions | |
QList< QModelIndex > | affectedIndexes (const QModelIndex &index) const |
bool | affectsMultiple (const QModelIndex &index) const |
virtual bool | checkIndex (const QModelIndex &index) const |
bool | checkIndexOnEnter (const QModelIndex &index) const |
virtual QWidget * | createWidget ()=0 |
bool | eventFilter (QObject *obj, QEvent *event) 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 () |
virtual void | setFocusOnWidget () |
virtual void | showOnIndex (const QModelIndex &index) |
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 |
bool | viewHasMultiSelection () const |
void | viewportLeaveEvent (QObject *obj, QEvent *event) override |
virtual void | widgetEnterEvent () |
void | widgetEnterNotifyMultiple (const QModelIndex &index) |
virtual void | widgetLeaveEvent () |
void | widgetLeaveNotifyMultiple () |
Protected Attributes | |
QAbstractItemDelegate * | m_delegate |
bool | m_mouseButtonPressedOnWidget |
QAbstractItemView * | m_view |
QWidget * | m_widget |
|
explicit |
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. If the overlay widget had focus, it will be restored on show.
|
override |
|
inlinevirtualinherited |
Referenced by Digikam::ItemDelegateOverlayContainer::installOverlay().
|
protectedinherited |
References Digikam::ItemDelegateOverlay::affectsMultiple(), and Digikam::ItemDelegateOverlay::view().
Referenced by Digikam::AssignNameOverlay::slotAssigned(), Digikam::FaceRejectionOverlay::slotClicked(), Digikam::AssignNameOverlay::slotIgnored(), Digikam::ItemRatingOverlay::slotRatingChanged(), Digikam::ImportRatingOverlay::slotRatingChanged(), Digikam::AssignNameOverlay::slotRejected(), and Digikam::AssignNameOverlay::slotUnknown().
|
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().
|
protectedvirtualinherited |
Return true here if you want to show the overlay for the given index. The default implementation returns true.
Reimplemented in Digikam::ImportRotateOverlay, Digikam::ImportDownloadOverlay, Digikam::ImportLockOverlay, Digikam::ImportCoordinatesOverlay, ShowFoto::ShowfotoCoordinatesOverlay, Digikam::ActionVersionsOverlay, Digikam::ShowHideVersionsOverlay, Digikam::ItemRotateOverlay, Digikam::ItemFullScreenOverlay, Digikam::ItemCoordinatesOverlay, Digikam::GroupIndicatorOverlay, Digikam::FaceRejectionOverlay, and Digikam::AssignNameOverlay.
Referenced by Digikam::AbstractWidgetDelegateOverlay::checkIndexOnEnter(), and Digikam::HoverButtonDelegateOverlay::slotEntered().
|
protectedinherited |
Utility method called from slotEntered
References Digikam::AbstractWidgetDelegateOverlay::checkIndex().
Referenced by Digikam::AbstractWidgetDelegateOverlay::slotEntered(), and slotEntered().
|
protectedpure virtualinherited |
Create your widget here. When creating the object, pass parentWidget() as parent widget. Ownership of the object is passed. It will be deleted in setActive(false).
Implemented in Digikam::ImportRatingOverlay, Digikam::ImportDownloadOverlay, Digikam::ImportLockOverlay, Digikam::ImportCoordinatesOverlay, ShowFoto::ShowfotoCoordinatesOverlay, Digikam::HoverButtonDelegateOverlay, Digikam::TagsLineEditOverlay, Digikam::ItemRatingOverlay, Digikam::ItemCoordinatesOverlay, Digikam::GroupIndicatorOverlay, and Digikam::AssignNameOverlay.
Referenced by Digikam::AbstractWidgetDelegateOverlay::setActive().
|
inherited |
References Digikam::ItemDelegateOverlay::m_delegate.
Referenced by Digikam::GroupIndicatorOverlay::checkIndex(), Digikam::ItemCoordinatesOverlay::checkIndex(), ShowFoto::ShowfotoCoordinatesOverlay::checkIndex(), Digikam::ImportCoordinatesOverlay::checkIndex(), Digikam::ItemRatingOverlay::hide(), Digikam::ImportRatingOverlay::hide(), Digikam::ItemCategorizedView::removeOverlay(), ShowFoto::ShowfotoCategorizedView::removeOverlay(), Digikam::ImportCategorizedView::removeOverlay(), Digikam::ItemDelegateOverlay::setDelegate(), Digikam::ItemRatingOverlay::slotEntered(), Digikam::ImportRatingOverlay::slotEntered(), Digikam::AssignNameOverlay::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(), and Digikam::ImportRatingOverlay::updatePosition().
|
slot |
References setPersistent().
Referenced by Digikam::AssignNameOverlay::eventFilter(), and Digikam::AssignNameOverlay::setActive().
|
overrideprotectedinherited |
References Digikam::AbstractWidgetDelegateOverlay::m_mouseButtonPressedOnWidget, Digikam::AbstractWidgetDelegateOverlay::m_widget, Digikam::AbstractWidgetDelegateOverlay::viewportLeaveEvent(), Digikam::AbstractWidgetDelegateOverlay::widgetEnterEvent(), and Digikam::AbstractWidgetDelegateOverlay::widgetLeaveEvent().
Referenced by Digikam::AssignNameOverlay::eventFilter().
|
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::AbstractWidgetDelegateOverlay::hide(), and Digikam::AbstractWidgetDelegateOverlay::m_widget.
Referenced by Digikam::AssignNameOverlay::hide(), setPersistent(), and slotEntered().
|
signalinherited |
|
protected |
Referenced by Digikam::AssignNameOverlay::checkIndex(), showOnIndex(), Digikam::AssignNameOverlay::showOnIndex(), Digikam::AssignNameOverlay::slotAssigned(), slotEntered(), Digikam::AssignNameOverlay::slotIgnored(), Digikam::AssignNameOverlay::slotRejected(), Digikam::AssignNameOverlay::slotUnknown(), Digikam::AssignNameOverlay::updateFace(), Digikam::AssignNameOverlay::updatePosition(), and Digikam::AssignNameOverlay::widgetEnterEvent().
bool Digikam::PersistentWidgetDelegateOverlay::isPersistent | ( | ) | const |
Referenced by Digikam::AssignNameOverlay::viewportLeaveEvent().
|
slot |
References setPersistent().
Referenced by Digikam::AssignNameOverlay::eventFilter(), setActive(), and Digikam::AssignNameOverlay::setActive().
|
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().
|
protectedvirtualinherited |
|
protectedinherited |
|
virtualinherited |
Referenced by Digikam::ItemDelegateOverlayContainer::drawOverlays().
|
protectedinherited |
Returns the widget to be used as parent for your widget created in createWidget()
References Digikam::ItemDelegateOverlay::m_view.
Referenced by Digikam::AssignNameOverlay::createWidget(), Digikam::GroupIndicatorOverlay::createWidget(), Digikam::ItemCoordinatesOverlay::createWidget(), Digikam::ItemRatingOverlay::createWidget(), Digikam::TagsLineEditOverlay::createWidget(), ShowFoto::ShowfotoCoordinatesOverlay::createWidget(), Digikam::ImportCoordinatesOverlay::createWidget(), Digikam::ImportLockOverlay::createWidget(), Digikam::ImportDownloadOverlay::createWidget(), and Digikam::ImportRatingOverlay::createWidget().
|
signalinherited |
|
protected |
References setFocusOnWidget().
Referenced by showOnIndex().
|
overridevirtual |
If active is true, this will call createWidget(), initialize the widget for use, and setup connections for the virtual slots. If active is false, this will delete the widget and disconnect all signal from model and view to this object (!)
Reimplemented from Digikam::AbstractWidgetDelegateOverlay.
References leavePersistentMode(), Digikam::ItemDelegateOverlay::m_view, and Digikam::AbstractWidgetDelegateOverlay::setActive().
Referenced by Digikam::AssignNameOverlay::setActive().
|
inherited |
References Digikam::ItemDelegateOverlay::delegate(), Digikam::ItemDelegateOverlay::m_delegate, and Digikam::ItemDelegateOverlay::visualChange().
Referenced by Digikam::ItemDelegateOverlayContainer::installOverlay(), Digikam::ItemDelegateOverlayContainer::removeAllOverlays(), and Digikam::ItemDelegateOverlayContainer::removeOverlay().
|
protectedvirtual |
Reimplement to set the focus on the correct subwidget. Default implementation sets focus on widget()
Reimplemented in Digikam::AssignNameOverlay.
References Digikam::AbstractWidgetDelegateOverlay::m_widget.
Referenced by restoreFocus().
|
slot |
Enters persistent mode. The overlay is moved because of mouse hover.
References hide(), showOnIndex(), and slotEntered().
Referenced by enterPersistentMode(), leavePersistentMode(), slotLayoutChanged(), slotReset(), slotRowsRemoved(), and viewportLeaveEvent().
|
inherited |
References Digikam::ItemDelegateOverlay::m_view, Digikam::ItemDelegateOverlay::update(), and Digikam::ItemDelegateOverlay::view().
Referenced by Digikam::VersionsTreeView::addOverlay(), Digikam::ImportCategorizedView::addOverlay(), Digikam::ItemCategorizedView::addOverlay(), ShowFoto::ShowfotoCategorizedView::addOverlay(), Digikam::ItemDelegateOverlayContainer::removeAllOverlays(), Digikam::ItemCategorizedView::removeOverlay(), Digikam::VersionsTreeView::removeOverlay(), ShowFoto::ShowfotoCategorizedView::removeOverlay(), Digikam::ImportCategorizedView::removeOverlay(), and Digikam::ItemDelegateOverlayContainer::setViewOnAllOverlays().
|
protectedvirtual |
see slotEntered()
Reimplemented in Digikam::AssignNameOverlay.
References index(), and restoreFocus().
Referenced by setPersistent(), Digikam::AssignNameOverlay::showOnIndex(), and slotEntered().
|
overrideprotectedvirtual |
Most overlays reimplement this slot to get the starting point for repositioning a widget etc. This class instead provides showOnIndex() which you shall use for this purpose.
Reimplemented from Digikam::AbstractWidgetDelegateOverlay.
References Digikam::AbstractWidgetDelegateOverlay::checkIndexOnEnter(), hide(), index(), Digikam::AbstractWidgetDelegateOverlay::m_widget, and showOnIndex().
Referenced by setPersistent().
|
overrideprotectedvirtual |
Reimplemented from Digikam::AbstractWidgetDelegateOverlay.
References setPersistent(), and Digikam::AbstractWidgetDelegateOverlay::slotLayoutChanged().
|
overrideprotectedvirtual |
Default implementations of these three slots call hide()
Reimplemented from Digikam::AbstractWidgetDelegateOverlay.
References setPersistent(), and Digikam::AbstractWidgetDelegateOverlay::slotReset().
|
overrideprotectedvirtual |
Reimplemented from Digikam::AbstractWidgetDelegateOverlay.
References setPersistent(), and Digikam::AbstractWidgetDelegateOverlay::slotRowsRemoved().
|
overrideprotectedvirtual |
Reimplemented from Digikam::AbstractWidgetDelegateOverlay.
References Digikam::AbstractWidgetDelegateOverlay::slotViewportEntered().
|
slot |
Referenced by Digikam::AssignNameOverlay::setActive().
|
signalinherited |
Referenced by Digikam::ItemDelegateOverlay::setView().
|
inherited |
References Digikam::ItemDelegateOverlay::m_view.
Referenced by Digikam::ItemDelegateOverlay::affectedIndexes(), Digikam::ItemDelegateOverlay::affectsMultiple(), Digikam::FaceRejectionOverlay::createButton(), Digikam::ItemFullScreenOverlay::createButton(), Digikam::ItemRotateOverlay::createButton(), Digikam::ItemSelectionOverlay::createButton(), Digikam::ShowHideVersionsOverlay::createButton(), Digikam::ActionVersionsOverlay::createButton(), Digikam::ImportRotateOverlay::createButton(), Digikam::ItemDelegateOverlay::numberOfAffectedIndexes(), Digikam::AbstractWidgetDelegateOverlay::setActive(), Digikam::ItemRatingOverlay::setActive(), Digikam::TagsLineEditOverlay::setActive(), Digikam::ImportRatingOverlay::setActive(), Digikam::ItemDelegateOverlay::setView(), Digikam::ItemRatingOverlay::slotEntered(), Digikam::TagsLineEditOverlay::slotEntered(), Digikam::ImportRatingOverlay::slotEntered(), and Digikam::ItemDelegateOverlay::viewHasMultiSelection().
|
protectedinherited |
Utility method
References Digikam::ItemDelegateOverlay::view().
Referenced by Digikam::ItemDelegateOverlay::affectsMultiple().
|
overrideprotectedvirtual |
Called when a QEvent::Leave of the viewport is received. The default implementation hide()s.
Reimplemented from Digikam::AbstractWidgetDelegateOverlay.
References setPersistent(), and Digikam::AbstractWidgetDelegateOverlay::viewportLeaveEvent().
Referenced by Digikam::AssignNameOverlay::viewportLeaveEvent().
|
protectedvirtualslotinherited |
Called when any change from the delegate occurs - when the overlay is installed, when size hints, styles or fonts change
Reimplemented in Digikam::ImportRatingOverlay, Digikam::ImportDownloadOverlay, Digikam::ImportLockOverlay, Digikam::ImportCoordinatesOverlay, ShowFoto::ShowfotoCoordinatesOverlay, Digikam::HoverButtonDelegateOverlay, Digikam::TagsLineEditOverlay, Digikam::ItemRatingOverlay, Digikam::ItemCoordinatesOverlay, Digikam::GroupIndicatorOverlay, and Digikam::AssignNameOverlay.
Referenced by Digikam::ItemDelegateOverlay::setDelegate().
|
protectedvirtualinherited |
Called when a QEvent::Enter resp. QEvent::Leave event for the widget is received. The default implementation does nothing.
Reimplemented in Digikam::ImportRotateOverlay, Digikam::ImportRatingOverlay, Digikam::ItemRotateOverlay, Digikam::ItemRatingOverlay, Digikam::ItemFullScreenOverlay, Digikam::FaceRejectionOverlay, and Digikam::AssignNameOverlay.
Referenced by Digikam::AbstractWidgetDelegateOverlay::eventFilter().
|
protectedinherited |
A sample implementation for above methods
References Digikam::ItemDelegateOverlay::affectsMultiple(), Digikam::AbstractWidgetDelegateOverlay::notifyMultipleMessage(), Digikam::ItemDelegateOverlay::numberOfAffectedIndexes(), and Digikam::ItemDelegateOverlay::requestNotification().
Referenced by Digikam::AssignNameOverlay::widgetEnterEvent(), Digikam::FaceRejectionOverlay::widgetEnterEvent(), Digikam::ItemFullScreenOverlay::widgetEnterEvent(), Digikam::ItemRatingOverlay::widgetEnterEvent(), Digikam::ItemRotateOverlay::widgetEnterEvent(), Digikam::ImportRatingOverlay::widgetEnterEvent(), and Digikam::ImportRotateOverlay::widgetEnterEvent().
|
protectedvirtualinherited |
|
protectedinherited |
References Digikam::ItemDelegateOverlay::hideNotification().
Referenced by Digikam::AssignNameOverlay::widgetLeaveEvent(), Digikam::FaceRejectionOverlay::widgetLeaveEvent(), Digikam::ItemFullScreenOverlay::widgetLeaveEvent(), Digikam::ItemRatingOverlay::widgetLeaveEvent(), Digikam::ItemRotateOverlay::widgetLeaveEvent(), Digikam::ImportRatingOverlay::widgetLeaveEvent(), and Digikam::ImportRotateOverlay::widgetLeaveEvent().
|
protectedinherited |
Referenced by Digikam::ItemDelegateOverlay::delegate(), and Digikam::ItemDelegateOverlay::setDelegate().
|
protectedinherited |
Referenced by Digikam::AbstractWidgetDelegateOverlay::eventFilter().
|
protectedinherited |
Referenced by Digikam::AbstractWidgetDelegateOverlay::parentWidget(), Digikam::ItemSelectionOverlay::setActive(), Digikam::AbstractWidgetDelegateOverlay::setActive(), setActive(), Digikam::ItemDelegateOverlay::setView(), Digikam::ItemSelectionOverlay::slotClicked(), Digikam::FaceRejectionOverlay::updateButton(), Digikam::ItemFullScreenOverlay::updateButton(), Digikam::ItemRotateOverlay::updateButton(), Digikam::ItemSelectionOverlay::updateButton(), Digikam::ShowHideVersionsOverlay::updateButton(), Digikam::ActionVersionsOverlay::updateButton(), Digikam::ImportRotateOverlay::updateButton(), Digikam::AssignNameOverlay::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(), and Digikam::ItemDelegateOverlay::view().
|
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(), hide(), Digikam::ItemRatingOverlay::ratingWidget(), Digikam::ImportRatingOverlay::ratingWidget(), Digikam::AbstractWidgetDelegateOverlay::setActive(), setFocusOnWidget(), Digikam::ItemRatingOverlay::slotDataChanged(), Digikam::ImportRatingOverlay::slotDataChanged(), Digikam::AbstractWidgetDelegateOverlay::slotEntered(), Digikam::ItemRatingOverlay::slotEntered(), Digikam::TagsLineEditOverlay::slotEntered(), slotEntered(), Digikam::ImportRatingOverlay::slotEntered(), Digikam::ItemRatingOverlay::slotRatingChanged(), Digikam::ImportRatingOverlay::slotRatingChanged(), Digikam::TagsLineEditOverlay::slotTagChanged(), Digikam::AssignNameOverlay::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(), Digikam::AssignNameOverlay::viewportLeaveEvent(), Digikam::AssignNameOverlay::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().