2023-04-11 10:19:35 +08:00
|
|
|
|
/*
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2023, KylinSoft Co., Ltd.
|
|
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
*
|
|
|
|
|
* Authors: iaom <zhangpengfei@kylinos.cn>
|
|
|
|
|
*/
|
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, //是否锁定(不允许显示或打开)
|
2023-04-17 16:14:44 +08:00
|
|
|
|
DontDisplay, //是否不需要显示(设置了Nodisplay等字段)
|
|
|
|
|
AutoStart //是否自启动(位于自启动目录/etc/xdg/autostart下)
|
2023-03-07 17:33:08 +08:00
|
|
|
|
};
|
|
|
|
|
} //namespace ApplicationProperty
|
2023-03-15 16:39:38 +08:00
|
|
|
|
typedef QVector<ApplicationProperty::Property> ApplicationProperties;
|
|
|
|
|
typedef QMap<ApplicationProperty::Property, QVariant> ApplicationPropertyMap;
|
|
|
|
|
typedef QMap<QString, ApplicationPropertyMap> ApplicationInfoMap; // desktopFile->ApplicationPropertyMap
|
2023-03-07 17:33:08 +08:00
|
|
|
|
}
|
|
|
|
|
Q_DECLARE_METATYPE(UkuiSearch::ApplicationProperty::Property)
|
2023-04-14 13:45:05 +08:00
|
|
|
|
Q_DECLARE_METATYPE(UkuiSearch::ApplicationInfoMap)
|
2023-03-07 17:33:08 +08:00
|
|
|
|
#endif // APPLICATIONPROPERTY_H
|