#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>
class KDirectoryContentsCounter;
class KFileItemModel;
-class KJob;
class QPixmap;
class QTimer;
+class KOverlayIconPlugin;
namespace KIO {
class PreviewJob;
{
class FileMonitor;
}
+ #include <Baloo/IndexerConfig>
#endif
/**
* 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;
private slots:
void slotItemsInserted(const KItemRangeList& itemRanges);
void slotItemsRemoved(const KItemRangeList& itemRanges);
- void slotItemsMoved(const KItemRange& itemRange, QList<int> movedToIndexes);
+ void slotItemsMoved(const KItemRange& itemRange, const QList<int> &movedToIndexes);
void slotItemsChanged(const KItemRangeList& itemRanges,
const QSet<QByteArray>& roles);
void slotSortRoleChanged(const QByteArray& current,
*/
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
void resolveRecentlyChangedItems();
void applyChangedBalooRoles(const QString& file);
- void applyChangedBalooRolesJobFinished(KJob* job);
+ void applyChangedBalooRolesForItem(const KFileItem& file);
- void slotDirectoryContentsCountReceived(const QString& path, int count);
+ void slotDirectoryContentsCountReceived(const QString& path, int count, long size);
private:
/**
KDirectoryContentsCounter* m_directoryContentsCounter;
+ QList<KOverlayIconPlugin*> m_overlayIconsPlugin;
+
#ifdef HAVE_BALOO
Baloo::FileMonitor* m_balooFileMonitor;
+ Baloo::IndexerConfig m_balooConfig;
#endif
};