19#include <QFutureWatcher>
20#include <lomiri/shell/launcher/AppDrawerModelInterface.h>
22#include "launcheritem.h"
27class AppDrawerModel:
public AppDrawerModelInterface
32 Q_PROPERTY(
bool refreshing READ refreshing NOTIFY refreshingChanged)
34 AppDrawerModel(QObject* parent =
nullptr);
36 int rowCount(
const QModelIndex &parent)
const override;
37 QVariant data(
const QModelIndex &index,
int role)
const override;
41 Q_INVOKABLE
void refresh();
44 void refreshingChanged();
47 void appAdded(
const QString &appId);
48 void appRemoved(
const QString &appId);
49 void appInfoChanged(
const QString &appId);
51 void onRefreshFinished();
57 typedef QList<std::shared_ptr<LauncherItem>> ItemList;
61 XdgWatcher *m_xdgWatcher;
62 QFutureWatcher<ItemList> m_refreshFutureWatcher;