]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemlistview.h
Add support for hover sequence thumbnails (via ThumbSequenceCreator)
[dolphin.git] / src / kitemviews / kfileitemlistview.h
index 43712541a9e1e63eda89bb70ad4097986417d4c2..bfbe85d120438ea6fcea81effe49a5afa4407f39 100644 (file)
@@ -10,6 +10,8 @@
 #include "dolphin_export.h"
 #include "kitemviews/kstandarditemlistview.h"
 
+#include <KFileItem>
+
 class KFileItemModelRolesUpdater;
 class QTimer;
 
@@ -69,8 +71,25 @@ public:
     void setLocalFileSizePreviewLimit(qlonglong size);
     qlonglong localFileSizePreviewLimit() const;
 
+    /**
+     * If set to true, directories contents are scanned to determine their size
+     * Default true
+     */
+    void setScanDirectories(bool enabled);
+    bool scanDirectories();
+
     QPixmap createDragPixmap(const KItemSet& indexes) const override;
 
+    /**
+     * Notifies the view of a change in the hover state on an item.
+     *
+     * @param itemUrl URL of the item that is hovered, or an empty URL if no item is hovered.
+     * @param seqIdx The current hover sequence index. While an item is hovered,
+     *               this method will be called repeatedly with increasing values
+     *               for this parameter.
+     */
+    void setHoverSequenceState(const QUrl& itemUrl, int seqIdx);
+
 protected:
     KItemListWidgetCreatorBase* defaultWidgetCreator() const override;
     void initializeItemListWidget(KItemListWidget* item) override;
@@ -87,11 +106,11 @@ protected:
     void onTransactionEnd() override;
     void resizeEvent(QGraphicsSceneResizeEvent* event) override;
 
-protected slots:
+protected Q_SLOTS:
     void slotItemsRemoved(const KItemRangeList& itemRanges) override;
     void slotSortRoleChanged(const QByteArray& current, const QByteArray& previous) override;
 
-private slots:
+private Q_SLOTS:
     void triggerVisibleIndexRangeUpdate();
     void updateVisibleIndexRange();
 
@@ -118,6 +137,7 @@ private:
     KFileItemModelRolesUpdater* m_modelRolesUpdater;
     QTimer* m_updateVisibleIndexRangeTimer;
     QTimer* m_updateIconSizeTimer;
+    bool m_scanDirectories;
 
     friend class KFileItemListViewTest; // For unit testing
 };