2023-03-07 17:33:08 +08:00
|
|
|
|
#ifndef APPLICATIONPROPERTY_H
|
|
|
|
|
#define APPLICATIONPROPERTY_H
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
#include <QMap>
|
|
|
|
|
#include <QVector>
|
2023-03-10 17:47:04 +08:00
|
|
|
|
#include <QVariant>
|
2023-03-07 17:33:08 +08:00
|
|
|
|
namespace UkuiSearch {
|
2023-03-10 17:47:04 +08:00
|
|
|
|
|
2023-03-07 17:33:08 +08:00
|
|
|
|
namespace ApplicationProperty {
|
|
|
|
|
/**
|
|
|
|
|
* @brief 表示应用基础信息
|
|
|
|
|
*/
|
|
|
|
|
enum Property {
|
|
|
|
|
Invalid = 0,
|
|
|
|
|
DesktopFilePath, //desktop文件路径
|
|
|
|
|
ModifiedTime, //数据修改时间
|
|
|
|
|
InsertTime, //数据插入时间
|
|
|
|
|
LocalName, //应用名(本地化)
|
|
|
|
|
NameEn, //应用英文名
|
|
|
|
|
NameZh, //应用中文名
|
|
|
|
|
PinyinName, //名称拼音
|
|
|
|
|
FirstLetterOfPinyin, //拼音首字母
|
|
|
|
|
FirstLetterAll, //名称首字母
|
|
|
|
|
Icon, //应用图标
|
|
|
|
|
Type, //种类(Application等)
|
|
|
|
|
Category, //分类(AudioVideo等)
|
|
|
|
|
Exec, //执行命令
|
|
|
|
|
Comment, //简介
|
|
|
|
|
Md5, //desktop文件的md5
|
|
|
|
|
LaunchTimes, //启动次数
|
|
|
|
|
Favorites, //收藏顺序(0 未收藏)
|
|
|
|
|
Launched, //是否从开始菜单启动过
|
|
|
|
|
Top, //置顶顺序(0 未置顶)
|
|
|
|
|
Lock, //是否锁定(不允许显示或打开)
|
|
|
|
|
DontDisplay //是否不需要显示(设置了Nodisplay等字段)
|
|
|
|
|
};
|
|
|
|
|
} //namespace ApplicationProperty
|
|
|
|
|
typedef QVector<ApplicationProperty::Property> Properties;
|
|
|
|
|
typedef QMap<ApplicationProperty::Property, QVariant> PropertyMap;
|
|
|
|
|
typedef QMap<QString, PropertyMap> ApplicationInfoMap; // desktopFile->PropertyMap
|
|
|
|
|
}
|
|
|
|
|
Q_DECLARE_METATYPE(UkuiSearch::ApplicationProperty::Property)
|
|
|
|
|
#endif // APPLICATIONPROPERTY_H
|