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

Signals

void activated (const ItemInfo &info)
 
void hideNotification ()
 
void requestNotification (const QModelIndex &index, const QString &message)
 
void update (const QModelIndex &index)
 

Public Member Functions

virtual bool acceptsDelegate (QAbstractItemDelegate *) const
 
 ActionVersionsOverlay (QObject *const parent, const QIcon &icon, const QString &text, const QString &tip=QString())
 
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 setReferenceModel (const ItemModel *model)
 
void setView (QAbstractItemView *view)
 
QAbstractItemView * view () const
 

Protected Slots

void slotClicked (bool checked)
 
void slotEntered (const QModelIndex &index) override
 
virtual void slotLayoutChanged ()
 
void slotReset () override
 
virtual void slotRowsRemoved (const QModelIndex &parent, int start, int end)
 
virtual void slotViewportEntered ()
 

Protected Member Functions

QList< QModelIndex > affectedIndexes (const QModelIndex &index) const
 
bool affectsMultiple (const QModelIndex &index) const
 
Button * button () const
 
bool checkIndex (const QModelIndex &index) const override
 
bool checkIndexOnEnter (const QModelIndex &index) const
 
ItemViewHoverButtoncreateButton () override
 
QWidget * createWidget () override
 
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
 
void updateButton (const QModelIndex &index) override
 
bool viewHasMultiSelection () const
 
virtual void viewportLeaveEvent (QObject *obj, QEvent *event)
 
void visualChange () override
 
virtual void widgetEnterEvent ()
 
void widgetEnterNotifyMultiple (const QModelIndex &index)
 
virtual void widgetLeaveEvent ()
 
void widgetLeaveNotifyMultiple ()
 

Protected Attributes

QAbstractItemDelegate * m_delegate
 
QIcon m_icon
 
bool m_mouseButtonPressedOnWidget
 
const ItemModelm_referenceModel
 
QString m_text
 
QString m_tip
 
QAbstractItemView * m_view
 
QWidget * m_widget
 

Constructor & Destructor Documentation

◆ ActionVersionsOverlay()

Digikam::ActionVersionsOverlay::ActionVersionsOverlay ( QObject *const  parent,
const QIcon &  icon,
const QString &  text,
const QString &  tip = QString() 
)
explicit

Member Function Documentation

◆ acceptsDelegate()

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

◆ activated

void Digikam::ActionVersionsOverlay::activated ( const ItemInfo info)
signal

Referenced by slotClicked().

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

◆ button()

ActionVersionsOverlay::Button * Digikam::ActionVersionsOverlay::button ( ) const
protected

◆ checkIndex()

bool Digikam::ActionVersionsOverlay::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::hasImage(), Digikam::ItemHistoryGraphModel::IsImageItemRole, m_referenceModel, and Digikam::ItemModel::retrieveItemInfo().

◆ checkIndexOnEnter()

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

◆ createButton()

ItemViewHoverButton * Digikam::ActionVersionsOverlay::createButton ( )
overrideprotectedvirtual

Create your widget here. Pass view() as parent.

Implements Digikam::HoverButtonDelegateOverlay.

References m_icon, m_text, m_tip, and Digikam::ItemDelegateOverlay::view().

◆ createWidget()

QWidget * Digikam::HoverButtonDelegateOverlay::createWidget ( )
overrideprotectedvirtualinherited

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

Implements Digikam::AbstractWidgetDelegateOverlay.

References Digikam::HoverButtonDelegateOverlay::createButton().

◆ delegate()

◆ eventFilter()

◆ hide()

◆ hideNotification

void Digikam::ItemDelegateOverlay::hideNotification ( )
signalinherited

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

◆ requestNotification

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

◆ setActive()

void Digikam::ActionVersionsOverlay::setActive ( bool  active)
overridevirtual

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 button(), Digikam::HoverButtonDelegateOverlay::setActive(), and slotClicked().

◆ setDelegate()

◆ setReferenceModel()

void Digikam::ActionVersionsOverlay::setReferenceModel ( const ItemModel model)

◆ setView()

◆ slotClicked

void Digikam::ActionVersionsOverlay::slotClicked ( bool  checked)
protectedslot

◆ slotEntered

◆ slotLayoutChanged

void Digikam::AbstractWidgetDelegateOverlay::slotLayoutChanged ( )
protectedvirtualslotinherited

◆ slotReset

void Digikam::HoverButtonDelegateOverlay::slotReset ( )
overrideprotectedslotinherited

◆ slotRowsRemoved

void Digikam::AbstractWidgetDelegateOverlay::slotRowsRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
protectedvirtualslotinherited

◆ slotViewportEntered

void Digikam::AbstractWidgetDelegateOverlay::slotViewportEntered ( )
protectedvirtualslotinherited

◆ update

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

◆ updateButton()

void Digikam::ActionVersionsOverlay::updateButton ( const QModelIndex &  index)
overrideprotectedvirtual

Called when a new index is entered. Reposition your button here, adjust and store state.

Implements Digikam::HoverButtonDelegateOverlay.

References button(), and Digikam::ItemDelegateOverlay::m_view.

◆ view()

◆ viewHasMultiSelection()

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

◆ viewportLeaveEvent()

void Digikam::AbstractWidgetDelegateOverlay::viewportLeaveEvent ( QObject *  obj,
QEvent *  event 
)
protectedvirtualinherited

◆ visualChange()

void Digikam::HoverButtonDelegateOverlay::visualChange ( )
overrideprotectedvirtualinherited

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::HoverButtonDelegateOverlay::button(), Digikam::AbstractWidgetDelegateOverlay::m_widget, and Digikam::HoverButtonDelegateOverlay::updateButton().

◆ widgetEnterEvent()

void Digikam::AbstractWidgetDelegateOverlay::widgetEnterEvent ( )
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().

◆ widgetEnterNotifyMultiple()

◆ widgetLeaveEvent()

◆ widgetLeaveNotifyMultiple()

Member Data Documentation

◆ m_delegate

QAbstractItemDelegate* Digikam::ItemDelegateOverlay::m_delegate
protectedinherited

◆ m_icon

QIcon Digikam::ActionVersionsOverlay::m_icon
protected

Referenced by createButton().

◆ m_mouseButtonPressedOnWidget

bool Digikam::AbstractWidgetDelegateOverlay::m_mouseButtonPressedOnWidget
protectedinherited

◆ m_referenceModel

const ItemModel* Digikam::ActionVersionsOverlay::m_referenceModel
protected

Referenced by checkIndex(), and setReferenceModel().

◆ m_text

QString Digikam::ActionVersionsOverlay::m_text
protected

Referenced by createButton().

◆ m_tip

QString Digikam::ActionVersionsOverlay::m_tip
protected

Referenced by createButton().

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


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