digiKam
|
Signals | |
void | hideNotification () |
void | requestNotification (const QModelIndex &index, const QString &message) |
void | update (const QModelIndex &index) |
Public Member Functions | |
AbstractWidgetDelegateOverlay (QObject *const parent) | |
virtual bool | acceptsDelegate (QAbstractItemDelegate *) const |
QAbstractItemDelegate * | delegate () const |
virtual void | mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index) |
virtual void | paint (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) |
void | setActive (bool active) override |
void | setDelegate (QAbstractItemDelegate *delegate) |
void | setView (QAbstractItemView *view) |
QAbstractItemView * | view () const |
Protected Slots | |
virtual void | slotEntered (const QModelIndex &index) |
virtual void | slotLayoutChanged () |
virtual void | slotReset () |
virtual void | slotRowsRemoved (const QModelIndex &parent, int start, int end) |
virtual void | slotViewportEntered () |
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 |
virtual void | hide () |
virtual QString | notifyMultipleMessage (const QModelIndex &, int number) |
int | numberOfAffectedIndexes (const QModelIndex &index) const |
QWidget * | parentWidget () const |
bool | viewHasMultiSelection () const |
virtual void | viewportLeaveEvent (QObject *obj, QEvent *event) |
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 provides functionality for using a widget in an overlay. You must reimplement at least createWidget to return your widget. Per default it will be shown when the cursor enters an index and hidden when left. Reimplement slotEntered() and mouseMove() for more fine grained control.
|
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 widgetEnterNotifyMultiple().
|
protectedvirtual |
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 checkIndexOnEnter(), and Digikam::HoverButtonDelegateOverlay::slotEntered().
|
protected |
Utility method called from slotEntered
References checkIndex().
Referenced by slotEntered(), and Digikam::PersistentWidgetDelegateOverlay::slotEntered().
|
protectedpure virtual |
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 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().
|
overrideprotected |
References m_mouseButtonPressedOnWidget, m_widget, viewportLeaveEvent(), widgetEnterEvent(), and widgetLeaveEvent().
Referenced by Digikam::AssignNameOverlay::eventFilter().
|
protectedvirtual |
Called when the widget shall be hidden (mouse cursor left index, viewport, uninstalled etc.). Default implementation hide()s m_widget.
Reimplemented in Digikam::ImportRatingOverlay, Digikam::PersistentWidgetDelegateOverlay, Digikam::TagsLineEditOverlay, Digikam::ItemRatingOverlay, and Digikam::AssignNameOverlay.
References m_widget.
Referenced by Digikam::ItemRatingOverlay::hide(), Digikam::TagsLineEditOverlay::hide(), Digikam::PersistentWidgetDelegateOverlay::hide(), Digikam::ImportRatingOverlay::hide(), slotEntered(), slotLayoutChanged(), slotReset(), slotRowsRemoved(), slotViewportEntered(), and viewportLeaveEvent().
|
signalinherited |
Referenced by widgetLeaveNotifyMultiple().
|
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().
|
protectedvirtual |
Referenced by widgetEnterNotifyMultiple().
|
protectedinherited |
References Digikam::ItemDelegateOverlay::affectsMultiple(), and Digikam::ItemDelegateOverlay::view().
Referenced by widgetEnterNotifyMultiple().
|
virtualinherited |
Referenced by Digikam::ItemDelegateOverlayContainer::drawOverlays().
|
protected |
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 |
Referenced by widgetEnterNotifyMultiple().
|
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::ItemDelegateOverlay.
Reimplemented in Digikam::ImportRatingOverlay, Digikam::ImportRotateOverlay, Digikam::ImportDownloadOverlay, Digikam::ImportLockOverlay, Digikam::ImportCoordinatesOverlay, ShowFoto::ShowfotoCoordinatesOverlay, Digikam::PersistentWidgetDelegateOverlay, and Digikam::HoverButtonDelegateOverlay.
References createWidget(), Digikam::ItemDelegateOverlay::m_view, m_widget, slotEntered(), slotLayoutChanged(), slotReset(), slotRowsRemoved(), slotViewportEntered(), and Digikam::ItemDelegateOverlay::view().
Referenced by Digikam::ItemCoordinatesOverlay::setActive(), Digikam::HoverButtonDelegateOverlay::setActive(), Digikam::PersistentWidgetDelegateOverlay::setActive(), Digikam::ImportCoordinatesOverlay::setActive(), Digikam::ImportLockOverlay::setActive(), Digikam::ImportDownloadOverlay::setActive(), Digikam::GroupIndicatorOverlay::setActive(), Digikam::ItemRatingOverlay::setActive(), Digikam::TagsLineEditOverlay::setActive(), and Digikam::ImportRatingOverlay::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().
|
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().
|
protectedvirtualslot |
Default implementation shows the widget iff the index is valid and checkIndex returns true.
Reimplemented in Digikam::ImportRatingOverlay, Digikam::ImportDownloadOverlay, Digikam::ImportLockOverlay, Digikam::ImportCoordinatesOverlay, ShowFoto::ShowfotoCoordinatesOverlay, Digikam::PersistentWidgetDelegateOverlay, Digikam::TagsLineEditOverlay, Digikam::ItemRatingOverlay, Digikam::ItemCoordinatesOverlay, and Digikam::GroupIndicatorOverlay.
References checkIndexOnEnter(), hide(), and m_widget.
Referenced by setActive(), Digikam::GroupIndicatorOverlay::slotEntered(), Digikam::ItemCoordinatesOverlay::slotEntered(), Digikam::ItemRatingOverlay::slotEntered(), Digikam::TagsLineEditOverlay::slotEntered(), Digikam::HoverButtonDelegateOverlay::slotEntered(), Digikam::ImportCoordinatesOverlay::slotEntered(), Digikam::ImportLockOverlay::slotEntered(), Digikam::ImportDownloadOverlay::slotEntered(), and Digikam::ImportRatingOverlay::slotEntered().
|
protectedvirtualslot |
Reimplemented in Digikam::PersistentWidgetDelegateOverlay.
References hide().
Referenced by setActive(), and Digikam::PersistentWidgetDelegateOverlay::slotLayoutChanged().
|
protectedvirtualslot |
Default implementations of these three slots call hide()
Reimplemented in Digikam::PersistentWidgetDelegateOverlay.
References hide().
Referenced by setActive(), Digikam::HoverButtonDelegateOverlay::slotReset(), and Digikam::PersistentWidgetDelegateOverlay::slotReset().
|
protectedvirtualslot |
Reimplemented in Digikam::PersistentWidgetDelegateOverlay.
References hide().
Referenced by setActive(), and Digikam::PersistentWidgetDelegateOverlay::slotRowsRemoved().
|
protectedvirtualslot |
Reimplemented in Digikam::PersistentWidgetDelegateOverlay.
References hide().
Referenced by setActive(), and Digikam::PersistentWidgetDelegateOverlay::slotViewportEntered().
|
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(), 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().
|
protectedvirtual |
Called when a QEvent::Leave of the viewport is received. The default implementation hide()s.
Reimplemented in Digikam::PersistentWidgetDelegateOverlay, and Digikam::AssignNameOverlay.
References hide().
Referenced by eventFilter(), and Digikam::PersistentWidgetDelegateOverlay::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().
|
protectedvirtual |
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 eventFilter().
|
protected |
A sample implementation for above methods
References Digikam::ItemDelegateOverlay::affectsMultiple(), 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().
|
protectedvirtual |
|
protected |
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().
|
protected |
Referenced by eventFilter().
|
protectedinherited |
Referenced by parentWidget(), Digikam::ItemSelectionOverlay::setActive(), setActive(), Digikam::PersistentWidgetDelegateOverlay::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().
|
protected |
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(), eventFilter(), hide(), Digikam::TagsLineEditOverlay::hide(), Digikam::PersistentWidgetDelegateOverlay::hide(), Digikam::ItemRatingOverlay::ratingWidget(), Digikam::ImportRatingOverlay::ratingWidget(), setActive(), Digikam::PersistentWidgetDelegateOverlay::setFocusOnWidget(), Digikam::ItemRatingOverlay::slotDataChanged(), Digikam::ImportRatingOverlay::slotDataChanged(), slotEntered(), Digikam::ItemRatingOverlay::slotEntered(), Digikam::TagsLineEditOverlay::slotEntered(), Digikam::PersistentWidgetDelegateOverlay::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().