From 94828aa307af32191124d4fb8c0033a365dc3568 Mon Sep 17 00:00:00 2001 From: Felix Ernst Date: Sun, 18 Feb 2024 13:15:18 +0100 Subject: Add drag-open animation This commit adds an animation for folders that makes clear that they will open or expand soon. This is the case when the option to open folders during drag operations is enabled and a user drags an item on top of a folder. The animation goes like this: - Replace the folder's icon with the "folder-open" icon - Go back to the folder's original icon - Replace the folder's icon with the "folder-open" icon once more --- src/kitemviews/kitemlistwidget.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/kitemviews/kitemlistwidget.h') diff --git a/src/kitemviews/kitemlistwidget.h b/src/kitemviews/kitemlistwidget.h index 55d924719..fdfe5e78a 100644 --- a/src/kitemviews/kitemlistwidget.h +++ b/src/kitemviews/kitemlistwidget.h @@ -188,6 +188,12 @@ public: */ virtual QPixmap createDragPixmap(const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr); + /** + * Starts an animation that makes clear that the item will be activated soon. + * @param timeUntilActivation time in milliseconds until the item will activate + */ + virtual void startActivateSoonAnimation(int timeUntilActivation); + Q_SIGNALS: void roleEditingCanceled(int index, const QByteArray &role, const QVariant &value); void roleEditingFinished(int index, const QByteArray &role, const QVariant &value); -- cgit v1.3.1