![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
Signals | |
void | hideNotification () |
void | requestNotification (const QModelIndex &index, const QString &message) |
void | update (const QModelIndex &index) |
Public Member Functions | |
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) |
virtual void | setActive (bool active) |
Called when the overlay was installed and shall begin working, and before it is removed and shall stop. | |
void | setDelegate (QAbstractItemDelegate *delegate) |
void | setView (QAbstractItemView *view) |
QAbstractItemView * | view () const |
Protected Slots | |
virtual void | visualChange () |
Called when any change from the delegate occurs - when the overlay is installed, when size hints, styles or fonts change. | |
Protected Member Functions | |
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 overlayed index is given. | |
int | numberOfAffectedIndexes (const QModelIndex &index) const |
bool | viewHasMultiSelection () const |
Utility method. | |
Protected Attributes | |
QAbstractItemDelegate * | m_delegate = nullptr |
QAbstractItemView * | m_view = nullptr |
|
protected |
Will an operation affect only the single item, or multiple? If multiple, retrieve the affected selection.
|
virtual |
For all other events, connect to the view's signals. There are a few signals specifically for overlays and all QAbstractItemView standard signals.
|
virtual |
Setup your connections to view and delegate here. You will be disconnected automatically on removal.
Reimplemented in Digikam::FaceRejectionOverlay, Digikam::ItemCoordinatesOverlay, Digikam::ItemFullScreenOverlay, Digikam::ItemRotateOverlay, Digikam::ItemSelectionOverlay, Digikam::ShowHideVersionsOverlay, Digikam::ActionVersionsOverlay, Digikam::AbstractWidgetDelegateOverlay, Digikam::HoverButtonDelegateOverlay, Digikam::PersistentWidgetDelegateOverlay, ShowFoto::ShowfotoCoordinatesOverlay, Digikam::ImportCoordinatesOverlay, Digikam::ImportLockOverlay, Digikam::ImportDownloadOverlay, Digikam::ImportRotateOverlay, Digikam::AssignNameOverlay, Digikam::GroupIndicatorOverlay, Digikam::ItemRatingOverlay, Digikam::TagsLineEditOverlay, and Digikam::ImportRatingOverlay.
|
protectedvirtualslot |
Reimplemented in Digikam::AssignNameOverlay, Digikam::GroupIndicatorOverlay, Digikam::ItemCoordinatesOverlay, Digikam::ItemRatingOverlay, Digikam::TagsLineEditOverlay, Digikam::HoverButtonDelegateOverlay, ShowFoto::ShowfotoCoordinatesOverlay, Digikam::ImportCoordinatesOverlay, Digikam::ImportLockOverlay, Digikam::ImportDownloadOverlay, and Digikam::ImportRatingOverlay.