digiKam
Digikam::ItemViewHoverButton Class Referenceabstract
+ Inheritance diagram for Digikam::ItemViewHoverButton:

Public Member Functions

QModelIndex index () const
 
void initIcon ()
 
 ItemViewHoverButton (QAbstractItemView *const parentView)
 
void reset ()
 
void setIndex (const QModelIndex &index)
 
void setVisible (bool visible) override
 
QSize sizeHint () const override=0
 

Protected Slots

void refreshIcon ()
 
void setFadingValue (int value)
 
void startFading ()
 
void stopFading ()
 

Protected Member Functions

void enterEvent (QEvent *event)
 
virtual QIcon icon ()=0
 
void leaveEvent (QEvent *event)
 
void paintEvent (QPaintEvent *event)
 
void setup ()
 
virtual void updateToolTip ()
 

Protected Attributes

QTimeLine * m_fadingTimeLine
 
int m_fadingValue
 
QIcon m_icon
 
QPersistentModelIndex m_index
 
bool m_isHovered
 

Constructor & Destructor Documentation

◆ ItemViewHoverButton()

Digikam::ItemViewHoverButton::ItemViewHoverButton ( QAbstractItemView *const  parentView)
explicit

References m_fadingTimeLine.

Member Function Documentation

◆ enterEvent()

void Digikam::ItemViewHoverButton::enterEvent ( QEvent *  event)
protected

◆ icon()

virtual QIcon Digikam::ItemViewHoverButton::icon ( )
protectedpure virtual

◆ index()

◆ initIcon()

void Digikam::ItemViewHoverButton::initIcon ( )

◆ leaveEvent()

void Digikam::ItemViewHoverButton::leaveEvent ( QEvent *  event)
protected

References m_isHovered.

◆ paintEvent()

void Digikam::ItemViewHoverButton::paintEvent ( QPaintEvent *  event)
protected

References icon(), m_fadingValue, m_icon, and m_isHovered.

◆ refreshIcon

void Digikam::ItemViewHoverButton::refreshIcon ( )
protectedslot

References icon(), and m_icon.

Referenced by initIcon(), and setup().

◆ reset()

void Digikam::ItemViewHoverButton::reset ( )

◆ setFadingValue

void Digikam::ItemViewHoverButton::setFadingValue ( int  value)
protectedslot

References m_fadingTimeLine, m_fadingValue, and value.

Referenced by setup().

◆ setIndex()

void Digikam::ItemViewHoverButton::setIndex ( const QModelIndex &  index)

◆ setup()

◆ setVisible()

void Digikam::ItemViewHoverButton::setVisible ( bool  visible)
override

References startFading(), and stopFading().

◆ sizeHint()

QSize Digikam::ItemViewHoverButton::sizeHint ( ) const
overridepure virtual

◆ startFading

void Digikam::ItemViewHoverButton::startFading ( )
protectedslot

References m_fadingTimeLine, and m_fadingValue.

Referenced by setIndex(), and setVisible().

◆ stopFading

void Digikam::ItemViewHoverButton::stopFading ( )
protectedslot

References m_fadingTimeLine, and m_fadingValue.

Referenced by setVisible().

◆ updateToolTip()

void Digikam::ItemViewHoverButton::updateToolTip ( )
protectedvirtual

Member Data Documentation

◆ m_fadingTimeLine

QTimeLine* Digikam::ItemViewHoverButton::m_fadingTimeLine
protected

◆ m_fadingValue

int Digikam::ItemViewHoverButton::m_fadingValue
protected

◆ m_icon

QIcon Digikam::ItemViewHoverButton::m_icon
protected

Referenced by paintEvent(), and refreshIcon().

◆ m_index

QPersistentModelIndex Digikam::ItemViewHoverButton::m_index
protected

Referenced by index(), reset(), and setIndex().

◆ m_isHovered

bool Digikam::ItemViewHoverButton::m_isHovered
protected

Referenced by leaveEvent(), and paintEvent().


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