ukui-search/libsearch/appdata/application-info-storage.h

42 lines
1.3 KiB
C
Raw Permalink Normal View History

#ifndef APPLICATIONINFOSTORAGE_H
#define APPLICATIONINFOSTORAGE_H
#include <QVariant>
#include "application-property.h"
namespace UkuiSearch {
class ApplicationInfoStoragePrivate;
class ApplicationInfoStorage
{
public:
ApplicationInfoStorage();
ApplicationInfoStorage(Properties properties);
ApplicationInfoStorage(const ApplicationInfoStorage &other);
~ApplicationInfoStorage();
ApplicationInfoStorage & operator=(const ApplicationInfoStorage &rhs);
/**
* @brief
* @return desktop路径的QStringlist
*/
QStringList applicationKeys() const;
/**
* @brief
* @return QVector<ApplicationProperty::Property>
*/
Properties &applicationInfoKeys() const;
/**
* @brief
* @param desktopFile
* @param info
* @return info的数据类型格式返回特定信息
*/
QVariant ApplicationInfo(const QString &desktopFile, ApplicationProperty::Property property);
ApplicationInfoMap &allData();
void addData(const QString &desktopFile, ApplicationProperty::Property property, const QVariant &value);
private:
ApplicationInfoStoragePrivate *d = nullptr;
};
}
#endif // APPLICATIONINFOSTORAGE_H