]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemmodelrolesupdater.h
Merge branch 'Applications/18.04'
[dolphin.git] / src / kitemviews / kfileitemmodelrolesupdater.h
index 6c82dbe4ae552f9b85055a29711f78b755dfc114..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 "libdolphin_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;
@@ -46,6 +46,7 @@ namespace KIO {
     {
         class FileMonitor;
     }
+    #include <Baloo/IndexerConfig>
 #endif
 
 /**
@@ -87,13 +88,13 @@ namespace KIO {
  * 3.   Finally, the entire process is repeated for any items that might have
  *      changed in the mean time.
  */
-class LIBDOLPHINPRIVATE_EXPORT KFileItemModelRolesUpdater : public QObject
+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;
@@ -182,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
@@ -204,6 +210,7 @@ private slots:
     void resolveRecentlyChangedItems();
 
     void applyChangedBalooRoles(const QString& file);
+    void applyChangedBalooRolesForItem(const KFileItem& file);
 
     void slotDirectoryContentsCountReceived(const QString& path, int count);
 
@@ -333,8 +340,11 @@ private:
 
     KDirectoryContentsCounter* m_directoryContentsCounter;
 
+    QList<KOverlayIconPlugin*> m_overlayIconsPlugin;
+
 #ifdef HAVE_BALOO
     Baloo::FileMonitor* m_balooFileMonitor;
+    Baloo::IndexerConfig m_balooConfig;
 #endif
 };