]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemmodelrolesupdater.h
[KStandardItemListWidget] Pass icon state to overlay painter
[dolphin.git] / src / kitemviews / kfileitemmodelrolesupdater.h
index 6e7559fb53a7f98eb167865a45abd23eefa6e583..0eef7fcd4f1220a412ac4d1b7c3f157d1e0c819a 100644 (file)
 #ifndef KFILEITEMMODELROLESUPDATER_H
 #define KFILEITEMMODELROLESUPDATER_H
 
-#include <config-baloo.h>
+#include "dolphin_export.h"
+#include "kitemviews/kitemmodelbase.h"
 
 #include <KFileItem>
-#include <kitemviews/kitemmodelbase.h>
-
-#include "dolphin_export.h"
+#include <config-baloo.h>
 
 #include <QObject>
 #include <QSet>
@@ -36,6 +35,7 @@ class KDirectoryContentsCounter;
 class KFileItemModel;
 class QPixmap;
 class QTimer;
+class KOverlayIconPlugin;
 
 namespace KIO {
     class PreviewJob;
@@ -93,8 +93,8 @@ class DOLPHIN_EXPORT KFileItemModelRolesUpdater : public QObject
     Q_OBJECT
 
 public:
-    explicit KFileItemModelRolesUpdater(KFileItemModel* model, QObject* parent = 0);
-    virtual ~KFileItemModelRolesUpdater();
+    explicit KFileItemModelRolesUpdater(KFileItemModel* model, QObject* parent = nullptr);
+    ~KFileItemModelRolesUpdater() override;
 
     void setIconSize(const QSize& size);
     QSize iconSize() const;
@@ -183,6 +183,11 @@ private slots:
      */
     void slotPreviewJobFinished();
 
+    /**
+     * Is invoked when one of the KOverlayIconPlugin emit the signal that an overlay has changed
+     */
+    void slotOverlaysChanged(const QUrl& url, const QStringList&);
+
     /**
      * Resolves the sort role of the next item in m_pendingSortRole, applies it
      * to the model, and invokes itself if there are any pending items left. If
@@ -205,6 +210,7 @@ private slots:
     void resolveRecentlyChangedItems();
 
     void applyChangedBalooRoles(const QString& file);
+    void applyChangedBalooRolesForItem(const KFileItem& file);
 
     void slotDirectoryContentsCountReceived(const QString& path, int count);
 
@@ -334,6 +340,8 @@ private:
 
     KDirectoryContentsCounter* m_directoryContentsCounter;
 
+    QList<KOverlayIconPlugin*> m_overlayIconsPlugin;
+
 #ifdef HAVE_BALOO
     Baloo::FileMonitor* m_balooFileMonitor;
     Baloo::IndexerConfig m_balooConfig;