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

Signals

void hideNotification ()
 
void ratingEdited (const QList< QModelIndex > &indexes, int rating)
 
void requestNotification (const QModelIndex &index, const QString &message)
 
void update (const QModelIndex &index)
 

Public Member Functions

virtual bool acceptsDelegate (QAbstractItemDelegate *) const
 
QAbstractItemDelegate * delegate () const
 
 ImportRatingOverlay (QObject *const parent)
 
virtual void mouseMoved (QMouseEvent *e, const QRect &visualRect, const QModelIndex &index)
 
virtual void paint (QPainter *p, const QStyleOptionViewItem &option, const QModelIndex &index)
 
RatingWidgetratingWidget () const
 
void setDelegate (QAbstractItemDelegate *delegate)
 
void setView (QAbstractItemView *view)
 
QAbstractItemView * view () const
 

Protected Slots

void slotDataChanged (const QModelIndex &, const QModelIndex &)
 
virtual void slotLayoutChanged ()
 
void slotRatingChanged (int)
 
virtual void slotReset ()
 
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
 
virtual bool checkIndex (const QModelIndex &index) const
 
bool checkIndexOnEnter (const QModelIndex &index) const
 
QWidget * createWidget () override
 
bool eventFilter (QObject *obj, QEvent *event) override
 
void hide () override
 
virtual QString notifyMultipleMessage (const QModelIndex &, int number)
 
int numberOfAffectedIndexes (const QModelIndex &index) const
 
QWidget * parentWidget () const
 
void setActive (bool) override
 
void slotEntered (const QModelIndex &index) override
 
void updatePosition ()
 
void updateRating ()
 
bool viewHasMultiSelection () const
 
virtual void viewportLeaveEvent (QObject *obj, QEvent *event)
 
void visualChange () override
 
void widgetEnterEvent () override
 
void widgetEnterNotifyMultiple (const QModelIndex &index)
 
void widgetLeaveEvent () override
 
void widgetLeaveNotifyMultiple ()
 

Protected Attributes

QAbstractItemDelegate * m_delegate
 
QPersistentModelIndex m_index
 
bool m_mouseButtonPressedOnWidget
 
QAbstractItemView * m_view
 
QWidget * m_widget
 

Constructor & Destructor Documentation

◆ ImportRatingOverlay()

Digikam::ImportRatingOverlay::ImportRatingOverlay ( QObject *const  parent)
explicit

Member Function Documentation

◆ acceptsDelegate()

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

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

◆ checkIndex()

◆ checkIndexOnEnter()

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

◆ createWidget()

QWidget * Digikam::ImportRatingOverlay::createWidget ( )
overrideprotectedvirtual

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::AbstractWidgetDelegateOverlay::parentWidget(), Digikam::RatingWidget::setFading(), and Digikam::RatingWidget::setTracking().

◆ delegate()

◆ eventFilter()

◆ hide()

void Digikam::ImportRatingOverlay::hide ( )
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::ItemDelegateOverlay::delegate(), and Digikam::AbstractWidgetDelegateOverlay::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()

◆ ratingEdited

void Digikam::ImportRatingOverlay::ratingEdited ( const QList< QModelIndex > &  indexes,
int  rating 
)
signal

Referenced by slotRatingChanged().

◆ ratingWidget()

RatingWidget * Digikam::ImportRatingOverlay::ratingWidget ( ) const

◆ requestNotification

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

◆ setActive()

void Digikam::ImportRatingOverlay::setActive ( bool  active)
overrideprotectedvirtual

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 ratingWidget(), Digikam::AbstractWidgetDelegateOverlay::setActive(), slotDataChanged(), slotRatingChanged(), and Digikam::ItemDelegateOverlay::view().

◆ setDelegate()

◆ setView()

◆ slotDataChanged

void Digikam::ImportRatingOverlay::slotDataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
protectedslot

◆ slotEntered()

void Digikam::ImportRatingOverlay::slotEntered ( const QModelIndex &  index)
overrideprotectedvirtual

◆ slotLayoutChanged

void Digikam::AbstractWidgetDelegateOverlay::slotLayoutChanged ( )
protectedvirtualslotinherited

◆ slotRatingChanged

void Digikam::ImportRatingOverlay::slotRatingChanged ( int  rating)
protectedslot

◆ slotReset

void Digikam::AbstractWidgetDelegateOverlay::slotReset ( )
protectedvirtualslotinherited

◆ 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

◆ updatePosition()

◆ updateRating()

◆ view()

◆ viewHasMultiSelection()

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

◆ viewportLeaveEvent()

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

◆ visualChange()

void Digikam::ImportRatingOverlay::visualChange ( )
overrideprotectedvirtual

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::AbstractWidgetDelegateOverlay::m_widget, and updatePosition().

◆ widgetEnterEvent()

void Digikam::ImportRatingOverlay::widgetEnterEvent ( )
overrideprotectedvirtual

Called when a QEvent::Enter resp. QEvent::Leave event for the widget is received. The default implementation does nothing.

Reimplemented from Digikam::AbstractWidgetDelegateOverlay.

References m_index, and Digikam::AbstractWidgetDelegateOverlay::widgetEnterNotifyMultiple().

◆ widgetEnterNotifyMultiple()

◆ widgetLeaveEvent()

void Digikam::ImportRatingOverlay::widgetLeaveEvent ( )
overrideprotectedvirtual

◆ widgetLeaveNotifyMultiple()

Member Data Documentation

◆ m_delegate

QAbstractItemDelegate* Digikam::ItemDelegateOverlay::m_delegate
protectedinherited

◆ m_index

QPersistentModelIndex Digikam::ImportRatingOverlay::m_index
protected

◆ m_mouseButtonPressedOnWidget

bool Digikam::AbstractWidgetDelegateOverlay::m_mouseButtonPressedOnWidget
protectedinherited

◆ 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(), ratingWidget(), Digikam::AbstractWidgetDelegateOverlay::setActive(), Digikam::PersistentWidgetDelegateOverlay::setFocusOnWidget(), Digikam::ItemRatingOverlay::slotDataChanged(), slotDataChanged(), Digikam::AbstractWidgetDelegateOverlay::slotEntered(), Digikam::ItemRatingOverlay::slotEntered(), Digikam::TagsLineEditOverlay::slotEntered(), Digikam::PersistentWidgetDelegateOverlay::slotEntered(), slotEntered(), Digikam::ItemRatingOverlay::slotRatingChanged(), 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(), updatePosition(), Digikam::ItemRatingOverlay::updateRating(), 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 visualChange().


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