19#include <QFutureWatcher>
20#include <lomiri/shell/launcher/AppDrawerModelInterface.h>
22#include "launcheritem.h"
27class IconCacheWatcher;
28class AppDrawerModel:
public AppDrawerModelInterface
33 Q_PROPERTY(
bool refreshing READ refreshing NOTIFY refreshingChanged)
35 AppDrawerModel(QObject* parent =
nullptr);
37 int rowCount(
const QModelIndex &parent)
const override;
38 QVariant data(
const QModelIndex &index,
int role)
const override;
42 Q_INVOKABLE
void refresh();
45 void refreshingChanged();
48 void appAdded(
const QString &appId);
49 void appRemoved(
const QString &appId);
50 void appInfoChanged(
const QString &appId);
52 void onRefreshFinished();
58 typedef QList<std::shared_ptr<LauncherItem>> ItemList;
62 XdgWatcher *m_xdgWatcher;
63 IconCacheWatcher *m_iconCacheWatcher;
64 QFutureWatcher<ItemList> m_refreshFutureWatcher;