m_hoverAnimation = new QPropertyAnimation(this, "hoverOpacity", this);
const int duration = (KGlobalSettings::graphicEffectsLevel() == KGlobalSettings::NoEffects) ? 1 : 200;
m_hoverAnimation->setDuration(duration);
- connect(m_hoverAnimation, SIGNAL(finished()), this, SLOT(slotHoverAnimationFinished()));
+ connect(m_hoverAnimation, &QPropertyAnimation::finished, this, &KItemListWidget::slotHoverAnimationFinished);
}
m_hoverAnimation->stop();
return m_hovered;
}
+void KItemListWidget::setHoverPosition(const QPointF& pos)
+{
+ if (m_selectionToggle) {
+ m_selectionToggle->setHovered(selectionToggleRect().contains(pos));
+ }
+}
+
void KItemListWidget::setAlternateBackground(bool enable)
{
if (m_alternateBackground != enable) {