This commit is contained in:
Misaki
2026-06-10 00:57:54 +08:00
commit 7551a85abe
2805 changed files with 373529 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#ifndef T_ICONMODEL_H
#define T_ICONMODEL_H
#include <QAbstractListModel>
#include <QMetaEnum>
#include "stdafx.h"
class T_IconModel : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY_CREATE(bool, IsSearchMode)
public:
explicit T_IconModel(QObject* parent = nullptr);
~T_IconModel();
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
void setSearchKeyList(QStringList list);
QStringList getSearchKeyList();
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
QString getIconNameFromModelIndex(const QModelIndex& index) const;
private:
QMetaEnum _metaEnum;
QStringList _searchKeyList;
int _rowCount;
};
#endif // T_ICONMODEL_H