]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemmodelrolesupdater.h
Provide ability to configure size cut-off for local file previews
[dolphin.git] / src / kitemviews / kfileitemmodelrolesupdater.h
index 9078c8e0d64cdc89607b27b656c46967a919865d..b881b73e4b0b4e369bc89f3d4025a93f6aa43a3d 100644 (file)
@@ -154,6 +154,17 @@ public:
      */
     QStringList enabledPlugins() const;
 
      */
     QStringList enabledPlugins() const;
 
+    /**
+     * Sets the maximum file size of local files for which
+     * previews will be generated (if enabled). A value of 0
+     * indicates no file size limit.
+     * Per default the value from KConfigGroup "PreviewSettings"
+     * MaximumSize is used, 0 otherwise.
+     * @param size
+     */
+    void setLocalFileSizePreviewLimit(qlonglong size);
+    qlonglong localFileSizePreviewLimit() const;
+
 private slots:
     void slotItemsInserted(const KItemRangeList& itemRanges);
     void slotItemsRemoved(const KItemRangeList& itemRanges);
 private slots:
     void slotItemsInserted(const KItemRangeList& itemRanges);
     void slotItemsRemoved(const KItemRangeList& itemRanges);
@@ -212,7 +223,7 @@ private slots:
     void applyChangedBalooRoles(const QString& file);
     void applyChangedBalooRolesForItem(const KFileItem& file);
 
     void applyChangedBalooRoles(const QString& file);
     void applyChangedBalooRolesForItem(const KFileItem& file);
 
-    void slotDirectoryContentsCountReceived(const QString& path, int count);
+    void slotDirectoryContentsCountReceived(const QString& path, int count, long size);
 
 private:
     /**
 
 private:
     /**
@@ -313,6 +324,7 @@ private:
     QSet<QByteArray> m_roles;
     QSet<QByteArray> m_resolvableRoles;
     QStringList m_enabledPlugins;
     QSet<QByteArray> m_roles;
     QSet<QByteArray> m_resolvableRoles;
     QStringList m_enabledPlugins;
+    qulonglong m_localFileSizePreviewLimit;
 
     // Items for which the sort role still has to be determined.
     QSet<KFileItem> m_pendingSortRoleItems;
 
     // Items for which the sort role still has to be determined.
     QSet<KFileItem> m_pendingSortRoleItems;