forked from openkylin/ukui-search
45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
![]() |
#ifndef APPLICATIONINFO_H
|
||
|
#define APPLICATIONINFO_H
|
||
|
|
||
|
#include <QObject>
|
||
|
|
||
|
#include "application-property.h"
|
||
|
namespace UkuiSearch {
|
||
|
class ApplicationInfoPrivate;
|
||
|
class ApplicationInfo : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit ApplicationInfo(QObject *parent = nullptr);
|
||
|
~ApplicationInfo();
|
||
|
/**
|
||
|
* @brief getInfo 查询单个应用的单个属性
|
||
|
* @param desktopFile
|
||
|
* @param property
|
||
|
* @return
|
||
|
*/
|
||
|
QVariant getInfo(const QString &desktopFile, ApplicationProperty::Property property);
|
||
|
/**
|
||
|
* @brief getInfo 查询单个应用的多个属性
|
||
|
* @param desktopFile
|
||
|
* @param properties
|
||
|
* @return
|
||
|
*/
|
||
|
PropertyMap getInfo(const QString &desktopFile, Properties properties);
|
||
|
/**
|
||
|
* @brief getInfo 查询所有应用的多个属性
|
||
|
* @param property
|
||
|
* @return
|
||
|
*/
|
||
|
ApplicationInfoMap getInfo(Properties properties);
|
||
|
|
||
|
//TODO 搜索接口,设置收藏和置顶接口,应用更新卸载信号
|
||
|
|
||
|
private:
|
||
|
ApplicationInfoPrivate *d = nullptr;
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|
||
|
#endif // APPLICATIONINFO_H
|