45 lines
1.8 KiB
C++
45 lines
1.8 KiB
C++
#ifndef APPLICATIONPROPERTY_H
|
||
#define APPLICATIONPROPERTY_H
|
||
|
||
#include <QObject>
|
||
#include <QMap>
|
||
#include <QVector>
|
||
#include <QVariant>
|
||
namespace UkuiSearch {
|
||
|
||
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
|