digiKam
|
Public Member Functions | |
void | installOverlay (ItemDelegateOverlay *overlay) |
ItemDelegateOverlayContainer ()=default | |
void | mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index) |
QList< ItemDelegateOverlay * > | overlays () const |
void | removeAllOverlays () |
void | removeOverlay (ItemDelegateOverlay *overlay) |
void | setAllOverlaysActive (bool active) |
void | setViewOnAllOverlays (QAbstractItemView *view) |
virtual | ~ItemDelegateOverlayContainer ()=default |
Protected Member Functions | |
virtual QAbstractItemDelegate * | asDelegate ()=0 |
Returns the delegate, typically, the derived class. More... | |
virtual void | drawOverlays (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index) const |
virtual void | overlayDestroyed (QObject *o) |
Declare as slot in the derived class calling this method. More... | |
Protected Attributes | |
QList< ItemDelegateOverlay * > | m_overlays |
|
default |
This is a sample implementation for delegate management methods, to be inherited by a delegate. Does not inherit QObject, the delegate already does.
|
virtualdefault |
|
protectedpure virtual |
Returns the delegate, typically, the derived class.
Implemented in Digikam::ItemViewImportDelegate, ShowFoto::ShowfotoItemViewDelegate, Digikam::ItemViewDelegate, and Digikam::VersionsDelegate.
Referenced by installOverlay(), and removeOverlay().
|
protectedvirtual |
References m_overlays, and Digikam::ItemDelegateOverlay::paint().
Referenced by Digikam::ItemDelegate::paint(), ShowFoto::ShowfotoDelegate::paint(), and Digikam::ImportDelegate::paint().
void Digikam::ItemDelegateOverlayContainer::installOverlay | ( | ItemDelegateOverlay * | overlay | ) |
References Digikam::ItemDelegateOverlay::acceptsDelegate(), asDelegate(), m_overlays, overlayDestroyed(), and Digikam::ItemDelegateOverlay::setDelegate().
Referenced by Digikam::VersionsTreeView::addOverlay(), Digikam::ImportCategorizedView::addOverlay(), Digikam::ItemCategorizedView::addOverlay(), and ShowFoto::ShowfotoCategorizedView::addOverlay().
void Digikam::ItemDelegateOverlayContainer::mouseMoved | ( | QMouseEvent * | e, |
const QRect & | visualRect, | ||
const QModelIndex & | index | ||
) |
|
protectedvirtual |
Declare as slot in the derived class calling this method.
References removeOverlay().
Referenced by installOverlay(), Digikam::VersionsDelegate::overlayDestroyed(), Digikam::ItemViewDelegate::overlayDestroyed(), and Digikam::ItemViewImportDelegate::overlayDestroyed().
QList< ItemDelegateOverlay * > Digikam::ItemDelegateOverlayContainer::overlays | ( | ) | const |
References m_overlays.
void Digikam::ItemDelegateOverlayContainer::removeAllOverlays | ( | ) |
References m_overlays, Digikam::ItemDelegateOverlay::setActive(), Digikam::ItemDelegateOverlay::setDelegate(), and Digikam::ItemDelegateOverlay::setView().
Referenced by Digikam::ItemViewDelegate::~ItemViewDelegate(), Digikam::ItemViewImportDelegate::~ItemViewImportDelegate(), ShowFoto::ShowfotoItemViewDelegate::~ShowfotoItemViewDelegate(), and Digikam::VersionsTreeView::~VersionsTreeView().
void Digikam::ItemDelegateOverlayContainer::removeOverlay | ( | ItemDelegateOverlay * | overlay | ) |
References asDelegate(), m_overlays, Digikam::ItemDelegateOverlay::setActive(), and Digikam::ItemDelegateOverlay::setDelegate().
Referenced by overlayDestroyed(), Digikam::ItemCategorizedView::removeOverlay(), Digikam::VersionsTreeView::removeOverlay(), ShowFoto::ShowfotoCategorizedView::removeOverlay(), and Digikam::ImportCategorizedView::removeOverlay().
void Digikam::ItemDelegateOverlayContainer::setAllOverlaysActive | ( | bool | active | ) |
References m_overlays, and Digikam::ItemDelegateOverlay::setActive().
void Digikam::ItemDelegateOverlayContainer::setViewOnAllOverlays | ( | QAbstractItemView * | view | ) |
|
protected |
Referenced by drawOverlays(), installOverlay(), mouseMoved(), overlays(), removeAllOverlays(), removeOverlay(), setAllOverlaysActive(), and setViewOnAllOverlays().