]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemmodelrolesupdater.h
GIT_SILENT Update Appstream for new release
[dolphin.git] / src / kitemviews / kfileitemmodelrolesupdater.h
index 78fa757f82eba3c7847ccf7d5cd8cfb232eb3ac6..56e28ce72587dbdae53096c1b7cbc3da57df9079 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.
@@ -175,6 +178,9 @@ public:
      */
     void setHoverSequenceState(const QUrl &itemUrl, int seqIdx);
 
+Q_SIGNALS:
+    void previewJobFinished(); // For unit testing
+
 private Q_SLOTS:
     void slotItemsInserted(const KItemRangeList &itemRanges);
     void slotItemsRemoved(const KItemRangeList &itemRanges);
@@ -290,6 +296,7 @@ private:
      * Transforms a raw preview image, applying scale and frame.
      *
      * @param pixmap A raw preview image from a PreviewJob.
+     * @param overlays the overlays to add to the pixmap
      * @return The scaled and decorated preview image.
      */
     QPixmap transformPreviewPixmap(const QPixmap &pixmap);
@@ -333,7 +340,12 @@ private:
 
     void trimHoverSequenceLoadedItems();
 
+    void resetSizeData(const int index, const int size = 0);
+
+    void recountDirectoryItems(const QList<QUrl> directories);
+
 private:
+    QSize cacheSize();
     /**
      * enqueue directory size counting for KFileItem item at index
      */
@@ -366,6 +378,7 @@ private:
 
     KFileItemModel *m_model;
     QSize m_iconSize;
+    qreal m_devicePixelRatio;
     int m_firstVisibleIndex;
     int m_lastVisibleIndex;
     int m_maximumVisibleItems;