1 #ifndef SHORTCUTAPPMODEL_H
2 #define SHORTCUTAPPMODEL_H
4 #include <QtCore/QAbstractListModel>
5 #include <QXmlStreamReader>
6 #include <QXmlStreamWriter>
18 class ShortcutAppModel : public QAbstractListModel
22 explicit ShortcutAppModel(QObject *parent = nullptr);
25 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
27 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
28 QHash<int, QByteArray> roleNames() const override;
30 Q_INVOKABLE QString getId(int index) const;
31 Q_INVOKABLE QString getName(int index) const;
32 Q_INVOKABLE QString getIcon(int index) const;
33 Q_INVOKABLE bool isBlank(int index) const;
36 void shortcutUpdate(QStringList shortcut_list);
39 void updateShortcut();
44 void setAppQueuePoint(QString id, QString name);
45 QString getIconPath(QString id);
53 #endif // SHORTCUTAPPMODEL_H