]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemmodelrolesupdater.h
Implemented grouping-related slots to match sorting in some obscure places.
[dolphin.git] / src / kitemviews / kfileitemmodelrolesupdater.h
index be6f2319311cbb56520be4a903f654193d6757b9..df3a9422622b5a3c68d166de675b30e6aee648f2 100644 (file)
@@ -89,6 +89,9 @@ public:
     void setIconSize(const QSize &size);
     QSize iconSize() const;
 
+    void setDevicePixelRatio(qreal devicePixelRatio);
+    qreal devicePixelRatio() const;
+
     /**
      * Sets the range of items that are visible currently. The roles
      * of visible items are resolved first.
@@ -260,7 +263,7 @@ private Q_SLOTS:
     void applyChangedBalooRoles(const QString &file);
     void applyChangedBalooRolesForItem(const KFileItem &file);
 
-    void slotDirectoryContentsCountReceived(const QString &path, int count, long size);
+    void slotDirectoryContentsCountReceived(const QString &path, int count, long long size);
 
 private:
     /**
@@ -312,6 +315,8 @@ private:
 
     /**
      * Resolves the sort role of the item and applies it to the model.
+     * Despite the name, this handles both sorting and grouping, as 
+     * regrouping never happens without resorting at the same time.
      */
     void applySortRole(int index);
 
@@ -334,6 +339,9 @@ private:
     void trimHoverSequenceLoadedItems();
 
 private:
+    /**
+     * enqueue directory size counting for KFileItem item at index
+     */
     void startDirectorySizeCounting(const KFileItem &item, int index);
 
     enum State { Idle, Paused, ResolvingSortRole, ResolvingAllRoles, PreviewJobRunning };
@@ -363,6 +371,7 @@ private:
 
     KFileItemModel *m_model;
     QSize m_iconSize;
+    qreal m_devicePixelRatio;
     int m_firstVisibleIndex;
     int m_lastVisibleIndex;
     int m_maximumVisibleItems;
@@ -370,7 +379,6 @@ private:
     QSet<QByteArray> m_resolvableRoles;
     QStringList m_enabledPlugins;
     qulonglong m_localFileSizePreviewLimit;
-    bool m_scanDirectories;
 
     // Items for which the sort role still has to be determined.
     QSet<KFileItem> m_pendingSortRoleItems;